FairRoot/PandaRoot
Functions | Variables
runPULL2.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)
 
 for (Int_t i=0;i< Nevents;i++)
 
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("ex2g.root")
 
TTree * simtree =f->Get("pndsim")
 
 fTrackParGeane = new TClonesArray("FairTrackParP")
 
 fTrackParIni = new TClonesArray("FairTrackParP")
 
 fTrackParFinal = new TClonesArray("FairTrackParP")
 
TH1F * h1 =new TH1F("h1","V ",100,-10.,10.)
 
TH1F * h2 =new TH1F("h2","W",100,-10,10)
 
TH1F * h3 =new TH1F("h3","TV",100,-10,10)
 
TH1F * h4 =new TH1F("h4","TW",100,-10,10)
 
TH1F * h5 =new TH1F("h5","Qp",100,-10,10)
 
TH1F * h6 =new TH1F("h6","Y",100, -10,10)
 
TH1F * h7 =new TH1F("h7","Z",100,-10,10)
 
TH1F * h8 =new TH1F("h8","Px",100,-10,10)
 
TH1F * h9 =new TH1F("h9","Py",100,-10,10)
 
TH1F * h10 =new TH1F("h10","Pz",100,-10,10)
 
FairTrackParP * fTrkF
 
FairTrackParP * 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 ( )
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 ( )

Definition at line 44 of file runPULL2.C.

References cemc, cluster_energy, digi, digi_ene, PndEmcCluster::DigiList(), Double_t, PndEmcCluster::energy(), fTrackParFinal, fTrackParGeane, PndMCTrack::Get4Momentum(), PndEmcHit::GetCopy(), PndEmcDigi::GetCopy(), PndEmcHit::GetCrystal(), PndEmcDigi::GetCrystal(), PndEmcDigi::GetDetectorId(), PndEmcHit::GetEnergy(), PndEmcDigi::GetEnergy(), PndEmcHit::GetModule(), PndEmcDigi::GetModule(), PndMCTrack::GetMomentum(), PndEmcDigi::GetPhi(), PndEmcDigi::GetPhiInt(), PndEmcHit::GetRow(), PndEmcDigi::GetRow(), PndEmcDigi::GetTheta(), PndEmcDigi::GetThetaInt(), PndEmcHit::GetXPad(), PndEmcDigi::GetXPad(), PndEmcHit::GetYPad(), PndEmcDigi::GetYPad(), hit(), hit_ene, i, mctrack, nhits, Pi, PndEmcCluster::where(), PndEmcDigi::where(), and PndEmcCluster::z().

44  {
45  fTrackParGeane->Delete();
46  fTrackParFinal->Delete();
47  simtree->GetEntry(i);
48  for (Int_t k=0; k<fTrackParGeane->GetEntriesFast(); k++) {
49  fTrkF = (FairTrackParP *)fTrackParFinal->At(k);
50  fTrkG = (FairTrackParP *)fTrackParGeane->At(k);
51  if(!fTrkF || !fTrkG) continue;
52  if(fTrkF &&fTrkG ){
53  if(fTrkG->GetDV()) h1->Fill((fTrkF->GetV() - fTrkG->GetV())/fTrkG->GetDV());
54  if(fTrkG->GetDW()) h2->Fill((fTrkF->GetW() - fTrkG->GetW())/fTrkG->GetDW());
55  if(fTrkG->GetDTV()) h3->Fill((fTrkF->GetTV() - fTrkG->GetTV())/fTrkG->GetDTV());
56  if(fTrkG->GetDTW()) h4->Fill((fTrkF->GetTW() - fTrkG->GetTW())/fTrkG->GetDTW());
57  if(fTrkG->GetDQp())h5->Fill((fTrkF->GetQp() - fTrkG->GetQp()) /fTrkG->GetDQp());
58  if(fTrkG->GetDY()) h6->Fill((fTrkF->GetY() - fTrkG->GetY()) /fTrkG->GetDY());
59  if(fTrkG->GetDZ()) h7->Fill((fTrkF->GetZ() - fTrkG->GetZ()) /fTrkG->GetDZ());
60  if(fTrkG->GetDPx()) h8->Fill((fTrkF->GetPx() - fTrkG->GetPx())/fTrkG->GetDPx());
61  if(fTrkG->GetDPy()) h9->Fill((fTrkF->GetPy() - fTrkG->GetPy())/fTrkG->GetDPy());
62  if(fTrkG->GetDPz()) h10->Fill((fTrkF->GetPz()- fTrkG->GetPz())/fTrkG->GetDPz());
63  }
64  }
65  }
Int_t i
Definition: run_full.C:25
FairTrackParP * fTrkG
Definition: runPULL2.C:41
FairTrackParP * fTrkF
Definition: runPULL2.C:40
TH1F * h4
Definition: runPULL2.C:30
TH1F * h2
Definition: runPULL2.C:28
TH1F * h9
Definition: runPULL2.C:35
TH1F * h7
Definition: runPULL2.C:33
fTrackParGeane
Definition: runPULL2.C:23
TH1F * h6
Definition: runPULL2.C:32
TH1F * h5
Definition: runPULL2.C:31
TH1F * h8
Definition: runPULL2.C:34
fTrackParFinal
Definition: runPULL2.C:25
TH1F * h1
Definition: runPULL2.C:27
TTree * simtree
Definition: runPULL2.C:21
TH1F * h3
Definition: runPULL2.C:29
TH1F * h10
Definition: runPULL2.C:36
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 66 of file runPULL2.C.

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

Definition at line 20 of file runPULL2.C.

fTrackParFinal = new TClonesArray("FairTrackParP")

Definition at line 25 of file runPULL2.C.

Referenced by for().

fTrackParGeane = new TClonesArray("FairTrackParP")

Definition at line 23 of file runPULL2.C.

Referenced by for().

fTrackParIni = new TClonesArray("FairTrackParP")

Definition at line 24 of file runPULL2.C.

FairTrackParP* fTrkF

Definition at line 40 of file runPULL2.C.

FairTrackParP* fTrkG

Definition at line 41 of file runPULL2.C.

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

Definition at line 27 of file runPULL2.C.

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

Definition at line 36 of file runPULL2.C.

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

Definition at line 28 of file runPULL2.C.

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

Definition at line 29 of file runPULL2.C.

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

Definition at line 30 of file runPULL2.C.

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

Definition at line 31 of file runPULL2.C.

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

Definition at line 32 of file runPULL2.C.

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

Definition at line 33 of file runPULL2.C.

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

Definition at line 34 of file runPULL2.C.

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

Definition at line 35 of file runPULL2.C.

Int_t Nevents = simtree->GetEntriesFast()

Definition at line 43 of file runPULL2.C.

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

Definition at line 21 of file runPULL2.C.