75 #ifndef __RUN_ALICE_ESD_SPLIT__ 77 void alice_esd_split()
82 gROOT->LoadMacro(dir +
"SplitGLView.C+");
83 const char* esd_file_name =
"http://root.cern.ch/files/alice_ESDs.root";
97 gROOT->ProcessLine(
"#define __RUN_ALICE_ESD_SPLIT__ 1");
98 gROOT->ProcessLine(
"#include \"alice_esd_split.C\"");
99 gROOT->ProcessLine(
"run_alice_esd_split()");
100 gROOT->ProcessLine(
"#undef __RUN_ALICE_ESD_SPLIT__");
114 class AliExternalTrackParam;
118 void update_projections();
120 void alice_esd_read();
122 AliExternalTrackParam* tp=0);
124 void trackGetPos(AliExternalTrackParam* tp,
Double_t r[3]);
125 void trackGetMomentum(AliExternalTrackParam* tp,
Double_t p[3]);
126 Double_t trackGetP(AliExternalTrackParam* tp);
131 const char* esd_file_name =
"http://root.cern.ch/files/alice_ESDs.root";
132 const char* esd_friends_file_name =
"http://root.cern.ch/files/alice_ESDfriends.root";
133 const char* esd_geom_file_name =
"http://root.cern.ch/files/alice_ESDgeometry.root";
136 TFile *esd_friends_file = 0;
140 AliESDEvent *esd = 0;
141 AliESDfriend *esd_friend = 0;
143 Int_t esd_event_id = 0;
167 printf(
"*** Opening ESD ***\n");
168 esd_file =
TFile::Open(esd_file_name,
"CACHEREAD");
172 printf(
"*** Opening ESD-friends ***\n");
173 esd_friends_file =
TFile::Open(esd_friends_file_name,
"CACHEREAD");
174 if (!esd_friends_file)
177 esd_tree = (
TTree*) esd_file->
Get(
"esdTree");
183 TIter next(esd->fESDObjects);
185 while ((el=(
TNamed*)next()))
188 if(bname.CompareTo(
"AliESDfriend")==0)
191 esd_tree->
SetBranchAddress(
"ESDfriend.", esd->fESDObjects->GetObjectRef(el));
209 if (screen_ratio > 1.5) {
234 gRPhiMgr->ImportElements(gGeoShape);
240 gRhoZMgr->ImportElements(gGeoShape);
245 update_projections();
256 printf(
"Loading event %d.\n", esd_event_id);
258 gTextEntry->
SetText(
Form(
"Loading event %d...",esd_event_id));
270 gTextEntry->
SetText(
Form(
"Event %d loaded",esd_event_id));
271 gROOT->ProcessLine(
"SplitGLView::UpdateSummary()");
275 void update_projections()
281 if (gRPhiMgr && top) {
283 gRPhiMgr->ImportElements(gGeoShape);
284 gRPhiMgr->ImportElements(top);
286 if (gRhoZMgr && top) {
287 gRhoZMgr->DestroyElements();
288 gRhoZMgr->ImportElements(gGeoShape);
289 gRhoZMgr->ImportElements(top);
306 if (esd_event_id < esd_tree->GetEntries() - 1) {
309 update_projections();
312 gTextEntry->
SetText(
"Already at last event");
313 printf(
"Already at last event.\n");
318 if (esd_event_id > 0) {
321 update_projections();
324 gTextEntry->
SetText(
"Already at first event");
325 printf(
"Already at first event.\n");
335 gROOT->ProcessLine(
".L SplitGLView.C+");
340 browser->
ExecPlugin(
"SplitGLView", 0,
"new SplitGLView(gClient->GetRoot(), 600, 450, kTRUE)");
354 EvNavHandler *fh =
new EvNavHandler;
358 b->
Connect(
"Clicked()",
"EvNavHandler", fh,
"Bck()");
362 b->
Connect(
"Clicked()",
"EvNavHandler", fh,
"Fwd()");
390 kITSin=0x0001,kITSout=0x0002,kITSrefit=0x0004,kITSpid=0x0008,
391 kTPCin=0x0010,kTPCout=0x0020,kTPCrefit=0x0040,kTPCpid=0x0080,
392 kTRDin=0x0100,kTRDout=0x0200,kTRDrefit=0x0400,kTRDpid=0x0800,
393 kTOFin=0x1000,kTOFout=0x2000,kTOFrefit=0x4000,kTOFpid=0x8000,
403 void alice_esd_read()
407 AliESDRun *esdrun = (AliESDRun*) esd->fESDObjects->FindObject(
"AliESDRun");
414 if (track_list == 0) {
426 trkProp->
SetMagField( 0.1 * esdrun->fMagneticField );
432 AliESDtrack* at = (AliESDtrack*) tracks->
At(
n);
435 AliExternalTrackParam* tp = at;
436 if (! trackIsOn(at, kITSrefit)) {
440 TEveTrack* track = esd_make_track(trkProp,
n, at, tp);
460 AliExternalTrackParam* tp)
470 if (tp == 0) tp = at;
475 rt.
fSign = (tp->fP[4] > 0) ? 1 : -1;
477 trackGetPos(tp, vbuf); rt.
fV.
Set(vbuf);
478 trackGetMomentum(tp, pbuf); rt.
fP.
Set(pbuf);
497 return (t->fFlags & mask) > 0;
501 void trackGetPos(AliExternalTrackParam* tp,
Double_t r[3])
505 r[0] = tp->fX; r[1] = tp->
fP[0]; r[2] = tp->fP[1];
508 r[0] =
x*cs - r[1]*sn; r[1] =
x*sn + r[1]*cs;
512 void trackGetMomentum(AliExternalTrackParam* tp,
Double_t p[3])
516 p[0] = tp->fP[4]; p[1] = tp->fP[2]; p[2] = tp->fP[3];
521 p[0]=pt*(r*cs - p[1]*sn); p[1]=pt*(p[1]*cs + r*sn); p[2]=pt*p[2];
525 Double_t trackGetP(AliExternalTrackParam* tp)
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
virtual void StartEmbedding(Int_t pos=kRight, Int_t subpos=-1)
Start embedding external frame in the tab "pos" and tab element "subpos".
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
void Increment(Float_t inc)
Increment progress position.
virtual void SetBranchStatus(const char *bname, Bool_t status=1, UInt_t *found=0)
Set branch status to Process or DoNotProcess.
void Set(const Float_t *v)
virtual void SetName(const char *name)
Change (i.e.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
TEveBrowser * GetBrowser() const
TString & ReplaceAll(const TString &s1, const TString &s2)
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
void AddGlobalElement(TEveElement *element, TEveElement *parent=0)
Add a global element, i.e.
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
virtual void SetTextColor(Pixel_t color, Bool_t local=kTRUE)
Changes text color.
static Bool_t SetCacheFileDir(ROOT::Internal::TStringView cacheDir, Bool_t operateDisconnected=kTRUE, Bool_t forceCacheread=kFALSE)
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
Specialization of TRootBrowser for Eve.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
virtual const char * GetSoExt() const
Get the shared library extension.
void Redraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
virtual void SetMarkerColor(Color_t c)
Set marker color for the list and the elements.
TObject * At(Int_t idx) const
Axes for non-linear projections.
virtual Long_t ExecPlugin(const char *name=0, const char *fname=0, const char *cmd=0, Int_t pos=kRight, Int_t subpos=-1)
Execute a macro and embed the created frame in the tab "pos" and tab element "subpos".
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
virtual void SetBarColor(Pixel_t color)
Set progress bar color.
void AddElement(TEveElement *element, TEveElement *parent=0)
Add an element.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
virtual void SetMarkerStyle(Style_t s)
Set marker style for the list and the elements.
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Change branch address, dealing with clone trees properly.
virtual void MakeProject(const char *dirname, const char *classes="*", Option_t *option="new")
Generate source code necessary to access the objects stored in the file.
The TNamed class is the base class for all named ROOT classes.
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
A list of tracks supporting change of common attributes and selection based on track parameters...
virtual const char * Getenv(const char *env)
Get environment variable.
virtual void SetMainColor(Color_t c)
Set main (line) color for the list and the elements.
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
virtual void DestroyElements()
Destroy all children of this element.
virtual TList * GetUserInfo()
Return a pointer to the list containing user objects associated to this tree.
Manager class for steering of projections and managing projected objects.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
R__EXTERN TSystem * gSystem
void SetTabTitle(const char *title, Int_t pos=kRight, Int_t subpos=-1)
Set text "title" of Tab "subpos" in TGTab "pos".
R__EXTERN TEveManager * gEve
TEveSceneList * GetScenes() const
Int_t GetEntriesFast() const
char * Form(const char *fmt,...)
TEveTrackPropagator * GetPropagator()
virtual void ShowCloseTab(Bool_t show)
virtual void AddElement(TEveElement *el)
Add el to the list of children.
Holding structure for a number of track rendering parameters.
void ShowPosition(Bool_t set=kTRUE, Bool_t percent=kTRUE, const char *format="%.2f")
Show postion text, either in percent or formatted according format.
Visual representation of a track.
virtual void Move(Int_t x, Int_t y)
Move frame.
void SetEnabled(Bool_t flag=kTRUE)
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
virtual void SetMarkerSize(Size_t s)
Set marker size for the list and the elements.
virtual void StopEmbedding(const char *name=0)
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
void SetMagField(Double_t bX, Double_t bY, Double_t bZ)
Set constant magnetic field and rebuild tracks.
Mother of all ROOT objects.
virtual void Reset()
Reset progress bar (i.e. set pos to 0).
An array of clone (identical) objects.
TEveEventManager * GetCurrentEvent() const
Wrapper for TGeoShape with absolute positioning and color attributes allowing display of extracted TG...
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
void MakeTracks(Bool_t recurse=kTRUE)
Regenerate the visual representations of tracks.
virtual void SetStdTitle()
Set standard track title based on most data-member values.
A TTree object has a header with a name and a title.
void SetAttLineAttMarker(TEveTrackList *tl)
Set line and marker attributes from TEveTrackList.
TEveElement * FindChild(const TString &name, const TClass *cls=0)
Find the first child with given name.
Double_t Sqrt(Double_t x)
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line...
virtual const char * GetName() const
Returns name of object.
static TEveGeoShape * ImportShapeExtract(TEveGeoShapeExtract *gse, TEveElement *parent=0)
Import a shape extract 'gse' under element 'parent'.
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
virtual void Close(Option_t *option="")
Close a file.