FairRoot/PandaRoot
Functions | Variables
runPULL1.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 ("libGeaneEx")
 
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("ex1g.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","Zsc",100,-10,10)
 
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 ( )
fTrackParFinal Delete ( )
c Divide ( ,
 
)
h1 Draw ( )

Definition at line 64 of file NHitsPerEvent.C.

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 48 of file runPULL1.C.

References fTrackParFinal, and fTrackParGeane.

48  {
49  fTrkF = (FairTrackParH *)fTrackParFinal->At(k);
50  fTrkG = (FairTrackParH *)fTrackParGeane->At(k);
51  if(fTrkF &&fTrkG ){
52  if(fTrkG->GetDPhi())h1->Fill((fTrkF->GetPhi()-fTrkG->GetPhi())/fTrkG->GetDPhi());
53  if(fTrkG->GetDLambda())h2->Fill((fTrkF->GetLambda()-fTrkG->GetLambda())/fTrkG->GetDLambda());
54  if(fTrkG->GetDQp())h3->Fill((fTrkF->GetQp()-fTrkG->GetQp())/fTrkG->GetDQp());
55  if(fTrkG->GetDY())h4->Fill((fTrkF->GetY() -fTrkG->GetY()) /fTrkG->GetDY());
56  if(fTrkG->GetDZ())h5->Fill((fTrkF->GetZ() -fTrkG->GetZ()) /fTrkG->GetDZ());
57  if(fTrkG->GetDPx())h6->Fill((fTrkF->GetPx()-fTrkG->GetPx())/fTrkG->GetDPx());
58  if(fTrkG->GetDPy())h7->Fill((fTrkF->GetPy()-fTrkG->GetPy())/fTrkG->GetDPy());
59  if(fTrkG->GetDPz())h8->Fill((fTrkF->GetPz()-fTrkG->GetPz())/fTrkG->GetDPz());
60  if(fTrkG->GetDY_sc())h9->Fill((fTrkF->GetY_sc()-fTrkG->GetY_sc())/fTrkG->GetDY_sc());
61  if(fTrkG->GetDZ_sc())h10->Fill((fTrkF->GetZ_sc()-fTrkG->GetZ_sc())/fTrkG->GetDZ_sc());
62  }
63  }
TH1F * h9
Definition: runPULL1.C:35
FairTrackParH * fTrkF
Definition: runPULL1.C:40
TH1F * h4
TH1F * h8
Definition: runPULL1.C:34
fTrackParFinal
Definition: runPULL1.C:25
TH2F * h5
Definition: draw_bands.C:19
FairTrackParH * fTrkG
Definition: runPULL1.C:41
TH1F * h3
fTrackParGeane
Definition: runPULL1.C:23
TH1F * h7
Definition: runPULL1.C:33
TH1F * h6
Definition: runPULL1.C:32
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 ( "libGeaneEx"  )
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 65 of file runPULL1.C.

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

Definition at line 20 of file runPULL1.C.

fTrackParFinal = new TClonesArray("FairTrackParH")

Definition at line 25 of file runPULL1.C.

Referenced by for().

fTrackParGeane = new TClonesArray("FairTrackParH")

Definition at line 23 of file runPULL1.C.

Referenced by for().

fTrackParIni = new TClonesArray("FairTrackParH")

Definition at line 24 of file runPULL1.C.

FairTrackParH* fTrkF

Definition at line 40 of file runPULL1.C.

FairTrackParH* fTrkG

Definition at line 41 of file runPULL1.C.

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

Definition at line 27 of file runPULL1.C.

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

Definition at line 36 of file runPULL1.C.

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

Definition at line 28 of file runPULL1.C.

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

Definition at line 29 of file runPULL1.C.

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

Definition at line 30 of file runPULL1.C.

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

Definition at line 31 of file runPULL1.C.

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

Definition at line 32 of file runPULL1.C.

Referenced by HypHitAnasigBg_AR(), and TrackHits().

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

Definition at line 33 of file runPULL1.C.

Referenced by HypHitAnasigBg_AR(), and TrackHits().

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

Definition at line 34 of file runPULL1.C.

Referenced by HypHitAnasigBg_AR(), and TrackHits().

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

Definition at line 35 of file runPULL1.C.

Referenced by HypHitAnasigBg_AR().

Int_t Nevents = simtree->GetEntriesFast()

Definition at line 42 of file runPULL1.C.

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

Definition at line 21 of file runPULL1.C.

Referenced by AnalyseSimFile(), histos_ca(), plot_pid(), and QA_histos().