FairRoot/PandaRoot
examples/pid/plot_pid.C
Go to the documentation of this file.
1 {
2  gStyle->SetOptTitle(0);
3  gStyle->SetTitleOffset(.85,"X");gStyle->SetTitleOffset(.85,"Y");
4  gStyle->SetTitleSize(.05,"X");gStyle->SetTitleSize(.05,"Y");
5  gStyle->SetLabelSize(.05,"X");gStyle->SetLabelSize(.05,"Y");
6  gStyle->SetHistLineWidth(2);
7  gStyle->SetOptFit(1);
8  TFile *inFile = TFile::Open("pid_sttcombi.root");
9 
10  TCanvas* c1 = new TCanvas("PID", "PID", 100, 100, 800, 800);
11 
12  c1.Divide(3,2);
13  c1.cd(1);
14 
15  simtree->Draw("PidChargedCand.GetEmcRawEnergy()/PidChargedCand.GetMomentum().Mag():PidChargedCand.GetMomentum().Mag()>>emc_pid(100,0,3,100,0,1.2)","PidChargedCand.GetEmcIndex()>-1","colz");
16  emc_pid->GetXaxis()->SetTitle("Momentum [GeV/c]");
17  emc_pid->GetYaxis()->SetTitle("EMC Energy / Momentum [c]");
18 
19  c1.cd(2);
20  simtree->Draw("PidChargedCand.GetTofBeta():PidChargedCand.GetMomentum().Mag()>>tof_pid(100,0,3,100,0,1.2)","PidChargedCand.GetTofIndex()>-1","colz");
21  tof_pid->GetXaxis()->SetTitle("Momentum [GeV/c]");
22  tof_pid->GetYaxis()->SetTitle("#beta");
23 
24  c1.cd(3);
25  simtree->Draw("PidChargedCand.GetDrcThetaC()*TMath::RadToDeg():PidChargedCand.GetMomentum().Mag()>>drc_pid(100,0,3,100,0,60)","PidChargedCand.GetDrcIndex()>-1","colz");
26  drc_pid->GetXaxis()->SetTitle("Momentum [GeV/c]");
27  drc_pid->GetYaxis()->SetTitle("#theta_{c} [^{0}]");
28 
29  c1.cd(4);
30  simtree->Draw("PidChargedCand.GetMvdDEDX():PidChargedCand.GetMomentum().Mag()>>mvd_pid(100,0,3,100,0,0.1)","PidChargedCand.GetMvdHits()>0","colz");
31  mvd_pid->GetXaxis()->SetTitle("Momentum [GeV/c]");
32  mvd_pid->GetYaxis()->SetTitle("MVD dE / # hit [MeV]");
33 
34  c1.cd(5);
35  simtree->Draw("PidChargedCand.GetMuoNumberOfLayers():PidChargedCand.GetMomentum().Mag()>>muo_pid(100,0,3,17,-0.5,16.5)","","colz");
36  muo_pid->GetXaxis()->SetTitle("Momentum [GeV/c]");
37  muo_pid->GetYaxis()->SetTitle("MDT Fired Layers");
38 
39  c1.cd(6);
40  simtree->Draw("PidChargedCand.GetMuoNumberOfLayers():PidChargedCand.GetMomentum().Theta()*TMath::RadToDeg()>>muo_pidt(100,0,100,17,-0.5,16.5)","","colz");
41  muo_pidt->GetXaxis()->SetTitle("#theta [degrees]");
42  muo_pidt->GetYaxis()->SetTitle("MDT Fired Layers");
43 
44  c1.cd();
45 }
TTree * simtree
Definition: runPULL1.C:21
TString inFile
Definition: hit_dirc.C:8
c1
Definition: plot_dirc.C:35