FairRoot/PandaRoot
Functions | Variables
drawGLTracks.C File Reference

Go to the source code of this file.

Functions

gSystem Load ("libEnDrc")
 
t SetBranchAddress ("GeoTracks",&fT)
 
c1 SetFillColor (10)
 
geoMan GetTopVolume () -> Draw("ogl")
 
geoMan SetAnimateTracks ()
 
 for (Int_t j=0;j< t->GetEntriesFast();j++)
 

Variables

TFile * f = new TFile("testsimu10.root")
 
TTree * t =f->Get("pndsim")
 
TClonesArray * fT =new TClonesArray("TGeoTrack")
 
TGeoManager * geoMan = (TGeoManager*) f->Get("FAIRGeom")
 
TCanvas * c1 = new TCanvas("glcanvas", "openGL", 100, 100, 800, 800)
 
TGeoTrack * tr
 
TObjArray * TrList = geoMan->GetListOfTracks()
 

Function Documentation

for ( Int_t  j = 0; j< t->GetEntriesFast(); j++)

Definition at line 28 of file drawGLTracks.C.

References Double_t, i, n, point, and pt().

28  {
29  t->GetEntry(j);
30  Double_t *point;
31  for (Int_t i=0; i<fT->GetEntriesFast(); i++) {
32  tr=(TGeoTrack *)fT->At(i);
33  Int_t Np=tr->GetNpoints();
34  FairVTrack *pt = new FairVTrack(Np);
35  pt->SetLineColor(tr->GetLineColor());
36  pt->SetLineWidth(2);
37  pt->SetTrack(tr);
38  pt->SetParticle((TParticle *)tr->GetParticle());
39  for (Int_t n=0; n<Np; n++){
40  point=tr->GetPoint(n);
41  pt->SetPoint(n,point[0],point[1],point[2]);
42  }
43  pt->Draw();
44  }
45  }
TGeoTrack * tr
Definition: drawGLTracks.C:25
Int_t i
Definition: run_full.C:25
TClonesArray * fT
Definition: drawGLTracks.C:13
TTree * t
Definition: drawGLTracks.C:12
int n
TString pt(TString pts, TString exts="px py pz")
Definition: invexp.C:133
Double_t
TClonesArray * point
Definition: anaLmdDigi.C:29
geoMan GetTopVolume ( ) -> Draw("ogl")
gSystem Load ( "libEnDrc"  )
geoMan SetAnimateTracks ( )
t SetBranchAddress ( "GeoTracks"  ,
fT 
)
c1 SetFillColor ( 10  )

Variable Documentation

TCanvas* c1 = new TCanvas("glcanvas", "openGL", 100, 100, 800, 800)

Definition at line 18 of file drawGLTracks.C.

TFile* f = new TFile("testsimu10.root")

Definition at line 10 of file drawGLTracks.C.

TClonesArray* fT =new TClonesArray("TGeoTrack")
TGeoManager* geoMan = (TGeoManager*) f->Get("FAIRGeom")

Definition at line 17 of file drawGLTracks.C.

TTree* t =f->Get("pndsim")

Definition at line 12 of file drawGLTracks.C.

TGeoTrack* tr

Definition at line 25 of file drawGLTracks.C.

TObjArray* TrList = geoMan->GetListOfTracks()

Definition at line 26 of file drawGLTracks.C.