FairRoot/PandaRoot
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
tutorials
geane
GeaneExEmc
macro
drawTracks.C
Go to the documentation of this file.
1
{
2
gROOT->LoadMacro(
"$VMCWORKDIR/gconfig/basiclibs.C"
);
3
basiclibs
();
4
5
gSystem->Load(
"libGeoBase"
);
6
gSystem->Load(
"libParBase"
);
7
gSystem->Load(
"libBase"
);
8
gSystem->Load(
"libPndData"
);
9
gSystem->Load(
"libField"
);
10
gSystem->Load(
"libPassive"
);
11
gSystem->Load(
"libGen"
);
12
gSystem->Load(
"libGeom.so"
);
13
14
gSystem->Load(
"libEmc"
);
15
gSystem->Load(
"libStt"
);
16
gSystem->Load(
"libMuo"
);
17
gSystem->Load(
"libEmc"
);
18
gSystem->Load(
"libTof"
);
19
gSystem->Load(
"libDrcProp"
);
20
gSystem->Load(
"libDrc"
);
21
gSystem->Load(
"libtpc"
);
22
gSystem->Load(
"libMvd"
);
23
gSystem->Load(
"libTrkBase"
);
24
25
26
TFile*
file
=
new
TFile(
"mc.root"
);
27
28
//drawing tracks
29
TTree *
t
=file->Get(
"pndsim"
) ;
30
31
TClonesArray *
fT
=
new
TClonesArray(
"TGeoTrack"
);
32
33
t->SetBranchAddress(
"GeoTracks"
,&fT) ;
34
35
36
TGeoTrack *
tr
;
37
//TObjArray *TrList= geoMan->GetListOfTracks();
38
for
(Int_t j=0; j< t->GetEntriesFast(); j++) {
39
t->GetEntry(j);
40
for
(Int_t
i
=0;
i
<fT->GetEntriesFast();
i
++) {
41
tr=(TGeoTrack *)fT->At(
i
);
42
tr->Draw(
"same"
);
// uncommit this to draw the tracks one by on
43
// TrList->AddLast(tr);
44
}
45
}
46
47
// geoMan->AnimateTracks(0,1E-7, 500,"/G"); // uncommit this to animate the tracks
48
49
// geoMan->DrawTracks("same"); // this will draw all tracks added to the TrList at once
50
51
}
52
basiclibs
basiclibs()
i
Int_t i
Definition:
run_full.C:25
file
TFile * file
Definition:
drc/old/draw_geom.C:12
fT
TClonesArray * fT
Definition:
drawGLTracks.C:13
tr
Double_t tr
Definition:
createRootGeoFileBwEnd_FwEndCapGeo.C:19
t
TTree * t
Definition:
bump_analys.C:13
Generated on Wed Apr 3 2019 08:43:50 for FairRoot/PandaRoot by
1.8.5