Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:27:48

0001 // Macro to draw the pulls of the track parameters
0002 // Shyam Kumar; INFN Bari, shyam.kumar@ba.infn.it
0003 
0004 void draw_Pulls(TString particle = "pi-", double etamin = -1.0, double etamax = 1.0){
0005     
0006     gStyle->SetPalette(kRainBow);
0007     gStyle->SetTitleSize(0.045,"XY");   
0008     gStyle->SetTitleSize(0.04,"XY");    
0009     gStyle->SetLabelSize(0.04,"XY");    
0010     gStyle->SetTitleOffset(1.0,"XY");   
0011     gStyle->SetOptStat(1);
0012     gStyle->SetOptFit(1);
0013     gStyle->SetOptTitle(1);
0014     gStyle->SetGridColor(kBlack);     
0015     gStyle->SetGridWidth(2);        
0016     gStyle->SetGridStyle(2);
0017 
0018   const Int_t nfiles = 6;
0019   double mom[nfiles] ={0.5,1.0,2.0,5.0,10.0,20.0};
0020   TFile *fmom_real[nfiles];
0021   
0022   for (int i =0; i<nfiles; ++i){
0023       
0024   TCanvas *can = new TCanvas("can","can",2000,1000);
0025   can->Divide(3,2);
0026 
0027     fmom_real[i] = TFile::Open(Form("./realseed/pi-/mom/Performances_mom_%1.1f_mom_resol_realseed_%s.root",mom[i],particle.Data()));
0028     TH1D *hpull_invp = (TH1D*) fmom_real[i]->Get(Form("hpull_invp_%1.1f_%1.1f_pmax_%1.1f",mom[i],etamin,etamax));
0029     TH1D *hpull_d0xy = (TH1D*) fmom_real[i]->Get(Form("hpull_d0xy_%1.1f_%1.1f_pmax_%1.1f",mom[i],etamin,etamax));
0030     TH1D *hpull_d0z = (TH1D*) fmom_real[i]->Get(Form("hpull_d0z_%1.1f_%1.1f_pmax_%1.1f",mom[i],etamin,etamax));
0031     TH1D *hpull_phi = (TH1D*) fmom_real[i]->Get(Form("hpull_phi_%1.1f_%1.1f_pmax_%1.1f",mom[i],etamin,etamax));
0032     TH1D *hpull_theta = (TH1D*) fmom_real[i]->Get(Form("hpull_theta_%1.1f_%1.1f_pmax_%1.1f",mom[i],etamin,etamax));
0033     
0034     can->cd(1);
0035     hpull_invp->Draw("hist");
0036 
0037     can->cd(2);
0038     hpull_d0xy->Draw("hist");
0039 
0040     can->cd(3);
0041     hpull_d0z->Draw("hist");
0042 
0043     can->cd(4);
0044     hpull_phi->Draw("hist");
0045     
0046     can->cd(5);
0047     hpull_theta->Draw("hist");
0048     can->SaveAs(Form("Final_Results/%s/mom/hpulls_%1.1f_eta_%1.1f_pmax_%1.1f.png",particle.Data(),etamin,etamax,mom[i]));
0049     can->SaveAs(Form("Final_Results/%s/mom/hpulls_%1.1f_eta_%1.1f_pmax_%1.1f.root",particle.Data(),etamin,etamax,mom[i]));
0050     }
0051 
0052 }   
0053 
0054 
0055 
0056 
0057 
0058 
0059 
0060 
0061 
0062 
0063 
0064 
0065 
0066 
0067 
0068 
0069 
0070 
0071