Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
run_alice_esd.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_eve
3/// Complex example showing ALICE ESD track visualization.
4///
5/// alice_esd.C - a simple event-display for ALICE ESD tracks and clusters
6///
7///
8/// Only standard ROOT is used to process the ALICE ESD files.
9///
10/// No ALICE code is needed, only four simple coordinate-transformation
11/// functions declared in this macro.
12///
13/// A simple geometry of 10KB, extracted from the full TGeo-geometry, is
14/// used to outline the central detectors of ALICE.
15///
16/// All files are access from the web by using the "CACHEREAD" option.
17///
18///
19/// ### Automatic building of ALICE ESD class declarations and dictionaries.
20///
21/// ALICE ESD is a TTree containing tracks and other event-related
22/// information with one entry per event. All these classes are part of
23/// the AliROOT offline framework and are not available to standard
24/// ROOT.
25///
26/// To be able to access the event data in a natural way, by using
27/// data-members of classes and object containers, the header files and
28/// class dictionaries are automatically generated from the
29/// TStreamerInfo classes stored in the ESD file by using the
30/// TFile::MakeProject() function. The header files and a shared library
31/// is created in the aliesd/ directory and can be loaded dynamically
32/// into the ROOT session.
33///
34/// See the run_alice_esd.C macro.
35///
36///
37/// ### Creation of simple GUI for event navigation.
38///
39/// Most common use of the event-display is to browse through a
40/// collection of events. Thus a simple GUI allowing this is created in
41/// the function make_gui().
42///
43/// Eve uses the configurable ROOT-browser as its main window and so we
44/// create an extra tab in the left working area of the browser and
45/// provide backward/forward buttons.
46///
47///
48/// ### Event-navigation functions.
49///
50/// As this is a simple macro, we store the information about the
51/// current event in the global variable 'Int_t esd_event_id'. The
52/// functions for event-navigation simply modify this variable and call
53/// the load_event() function which does the following:
54/// 1. drop the old visualization objects;
55/// 2. retrieve given event from the ESD tree;
56/// 3. call alice_esd_read() function to create visualization objects
57/// for the new event.
58///
59///
60/// ### Reading of ALICE data and creation of visualization objects.
61///
62/// This is performed in alice_esd_read() function, with the following
63/// steps:
64/// 1. create the track container object - TEveTrackList;
65/// 2. iterate over the ESD tracks, create TEveTrack objects and append
66/// them to the container;
67/// 3. instruct the container to extrapolate the tracks and set their
68/// visual attributes.
69///
70/// \image html eve_alice_esd.png
71/// \macro_code
72///
73/// \author Matevz Tadel
74
75#include "MultiView.C"
77
78// Forward declarations.
79
80#include "aliesd/AliESDEvent.h"
81#include "aliesd/AliESDfriend.h"
82#include "aliesd/AliESDtrack.h"
83#include "aliesd/AliESDRun.h"
84
85class AliExternalTrackParam;
86
87void make_gui();
88void load_event();
89
90void alice_esd_read();
91TEveTrack* esd_make_track(TEveTrackPropagator* trkProp, Int_t index,
92 AliESDtrack* at,
93 AliExternalTrackParam* tp=0);
94Bool_t trackIsOn(AliESDtrack* t, Int_t mask);
95void trackGetPos(AliExternalTrackParam* tp, Double_t r[3]);
96void trackGetMomentum(AliExternalTrackParam* tp, Double_t p[3]);
97Double_t trackGetP(AliExternalTrackParam* tp);
98
99
100// Configuration and global variables.
101
102const char* esd_file_name = "http://root.cern.ch/files/alice_ESDs.root";
103// Temporarily disable reading of ESD friend.
104// There seems to be no way to get it working without AliRoot.
105// const char* esd_friends_file_name =
106// "http://root.cern.ch/files/alice_ESDfriends.root";
107const char* esd_friends_file_name = nullptr;
108
109const char* esd_geom_file_name =
110 "http://root.cern.ch/files/alice_ESDgeometry.root";
111
112// For testing
113// const char* esd_file_name = "AliESDs.root";
114// const char* esd_friends_file_name = "AliESDfriends.root";
115
116TFile *esd_file = nullptr;
117TFile *esd_friends_file = nullptr;
118
119TTree *esd_tree = nullptr;
120
121AliESDEvent *esd = nullptr;
122TList *esd_objs = nullptr;
123AliESDfriend *esd_friend = nullptr;
124
125Int_t esd_event_id = 0; // Current event id.
126
127TEveTrackList *gTrackList = nullptr;
128
129TEveGeoShape *gGeomGentle = nullptr;
130
131// Implemented in MultiView.C
132MultiView *gMultiView = nullptr;
133
134/******************************************************************************/
135// Initialization and steering functions
136/******************************************************************************/
137
138//______________________________________________________________________________
139void run_alice_esd()
140{
141 // Main function, initializes the application.
142 //
143 // 1. Load the auto-generated library holding ESD classes and
144 // ESD dictionaries.
145 // 2. Open ESD data-files.
146 // 3. Load cartoon geometry.
147 // 4. Spawn simple GUI.
148 // 5. Load first event.
149
150 const TString weh("alice_esd()");
151
153
154 printf("*** Opening ESD ***\n");
155 esd_file = TFile::Open(esd_file_name, "CACHEREAD");
156 if (!esd_file)
157 return;
158
159 esd_tree = (TTree*) esd_file->Get("esdTree");
160 esd = (AliESDEvent*) esd_tree->GetUserInfo()->FindObject("AliESDEvent");
161 esd_objs = esd->fESDObjects;
162
163 if (esd_friends_file_name != 0)
164 {
165 printf("*** Opening ESD-friends ***\n");
166 esd_friends_file = TFile::Open(esd_friends_file_name, "CACHEREAD");
167 if (!esd_friends_file)
168 return;
169
170 esd_tree->SetBranchStatus ("ESDfriend*", 1);
171 }
172
173 // Set the branch addresses.
174 {
175 TIter next(esd_objs);
176 TObject *el;
177 while ((el = (TNamed*)next()))
178 {
179 TString bname(el->GetName());
180 if (bname == "AliESDfriend")
181 {
182 // AliESDfriend needs special treatment.
183 TBranch *br = esd_tree->GetBranch("ESDfriend.");
184 br->SetAddress(esd_objs->GetObjectRef(el));
185 }
186 else
187 {
188 TBranch *br = esd_tree->GetBranch(bname);
189 if (br)
190 {
191 br->SetAddress(esd_objs->GetObjectRef(el));
192 }
193 else
194 {
195 br = esd_tree->GetBranch(bname + ".");
196 if (br)
197 {
198 br->SetAddress(esd_objs->GetObjectRef(el));
199 }
200 else
201 {
202 Warning("AliESDEvent::ReadFromTree() "
203 "No Branch found with Name '%s' or '%s.'.",
204 bname.Data(),bname.Data());
205 }
206 }
207 }
208 }
209 }
210
211
213
214 { // Simple geometry
215 TFile* geom = TFile::Open(esd_geom_file_name, "CACHEREAD");
216 if (!geom)
217 return;
218 TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) geom->Get("Gentle");
219 gGeomGentle = TEveGeoShape::ImportShapeExtract(gse, 0);
220 geom->Close();
221 delete geom;
222 gEve->AddGlobalElement(gGeomGentle);
223 }
224
225
226 // Standard multi-view
227 //=====================
228
229 gMultiView = new MultiView;
230
231 gMultiView->ImportGeomRPhi(gGeomGentle);
232 gMultiView->ImportGeomRhoZ(gGeomGentle);
233
234
235 // HTML summary view
236 //===================
237
238 fgHtmlSummary = new HtmlSummary("Alice Event Display Summary Table");
240 fgHtml = new TGHtml(0, 100, 100);
241 TEveWindowFrame *wf = slot->MakeFrame(fgHtml);
242 fgHtml->MapSubwindows();
243 wf->SetElementName("Summary");
244
245
246 // Final stuff
247 //=============
248
250
251 make_gui();
252
253 load_event();
254
255 gEve->Redraw3D(kTRUE); // Reset camera after the first event has been shown.
256}
257
258//______________________________________________________________________________
259void load_event()
260{
261 // Load event specified in global esd_event_id.
262 // The contents of previous event are removed.
263
264 printf("Loading event %d.\n", esd_event_id);
265
267
268 if (gTrackList)
269 gTrackList->DestroyElements();
270
271 esd_tree->GetEntry(esd_event_id);
272 // esd_tree->Show();
273
274 alice_esd_read();
275
277
278 gMultiView->DestroyEventRPhi();
279 gMultiView->ImportEventRPhi(top);
280
281 gMultiView->DestroyEventRhoZ();
282 gMultiView->ImportEventRhoZ(top);
283
284 update_html_summary();
285
287}
288
289
290/******************************************************************************/
291// GUI
292/******************************************************************************/
293
294//______________________________________________________________________________
295//
296// EvNavHandler class is needed to connect GUI signals.
297
298class EvNavHandler
299{
300public:
301 void Fwd()
302 {
303 if (esd_event_id < esd_tree->GetEntries() - 1) {
304 ++esd_event_id;
305 load_event();
306 } else {
307 printf("Already at last event.\n");
308 }
309 }
310 void Bck()
311 {
312 if (esd_event_id > 0) {
313 --esd_event_id;
314 load_event();
315 } else {
316 printf("Already at first event.\n");
317 }
318 }
319};
320
321//______________________________________________________________________________
322void make_gui()
323{
324 // Create minimal GUI for event navigation.
325
326 TEveBrowser* browser = gEve->GetBrowser();
328
329 TGMainFrame* frmMain = new TGMainFrame(gClient->GetRoot(), 1000, 600);
330 frmMain->SetWindowName("XX GUI");
331 frmMain->SetCleanup(kDeepCleanup);
332
333 TGHorizontalFrame* hf = new TGHorizontalFrame(frmMain);
334 {
335
336 TString icondir( Form("%s/icons/", gSystem->Getenv("ROOTSYS")) );
337 TGPictureButton* b = 0;
338 EvNavHandler *fh = new EvNavHandler;
339
340 b = new TGPictureButton(hf, gClient->GetPicture(icondir+"GoBack.gif"));
341 hf->AddFrame(b);
342 b->Connect("Clicked()", "EvNavHandler", fh, "Bck()");
343
344 b = new TGPictureButton(hf, gClient->GetPicture(icondir+"GoForward.gif"));
345 hf->AddFrame(b);
346 b->Connect("Clicked()", "EvNavHandler", fh, "Fwd()");
347 }
348 frmMain->AddFrame(hf);
349
350 frmMain->MapSubwindows();
351 frmMain->Resize();
352 frmMain->MapWindow();
353
354 browser->StopEmbedding();
355 browser->SetTabTitle("Event Control", 0);
356}
357
358
359/******************************************************************************/
360// Code for reading AliESD and creating visualization objects
361/******************************************************************************/
362
363enum ESDTrackFlags {
364 kITSin=0x0001,kITSout=0x0002,kITSrefit=0x0004,kITSpid=0x0008,
365 kTPCin=0x0010,kTPCout=0x0020,kTPCrefit=0x0040,kTPCpid=0x0080,
366 kTRDin=0x0100,kTRDout=0x0200,kTRDrefit=0x0400,kTRDpid=0x0800,
367 kTOFin=0x1000,kTOFout=0x2000,kTOFrefit=0x4000,kTOFpid=0x8000,
368 kHMPIDpid=0x20000,
369 kEMCALmatch=0x40000,
370 kTRDbackup=0x80000,
371 kTRDStop=0x20000000,
372 kESDpid=0x40000000,
373 kTIME=0x80000000
374};
375
376//______________________________________________________________________________
377void alice_esd_read()
378{
379 // Read tracks and associated clusters from current event.
380
381 AliESDRun *esdrun = (AliESDRun*) esd_objs->FindObject("AliESDRun");
382 TClonesArray *tracks = (TClonesArray*) esd_objs->FindObject("Tracks");
383
384 // This needs further investigation. Clusters not shown.
385 // esd_friend = (AliESDfriend*) esd_objs->FindObject("AliESDfriend");
386 // printf("Friend %p, n_tracks:%d\n",
387 // esd_friend,
388 // esd_friend->fTracks.GetEntries());
389
390 if (gTrackList == 0)
391 {
392 gTrackList = new TEveTrackList("ESD Tracks");
393 gTrackList->SetMainColor(6);
394 gTrackList->SetMarkerColor(kYellow);
395 gTrackList->SetMarkerStyle(4);
396 gTrackList->SetMarkerSize(0.5);
397
398 gEve->AddElement(gTrackList);
399 }
400
401 TEveTrackPropagator* trkProp = gTrackList->GetPropagator();
402 trkProp->SetMagField( 0.1 * esdrun->fMagneticField ); // kGaus to Tesla
403
404 for (Int_t n=0; n<tracks->GetEntriesFast(); ++n)
405 {
406 AliESDtrack* at = (AliESDtrack*) tracks->At(n);
407
408 // If ITS refit failed, take track parameters at inner TPC radius.
409 AliExternalTrackParam* tp = at;
410 if (! trackIsOn(at, kITSrefit)) {
411 tp = at->fIp;
412 }
413
414 TEveTrack* track = esd_make_track(trkProp, n, at, tp);
415 track->SetAttLineAttMarker(gTrackList);
416 gTrackList->AddElement(track);
417
418 // This needs further investigation. Clusters not shown.
419 // if (frnd)
420 // {
421 // AliESDfriendTrack* ft = (AliESDfriendTrack*) frnd->fTracks->At(n);
422 // printf("%d friend = %p\n", ft);
423 // }
424 }
425
426 gTrackList->MakeTracks();
427}
428
429//______________________________________________________________________________
430TEveTrack* esd_make_track(TEveTrackPropagator* trkProp,
431 Int_t index,
432 AliESDtrack* at,
433 AliExternalTrackParam* tp)
434{
435 // Helper function creating TEveTrack from AliESDtrack.
436 //
437 // Optionally specific track-parameters (e.g. at TPC entry point)
438 // can be specified via the tp argument.
439
440 Double_t pbuf[3], vbuf[3];
441 TEveRecTrack rt;
442
443 if (tp == 0) tp = at;
444
445 rt.fLabel = at->fLabel;
446 rt.fIndex = index;
447 rt.fStatus = (Int_t) at->fFlags;
448 rt.fSign = (tp->fP[4] > 0) ? 1 : -1;
449
450 trackGetPos(tp, vbuf); rt.fV.Set(vbuf);
451 trackGetMomentum(tp, pbuf); rt.fP.Set(pbuf);
452
453 Double_t ep = trackGetP(at);
454 Double_t mc = 0.138; // at->GetMass(); - Complicated function, requiring PID.
455
456 rt.fBeta = ep/TMath::Sqrt(ep*ep + mc*mc);
457
458 TEveTrack* track = new TEveTrack(&rt, trkProp);
459 track->SetName(Form("TEveTrack %d", rt.fIndex));
460 track->SetStdTitle();
461
462 return track;
463}
464
465//______________________________________________________________________________
466Bool_t trackIsOn(AliESDtrack* t, Int_t mask)
467{
468 // Check is track-flag specified by mask are set.
469
470 return (t->fFlags & mask) > 0;
471}
472
473//______________________________________________________________________________
474void trackGetPos(AliExternalTrackParam* tp, Double_t r[3])
475{
476 // Get global position of starting point of tp.
477
478 r[0] = tp->fX; r[1] = tp->fP[0]; r[2] = tp->fP[1];
479
480 Double_t cs=TMath::Cos(tp->fAlpha), sn=TMath::Sin(tp->fAlpha), x=r[0];
481 r[0] = x*cs - r[1]*sn; r[1] = x*sn + r[1]*cs;
482}
483
484//______________________________________________________________________________
485void trackGetMomentum(AliExternalTrackParam* tp, Double_t p[3])
486{
487 // Return global momentum vector of starting point of tp.
488
489 p[0] = tp->fP[4]; p[1] = tp->fP[2]; p[2] = tp->fP[3];
490
491 Double_t pt=1./TMath::Abs(p[0]);
492 Double_t cs=TMath::Cos(tp->fAlpha), sn=TMath::Sin(tp->fAlpha);
493 Double_t r=TMath::Sqrt(1 - p[1]*p[1]);
494 p[0]=pt*(r*cs - p[1]*sn); p[1]=pt*(p[1]*cs + r*sn); p[2]=pt*p[2];
495}
496
497//______________________________________________________________________________
498Double_t trackGetP(AliExternalTrackParam* tp)
499{
500 // Return magnitude of momentum of tp.
501
502 return TMath::Sqrt(1.+ tp->fP[3]*tp->fP[3])/TMath::Abs(tp->fP[4]);
503}
Multi-view (3d, rphi, rhoz) service class using EVE Window Manager.
#define b(i)
Definition RSha256.hxx:100
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
double Double_t
Definition RtypesCore.h:59
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
@ kYellow
Definition Rtypes.h:66
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
Definition TError.cxx:229
R__EXTERN TEveManager * gEve
#define gClient
Definition TGClient.h:156
@ kDeepCleanup
Definition TGFrame.h:42
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t mask
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Definition TString.cxx:2489
R__EXTERN TSystem * gSystem
Definition TSystem.h:555
Html table and event summary for alice_esd.C.
A TTree is a list of TBranches.
Definition TBranch.h:93
virtual void SetAddress(void *add)
Set address of this branch.
Definition TBranch.cxx:2682
An array of clone (identical) objects.
TObject * Get(const char *namecycle) override
Return pointer to object identified by namecycle.
Specialization of TRootBrowser for Eve.
void SetElementName(const char *name) override
Virtual function for setting of name of an element.
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition TEveElement.h:36
virtual void AddElement(TEveElement *el)
Add el to the list of children.
virtual void DestroyElements()
Destroy all children of this element.
Globally positioned TGeoShape with rendering attributes and an optional list of daughter shape-extrac...
Wrapper for TGeoShape with absolute positioning and color attributes allowing display of extracted TG...
static TEveGeoShape * ImportShapeExtract(TEveGeoShapeExtract *gse, TEveElement *parent=nullptr)
Import a shape extract 'gse' under element 'parent'.
void AddElement(TEveElement *element, TEveElement *parent=nullptr)
Add an element.
void AddGlobalElement(TEveElement *element, TEveElement *parent=nullptr)
Add a global element, i.e.
TEveViewerList * GetViewers() const
TEveBrowser * GetBrowser() const
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
void Redraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
TEveEventManager * GetCurrentEvent() const
TEveVectorT< TT > fP
TEveVectorT< TT > fV
A list of tracks supporting change of common attributes and selection based on track parameters.
Definition TEveTrack.h:140
void SetMarkerStyle(Style_t s) override
Set marker style for the list and the elements.
void SetMarkerColor(Color_t c) override
Set marker color for the list and the elements.
void SetMainColor(Color_t c) override
Set main (line) color for the list and the elements.
void SetMarkerSize(Size_t s) override
Set marker size for the list and the elements.
void MakeTracks(Bool_t recurse=kTRUE)
Regenerate the visual representations of tracks.
TEveTrackPropagator * GetPropagator()
Definition TEveTrack.h:175
Holding structure for a number of track rendering parameters.
void SetMagField(Double_t bX, Double_t bY, Double_t bZ)
Set constant magnetic field and rebuild tracks.
Visual representation of a track.
Definition TEveTrack.h:33
void SetAttLineAttMarker(TEveTrackList *tl)
Set line and marker attributes from TEveTrackList.
virtual void SetStdTitle()
Set standard track title based on most data-member values.
void Set(const Float_t *v)
Definition TEveVector.h:82
void DeleteAnnotations()
Delete annotations from all viewers.
Encapsulates TGFrame into an eve-window.
Definition TEveWindow.h:336
static TEveWindowSlot * CreateWindowInTab(TGTab *tab, TEveWindow *eve_parent=nullptr)
Create a new tab in a given tab-widget and populate it with a default window-slot.
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
Definition TFile.h:53
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
Definition TFile.cxx:4089
static Bool_t SetCacheFileDir(std::string_view cacheDir, Bool_t operateDisconnected=kTRUE, Bool_t forceCacheread=kFALSE)
Sets the directory where to locally stage/cache remote files.
Definition TFile.cxx:4626
void Close(Option_t *option="") override
Close a file.
Definition TFile.cxx:950
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1117
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
Definition TGFrame.cxx:1164
void SetCleanup(Int_t mode=kLocalCleanup) override
Turn on automatic cleanup of child frames in dtor.
Definition TGFrame.cxx:1072
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:605
void MapWindow() override
map window
Definition TGFrame.h:204
A composite frame that layout their children in horizontal way.
Definition TGFrame.h:385
The ROOT HTML widget.
Definition TGHtml.h:873
Defines top level windows that interact with the system Window Manager.
Definition TGFrame.h:397
void SetWindowName(const char *name=nullptr) override
Set window name. This is typically done via the window manager.
Definition TGFrame.cxx:1788
Yield an action as soon as it is clicked.
Definition TGButton.h:228
virtual Bool_t SetTab(Int_t tabIndex, Bool_t emit=kTRUE)
Brings the composite frame with the index tabIndex to the front and generate the following event if t...
Definition TGTab.cxx:558
A doubly linked list.
Definition TList.h:38
TObject ** GetObjectRef(const TObject *obj) const override
Return address of pointer to obj.
Definition TList.cxx:669
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
Definition TList.cxx:576
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
Mother of all ROOT objects.
Definition TObject.h:41
virtual const char * GetName() const
Returns name of object.
Definition TObject.cxx:439
SCoord_t fX
Definition TPoint.h:35
virtual void SetName(const char *name)
Change (i.e.
void StartEmbedding(Int_t pos=kRight, Int_t subpos=-1) override
Start embedding external frame in the tab "pos" and tab element "subpos".
void SetTabTitle(const char *title, Int_t pos=kRight, Int_t subpos=-1)
Set text "title" of Tab "subpos" in TGTab "pos".
void StopEmbedding(const char *name=nullptr) override
TGTab * GetTabRight() const
Basic string class.
Definition TString.h:139
virtual const char * Getenv(const char *env)
Get environment variable.
Definition TSystem.cxx:1665
A TTree represents a columnar dataset.
Definition TTree.h:79
virtual void SetBranchStatus(const char *bname, bool status=true, UInt_t *found=nullptr)
Set branch status to Process or DoNotProcess.
Definition TTree.cxx:8529
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch with the given name in this tree or its friends.
Definition TTree.cxx:5294
virtual Int_t GetEntry(Long64_t entry, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
Definition TTree.cxx:5638
virtual TList * GetUserInfo()
Return a pointer to the list containing user objects associated to this tree.
Definition TTree.cxx:6356
TPaveText * pt
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
Double_t Sqrt(Double_t x)
Returns the square root of x.
Definition TMath.h:662
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Definition TMath.h:594
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Definition TMath.h:588
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
Definition TMathBase.h:123
void tracks()
Definition tracks.C:49