FairRoot/PandaRoot
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()
Int_t i
Definition: run_full.C:25
TFile * file
TClonesArray * fT
Definition: drawGLTracks.C:13
TTree * t
Definition: bump_analys.C:13