FairRoot/PandaRoot
Functions | Variables
runPULL.C File Reference

Go to the source code of this file.

Functions

gStyle SetOptFit (1)
 
gROOT LoadMacro ("$VMCWORKDIR/gconfig/basiclibs.C")
 
 basiclibs ()
 
gSystem Load ("libGeoBase")
 
gSystem Load ("libParBase")
 
gSystem Load ("libBase")
 
gSystem Load ("libField")
 
gSystem Load ("libPndData")
 
gSystem Load ("libGeane")
 
gSystem Load ("libPlane")
 
gSystem Load ("libGeaneExEmc")
 
gSystem Load ("libTrkBase")
 
simtree SetBranchAddress ("GeaneTrackFinal",&fTrackParFinal)
 
simtree SetBranchAddress ("GeaneTrackPar",&fTrackParGeane)
 
cout<< Nevents<< endl;for(Int_t
i=0;i< Nevents;i++){fTrackParGeane-> 
Delete ()
 
simtree GetEntry (i)
 
 for (Int_t k=0;k< fTrackParGeane->GetEntriesFast();k++)
 
c Divide (5, 2)
 
c cd (1)
 
h1 Draw ()
 
h1 Fit ("gaus")
 
c cd (2)
 
c cd (3)
 
c cd (4)
 
c cd (5)
 
c cd (6)
 
c cd (7)
 
c cd (8)
 
c cd (9)
 
c cd (10)
 
c cd ()
 

Variables

TFile * f =new TFile("geane.root")
 
TTree * simtree =f->Get("pndsim")
 
 fTrackParGeane = new TClonesArray("FairTrackParH")
 
 fTrackParIni = new TClonesArray("FairTrackParH")
 
 fTrackParFinal = new TClonesArray("FairTrackParH")
 
TH1F * h1 =new TH1F("h1","Phi ",100,-10.,10.)
 
TH1F * h2 =new TH1F("h2","Lambda",100,-10,10)
 
TH1F * h3 =new TH1F("h3","Qp",100,-10.,10.)
 
TH1F * h4 =new TH1F("h4","Y",100,-10,10)
 
TH1F * h5 =new TH1F("h5","Z",100,-10,10)
 
TH1F * h6 =new TH1F("h6","Px",100, -10,10)
 
TH1F * h7 =new TH1F("h7","Py",100,-10,10)
 
TH1F * h8 =new TH1F("h8","Pz",100,-10,10)
 
TH1F * h9 =new TH1F("h9","Ysc",100,-10,10)
 
TH1F * h10 =new TH1F("h10","Ysc",100,-10,10)
 
TH1F * h11 =new TH1F("h11","Zsc",100,-10,10)
 
TH2F * h101 =new TH2F("h101","X_MC vs X_GE",100,-100,100,100,-100,100)
 
TH2F * h102 =new TH2F("h102","Y_MC vs Y_GE",100,-100,100,100,-100,100)
 
TH2F * h103 =new TH2F("h103","Z_MC vs Z_GE",100,-150,250,100,-150,250)
 
TH2F * h201 =new TH2F("h201","PX_MC vs PX_GE",100,-2,2,100,-2,2)
 
TH2F * h202 =new TH2F("h202","PY_MC vs PY_GE",100,-2,2,100,-2,2)
 
TH2F * h203 =new TH2F("h203","PZ_MC vs PZ_GE",100,-2,2,100,-2,2)
 
FairTrackParH * fTrkF
 
FairTrackParH * fTrkG
 
Int_t Nevents = simtree->GetEntriesFast()
 
TCanvas * c =new TCanvas("c","c",900,600)
 

Function Documentation

basiclibs ( )
c cd ( )
c cd ( )
c cd ( )
c cd ( )
c cd ( )
c cd ( )
c cd ( )
c cd ( )
c cd ( )
c cd ( 10  )
c cd ( )
cout<<Nevents<<endl; for(Int_t i=0; i<Nevents; i++){ fTrackParGeane-> Delete ( )
c Divide ( ,
 
)
h1 Draw ( )

Definition at line 64 of file NHitsPerEvent.C.

References ExtractData(), gHitPoints, gProjections, mvdHitArray, and mvdProjectedArray.

64  {
65 
66  std::cout << "mvdHitArray: " << mvdHitArray->GetEntries() << " projectedHitArray " << mvdProjectedArray->GetEntries() << std::endl;
67 
68 // gHitPoints->Clear();
71  //if (gHitPoints->GetN() != x.size()) gHitPoints->Expand(x.size());
72 
73  std::cout << "NHits: " << gHitPoints->GetN() << std::endl;
74  gHitPoints->Draw("apl");
75  gProjections->Draw("pl");
76 }
void ExtractData(TClonesArray *array, TGraph *g)
Definition: NHitsPerEvent.C:78
TGraph * gHitPoints
Definition: NHitsPerEvent.C:15
TClonesArray * mvdHitArray
Definition: NHitsPerEvent.C:12
TClonesArray * mvdProjectedArray
Definition: NHitsPerEvent.C:13
TGraph * gProjections
Definition: NHitsPerEvent.C:16
h1 Fit ( "gaus"  )
for ( Int_t  k = 0; k<fTrackParGeane->GetEntriesFast(); k++)

Definition at line 57 of file runPULL.C.

References fTrackParFinal, and fTrackParGeane.

57  {
58  fTrkF = (FairTrackParH *)fTrackParFinal->At(k);
59  fTrkG = (FairTrackParH *)fTrackParGeane->At(k);
60  if(fTrkF &&fTrkG ){
61 
62  h101->Fill(fTrkF->GetX(),fTrkG->GetX());
63  h102->Fill(fTrkF->GetY(),fTrkG->GetY());
64  h103->Fill(fTrkF->GetZ(),fTrkG->GetZ());
65 
66  h201->Fill(fTrkF->GetPx(),fTrkG->GetPx());
67  h202->Fill(fTrkF->GetPy(),fTrkG->GetPy());
68  h203->Fill(fTrkF->GetPz(),fTrkG->GetPz());
69 
70  if(fTrkG->GetDPhi())h1->Fill((fTrkF->GetPhi()-fTrkG->GetPhi())/fTrkG->GetDPhi());
71  if(fTrkG->GetDLambda())h2->Fill((fTrkF->GetLambda()-fTrkG->GetLambda())/fTrkG->GetDLambda());
72  if(fTrkG->GetDQp())h3->Fill((fTrkF->GetQp()-fTrkG->GetQp())/fTrkG->GetDQp());
73  if(fTrkG->GetDY())h4->Fill((fTrkF->GetY() -fTrkG->GetY()) /fTrkG->GetDY());
74  if(fTrkG->GetDZ())h5->Fill((fTrkF->GetZ() -fTrkG->GetZ()) /fTrkG->GetDZ());
75  if(fTrkG->GetDPx())h6->Fill((fTrkF->GetPx()-fTrkG->GetPx())/fTrkG->GetDPx());
76  if(fTrkG->GetDPy())h7->Fill((fTrkF->GetPy()-fTrkG->GetPy())/fTrkG->GetDPy());
77  if(fTrkG->GetDPz())h8->Fill((fTrkF->GetPz()-fTrkG->GetPz())/fTrkG->GetDPz());
78  if(fTrkG->GetDY_sc())h9->Fill((fTrkF->GetY_sc()-fTrkG->GetY_sc())/fTrkG->GetDY_sc());
79  if(fTrkG->GetDY_sc())h10->Fill((fTrkF->GetY_sc()-fTrkG->GetY_sc())/fTrkG->GetDY_sc());
80  if(fTrkG->GetDZ_sc())h11->Fill((fTrkF->GetZ_sc()-fTrkG->GetZ_sc())/fTrkG->GetDZ_sc());
81  }
82  }
TH1F * h9
Definition: runPULL1.C:35
FairTrackParH * fTrkF
Definition: runPULL1.C:40
TH1F * h4
TH1F * h8
Definition: runPULL1.C:34
TH2F * h203
Definition: runPULL.C:45
fTrackParFinal
Definition: runPULL1.C:25
TH2F * h5
Definition: draw_bands.C:19
FairTrackParH * fTrkG
Definition: runPULL1.C:41
TH1F * h11
Definition: runPULL.C:37
TH2F * h101
Definition: runPULL.C:39
TH1F * h3
TH2F * h202
Definition: runPULL.C:44
fTrackParGeane
Definition: runPULL1.C:23
TH1F * h7
Definition: runPULL1.C:33
TH2F * h201
Definition: runPULL.C:43
TH1F * h6
Definition: runPULL1.C:32
TH2F * h103
Definition: runPULL.C:41
TH2F * h102
Definition: runPULL.C:40
simtree GetEntry ( i  )
gSystem Load ( "libGeoBase"  )
gSystem Load ( "libParBase"  )
gSystem Load ( "libBase"  )
gSystem Load ( "libField"  )
gSystem Load ( "libPndData"  )
gSystem Load ( "libGeane"  )
gSystem Load ( "libPlane"  )
gSystem Load ( "libGeaneExEmc"  )
gSystem Load ( "libTrkBase"  )
gROOT LoadMacro ( "$VMCWORKDIR/gconfig/basiclibs.C )
simtree SetBranchAddress ( "GeaneTrackFinal"  ,
fTrackParFinal 
)
simtree SetBranchAddress ( "GeaneTrackPar"  ,
fTrackParGeane 
)
gStyle SetOptFit ( )

Variable Documentation

TCanvas* c =new TCanvas("c","c",900,600)

Definition at line 84 of file runPULL.C.

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

Definition at line 20 of file runPULL.C.

fTrackParFinal = new TClonesArray("FairTrackParH")

Definition at line 25 of file runPULL.C.

fTrackParGeane = new TClonesArray("FairTrackParH")

Definition at line 23 of file runPULL.C.

fTrackParIni = new TClonesArray("FairTrackParH")

Definition at line 24 of file runPULL.C.

FairTrackParH* fTrkF

Definition at line 49 of file runPULL.C.

FairTrackParH* fTrkG

Definition at line 50 of file runPULL.C.

TH1F* h1 =new TH1F("h1","Phi ",100,-10.,10.)

Definition at line 27 of file runPULL.C.

TH1F* h10 =new TH1F("h10","Ysc",100,-10,10)

Definition at line 36 of file runPULL.C.

TH2F* h101 =new TH2F("h101","X_MC vs X_GE",100,-100,100,100,-100,100)

Definition at line 39 of file runPULL.C.

TH2F* h102 =new TH2F("h102","Y_MC vs Y_GE",100,-100,100,100,-100,100)

Definition at line 40 of file runPULL.C.

TH2F* h103 =new TH2F("h103","Z_MC vs Z_GE",100,-150,250,100,-150,250)

Definition at line 41 of file runPULL.C.

TH1F* h11 =new TH1F("h11","Zsc",100,-10,10)

Definition at line 37 of file runPULL.C.

TH1F* h2 =new TH1F("h2","Lambda",100,-10,10)

Definition at line 28 of file runPULL.C.

TH2F* h201 =new TH2F("h201","PX_MC vs PX_GE",100,-2,2,100,-2,2)

Definition at line 43 of file runPULL.C.

TH2F* h202 =new TH2F("h202","PY_MC vs PY_GE",100,-2,2,100,-2,2)

Definition at line 44 of file runPULL.C.

TH2F* h203 =new TH2F("h203","PZ_MC vs PZ_GE",100,-2,2,100,-2,2)

Definition at line 45 of file runPULL.C.

TH1F* h3 =new TH1F("h3","Qp",100,-10.,10.)

Definition at line 29 of file runPULL.C.

TH1F* h4 =new TH1F("h4","Y",100,-10,10)

Definition at line 30 of file runPULL.C.

TH1F* h5 =new TH1F("h5","Z",100,-10,10)

Definition at line 31 of file runPULL.C.

TH1F* h6 =new TH1F("h6","Px",100, -10,10)

Definition at line 32 of file runPULL.C.

TH1F* h7 =new TH1F("h7","Py",100,-10,10)

Definition at line 33 of file runPULL.C.

TH1F* h8 =new TH1F("h8","Pz",100,-10,10)

Definition at line 34 of file runPULL.C.

TH1F* h9 =new TH1F("h9","Ysc",100,-10,10)

Definition at line 35 of file runPULL.C.

Int_t Nevents = simtree->GetEntriesFast()

Definition at line 51 of file runPULL.C.

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

Definition at line 21 of file runPULL.C.