FairRoot/PandaRoot
anaMvdGeanePullDist.C
Go to the documentation of this file.
1 {
2 gROOT->LoadMacro("Tools.C");
4 TFile f("./data/Mvd_FlatG4Special_0G5_70k_Geane.root");
5 TTree* t = (TTree*)f->Get("pndsim");
6 //gStyle->SetPalette(1);
7 
8 TH1D hpdX("hpdX","Pull distribution in x", 1000, -5, 5);
9 TH1D hpdY("hpdY","Pull distribution in y", 1000, -5, 5);
10 TH1D hpdZ("hpdZ","Pull distribution in z", 1000, -5, 5);
11 TH1D hdiffX("hdiffX","Diff in x", 1000, -0.5, 0.5);
12 TH1D hdiffY("hdiffY","Diff in y", 1000, -0.5, 0.5);
13 TH1D hdiffZ("hdiffZ","Diff in z", 1000, -0.5, 0.5);
14 
15 
16 TCanvas *myCan = new TCanvas("BarrelStructures");
17 
18 
19 myCan->Divide(3,2);
20 
21 myCan->cd(1);
22 t->Draw("(GeaneTrackFinal.fX-GeaneTrackPar.fX)/GeaneTrackPar.fDX >>hpdX","","");
23 myCan->cd(2);
24 t->Draw("(GeaneTrackFinal.fY-GeaneTrackPar.fY)/GeaneTrackPar.fDY >>hpdY","","");
25 myCan->cd(3);
26 t->Draw("(GeaneTrackFinal.fZ-GeaneTrackPar.fZ)/GeaneTrackPar.fDZ >>hpdZ","","");
27 myCan->cd(4);
28 t->Draw("(GeaneTrackFinal.fX-GeaneTrackPar.fX) >>hdiffX","","");
29 myCan->cd(5);
30 t->Draw("(GeaneTrackFinal.fY-GeaneTrackPar.fY) >>hdiffY","","");
31 myCan->cd(6);
32 t->Draw("(GeaneTrackFinal.fZ-GeaneTrackPar.fZ) >>hdiffZ","","");
33 
34 }
TTree * t
TH1D hdiffY("hdiffY","Diff in y", 1000,-0.5, 0.5)
LoadPandaStyle()
TCanvas * myCan
TH1D hpdY("hpdY","Pull distribution in y", 1000,-5, 5)
TH1D hdiffZ("hdiffZ","Diff in z", 1000,-0.5, 0.5)
TFile f("./data/Mvd_FlatG4Special_0G5_70k_Geane.root")
TH1D hpdX("hpdX","Pull distribution in x", 1000,-5, 5)
TH1D hdiffX("hdiffX","Diff in x", 1000,-0.5, 0.5)
TH1D hpdZ("hpdZ","Pull distribution in z", 1000,-5, 5)