1 /***********************************************************************************************
2 *** provided by Gamma Conversion Group, PWGGA, ******
3 *** Friederike Bock, fbock@physi.uni-heidelberg.de *** ******
4 ************************************************************************************************
5 ************************************************************************************************
6 *** With this Macro Resolution Studies for the Conversion Method can be carried out ******
7 *** For this a run with the flag "resolution" of the Gamma Conversion Software needs ******
8 *** to be performed, this study can only be carried out on Montecarlo Productions ******
9 ************************************************************************************************/
11 #include <Riostream.h>
13 #include "PlottingGammaConversionHistos.h"
14 #include "PlottingGammaConversionAdditional.h"
15 extern TRandom *gRandom;
16 extern TBenchmark *gBenchmark;
17 extern TSystem *gSystem;
19 void Photon_Resolution(const char *MCfile = "", const char *cutsel = "",const char *path = "", const char *output = "Photon-Resolution", const char *Plots = "kTRUE", const char *suffix = "eps"){
22 gROOT->SetStyle("Plain");
27 Bool_t SinglePlots = kFALSE;
28 if(Plots == "kTRUE") SinglePlots = kTRUE;
31 //**********************************************************************************************************************
32 //******************************** Definition of some plotting variables ***********************************************
33 //**********************************************************************************************************************
35 //Array defintion for printing Logo
36 Float_t right_up[4]={0.7,0.63,0.15, 0.02};
37 Float_t right_up2D[4]={0.65,0.63,0.11, 0.02};
38 Float_t right_down[4]={0.7,0.23,0.15, 0.02};
39 Float_t left_up[4]={0.17,0.73, 0.15, 0.02};
44 //**********************************************************************************************************************
45 //******************************** Defintion of arrays for rebinning ***************************************************
46 //**********************************************************************************************************************
49 Float_t ptcalcbinning1[5] = {0.5 ,1 ,2 ,5,10};
50 Float_t ptcalcbinning2[4] = {14,40,100,200};
51 Float_t ptcalcbinning3[6] = {1,5,13,21,24,31};
52 Double_t ptbinning[31];
54 for ( int j = 0; j < 5 ; j ++ ){
55 for ( int i = ptcalcbinning3[j]; i<ptcalcbinning3[j+1]; i++){
56 ptbinning[i] = ptbinning[i-1] + ptcalcbinning1[j];
61 Float_t Rcalcbinning1[18] = {5, 0.5, 2, 0.5, 4,0.5,1,0.5,3.5,0.5,4,0.5,5,0.5,4,1,11,15};
62 Float_t Rcalcbinning3[19] = {1,2,16,17,27,28,38,39,41,43,65,68,71,74,79,80,81,82,89};
63 Double_t Rbinning[89];
65 for ( int j = 0; j < 18 ; j ++ ){
66 for ( int i = Rcalcbinning3[j]; i<Rcalcbinning3[j+1]; i++){
67 Rbinning[i] = Rbinning[i-1] + Rcalcbinning1[j];
70 //**********************************************************************************************************************
71 //******************************************* Defintion of file name ***************************************************
72 //**********************************************************************************************************************
74 Char_t filename_MC[100] = (Form("%s%s",path,MCfile));
77 char *GammaDirectory = Form("PWGGA_GammaConversion_%s", cutsel);
78 cout << GammaDirectory << endl;
79 char *GammaList = Form("histogramsAliGammaConversion_%s", cutsel);
80 cout << GammaList << endl;
82 char *GammaDirectory = "PWGGA_GammaConversion";
83 cout << GammaDirectory << endl;
84 char *GammaList = "histogramsAliGammaConversion";
85 cout << GammaList << endl;
88 //**********************************************************************************************************************
89 //****************************************** Loading of Histograms *****************************************************
90 //**********************************************************************************************************************
94 //************************** Container Loading ********************************************************************
95 TDirectory *fPWGGAGammaConversion_montecarlo = new TDirectory();
96 TList *fHistosGammaConversion_montecarlo = new TList();
97 TList *fResolutionContainer_montecarlo = new TList();
98 TList *fESDContainer_montecarlo = new TList();
99 if(!(fPWGGAGammaConversion_montecarlo = (TDirectory*)f.Get(GammaDirectory))) cout <<"PWGGAGammConversion TList NOT loaded correctly"<<endl;
100 if(!(fHistosGammaConversion_montecarlo = (TList*)fPWGGAGammaConversion_montecarlo->Get(GammaList))) cout<<"histogramsAliGammaConversion NOT loaded correctly!"<<endl;
101 if(fResolutionContainer_montecarlo = (TList*)fHistosGammaConversion_montecarlo->FindObject("Resolution histograms")) cout<<"list loaded correctly!"<<endl;
102 if(!(fESDContainer_montecarlo = (TList*)fHistosGammaConversion_montecarlo->FindObject("ESD histograms"))) cout<<"ESD histograms NOT loaded correctly!"<<endl;
103 TH1F * ESD_ConvGamma_Pt=fESDContainer_montecarlo->FindObject("ESD_ConvGamma_Pt");
104 TH1F * ESD_E_Pt=fESDContainer_montecarlo->FindObject("ESD_E_Pt");
105 TH1F * ESD_P_Pt=fESDContainer_montecarlo->FindObject("ESD_P_Pt");
107 //************************** Histo loading *************************************************************************
109 //****************************** Resolution dPt vs Pt **********************************************
110 TH1F * Resolution_MC_Pt = fResolutionContainer_montecarlo->FindObject("Resolution_MC_Pt" ); //
111 TH1F * Resolution_ESD_Pt = fResolutionContainer_montecarlo->FindObject("Resolution_ESD_Pt" ); //
112 TH2F * Resolution_Gamma_dPt_Pt = fResolutionContainer_montecarlo->FindObject("Resolution_Gamma_dPt_Pt" ); //
113 TH2F * Resolution_E_dPt_Pt_ITS0 = fResolutionContainer_montecarlo->FindObject("Resolution_E_dPt_Pt_ITS0" ); //
114 TH2F * Resolution_E_dPt_Pt_ITS1 = fResolutionContainer_montecarlo->FindObject("Resolution_E_dPt_Pt_ITS1" ); //
115 TH2F * Resolution_E_dPt_Pt_ITS2 = fResolutionContainer_montecarlo->FindObject("Resolution_E_dPt_Pt_ITS2" ); //
116 TH2F * Resolution_E_dPt_Pt_ITS3 = fResolutionContainer_montecarlo->FindObject("Resolution_E_dPt_Pt_ITS3" ); //
117 TH2F * Resolution_E_dPt_Pt_ITS4 = fResolutionContainer_montecarlo->FindObject("Resolution_E_dPt_Pt_ITS4" ); //
118 TH2F * Resolution_E_dPt_Pt_ITS5 = fResolutionContainer_montecarlo->FindObject("Resolution_E_dPt_Pt_ITS5" ); //
119 TH2F * Resolution_E_dPt_Pt_ITS6 = fResolutionContainer_montecarlo->FindObject("Resolution_E_dPt_Pt_ITS6" ); //
120 TH2F * Resolution_E_dPt_Pt = fResolutionContainer_montecarlo->FindObject("Resolution_E_dPt_Pt" ); //
121 TH2F * Resolution_P_dPt_Pt_ITS0 = fResolutionContainer_montecarlo->FindObject("Resolution_P_dPt_Pt_ITS0" ); //
122 TH2F * Resolution_P_dPt_Pt_ITS1 = fResolutionContainer_montecarlo->FindObject("Resolution_P_dPt_Pt_ITS1" ); //
123 TH2F * Resolution_P_dPt_Pt_ITS2 = fResolutionContainer_montecarlo->FindObject("Resolution_P_dPt_Pt_ITS2" ); //
124 TH2F * Resolution_P_dPt_Pt_ITS3 = fResolutionContainer_montecarlo->FindObject("Resolution_P_dPt_Pt_ITS3" ); //
125 TH2F * Resolution_P_dPt_Pt_ITS4 = fResolutionContainer_montecarlo->FindObject("Resolution_P_dPt_Pt_ITS4" ); //
126 TH2F * Resolution_P_dPt_Pt_ITS5 = fResolutionContainer_montecarlo->FindObject("Resolution_P_dPt_Pt_ITS5" ); //
127 TH2F * Resolution_P_dPt_Pt_ITS6 = fResolutionContainer_montecarlo->FindObject("Resolution_P_dPt_Pt_ITS6" ); //
128 TH2F * Resolution_P_dPt_Pt = fResolutionContainer_montecarlo->FindObject("Resolution_P_dPt_Pt" ); //
130 //****************************** TRD performance ***************************************************
131 TH2F * Resolution_E_nTRDtracklets_ESDPt = fResolutionContainer_montecarlo->FindObject("Resolution_E_nTRDtracklets_ESDPt" );
132 // TH2F * Resolution_E_nTRDtracklets_MCPt = fResolutionContainer_montecarlo->FindObject("Resolution_E_nTRDtracklets_MCPt" );
133 TH2F * Resolution_E_nTRDclusters_ESDPt = fResolutionContainer_montecarlo->FindObject("Resolution_E_nTRDclusters_ESDPt" );
134 // TH2F * Resolution_E_nTRDclusters_MCPt = fResolutionContainer_montecarlo->FindObject("Resolution_E_nTRDclusters_MCPt" );
135 TH2F * Resolution_P_nTRDtracklets_ESDPt = fResolutionContainer_montecarlo->FindObject("Resolution_P_nTRDtracklets_ESDPt" );
136 // TH2F * Resolution_P_nTRDtracklets_MCPt = fResolutionContainer_montecarlo->FindObject("Resolution_P_nTRDtracklets_MCPt" );
137 TH2F * Resolution_P_nTRDclusters_ESDPt = fResolutionContainer_montecarlo->FindObject("Resolution_P_nTRDclusters_ESDPt" );
138 // TH2F * Resolution_P_nTRDclusters_MCPt = fResolutionContainer_montecarlo->FindObject("Resolution_P_nTRDclusters_MCPt" );
140 //******************************** Resolution in Absolute ********************************************
141 TH2F * Resolution_dZAbs_VS_R = fResolutionContainer_montecarlo->FindObject("Resolution_dZAbs_VS_R" ); //
142 TH2F * Resolution_dPhiAbs_VS_R = fResolutionContainer_montecarlo->FindObject("Resolution_dPhiAbs_VS_R" ); //
143 TH2F * Resolution_dRAbs_VS_R = fResolutionContainer_montecarlo->FindObject("Resolution_dRAbs_VS_R" ); //
145 // ******************************* Resolution in R ***************************************************
146 TH1F * Resolution_MC_R = fResolutionContainer_montecarlo->FindObject("Resolution_MC_R" ); //
147 TH1F * Resolution_ESD_R = fResolutionContainer_montecarlo->FindObject("Resolution_ESD_R" ); //
148 // TH2F * Resolution_dR = fResolutionContainer_montecarlo->FindObject("Resolution_dR" );
149 TH2F * Resolution_R_dPt = fResolutionContainer_montecarlo->FindObject("Resolution_R_dPt" );
151 //******************************** Resolution in Z ***************************************************
152 TH1F * Resolution_MC_Z = fResolutionContainer_montecarlo->FindObject("Resolution_MC_Z" ); //
153 TH1F * Resolution_ESD_Z = fResolutionContainer_montecarlo->FindObject("Resolution_ESD_Z" ); //
154 // TH2F * Resolution_dZ = fResolutionContainer_montecarlo->FindObject("Resolution_dZ" );
157 //******************************** Resolution dPt vs Phi *********************************************
158 TH2F * Resolution_Gamma_dPt_Phi = fResolutionContainer_montecarlo->FindObject("Resolution_Gamma_dPt_Phi" );
159 TH2F * Resolution_E_dPt_Phi = fResolutionContainer_montecarlo->FindObject("Resolution_E_dPt_Phi" );
160 TH2F * Resolution_P_dPt_Phi = fResolutionContainer_montecarlo->FindObject("Resolution_P_dPt_Phi" );
162 //**********************************************************************************************************************************************
163 //*********************************** Rebinning of 2D histograms and fitslices *****************************************************************
164 //**********************************************************************************************************************************************
166 //********************************* Rebinning Gamma dPt Pt *****************************************************************
167 TH2F *Resolution_Gamma_dPt_Ptrebin = new TH2F("Resolution_Gamma_dPt_Ptrebin", "Photon Resolution dPt vs Pt ", 30, ptbinning , 100, -10., 10.) ;
168 Resolution_Gamma_dPt_Pt->Sumw2();
169 Int_t maxYbin = Resolution_Gamma_dPt_Pt->GetNbinsY();
170 for (Int_t i = 1; i <201; i++) {
171 TAxis *xaxis_old = Resolution_Gamma_dPt_Pt->GetXaxis() ;
172 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
173 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
174 Double_t biny = Resolution_Gamma_dPt_Pt->GetYaxis()->GetBinCenter(j);
175 Double_t value = Resolution_Gamma_dPt_Pt->GetBinContent(i, j);
176 Resolution_Gamma_dPt_Ptrebin->Fill(binoldpoint, biny, value);
180 //********************************* Rebinning of E dPt Pt all **************************************************************
181 TH2F *Resolution_E_dPt_Ptrebin = new TH2F("Resolution_E_dPt_Ptrebin", "Electron Resolution dPt vs Pt ", 30, ptbinning , 100, -10., 10.) ;
182 Resolution_E_dPt_Pt->Sumw2();
183 Int_t maxYbin = Resolution_E_dPt_Pt->GetNbinsY();
184 for (Int_t i = 1; i <201; i++) {
185 TAxis *xaxis_old = Resolution_E_dPt_Pt->GetXaxis() ;
186 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
187 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
188 Double_t biny = Resolution_E_dPt_Pt->GetYaxis()->GetBinCenter(j);
189 Double_t value = Resolution_E_dPt_Pt->GetBinContent(i, j);
190 Resolution_E_dPt_Ptrebin->Fill(binoldpoint, biny, value);
194 //**********************************Rebinning of E dPt Pt for different Nr of ITS clusters *********************************
195 TH2F *Resolution_E_dPt_Pt_ITS0rebin = new TH2F("Resolution_E_dPt_Pt_ITS0rebin", "Electron Resolution dPt vs Pt 0 ITS clusters", 30, ptbinning , 100, -10., 10.) ;
196 Resolution_E_dPt_Pt_ITS0->Sumw2();
197 Int_t maxYbin = Resolution_E_dPt_Pt_ITS0->GetNbinsY();
198 for (Int_t i = 1; i <201; i++) {
199 TAxis *xaxis_old = Resolution_E_dPt_Pt_ITS0->GetXaxis() ;
200 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
201 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
202 Double_t biny = Resolution_E_dPt_Pt_ITS0->GetYaxis()->GetBinCenter(j);
203 Double_t value = Resolution_E_dPt_Pt_ITS0->GetBinContent(i, j);
204 Resolution_E_dPt_Pt_ITS0rebin->Fill(binoldpoint, biny, value);
208 TH2F *Resolution_E_dPt_Pt_ITS1rebin = new TH2F("Resolution_E_dPt_Pt_ITS1rebin", "Electron Resolution dPt vs Pt 1 ITS clusters", 30, ptbinning , 100, -10., 10.) ;
209 Resolution_E_dPt_Pt_ITS1->Sumw2();
210 Int_t maxYbin = Resolution_E_dPt_Pt_ITS1->GetNbinsY();
211 for (Int_t i = 1; i <201; i++) {
212 TAxis *xaxis_old = Resolution_E_dPt_Pt_ITS1->GetXaxis() ;
213 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
214 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
215 Double_t biny = Resolution_E_dPt_Pt_ITS1->GetYaxis()->GetBinCenter(j);
216 Double_t value = Resolution_E_dPt_Pt_ITS1->GetBinContent(i, j);
217 Resolution_E_dPt_Pt_ITS1rebin->Fill(binoldpoint, biny, value);
221 TH2F *Resolution_E_dPt_Pt_ITS2rebin = new TH2F("Resolution_E_dPt_Pt_ITS2rebin", "Electron Resolution dPt vs Pt 2 ITS clusters", 30, ptbinning , 100, -10., 10.) ;
222 Resolution_E_dPt_Pt_ITS2->Sumw2();
223 Int_t maxYbin = Resolution_E_dPt_Pt_ITS2->GetNbinsY();
224 for (Int_t i = 1; i <201; i++) {
225 TAxis *xaxis_old = Resolution_E_dPt_Pt_ITS2->GetXaxis() ;
226 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
227 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
228 Double_t biny = Resolution_E_dPt_Pt_ITS2->GetYaxis()->GetBinCenter(j);
229 Double_t value = Resolution_E_dPt_Pt_ITS2->GetBinContent(i, j);
230 Resolution_E_dPt_Pt_ITS2rebin->Fill(binoldpoint, biny, value);
234 TH2F *Resolution_E_dPt_Pt_ITS3rebin = new TH2F("Resolution_E_dPt_Pt_ITS3rebin", "Electron Resolution dPt vs Pt 3 ITS clusters", 30, ptbinning , 100, -10., 10.) ;
235 Resolution_E_dPt_Pt_ITS3->Sumw2();
236 Int_t maxYbin = Resolution_E_dPt_Pt_ITS3->GetNbinsY();
237 for (Int_t i = 1; i <201; i++) {
238 TAxis *xaxis_old = Resolution_E_dPt_Pt_ITS3->GetXaxis() ;
239 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
240 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
241 Double_t biny = Resolution_E_dPt_Pt_ITS3->GetYaxis()->GetBinCenter(j);
242 Double_t value = Resolution_E_dPt_Pt_ITS3->GetBinContent(i, j);
243 Resolution_E_dPt_Pt_ITS3rebin->Fill(binoldpoint, biny, value);
247 TH2F *Resolution_E_dPt_Pt_ITS4rebin = new TH2F("Resolution_E_dPt_Pt_ITS4rebin", "Electron Resolution dPt vs Pt 4 ITS clusters", 30, ptbinning , 100, -10., 10.) ;
248 Resolution_E_dPt_Pt_ITS4->Sumw2();
249 Int_t maxYbin = Resolution_E_dPt_Pt_ITS4->GetNbinsY();
250 for (Int_t i = 1; i <201; i++) {
251 TAxis *xaxis_old = Resolution_E_dPt_Pt_ITS4->GetXaxis() ;
252 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
253 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
254 Double_t biny = Resolution_E_dPt_Pt_ITS4->GetYaxis()->GetBinCenter(j);
255 Double_t value = Resolution_E_dPt_Pt_ITS4->GetBinContent(i, j);
256 Resolution_E_dPt_Pt_ITS4rebin->Fill(binoldpoint, biny, value);
260 TH2F *Resolution_E_dPt_Pt_ITS5rebin = new TH2F("Resolution_E_dPt_Pt_ITS5rebin", "Electron Resolution dPt vs Pt 5 ITS clusters", 30, ptbinning , 100, -10., 10.) ;
261 Resolution_E_dPt_Pt_ITS5->Sumw2();
262 Int_t maxYbin = Resolution_E_dPt_Pt_ITS5->GetNbinsY();
263 for (Int_t i = 1; i <201; i++) {
264 TAxis *xaxis_old = Resolution_E_dPt_Pt_ITS5->GetXaxis() ;
265 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
266 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
267 Double_t biny = Resolution_E_dPt_Pt_ITS5->GetYaxis()->GetBinCenter(j);
268 Double_t value = Resolution_E_dPt_Pt_ITS5->GetBinContent(i, j);
269 Resolution_E_dPt_Pt_ITS5rebin->Fill(binoldpoint, biny, value);
273 TH2F *Resolution_E_dPt_Pt_ITS6rebin = new TH2F("Resolution_E_dPt_Pt_ITS6rebin", "Electron Resolution dPt vs Pt 6 ITS clusters", 30, ptbinning , 100, -10., 10.) ;
274 Resolution_E_dPt_Pt_ITS6->Sumw2();
275 Int_t maxYbin = Resolution_E_dPt_Pt_ITS6->GetNbinsY();
276 for (Int_t i = 1; i <201; i++) {
277 TAxis *xaxis_old = Resolution_E_dPt_Pt_ITS6->GetXaxis() ;
278 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
279 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
280 Double_t biny = Resolution_E_dPt_Pt_ITS6->GetYaxis()->GetBinCenter(j);
281 Double_t value = Resolution_E_dPt_Pt_ITS6->GetBinContent(i, j);
282 Resolution_E_dPt_Pt_ITS6rebin->Fill(binoldpoint, biny, value);
286 TH2F *Resolution_P_dPt_Ptrebin = new TH2F("Resolution_P_dPt_Ptrebin", "Positron Resolution dPt vs Pt ", 30, ptbinning , 100, -10., 10.) ;
287 Resolution_P_dPt_Pt->Sumw2();
288 Int_t maxYbin = Resolution_P_dPt_Pt->GetNbinsY();
289 for (Int_t i = 1; i <201; i++) {
290 TAxis *xaxis_old = Resolution_P_dPt_Pt->GetXaxis() ;
291 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
292 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
293 Double_t biny = Resolution_P_dPt_Pt->GetYaxis()->GetBinCenter(j);
294 Double_t value = Resolution_P_dPt_Pt->GetBinContent(i, j);
295 Resolution_P_dPt_Ptrebin->Fill(binoldpoint, biny, value);
299 //**********************************Rebinning of P dPt Pt for different Nr of ITS clusters *********************************
300 TH2F *Resolution_P_dPt_Pt_ITS0rebin = new TH2F("Resolution_P_dPt_Pt_ITS0rebin", "Positron Resolution dPt vs Pt 0 ITS clusters", 30, ptbinning , 100, -10., 10.) ;
301 Resolution_P_dPt_Pt_ITS0->Sumw2();
302 Int_t maxYbin = Resolution_P_dPt_Pt_ITS0->GetNbinsY();
303 for (Int_t i = 1; i <201; i++) {
304 TAxis *xaxis_old = Resolution_P_dPt_Pt_ITS0->GetXaxis() ;
305 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
306 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
307 Double_t biny = Resolution_P_dPt_Pt_ITS0->GetYaxis()->GetBinCenter(j);
308 Double_t value = Resolution_P_dPt_Pt_ITS0->GetBinContent(i, j);
309 Resolution_P_dPt_Pt_ITS0rebin->Fill(binoldpoint, biny, value);
313 TH2F *Resolution_P_dPt_Pt_ITS1rebin = new TH2F("Resolution_P_dPt_Pt_ITS1rebin", "Positron Resolution dPt vs Pt 1 ITS clusters", 30, ptbinning , 100, -10., 10.) ;
314 Resolution_P_dPt_Pt_ITS1->Sumw2();
315 Int_t maxYbin = Resolution_P_dPt_Pt_ITS1->GetNbinsY();
316 for (Int_t i = 1; i <201; i++) {
317 TAxis *xaxis_old = Resolution_P_dPt_Pt_ITS1->GetXaxis() ;
318 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
319 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
320 Double_t biny = Resolution_P_dPt_Pt_ITS1->GetYaxis()->GetBinCenter(j);
321 Double_t value = Resolution_P_dPt_Pt_ITS1->GetBinContent(i, j);
322 Resolution_P_dPt_Pt_ITS1rebin->Fill(binoldpoint, biny, value);
326 TH2F *Resolution_P_dPt_Pt_ITS2rebin = new TH2F("Resolution_P_dPt_Pt_ITS2rebin", "Positron Resolution dPt vs Pt 2 ITS clusters", 30, ptbinning , 100, -10., 10.) ;
327 Resolution_P_dPt_Pt_ITS2->Sumw2();
328 Int_t maxYbin = Resolution_P_dPt_Pt_ITS2->GetNbinsY();
329 for (Int_t i = 1; i <201; i++) {
330 TAxis *xaxis_old = Resolution_P_dPt_Pt_ITS2->GetXaxis() ;
331 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
332 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
333 Double_t biny = Resolution_P_dPt_Pt_ITS2->GetYaxis()->GetBinCenter(j);
334 Double_t value = Resolution_P_dPt_Pt_ITS2->GetBinContent(i, j);
335 Resolution_P_dPt_Pt_ITS2rebin->Fill(binoldpoint, biny, value);
339 TH2F *Resolution_P_dPt_Pt_ITS3rebin = new TH2F("Resolution_P_dPt_Pt_ITS3rebin", "Positron Resolution dPt vs Pt 3 ITS clusters", 30, ptbinning , 100, -10., 10.) ;
340 Resolution_P_dPt_Pt_ITS3->Sumw2();
341 Int_t maxYbin = Resolution_P_dPt_Pt_ITS3->GetNbinsY();
342 for (Int_t i = 1; i <201; i++) {
343 TAxis *xaxis_old = Resolution_P_dPt_Pt_ITS3->GetXaxis() ;
344 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
345 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
346 Double_t biny = Resolution_P_dPt_Pt_ITS3->GetYaxis()->GetBinCenter(j);
347 Double_t value = Resolution_P_dPt_Pt_ITS3->GetBinContent(i, j);
348 Resolution_P_dPt_Pt_ITS3rebin->Fill(binoldpoint, biny, value);
352 TH2F *Resolution_P_dPt_Pt_ITS4rebin = new TH2F("Resolution_P_dPt_Pt_ITS4rebin", "Positron Resolution dPt vs Pt 4 ITS clusters", 30, ptbinning , 100, -10., 10.) ;
353 Resolution_P_dPt_Pt_ITS4->Sumw2();
354 Int_t maxYbin = Resolution_P_dPt_Pt_ITS4->GetNbinsY();
355 for (Int_t i = 1; i <201; i++) {
356 TAxis *xaxis_old = Resolution_P_dPt_Pt_ITS4->GetXaxis() ;
357 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
358 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
359 Double_t biny = Resolution_P_dPt_Pt_ITS4->GetYaxis()->GetBinCenter(j);
360 Double_t value = Resolution_P_dPt_Pt_ITS4->GetBinContent(i, j);
361 Resolution_P_dPt_Pt_ITS4rebin->Fill(binoldpoint, biny, value);
365 TH2F *Resolution_P_dPt_Pt_ITS5rebin = new TH2F("Resolution_P_dPt_Pt_ITS5rebin", "Positron Resolution dPt vs Pt 5 ITS clusters", 30, ptbinning , 100, -10., 10.) ;
366 Resolution_P_dPt_Pt_ITS5->Sumw2();
367 Int_t maxYbin = Resolution_P_dPt_Pt_ITS5->GetNbinsY();
368 for (Int_t i = 1; i <201; i++) {
369 TAxis *xaxis_old = Resolution_P_dPt_Pt_ITS5->GetXaxis() ;
370 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
371 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
372 Double_t biny = Resolution_P_dPt_Pt_ITS5->GetYaxis()->GetBinCenter(j);
373 Double_t value = Resolution_P_dPt_Pt_ITS5->GetBinContent(i, j);
374 Resolution_P_dPt_Pt_ITS5rebin->Fill(binoldpoint, biny, value);
378 TH2F *Resolution_P_dPt_Pt_ITS6rebin = new TH2F("Resolution_P_dPt_Pt_ITS6rebin", "Positron Resolution dPt vs Pt 6 ITS clusters", 30, ptbinning , 100, -10., 10.) ;
379 Resolution_P_dPt_Pt_ITS6->Sumw2();
380 Int_t maxYbin = Resolution_P_dPt_Pt_ITS6->GetNbinsY();
381 for (Int_t i = 1; i <201; i++) {
382 TAxis *xaxis_old = Resolution_P_dPt_Pt_ITS6->GetXaxis() ;
383 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
384 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
385 Double_t biny = Resolution_P_dPt_Pt_ITS6->GetYaxis()->GetBinCenter(j);
386 Double_t value = Resolution_P_dPt_Pt_ITS6->GetBinContent(i, j);
387 Resolution_P_dPt_Pt_ITS6rebin->Fill(binoldpoint, biny, value);
391 //************************************** Rebinning of dZAbs R **********************************************
392 TH2F *Resolution_dZAbs_VS_Rrebin = new TH2F("Resolution_dZAbs_VS_Rrebin", "Photon Resolution dZabs vs R ", 88, Rbinning , 50, -25., 25.) ;
393 Resolution_dZAbs_VS_R->Sumw2();
394 Int_t maxXbin = Resolution_dZAbs_VS_R->GetNbinsX();
395 Int_t maxYbin = Resolution_dZAbs_VS_R->GetNbinsY();
396 for (Int_t i = 1; i <(maxXbin+1); i++) {
397 TAxis *xaxis_old = Resolution_dZAbs_VS_R->GetXaxis() ;
398 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
399 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
400 Double_t biny = Resolution_dZAbs_VS_R->GetYaxis()->GetBinCenter(j);
401 Double_t value = Resolution_dZAbs_VS_R->GetBinContent(i, j);
402 Resolution_dZAbs_VS_Rrebin->Fill(binoldpoint, biny, value);
406 //************************************** Rebinning of dPhiAbs R **********************************************
407 TH2F *Resolution_dPhiAbs_VS_Rrebin = new TH2F("Resolution_dPhiAbs_VS_Rrebin", "Photon Resolution dPhiabs vs R ", 88, Rbinning , 100, -TMath::Pi()/30, TMath::Pi()/30) ;
408 Resolution_dPhiAbs_VS_R->Sumw2();
409 Int_t maxXbin = Resolution_dPhiAbs_VS_R->GetNbinsX();
410 Int_t maxYbin = Resolution_dPhiAbs_VS_R->GetNbinsY();
411 for (Int_t i = 1; i <(maxXbin+1); i++) {
412 TAxis *xaxis_old = Resolution_dPhiAbs_VS_R->GetXaxis() ;
413 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
414 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
415 Double_t biny = Resolution_dPhiAbs_VS_R->GetYaxis()->GetBinCenter(j);
416 Double_t value = Resolution_dPhiAbs_VS_R->GetBinContent(i, j);
417 Resolution_dPhiAbs_VS_Rrebin->Fill(binoldpoint, biny, value);
421 //************************************** Rebinning of dRAbs R **********************************************
422 TH2F *Resolution_dRAbs_VS_Rrebin = new TH2F("Resolution_dRAbs_VS_Rrebin", "Photon Resolution dRabs vs R ", 88, Rbinning , 50, -25,25) ;
423 Resolution_dRAbs_VS_R->Sumw2();
424 Int_t maxXbin = Resolution_dRAbs_VS_R->GetNbinsX();
425 Int_t maxYbin = Resolution_dRAbs_VS_R->GetNbinsY();
426 for (Int_t i = 1; i <(maxXbin+1); i++) {
427 TAxis *xaxis_old = Resolution_dRAbs_VS_R->GetXaxis() ;
428 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
429 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
430 Double_t biny = Resolution_dRAbs_VS_R->GetYaxis()->GetBinCenter(j);
431 Double_t value = Resolution_dRAbs_VS_R->GetBinContent(i, j);
432 Resolution_dRAbs_VS_Rrebin->Fill(binoldpoint, biny, value);
436 //************************************** Rebinning of dRAbs R **********************************************
437 TH2F *Resolution_R_dPtrebin = new TH2F("Resolution_R_dPtrebin", "Photon Resolution dp_{t} vs R ", 88, Rbinning , 50, -10,10) ;
438 Resolution_R_dPt->Sumw2();
439 Int_t maxXbin = Resolution_R_dPt->GetNbinsX();
440 Int_t maxYbin = Resolution_R_dPt->GetNbinsY();
441 for (Int_t i = 1; i <(maxXbin+1); i++) {
442 TAxis *xaxis_old = Resolution_R_dPt->GetXaxis() ;
443 Double_t binoldpoint = xaxis_old->GetBinCenter(i);
444 for (Int_t j = 1 ; j < (maxYbin+1) ; j++){
445 Double_t biny = Resolution_R_dPt->GetYaxis()->GetBinCenter(j);
446 Double_t value = Resolution_R_dPt->GetBinContent(i, j);
447 Resolution_R_dPtrebin->Fill(binoldpoint, biny, value);
454 //**************************** Writing all rebined histos in a file ********************************************
455 Resolution = new TFile("ResolutionGamma.root","RECREATE");
456 Resolution_Gamma_dPt_Ptrebin->Write();
457 Resolution_E_dPt_Ptrebin->Write();
458 Resolution_E_dPt_Pt_ITS0rebin->Write();
459 Resolution_E_dPt_Pt_ITS1rebin->Write();
460 Resolution_E_dPt_Pt_ITS2rebin->Write();
461 Resolution_E_dPt_Pt_ITS3rebin->Write();
462 Resolution_E_dPt_Pt_ITS4rebin->Write();
463 Resolution_E_dPt_Pt_ITS5rebin->Write();
464 Resolution_E_dPt_Pt_ITS6rebin->Write();
465 Resolution_P_dPt_Ptrebin->Write();
466 Resolution_P_dPt_Pt_ITS0rebin->Write();
467 Resolution_P_dPt_Pt_ITS1rebin->Write();
468 Resolution_P_dPt_Pt_ITS2rebin->Write();
469 Resolution_P_dPt_Pt_ITS3rebin->Write();
470 Resolution_P_dPt_Pt_ITS4rebin->Write();
471 Resolution_P_dPt_Pt_ITS5rebin->Write();
472 Resolution_P_dPt_Pt_ITS6rebin->Write();
473 Resolution_dZAbs_VS_Rrebin->Write();
474 Resolution_dRAbs_VS_Rrebin->Write();
475 Resolution_dPhiAbs_VS_Rrebin->Write();
476 Resolution_R_dPtrebin->Write();
480 Double_t precision = 10E-5;
482 //*********************************** Fitting for dRabs vs R **********************************************
483 TH1F *Resolution_dRAbs_VS_Rrebin_1 = new TH1F("Resolution_dRAbs_VS_Rrebin_1", "Mean Photon Resolution dRabs vs R ", 88, Rbinning ) ;
484 TH1F *Resolution_dRAbs_VS_Rrebin_2 = new TH1F("Resolution_dRAbs_VS_Rrebin_2", "Sigma Photon Resolution dRabs vs R ", 88, Rbinning ) ;
485 for (Int_t i = 1; i < 88 + 1 ; i ++){
486 TF1 *f0 = new TF1("f0", "gaus", -25,25);
487 TH1D *hy = Resolution_dRAbs_VS_Rrebin->ProjectionY("hy", i, i);
489 Double_t rp = f0->GetParameter(2);
490 Double_t mp = f0->GetParameter(1);
491 Double_t ymin = mp -(rp * 2);
492 Double_t ymax = mp + (rp * 2);
493 Double_t deviation = 100;
495 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
496 while(deviation > precision && counter < 100){
497 f1->SetRange(ymin,ymax);
499 Double_t rp2 = f1->GetParameter(2);
500 if (rp2>rp){ deviation = rp2-rp;}
501 else {deviation = rp -rp2 ;}
503 mp = f1->GetParameter(1);
505 ymax = mp + (rp * 2);
508 Double_t mean = f1->GetParameter(1);
509 Double_t meanE = f1->GetParError(1);
510 Double_t sigma = f1->GetParameter(2);
511 Double_t sigmaE = f1->GetParError(2);
513 Resolution_dRAbs_VS_Rrebin_1->SetBinContent(i, mean);
514 Resolution_dRAbs_VS_Rrebin_1->SetBinError(i, meanE);
515 Resolution_dRAbs_VS_Rrebin_2->SetBinContent(i, sigma);
516 Resolution_dRAbs_VS_Rrebin_2->SetBinError(i, sigmaE);
521 //********************************************* fitting for dZAbs vs R *************************************************************
522 TH1F *Resolution_dZAbs_VS_Rrebin_1 = new TH1F("Resolution_dZAbs_VS_Rrebin_1", "Mean Photon Resolution dZabs vs R ", 88, Rbinning ) ;
523 TH1F *Resolution_dZAbs_VS_Rrebin_2 = new TH1F("Resolution_dZAbs_VS_Rrebin_2", "Sigma Photon Resolution dZabs vs R ", 88, Rbinning ) ;
524 for (Int_t i = 1; i < 88 + 1 ; i ++){
525 TF1 *f0 = new TF1("f0", "gaus", -25,25);
526 TH1D *hx = Resolution_dZAbs_VS_Rrebin->ProjectionY("hx", i, i);
528 Double_t rp = f0->GetParameter(2);
529 Double_t mp = f0->GetParameter(1);
530 Double_t ymin = mp -(rp * 2);
531 Double_t ymax = mp +(rp * 2);
532 Double_t deviation = 100;
534 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
535 while(deviation > precision && counter < 100){
536 f1->SetRange(ymin,ymax);
538 Double_t rp2 = f1->GetParameter(2);
539 if (rp2>rp){ deviation = rp2-rp;}
540 else {deviation = rp -rp2 ;}
542 mp = f1->GetParameter(1);
547 Double_t mean = f1->GetParameter(1);
548 Double_t meanE = f1->GetParError(1);
549 Double_t sigma = f1->GetParameter(2);
550 Double_t sigmaE = f1->GetParError(2);
552 Resolution_dZAbs_VS_Rrebin_1->SetBinContent(i, mean);
553 Resolution_dZAbs_VS_Rrebin_1->SetBinError(i, meanE);
554 Resolution_dZAbs_VS_Rrebin_2->SetBinContent(i, sigma);
555 Resolution_dZAbs_VS_Rrebin_2->SetBinError(i, sigmaE);
560 //********************************************* fitting for dPt vs R *************************************************************
561 TH1F *Resolution_R_dPtrebin_1 = new TH1F("Resolution_R_dPtrebin_1", "Mean Photon Resolution dPt vs R ", 88, Rbinning ) ;
562 TH1F *Resolution_R_dPtrebin_2 = new TH1F("Resolution_R_dPtrebin_2", "Sigma Photon Resolution dPt vs R ", 88, Rbinning ) ;
563 for (Int_t i = 1; i < 88 + 1 ; i ++){
564 TF1 *f0 = new TF1("f0", "gaus", -25,25);
565 TH1D *hu = Resolution_R_dPtrebin->ProjectionY("hu", i, i);
567 Double_t rp = f0->GetParameter(2);
568 Double_t mp = f0->GetParameter(1);
569 Double_t ymin = mp -(rp * 2);
570 Double_t ymax = mp +(rp * 2);
571 Double_t deviation = 100;
573 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
574 while(deviation > precision && counter < 100){
575 f1->SetRange(ymin,ymax);
577 Double_t rp2 = f1->GetParameter(2);
578 if (rp2>rp){ deviation = rp2-rp;}
579 else {deviation = rp -rp2 ;}
581 mp = f1->GetParameter(1);
586 Double_t mean = f1->GetParameter(1);
587 Double_t meanE = f1->GetParError(1);
588 Double_t sigma = f1->GetParameter(2);
589 Double_t sigmaE = f1->GetParError(2);
591 Resolution_R_dPtrebin_1->SetBinContent(i, mean);
592 Resolution_R_dPtrebin_1->SetBinError(i, meanE);
593 Resolution_R_dPtrebin_2->SetBinContent(i, sigma);
594 Resolution_R_dPtrebin_2->SetBinError(i, sigmaE);
600 Double_t precisionPhi = 10E-10;
601 //********************************************* fitting for dPhiAbs vs R *************************************************************
602 TH1F *Resolution_dPhiAbs_VS_Rrebin_1 = new TH1F("Resolution_dPhiAbs_VS_Rrebin_1", "Mean Photon Resolution dPhiabs vs R ", 88, Rbinning ) ;
603 TH1F *Resolution_dPhiAbs_VS_Rrebin_2 = new TH1F("Resolution_dPhiAbs_VS_Rrebin_2", "Sigma Photon Resolution dPhiabs vs R ", 88, Rbinning ) ;
604 for (Int_t i = 1; i < 88 + 1 ; i ++){
605 TF1 *f0 = new TF1("f0", "gaus", -0.5,0.5);
606 TH1D *hp = Resolution_dPhiAbs_VS_Rrebin->ProjectionY("hp", i, i);
608 Double_t rp = f0->GetParameter(2);
609 Double_t mp = f0->GetParameter(1);
610 Double_t ymin = mp -(rp * 2);
611 Double_t ymax = mp +(rp * 2);
612 Double_t deviation = 100;
614 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
615 while(deviation > precisionPhi && counter < 100){
616 f1->SetRange(ymin,ymax);
618 Double_t rp2 = f1->GetParameter(2);
619 if (rp2>rp){ deviation = rp2-rp;}
620 else {deviation = rp -rp2 ;}
622 mp = f1->GetParameter(1);
627 Double_t mean = f1->GetParameter(1);
628 Double_t meanE = f1->GetParError(1);
629 Double_t sigma = f1->GetParameter(2);
630 Double_t sigmaE = f1->GetParError(2);
632 Resolution_dPhiAbs_VS_Rrebin_1->SetBinContent(i, mean);
633 Resolution_dPhiAbs_VS_Rrebin_1->SetBinError(i, meanE);
634 Resolution_dPhiAbs_VS_Rrebin_2->SetBinContent(i, sigma);
635 Resolution_dPhiAbs_VS_Rrebin_2->SetBinError(i, sigmaE);
640 //************************************************* dPt fitting for ITS bins Positron ************************************************************
641 TH1F *Resolution_P_dPt_Pt_ITS0rebin_1 = new TH1F("Resolution_P_dPt_Pt_ITS0rebin_1", "mean Positron Resolution dPt vs Pt 0 ITS clusters", 30, ptbinning) ;
642 TH1F *Resolution_P_dPt_Pt_ITS0rebin_2 = new TH1F("Resolution_P_dPt_Pt_ITS0rebin_2", "sigma Positron Resolution dPt vs Pt 0 ITS clusters", 30, ptbinning) ;
643 for (Int_t i = 1; i < 30 + 1 ; i ++){
644 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
645 TH1D *PITS0 = Resolution_P_dPt_Pt_ITS0rebin->ProjectionY("PITS0", i, i);
646 PITS0->Fit(f0,"0RME");
647 Double_t rp = f0->GetParameter(2);
648 Double_t mp = f0->GetParameter(1);
649 Double_t ymin = mp -(rp * 2.);
650 Double_t ymax = mp + (rp * 2.);
651 Double_t deviation = 100;
653 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
654 while(deviation > precision && counter < 100){
655 f1->SetRange(ymin,ymax);
656 PITS0->Fit(f1,"0RME");
657 Double_t rp2 = f1->GetParameter(2);
658 if (rp2>rp){ deviation = rp2-rp;}
659 else {deviation = rp -rp2 ;}
661 mp = f1->GetParameter(1);
666 Double_t mean = f1->GetParameter(1);
667 Double_t meanE = f1->GetParError(1);
668 Double_t sigma = f1->GetParameter(2);
669 Double_t sigmaE = f1->GetParError(2);
671 Resolution_P_dPt_Pt_ITS0rebin_1->SetBinContent(i, mean);
672 Resolution_P_dPt_Pt_ITS0rebin_1->SetBinError(i, meanE);
673 Resolution_P_dPt_Pt_ITS0rebin_2->SetBinContent(i, sigma);
674 Resolution_P_dPt_Pt_ITS0rebin_2->SetBinError(i, sigmaE);
679 TH1F *Resolution_P_dPt_Pt_ITS1rebin_1 = new TH1F("Resolution_P_dPt_Pt_ITS1rebin_1", "mean Positron Resolution dPt vs Pt 1 ITS clusters", 30, ptbinning) ;
680 TH1F *Resolution_P_dPt_Pt_ITS1rebin_2 = new TH1F("Resolution_P_dPt_Pt_ITS1rebin_2", "sigma Positron Resolution dPt vs Pt 1 ITS clusters", 30, ptbinning) ;
681 for (Int_t i = 1; i < 30 + 1 ; i ++){
682 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
683 TH1D *PITS1 = Resolution_P_dPt_Pt_ITS1rebin->ProjectionY("PITS1", i, i);
684 PITS1->Fit(f0,"0RME");
685 Double_t rp = f0->GetParameter(2);
686 Double_t mp = f0->GetParameter(1);
687 Double_t ymin = mp -(rp * 2.);
688 Double_t ymax = mp + (rp * 2.);
689 Double_t deviation = 100;
691 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
692 while(deviation > precision && counter < 100){
693 f1->SetRange(ymin,ymax);
694 PITS1->Fit(f1,"0RME");
695 Double_t rp2 = f1->GetParameter(2);
696 if (rp2>rp){ deviation = rp2-rp;}
697 else {deviation = rp -rp2 ;}
699 mp = f1->GetParameter(1);
704 Double_t mean = f1->GetParameter(1);
705 Double_t meanE = f1->GetParError(1);
706 Double_t sigma = f1->GetParameter(2);
707 Double_t sigmaE = f1->GetParError(2);
709 Resolution_P_dPt_Pt_ITS1rebin_1->SetBinContent(i, mean);
710 Resolution_P_dPt_Pt_ITS1rebin_1->SetBinError(i, meanE);
711 Resolution_P_dPt_Pt_ITS1rebin_2->SetBinContent(i, sigma);
712 Resolution_P_dPt_Pt_ITS1rebin_2->SetBinError(i, sigmaE);
717 TH1F *Resolution_P_dPt_Pt_ITS2rebin_1 = new TH1F("Resolution_P_dPt_Pt_ITS2rebin_1", "mean Positron Resolution dPt vs Pt 2 ITS clusters", 30, ptbinning) ;
718 TH1F *Resolution_P_dPt_Pt_ITS2rebin_2 = new TH1F("Resolution_P_dPt_Pt_ITS2rebin_2", "sigma Positron Resolution dPt vs Pt 2 ITS clusters", 30, ptbinning) ;
719 for (Int_t i = 1; i < 30 + 1 ; i ++){
720 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
721 TH1D *PITS2 = Resolution_P_dPt_Pt_ITS2rebin->ProjectionY("PITS2", i, i);
722 PITS2->Fit(f0,"0RME");
723 Double_t rp = f0->GetParameter(2);
724 Double_t mp = f0->GetParameter(1);
725 Double_t ymin = mp -(rp * 2.);
726 Double_t ymax = mp + (rp * 2.);
727 Double_t deviation = 100;
729 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
730 while(deviation > precision && counter < 100){
731 f1->SetRange(ymin,ymax);
732 PITS2->Fit(f1,"0RME");
733 Double_t rp2 = f1->GetParameter(2);
734 if (rp2>rp){ deviation = rp2-rp;}
735 else {deviation = rp -rp2 ;}
737 mp = f1->GetParameter(1);
742 Double_t mean = f1->GetParameter(1);
743 Double_t meanE = f1->GetParError(1);
744 Double_t sigma = f1->GetParameter(2);
745 Double_t sigmaE = f1->GetParError(2);
747 Resolution_P_dPt_Pt_ITS2rebin_1->SetBinContent(i, mean);
748 Resolution_P_dPt_Pt_ITS2rebin_1->SetBinError(i, meanE);
749 Resolution_P_dPt_Pt_ITS2rebin_2->SetBinContent(i, sigma);
750 Resolution_P_dPt_Pt_ITS2rebin_2->SetBinError(i, sigmaE);
755 TH1F *Resolution_P_dPt_Pt_ITS3rebin_1 = new TH1F("Resolution_P_dPt_Pt_ITS3rebin_1", "mean Positron Resolution dPt vs Pt 3 ITS clusters", 30, ptbinning) ;
756 TH1F *Resolution_P_dPt_Pt_ITS3rebin_2 = new TH1F("Resolution_P_dPt_Pt_ITS3rebin_2", "sigma Positron Resolution dPt vs Pt 3 ITS clusters", 30, ptbinning) ;
757 for (Int_t i = 1; i < 30 + 1 ; i ++){
758 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
759 TH1D *PITS3 = Resolution_P_dPt_Pt_ITS3rebin->ProjectionY("PITS3", i, i);
760 PITS3->Fit(f0,"0RME");
761 Double_t rp = f0->GetParameter(2);
762 Double_t mp = f0->GetParameter(1);
763 Double_t ymin = mp -(rp * 2.);
764 Double_t ymax = mp + (rp * 2.);
765 Double_t deviation = 100;
767 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
768 while(deviation > precision && counter < 100){
769 f1->SetRange(ymin,ymax);
770 PITS3->Fit(f1,"0RME");
771 Double_t rp2 = f1->GetParameter(2);
772 if (rp2>rp){ deviation = rp2-rp;}
773 else {deviation = rp -rp2 ;}
775 mp = f1->GetParameter(1);
780 Double_t mean = f1->GetParameter(1);
781 Double_t meanE = f1->GetParError(1);
782 Double_t sigma = f1->GetParameter(2);
783 Double_t sigmaE = f1->GetParError(2);
785 Resolution_P_dPt_Pt_ITS3rebin_1->SetBinContent(i, mean);
786 Resolution_P_dPt_Pt_ITS3rebin_1->SetBinError(i, meanE);
787 Resolution_P_dPt_Pt_ITS3rebin_2->SetBinContent(i, sigma);
788 Resolution_P_dPt_Pt_ITS3rebin_2->SetBinError(i, sigmaE);
793 TH1F *Resolution_P_dPt_Pt_ITS4rebin_1 = new TH1F("Resolution_P_dPt_Pt_ITS4rebin_1", "mean Positron Resolution dPt vs Pt 4 ITS clusters", 30, ptbinning) ;
794 TH1F *Resolution_P_dPt_Pt_ITS4rebin_2 = new TH1F("Resolution_P_dPt_Pt_ITS4rebin_2", "sigma Positron Resolution dPt vs Pt 4 ITS clusters", 30, ptbinning) ;
795 for (Int_t i = 1; i < 30 + 1 ; i ++){
796 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
797 TH1D *PITS4 = Resolution_P_dPt_Pt_ITS4rebin->ProjectionY("PITS4", i, i);
798 PITS4->Fit(f0,"0RME");
799 Double_t rp = f0->GetParameter(2);
800 Double_t mp = f0->GetParameter(1);
801 Double_t ymin = mp -(rp * 2.);
802 Double_t ymax = mp + (rp * 2.);
803 Double_t deviation = 100;
805 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
806 while(deviation > precision && counter < 100){
807 f1->SetRange(ymin,ymax);
808 PITS4->Fit(f1,"0RME");
809 Double_t rp2 = f1->GetParameter(2);
810 if (rp2>rp){ deviation = rp2-rp;}
811 else {deviation = rp -rp2 ;}
813 mp = f1->GetParameter(1);
818 Double_t mean = f1->GetParameter(1);
819 Double_t meanE = f1->GetParError(1);
820 Double_t sigma = f1->GetParameter(2);
821 Double_t sigmaE = f1->GetParError(2);
823 Resolution_P_dPt_Pt_ITS4rebin_1->SetBinContent(i, mean);
824 Resolution_P_dPt_Pt_ITS4rebin_1->SetBinError(i, meanE);
825 Resolution_P_dPt_Pt_ITS4rebin_2->SetBinContent(i, sigma);
826 Resolution_P_dPt_Pt_ITS4rebin_2->SetBinError(i, sigmaE);
831 TH1F *Resolution_P_dPt_Pt_ITS5rebin_1 = new TH1F("Resolution_P_dPt_Pt_ITS5rebin_1", "mean Positron Resolution dPt vs Pt 5 ITS clusters", 30, ptbinning) ;
832 TH1F *Resolution_P_dPt_Pt_ITS5rebin_2 = new TH1F("Resolution_P_dPt_Pt_ITS5rebin_2", "mean Positron Resolution dPt vs Pt 5 ITS clusters", 30, ptbinning) ;
833 for (Int_t i = 1; i < 30 + 1 ; i ++){
834 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
835 TH1D *PITS5 = Resolution_P_dPt_Pt_ITS5rebin->ProjectionY("PITS5", i, i);
836 PITS5->Fit(f0,"0RME");
837 Double_t rp = f0->GetParameter(2);
838 Double_t mp = f0->GetParameter(1);
839 Double_t ymin = mp -(rp * 2.);
840 Double_t ymax = mp + (rp * 2.);
841 Double_t deviation = 100;
843 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
844 while(deviation > precision && counter < 100){
845 f1->SetRange(ymin,ymax);
846 PITS5->Fit(f1,"0RME");
847 Double_t rp2 = f1->GetParameter(2);
848 if (rp2>rp){ deviation = rp2-rp;}
849 else {deviation = rp -rp2 ;}
851 mp = f1->GetParameter(1);
856 Double_t mean = f1->GetParameter(1);
857 Double_t meanE = f1->GetParError(1);
858 Double_t sigma = f1->GetParameter(2);
859 Double_t sigmaE = f1->GetParError(2);
861 Resolution_P_dPt_Pt_ITS5rebin_1->SetBinContent(i, mean);
862 Resolution_P_dPt_Pt_ITS5rebin_1->SetBinError(i, meanE);
863 Resolution_P_dPt_Pt_ITS5rebin_2->SetBinContent(i, sigma);
864 Resolution_P_dPt_Pt_ITS5rebin_2->SetBinError(i, sigmaE);
869 TH1F *Resolution_P_dPt_Pt_ITS6rebin_1 = new TH1F("Resolution_P_dPt_Pt_ITS6rebin_1", "mean Positron Resolution dPt vs Pt 6 ITS clusters", 30, ptbinning) ;
870 TH1F *Resolution_P_dPt_Pt_ITS6rebin_2 = new TH1F("Resolution_P_dPt_Pt_ITS6rebin_2", "sigma Positron Resolution dPt vs Pt 6 ITS clusters", 30, ptbinning) ;
871 for (Int_t i = 1; i < 30 + 1 ; i ++){
872 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
873 TH1D *PITS6 = Resolution_P_dPt_Pt_ITS6rebin->ProjectionY("PITS6", i, i);
874 PITS6->Fit(f0,"0RME");
875 Double_t rp = f0->GetParameter(2);
876 Double_t mp = f0->GetParameter(1);
877 Double_t ymin = mp -(rp * 2.);
878 Double_t ymax = mp + (rp * 2.);
879 Double_t deviation = 100;
881 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
882 while(deviation > precision && counter < 100){
883 f1->SetRange(ymin,ymax);
884 PITS6->Fit(f1,"0RME");
885 Double_t rp2 = f1->GetParameter(2);
886 if (rp2>rp){ deviation = rp2-rp;}
887 else {deviation = rp -rp2 ;}
889 mp = f1->GetParameter(1);
894 Double_t mean = f1->GetParameter(1);
895 Double_t meanE = f1->GetParError(1);
896 Double_t sigma = f1->GetParameter(2);
897 Double_t sigmaE = f1->GetParError(2);
899 Resolution_P_dPt_Pt_ITS6rebin_1->SetBinContent(i, mean);
900 Resolution_P_dPt_Pt_ITS6rebin_1->SetBinError(i, meanE);
901 Resolution_P_dPt_Pt_ITS6rebin_2->SetBinContent(i, sigma);
902 Resolution_P_dPt_Pt_ITS6rebin_2->SetBinError(i, sigmaE);
907 //*************************************** fitting dPt for ITS bins for Electron ***************************************
908 TH1F *Resolution_E_dPt_Pt_ITS0rebin_1 = new TH1F("Resolution_E_dPt_Pt_ITS0rebin_1", "mean Electron Resolution dPt vs Pt 0 ITS clusters", 30, ptbinning) ;
909 TH1F *Resolution_E_dPt_Pt_ITS0rebin_2 = new TH1F("Resolution_E_dPt_Pt_ITS0rebin_2", "sigma Electron Resolution dPt vs Pt 0 ITS clusters", 30, ptbinning) ;
910 for (Int_t i = 1; i < 30 + 1 ; i ++){
911 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
912 TH1D *EITS0 = Resolution_E_dPt_Pt_ITS0rebin->ProjectionY("EITS0", i, i);
913 EITS0->Fit(f0,"0RME");
914 Double_t rp = f0->GetParameter(2);
915 Double_t mp = f0->GetParameter(1);
916 Double_t ymin = mp -(rp * 2.);
917 Double_t ymax = mp + (rp * 2.);
918 Double_t deviation = 100;
920 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
921 while(deviation > precision && counter < 100){
922 f1->SetRange(ymin,ymax);
923 EITS0->Fit(f1,"0RME");
924 Double_t rp2 = f1->GetParameter(2);
925 if (rp2>rp){ deviation = rp2-rp;}
926 else {deviation = rp -rp2 ;}
928 mp = f1->GetParameter(1);
933 Double_t mean = f1->GetParameter(1);
934 Double_t meanE = f1->GetParError(1);
935 Double_t sigma = f1->GetParameter(2);
936 Double_t sigmaE = f1->GetParError(2);
938 Resolution_E_dPt_Pt_ITS0rebin_1->SetBinContent(i, mean);
939 Resolution_E_dPt_Pt_ITS0rebin_1->SetBinError(i, meanE);
940 Resolution_E_dPt_Pt_ITS0rebin_2->SetBinContent(i, sigma);
941 Resolution_E_dPt_Pt_ITS0rebin_2->SetBinError(i, sigmaE);
946 TH1F *Resolution_E_dPt_Pt_ITS1rebin_1 = new TH1F("Resolution_E_dPt_Pt_ITS1rebin_1", "mean Electron Resolution dPt vs Pt 1 ITS clusters", 30, ptbinning) ;
947 TH1F *Resolution_E_dPt_Pt_ITS1rebin_2 = new TH1F("Resolution_E_dPt_Pt_ITS1rebin_2", "sigma Electron Resolution dPt vs Pt 1 ITS clusters", 30, ptbinning) ;
948 for (Int_t i = 1; i < 30 + 1 ; i ++){
949 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
950 TH1D *EITS1 = Resolution_E_dPt_Pt_ITS1rebin->ProjectionY("EITS1", i, i);
951 EITS1->Fit(f0,"0RME");
952 Double_t rp = f0->GetParameter(2);
953 Double_t mp = f0->GetParameter(1);
954 Double_t ymin = mp -(rp * 2.);
955 Double_t ymax = mp + (rp * 2.);
956 Double_t deviation = 100;
958 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
959 while(deviation > precision && counter < 100){
960 f1->SetRange(ymin,ymax);
961 EITS1->Fit(f1,"0RME");
962 Double_t rp2 = f1->GetParameter(2);
963 if (rp2>rp){ deviation = rp2-rp;}
964 else {deviation = rp -rp2 ;}
966 mp = f1->GetParameter(1);
971 Double_t mean = f1->GetParameter(1);
972 Double_t meanE = f1->GetParError(1);
973 Double_t sigma = f1->GetParameter(2);
974 Double_t sigmaE = f1->GetParError(2);
976 Resolution_E_dPt_Pt_ITS1rebin_1->SetBinContent(i, mean);
977 Resolution_E_dPt_Pt_ITS1rebin_1->SetBinError(i, meanE);
978 Resolution_E_dPt_Pt_ITS1rebin_2->SetBinContent(i, sigma);
979 Resolution_E_dPt_Pt_ITS1rebin_2->SetBinError(i, sigmaE);
984 TH1F *Resolution_E_dPt_Pt_ITS2rebin_1 = new TH1F("Resolution_E_dPt_Pt_ITS2rebin_1", "mean Electron Resolution dPt vs Pt 2 ITS clusters", 30, ptbinning) ;
985 TH1F *Resolution_E_dPt_Pt_ITS2rebin_2 = new TH1F("Resolution_E_dPt_Pt_ITS2rebin_2", "sigma Electron Resolution dPt vs Pt 2 ITS clusters", 30, ptbinning) ;
986 for (Int_t i = 1; i < 30 + 1 ; i ++){
987 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
988 TH1D *EITS2 = Resolution_E_dPt_Pt_ITS2rebin->ProjectionY("EITS2", i, i);
989 EITS2->Fit(f0,"0RME");
990 Double_t rp = f0->GetParameter(2);
991 Double_t mp = f0->GetParameter(1);
992 Double_t ymin = mp -(rp * 2.);
993 Double_t ymax = mp + (rp * 2.);
994 Double_t deviation = 100;
996 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
997 while(deviation > precision && counter < 100){
998 f1->SetRange(ymin,ymax);
999 EITS2->Fit(f1,"0RME");
1000 Double_t rp2 = f1->GetParameter(2);
1001 if (rp2>rp){ deviation = rp2-rp;}
1002 else {deviation = rp -rp2 ;}
1004 mp = f1->GetParameter(1);
1005 ymin = mp -(rp * 2);
1006 ymax = mp +(rp * 2);
1009 Double_t mean = f1->GetParameter(1);
1010 Double_t meanE = f1->GetParError(1);
1011 Double_t sigma = f1->GetParameter(2);
1012 Double_t sigmaE = f1->GetParError(2);
1014 Resolution_E_dPt_Pt_ITS2rebin_1->SetBinContent(i, mean);
1015 Resolution_E_dPt_Pt_ITS2rebin_1->SetBinError(i, meanE);
1016 Resolution_E_dPt_Pt_ITS2rebin_2->SetBinContent(i, sigma);
1017 Resolution_E_dPt_Pt_ITS2rebin_2->SetBinError(i, sigmaE);
1022 TH1F *Resolution_E_dPt_Pt_ITS3rebin_1 = new TH1F("Resolution_E_dPt_Pt_ITS3rebin_1", "mean Electron Resolution dPt vs Pt 3 ITS clusters", 30, ptbinning) ;
1023 TH1F *Resolution_E_dPt_Pt_ITS3rebin_2 = new TH1F("Resolution_E_dPt_Pt_ITS3rebin_2", "sigma Electron Resolution dPt vs Pt 3 ITS clusters", 30, ptbinning) ;
1024 for (Int_t i = 1; i < 30 + 1 ; i ++){
1025 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
1026 TH1D *EITS3 = Resolution_E_dPt_Pt_ITS3rebin->ProjectionY("EITS3", i, i);
1027 EITS3->Fit(f0,"0RME");
1028 Double_t rp = f0->GetParameter(2);
1029 Double_t mp = f0->GetParameter(1);
1030 Double_t ymin = mp -(rp * 2.);
1031 Double_t ymax = mp + (rp * 2.);
1032 Double_t deviation = 100;
1034 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
1035 while(deviation > precision && counter < 100){
1036 f1->SetRange(ymin,ymax);
1037 EITS3->Fit(f1,"0RME");
1038 Double_t rp2 = f1->GetParameter(2);
1039 if (rp2>rp){ deviation = rp2-rp;}
1040 else {deviation = rp -rp2 ;}
1042 mp = f1->GetParameter(1);
1043 ymin = mp -(rp * 2);
1044 ymax = mp +(rp * 2);
1047 Double_t mean = f1->GetParameter(1);
1048 Double_t meanE = f1->GetParError(1);
1049 Double_t sigma = f1->GetParameter(2);
1050 Double_t sigmaE = f1->GetParError(2);
1052 Resolution_E_dPt_Pt_ITS3rebin_1->SetBinContent(i, mean);
1053 Resolution_E_dPt_Pt_ITS3rebin_1->SetBinError(i, meanE);
1054 Resolution_E_dPt_Pt_ITS3rebin_2->SetBinContent(i, sigma);
1055 Resolution_E_dPt_Pt_ITS3rebin_2->SetBinError(i, sigmaE);
1060 TH1F *Resolution_E_dPt_Pt_ITS4rebin_1 = new TH1F("Resolution_E_dPt_Pt_ITS4rebin_1", "mean Electron Resolution dPt vs Pt 4 ITS clusters", 30, ptbinning) ;
1061 TH1F *Resolution_E_dPt_Pt_ITS4rebin_2 = new TH1F("Resolution_E_dPt_Pt_ITS4rebin_2", "sigma Electron Resolution dPt vs Pt 4 ITS clusters", 30, ptbinning) ;
1062 for (Int_t i = 1; i < 30 + 1 ; i ++){
1063 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
1064 TH1D *EITS4 = Resolution_E_dPt_Pt_ITS4rebin->ProjectionY("EITS4", i, i);
1065 EITS4->Fit(f0,"0RME");
1066 Double_t rp = f0->GetParameter(2);
1067 Double_t mp = f0->GetParameter(1);
1068 Double_t ymin = mp -(rp * 2.);
1069 Double_t ymax = mp + (rp * 2.);
1070 Double_t deviation = 100;
1072 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
1073 while(deviation > precision && counter < 100){
1074 f1->SetRange(ymin,ymax);
1075 EITS4->Fit(f1,"0RME");
1076 Double_t rp2 = f1->GetParameter(2);
1077 if (rp2>rp){ deviation = rp2-rp;}
1078 else {deviation = rp -rp2 ;}
1080 mp = f1->GetParameter(1);
1081 ymin = mp -(rp * 2);
1082 ymax = mp +(rp * 2);
1085 Double_t mean = f1->GetParameter(1);
1086 Double_t meanE = f1->GetParError(1);
1087 Double_t sigma = f1->GetParameter(2);
1088 Double_t sigmaE = f1->GetParError(2);
1090 Resolution_E_dPt_Pt_ITS4rebin_1->SetBinContent(i, mean);
1091 Resolution_E_dPt_Pt_ITS4rebin_1->SetBinError(i, meanE);
1092 Resolution_E_dPt_Pt_ITS4rebin_2->SetBinContent(i, sigma);
1093 Resolution_E_dPt_Pt_ITS4rebin_2->SetBinError(i, sigmaE);
1098 TH1F *Resolution_E_dPt_Pt_ITS5rebin_1 = new TH1F("Resolution_E_dPt_Pt_ITS5rebin_1", "mean Electron Resolution dPt vs Pt 5 ITS clusters", 30, ptbinning) ;
1099 TH1F *Resolution_E_dPt_Pt_ITS5rebin_2 = new TH1F("Resolution_E_dPt_Pt_ITS5rebin_2", "mean Electron Resolution dPt vs Pt 5 ITS clusters", 30, ptbinning) ;
1100 for (Int_t i = 1; i < 30 + 1 ; i ++){
1101 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
1102 TH1D *EITS5 = Resolution_E_dPt_Pt_ITS5rebin->ProjectionY("EITS5", i, i);
1103 EITS5->Fit(f0,"0RME");
1104 Double_t rp = f0->GetParameter(2);
1105 Double_t mp = f0->GetParameter(1);
1106 Double_t ymin = mp -(rp * 2.);
1107 Double_t ymax = mp + (rp * 2.);
1108 Double_t deviation = 100;
1110 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
1111 while(deviation > precision && counter < 100){
1112 f1->SetRange(ymin,ymax);
1113 EITS5->Fit(f1,"0RME");
1114 Double_t rp2 = f1->GetParameter(2);
1115 if (rp2>rp){ deviation = rp2-rp;}
1116 else {deviation = rp -rp2 ;}
1118 mp = f1->GetParameter(1);
1119 ymin = mp -(rp * 2);
1120 ymax = mp +(rp * 2);
1123 Double_t mean = f1->GetParameter(1);
1124 Double_t meanE = f1->GetParError(1);
1125 Double_t sigma = f1->GetParameter(2);
1126 Double_t sigmaE = f1->GetParError(2);
1128 Resolution_E_dPt_Pt_ITS5rebin_1->SetBinContent(i, mean);
1129 Resolution_E_dPt_Pt_ITS5rebin_1->SetBinError(i, meanE);
1130 Resolution_E_dPt_Pt_ITS5rebin_2->SetBinContent(i, sigma);
1131 Resolution_E_dPt_Pt_ITS5rebin_2->SetBinError(i, sigmaE);
1136 TH1F *Resolution_E_dPt_Pt_ITS6rebin_1 = new TH1F("Resolution_E_dPt_Pt_ITS6rebin_1", "mean Electron Resolution dPt vs Pt 6 ITS clusters", 30, ptbinning) ;
1137 TH1F *Resolution_E_dPt_Pt_ITS6rebin_2 = new TH1F("Resolution_E_dPt_Pt_ITS6rebin_2", "sigma Electron Resolution dPt vs Pt 6 ITS clusters", 30, ptbinning) ;
1138 for (Int_t i = 1; i < 30 + 1 ; i ++){
1139 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
1140 TH1D *EITS6 = Resolution_E_dPt_Pt_ITS6rebin->ProjectionY("EITS6", i, i);
1141 EITS6->Fit(f0,"0RME");
1142 Double_t rp = f0->GetParameter(2);
1143 Double_t mp = f0->GetParameter(1);
1144 Double_t ymin = mp -(rp * 2.);
1145 Double_t ymax = mp + (rp * 2.);
1146 Double_t deviation = 100;
1148 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
1149 while(deviation > precision && counter < 100){
1150 f1->SetRange(ymin,ymax);
1151 EITS6->Fit(f1,"0RME");
1152 Double_t rp2 = f1->GetParameter(2);
1153 if (rp2>rp){ deviation = rp2-rp;}
1154 else {deviation = rp -rp2 ;}
1156 mp = f1->GetParameter(1);
1157 ymin = mp -(rp * 2);
1158 ymax = mp +(rp * 2);
1161 Double_t mean = f1->GetParameter(1);
1162 Double_t meanE = f1->GetParError(1);
1163 Double_t sigma = f1->GetParameter(2);
1164 Double_t sigmaE = f1->GetParError(2);
1166 Resolution_E_dPt_Pt_ITS6rebin_1->SetBinContent(i, mean);
1167 Resolution_E_dPt_Pt_ITS6rebin_1->SetBinError(i, meanE);
1168 Resolution_E_dPt_Pt_ITS6rebin_2->SetBinContent(i, sigma);
1169 Resolution_E_dPt_Pt_ITS6rebin_2->SetBinError(i, sigmaE);
1175 //********************************** Fitting with TPC bins ****************************************
1177 TH1F *Resolution_E_dPt_Ptrebin_1 = new TH1F("Resolution_E_dPt_Ptrebin_1", "mean Electron Resolution dPt vs Pt", 30, ptbinning) ;
1178 TH1F *Resolution_E_dPt_Ptrebin_2 = new TH1F("Resolution_E_dPt_Ptrebin_2", "sigma Electron Resolution dPt vs Pt", 30, ptbinning) ;
1179 for (Int_t i = 1; i < 30 + 1 ; i ++){
1180 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
1181 TH1D *PtbinE = Resolution_E_dPt_Ptrebin->ProjectionY("PtbinE", i, i);
1182 PtbinE->Fit(f0,"0RME");
1183 Double_t rp = f0->GetParameter(2);
1184 Double_t mp = f0->GetParameter(1);
1185 Double_t ymin = mp -(rp * 2.);
1186 Double_t ymax = mp + (rp * 2.);
1187 Double_t deviation = 100;
1189 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
1190 while(deviation > precision && counter < 100){
1191 f1->SetRange(ymin,ymax);
1192 PtbinE->Fit(f1,"0RME");
1193 Double_t rp2 = f1->GetParameter(2);
1194 if (rp2>rp){ deviation = rp2-rp;}
1195 else {deviation = rp -rp2 ;}
1197 mp = f1->GetParameter(1);
1198 ymin = mp -(rp * 2);
1199 ymax = mp +(rp * 2);
1202 Double_t mean = f1->GetParameter(1);
1203 Double_t meanE = f1->GetParError(1);
1204 Double_t sigma = f1->GetParameter(2);
1205 Double_t sigmaE = f1->GetParError(2);
1207 Resolution_E_dPt_Ptrebin_1->SetBinContent(i, mean);
1208 Resolution_E_dPt_Ptrebin_1->SetBinError(i, meanE);
1209 Resolution_E_dPt_Ptrebin_2->SetBinContent(i, sigma);
1210 Resolution_E_dPt_Ptrebin_2->SetBinError(i, sigmaE);
1215 TH1F *Resolution_P_dPt_Ptrebin_1 = new TH1F("Resolution_P_dPt_Ptrebin_1", "mean Positron Resolution dPt vs Pt", 30, ptbinning) ;
1216 TH1F *Resolution_P_dPt_Ptrebin_2 = new TH1F("Resolution_P_dPt_Ptrebin_2", "sigma Positron Resolution dPt vs Pt", 30, ptbinning) ;
1217 for (Int_t i = 1; i < 30 + 1 ; i ++){
1218 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
1219 TH1D *PtbinP = Resolution_P_dPt_Ptrebin->ProjectionY("PtbinP", i, i);
1220 PtbinP->Fit(f0,"0RME");
1221 Double_t rp = f0->GetParameter(2);
1222 Double_t mp = f0->GetParameter(1);
1223 Double_t ymin = mp -(rp * 2.);
1224 Double_t ymax = mp + (rp * 2.);
1225 Double_t deviation = 100;
1227 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
1228 while(deviation > precision && counter < 100){
1229 f1->SetRange(ymin,ymax);
1230 PtbinP->Fit(f1,"0RME");
1231 Double_t rp2 = f1->GetParameter(2);
1232 if (rp2>rp){ deviation = rp2-rp;}
1233 else {deviation = rp -rp2 ;}
1235 mp = f1->GetParameter(1);
1236 ymin = mp -(rp * 2.);
1237 ymax = mp +(rp * 2.);
1240 Double_t mean = f1->GetParameter(1);
1241 Double_t meanE = f1->GetParError(1);
1242 Double_t sigma = f1->GetParameter(2);
1243 Double_t sigmaE = f1->GetParError(2);
1245 Resolution_P_dPt_Ptrebin_1->SetBinContent(i, mean);
1246 Resolution_P_dPt_Ptrebin_1->SetBinError(i, meanE);
1247 Resolution_P_dPt_Ptrebin_2->SetBinContent(i, sigma);
1248 Resolution_P_dPt_Ptrebin_2->SetBinError(i, sigmaE);
1253 TH1F *Resolution_Gamma_dPt_Ptrebin_1 = new TH1F("Resolution_Gamma_dPt_Ptrebin_1", "mean Gamma Resolution dPt vs Pt", 30, ptbinning) ;
1254 TH1F *Resolution_Gamma_dPt_Ptrebin_2 = new TH1F("Resolution_Gamma_dPt_Ptrebin_2", "sigma Gamma Resolution dPt vs Pt", 30, ptbinning) ;
1255 for (Int_t i = 1; i < 30 + 1 ; i ++){
1256 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
1257 TH1D *PtbinGamma = Resolution_Gamma_dPt_Ptrebin->ProjectionY("PtbinGamma", i, i);
1258 PtbinGamma->Fit(f0,"0RME");
1259 Double_t rp = f0->GetParameter(2);
1260 Double_t mp = f0->GetParameter(1);
1261 Double_t ymin = mp -(rp * 2.);
1262 Double_t ymax = mp + (rp * 2.);
1263 Double_t deviation = 100;
1265 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
1266 while(deviation > precision && counter < 100){
1267 f1->SetRange(ymin,ymax);
1268 PtbinGamma->Fit(f1,"0RME");
1269 Double_t rp2 = f1->GetParameter(2);
1270 if (rp2>rp){ deviation = rp2-rp;}
1271 else {deviation = rp -rp2 ;}
1273 mp = f1->GetParameter(1);
1274 ymin = mp -(rp * 2);
1275 ymax = mp +(rp * 2);
1278 Double_t mean = f1->GetParameter(1);
1279 Double_t meanE = f1->GetParError(1);
1280 Double_t sigma = f1->GetParameter(2);
1281 Double_t sigmaE = f1->GetParError(2);
1283 Resolution_Gamma_dPt_Ptrebin_1->SetBinContent(i, mean);
1284 Resolution_Gamma_dPt_Ptrebin_1->SetBinError(i, meanE);
1285 Resolution_Gamma_dPt_Ptrebin_2->SetBinContent(i, sigma);
1286 Resolution_Gamma_dPt_Ptrebin_2->SetBinError(i, sigmaE);
1292 //******************************** Fitting for Phi binning *******************************************************************
1294 TH1F *Resolution_Gamma_dPt_Phi_1 = new TH1F("Resolution_Gamma_dPt_Phi_1", "mean Gamma Resolution dPt vs Phi", 100, -TMath::Pi(), TMath::Pi()) ;
1295 TH1F *Resolution_Gamma_dPt_Phi_2 = new TH1F("Resolution_Gamma_dPt_Phi_2", "sigma Gamma Resolution dPt vs Phi", 100, -TMath::Pi(), TMath::Pi()) ;
1296 for (Int_t i = 1; i < 100 + 1 ; i ++){
1297 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
1298 TH1D *PhibinGamma = Resolution_Gamma_dPt_Phi->ProjectionY("PhibinGamma", i, i);
1299 PhibinGamma->Fit(f0,"0RME");
1300 Double_t rp = f0->GetParameter(2);
1301 Double_t mp = f0->GetParameter(1);
1302 Double_t ymin = mp -(rp * 2);
1303 Double_t ymax = mp +(rp * 2);
1304 Double_t deviation = 100;
1306 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
1307 while(deviation > precision && counter < 100){
1308 f1->SetRange(ymin,ymax);
1309 PhibinGamma->Fit(f1,"0RME");
1310 Double_t rp2 = f1->GetParameter(2);
1311 if (rp2>rp){ deviation = rp2-rp;}
1312 else {deviation = rp -rp2 ;}
1314 mp = f1->GetParameter(1);
1315 ymin = mp -(rp * 2);
1316 ymax = mp +(rp * 2);
1319 Double_t mean = f1->GetParameter(1);
1320 Double_t meanE = f1->GetParError(1);
1321 Double_t sigma = f1->GetParameter(2);
1322 Double_t sigmaE = f1->GetParError(2);
1324 Resolution_Gamma_dPt_Phi_1->SetBinContent(i, mean);
1325 Resolution_Gamma_dPt_Phi_1->SetBinError(i, meanE);
1326 Resolution_Gamma_dPt_Phi_2->SetBinContent(i, sigma);
1327 Resolution_Gamma_dPt_Phi_2->SetBinError(i, sigmaE);
1332 TH1F *Resolution_E_dPt_Phi_1 = new TH1F("Resolution_E_dPt_Phi_1", "mean Electron Resolution dPt vs Phi", 100, -TMath::Pi(), TMath::Pi()) ;
1333 TH1F *Resolution_E_dPt_Phi_2 = new TH1F("Resolution_E_dPt_Phi_2", "sigma Electron Resolution dPt vs Phi", 100, -TMath::Pi(), TMath::Pi()) ;
1334 for (Int_t i = 1; i < 100 + 1 ; i ++){
1335 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
1336 TH1D *PhibinE = Resolution_E_dPt_Phi->ProjectionY("PhibinE", i, i);
1337 PhibinE->Fit(f0,"0RME");
1338 Double_t rp = f0->GetParameter(2);
1339 Double_t mp = f0->GetParameter(1);
1340 Double_t ymin = mp -(rp * 2);
1341 Double_t ymax = mp +(rp * 2);
1342 Double_t deviation = 100;
1344 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
1345 while(deviation > precision && counter < 100){
1346 f1->SetRange(ymin,ymax);
1347 PhibinE->Fit(f1,"0RME");
1348 Double_t rp2 = f1->GetParameter(2);
1349 if (rp2>rp){ deviation = rp2-rp;}
1350 else {deviation = rp -rp2 ;}
1352 mp = f1->GetParameter(1);
1353 ymin = mp -(rp * 2);
1354 ymax = mp +(rp * 2);
1357 Double_t mean = f1->GetParameter(1);
1358 Double_t meanE = f1->GetParError(1);
1359 Double_t sigma = f1->GetParameter(2);
1360 Double_t sigmaE = f1->GetParError(2);
1362 Resolution_E_dPt_Phi_1->SetBinContent(i, mean);
1363 Resolution_E_dPt_Phi_1->SetBinError(i, meanE);
1364 Resolution_E_dPt_Phi_2->SetBinContent(i, sigma);
1365 Resolution_E_dPt_Phi_2->SetBinError(i, sigmaE);
1370 TH1F *Resolution_P_dPt_Phi_1 = new TH1F("Resolution_P_dPt_Phi_1", "mean Positron Resolution dPt vs Phi", 100, -TMath::Pi(), TMath::Pi()) ;
1371 TH1F *Resolution_P_dPt_Phi_2 = new TH1F("Resolution_P_dPt_Phi_2", "sigma Positron Resolution dPt vs Phi", 100, -TMath::Pi(), TMath::Pi()) ;
1372 for (Int_t i = 1; i < 100 + 1 ; i ++){
1373 TF1 *f0 = new TF1("f0", "gaus", -10.,10.);
1374 TH1D *PhibinP = Resolution_P_dPt_Phi->ProjectionY("PhibinP", i, i);
1375 PhibinP->Fit(f0,"0RME");
1376 Double_t rp = f0->GetParameter(2);
1377 Double_t mp = f0->GetParameter(1);
1378 Double_t ymin = mp -(rp * 2);
1379 Double_t ymax = mp +(rp * 2);
1380 Double_t deviation = 100;
1382 TF1* f1 = new TF1 ("f1", "gaus", ymin, ymax);
1383 while(deviation > precision && counter < 100){
1384 f1->SetRange(ymin,ymax);
1385 PhibinP->Fit(f1,"0RME");
1386 Double_t rp2 = f1->GetParameter(2);
1387 if (rp2>rp){ deviation = rp2-rp;}
1388 else {deviation = rp -rp2 ;}
1390 mp = f1->GetParameter(1);
1391 ymin = mp -(rp * 2);
1392 ymax = mp +(rp * 2);
1395 Double_t mean = f1->GetParameter(1);
1396 Double_t meanE = f1->GetParError(1);
1397 Double_t sigma = f1->GetParameter(2);
1398 Double_t sigmaE = f1->GetParError(2);
1400 Resolution_P_dPt_Phi_1->SetBinContent(i, mean);
1401 Resolution_P_dPt_Phi_1->SetBinError(i, meanE);
1402 Resolution_P_dPt_Phi_2->SetBinContent(i, sigma);
1403 Resolution_P_dPt_Phi_2->SetBinError(i, sigmaE);
1410 //********************************************************************************************************
1411 //*************************************** creating ps-file ***********************************************
1412 //********************************************************************************************************
1414 TPostScript *ps_characteristics;
1415 ps_characteristics = new TPostScript(Form("%s%s.ps",path,output),111);
1417 //******************************* Performance *********************************************
1419 ps_characteristics->NewPage();
1421 TCanvas * c5 = new TCanvas("c5","",700,1000); // gives the page size
1422 pad_c5 = new TPad("pad_c4","",0.05,0.05,0.95,0.85,0); // gives the size of the histo areas
1423 pad_c5->SetFillColor(0);
1424 pad_c5->GetFrame()->SetFillColor(0);
1425 pad_c5->SetBorderMode(0);
1426 pad_c5->Divide(2,2);
1430 leg1 = new TLegend( 0.6,0.82,0.92,0.9);
1431 leg1->SetTextSize(0.03);
1432 leg1->SetFillColor(0);
1433 leg1->AddEntry(Resolution_MC_Pt,("MC truth"));
1434 leg1->AddEntry(Resolution_ESD_Pt,("MC reconstructed"));
1435 pad_c5->cd(1)->SetLogy(1);
1437 DrawAutoGammaHistos( Resolution_MC_Pt,
1439 "p_{t} distribution of the #gamma","p_{t} ","N_{#gamma}",
1445 pad_c5->cd(1)->Update();
1448 DrawAutoGammaHistos( Resolution_MC_Z,
1450 "Z distribution of conversion point","Z [cm] ","N_{#gamma}",
1456 pad_c5->cd(2)->Update();
1459 DrawAutoGammaHistos( Resolution_MC_R,
1461 "R distribution of conversion point","R [cm] ","N_{#gamma}",
1467 pad_c5->cd(3)->Update();
1470 //************************************ Resolution Gamma dPt vs Pt **********************************
1471 ps_characteristics->NewPage();
1472 TCanvas * c0 = new TCanvas("c0","",700,1000); // gives the page size
1473 pad_c0 = new TPad("pad_c0","",0.05,0.05,0.95,0.85,0); // gives the size of the histo areas
1474 pad_c0->SetFillColor(0);
1475 pad_c0->GetFrame()->SetFillColor(0);
1476 pad_c0->SetBorderMode(0);
1477 pad_c0->Divide(2,2);
1480 pad_c0->cd(1)->SetLogz(1);
1481 pad_c0->cd(1)->SetLogx(1);
1482 pad_c0->cd(2)->SetLogz(1);
1483 pad_c0->cd(2)->SetLogx(1);
1485 pad_c0->cd(1)->SetRightMargin(0.17);
1487 DrawAutoGammaHisto2D( Resolution_Gamma_dPt_Pt,
1488 "", "p_{t} [GeV/c]", "dp_{t}/p_{t,MC} [%]", "",
1491 pad_c0->cd(1)->Update();
1493 pad_c0->cd(2)->SetRightMargin(0.17);
1495 DrawAutoGammaHisto2D( Resolution_Gamma_dPt_Ptrebin,
1496 "", "p_{t} [GeV/c]", "dp_{t}/p_{t,MC} [%]", "",
1499 pad_c0->cd(2)->Update();
1503 StylingSliceHistos(Resolution_Gamma_dPt_Ptrebin_1,0.8);
1504 Resolution_Gamma_dPt_Ptrebin_1->SetMarkerColor(kRed+2);
1505 Resolution_Gamma_dPt_Ptrebin_1->SetLineColor(kBlue-8);
1506 DrawResolutionGammaHisto( Resolution_Gamma_dPt_Ptrebin_1,
1507 "", "p_{t} [GeV/c]", "Peak pos. dp_{t}/p_{t,MC} [%]",
1511 pad_c0->cd(3)->Update();
1514 StylingSliceHistos(Resolution_Gamma_dPt_Ptrebin_2,0.8);
1515 Resolution_Gamma_dPt_Ptrebin_2->SetMarkerColor(kRed+2);
1516 Resolution_Gamma_dPt_Ptrebin_2->SetLineColor(kBlue-8);
1517 DrawResolutionGammaHisto( Resolution_Gamma_dPt_Ptrebin_2,
1518 "", "p_{t} [GeV/c]", " #sigma dp_{t}/p_{t,MC} [%] ",
1522 pad_c0->cd(4)->Update();
1527 //************************************ Resolution E dPt vs Pt **********************************
1528 ps_characteristics->NewPage();
1530 TCanvas * c1 = new TCanvas("c1","",700,1000); // gives the page size
1531 pad_c1 = new TPad("pad_c1","",0.05,0.05,0.95,0.85,0); // gives the size of the histo areas
1532 pad_c1->SetFillColor(0);
1533 pad_c1->GetFrame()->SetFillColor(0);
1534 pad_c1->SetBorderMode(0);
1535 pad_c1->Divide(2,2);
1538 pad_c1->cd(1)->SetLogz(1);
1539 pad_c1->cd(1)->SetLogx(1);
1540 pad_c1->cd(2)->SetLogz(1);
1541 pad_c1->cd(2)->SetLogx(1);
1543 pad_c1->cd(1)->SetRightMargin(0.17);
1545 DrawAutoGammaHisto2D( Resolution_E_dPt_Pt,
1546 "", "p_{t} [GeV/c]", "dp_{t}/p_{t,MC} [%]", "",
1549 pad_c1->cd(1)->Update();
1551 pad_c1->cd(2)->SetRightMargin(0.17);
1553 DrawAutoGammaHisto2D( Resolution_E_dPt_Ptrebin,
1554 "", "p_{t} [GeV/c]", "dp_{t}/p_{t,MC} [%]", "",
1557 pad_c1->cd(2)->Update();
1561 StylingSliceHistos(Resolution_E_dPt_Ptrebin_1,0.8);
1562 Resolution_E_dPt_Ptrebin_1->SetMarkerColor(kRed+2);
1563 Resolution_E_dPt_Ptrebin_1->SetLineColor(kBlue-8);
1564 DrawResolutionGammaHisto( Resolution_E_dPt_Ptrebin_1,
1565 "", "p_{t} [GeV/c]", "Peak pos. dp_{t}/p_{t,MC} [%]",
1569 pad_c1->cd(3)->Update();
1572 StylingSliceHistos(Resolution_E_dPt_Ptrebin_2,0.8);
1573 Resolution_E_dPt_Ptrebin_2->SetMarkerColor(kRed+2);
1574 Resolution_E_dPt_Ptrebin_2->SetLineColor(kBlue-8);
1575 DrawResolutionGammaHisto( Resolution_E_dPt_Ptrebin_2,
1576 "", "p_{t} [GeV/c]", " #sigma dp_{t}/p_{t,MC} [%]",
1580 pad_c1->cd(4)->Update();
1584 //******************************* Resoltution E dPt vs Pt ITS dependent ***************************
1586 ps_characteristics->NewPage();
1588 TCanvas * c2 = new TCanvas("c2","",700,1000); // gives the page size
1589 pad_c2 = new TPad("pad_c2","",0.05,0.05,0.95,0.85,0); // gives the size of the histo areas
1590 pad_c2->SetFillColor(0);
1591 pad_c2->GetFrame()->SetFillColor(0);
1592 pad_c2->SetBorderMode(0);
1593 pad_c2->Divide(1,2);
1597 leg2 = new TLegend( 0.6,0.72,0.92,0.9);
1598 leg2->SetTextSize(0.03);
1599 leg2->SetFillColor(0); pad_c5->cd(1);
1600 leg2->AddEntry(Resolution_E_dPt_Pt_ITS0rebin_1,("only TPC"));
1601 // leg2->AddEntry(Resolution_E_dPt_Pt_ITS1rebin_1,("1 ITS cluster"));
1602 leg2->AddEntry(Resolution_E_dPt_Pt_ITS2rebin_1,("2 ITS cluster"));
1603 // leg2->AddEntry(Resolution_E_dPt_Pt_ITS3rebin_1,("3 ITS cluster"));
1604 leg2->AddEntry(Resolution_E_dPt_Pt_ITS4rebin_1,("4 ITS cluster"));
1605 leg2->AddEntry(Resolution_E_dPt_Pt_ITS5rebin_1,("5 ITS cluster"));
1606 leg2->AddEntry(Resolution_E_dPt_Pt_ITS6rebin_1,("6 ITS cluster"));
1609 StylingSliceHistos( Resolution_E_dPt_Pt_ITS0rebin_1,0.8);
1610 Resolution_E_dPt_Pt_ITS0rebin_1->SetMarkerColor(kRed+2);
1611 Resolution_E_dPt_Pt_ITS0rebin_1->SetLineColor(kRed+2);
1612 DrawResolutionGammaHisto( Resolution_E_dPt_Pt_ITS0rebin_1,
1613 "", "p_{t} [GeV/c]", "Peak pos. dp_{t}/p_{t,MC} [%]",
1617 /* StylingSliceHistos( Resolution_E_dPt_Pt_ITS1rebin_1,1);
1618 Resolution_E_dPt_Pt_ITS1rebin_1->SetMarkerColor(kBlue+2);
1619 Resolution_E_dPt_Pt_ITS1rebin_1->SetLineColor(kBlue+2);
1620 Resolution_E_dPt_Pt_ITS1rebin_1->Draw("same");
1621 */ StylingSliceHistos( Resolution_E_dPt_Pt_ITS2rebin_1,0.8);
1622 Resolution_E_dPt_Pt_ITS2rebin_1->SetMarkerColor(kViolet+2);
1623 Resolution_E_dPt_Pt_ITS2rebin_1->SetLineColor(kViolet+2);
1624 Resolution_E_dPt_Pt_ITS2rebin_1->Draw("same");
1625 /* StylingSliceHistos( Resolution_E_dPt_Pt_ITS3rebin_1,1);
1626 Resolution_E_dPt_Pt_ITS3rebin_1->SetMarkerColor(kOrange+2);
1627 Resolution_E_dPt_Pt_ITS3rebin_1->SetLineColor(kOrange+2);
1628 Resolution_E_dPt_Pt_ITS3rebin_1->Draw("same");
1629 */ StylingSliceHistos( Resolution_E_dPt_Pt_ITS4rebin_1,0.8);
1630 Resolution_E_dPt_Pt_ITS4rebin_1->SetMarkerColor(kCyan+2);
1631 Resolution_E_dPt_Pt_ITS4rebin_1->SetLineColor(kCyan+2);
1632 Resolution_E_dPt_Pt_ITS4rebin_1->Draw("same");
1633 StylingSliceHistos( Resolution_E_dPt_Pt_ITS5rebin_1,1);
1634 Resolution_E_dPt_Pt_ITS5rebin_1->SetMarkerColor(kGreen+2);
1635 Resolution_E_dPt_Pt_ITS5rebin_1->SetLineColor(kGreen+2);
1636 Resolution_E_dPt_Pt_ITS5rebin_1->Draw("same");
1637 StylingSliceHistos( Resolution_E_dPt_Pt_ITS6rebin_1,0.8);
1638 Resolution_E_dPt_Pt_ITS6rebin_1->SetMarkerColor(kMagenta+2);
1639 Resolution_E_dPt_Pt_ITS6rebin_1->SetLineColor(kMagenta+2);
1640 Resolution_E_dPt_Pt_ITS6rebin_1->Draw("same");
1642 pad_c2->cd(1)->Update();
1645 StylingSliceHistos( Resolution_E_dPt_Pt_ITS0rebin_2,0.8);
1646 Resolution_E_dPt_Pt_ITS0rebin_2->SetMarkerColor(kRed+2);
1647 Resolution_E_dPt_Pt_ITS0rebin_2->SetLineColor(kRed+2);
1648 DrawResolutionGammaHisto( Resolution_E_dPt_Pt_ITS0rebin_2,
1649 "", "p_{t} [GeV/c]", "#sigma dp_{t}/p_{t,MC} [%]",
1653 /* StylingSliceHistos( Resolution_E_dPt_Pt_ITS1rebin_2,1);
1654 Resolution_E_dPt_Pt_ITS1rebin_2->SetMarkerColor(kBlue+2);
1655 Resolution_E_dPt_Pt_ITS1rebin_2->SetLineColor(kBlue+2);
1656 Resolution_E_dPt_Pt_ITS1rebin_2->Draw("same");
1657 */ StylingSliceHistos( Resolution_E_dPt_Pt_ITS2rebin_2,0.8);
1658 Resolution_E_dPt_Pt_ITS2rebin_2->SetMarkerColor(kViolet+2);
1659 Resolution_E_dPt_Pt_ITS2rebin_2->SetLineColor(kViolet+2);
1660 Resolution_E_dPt_Pt_ITS2rebin_2->Draw("same");
1661 /* StylingSliceHistos( Resolution_E_dPt_Pt_ITS3rebin_2,1);
1662 Resolution_E_dPt_Pt_ITS3rebin_2->SetMarkerColor(kOrange+2);
1663 Resolution_E_dPt_Pt_ITS3rebin_2->SetLineColor(kOrange+2);
1664 Resolution_E_dPt_Pt_ITS3rebin_2->Draw("same");
1665 */ StylingSliceHistos( Resolution_E_dPt_Pt_ITS4rebin_2,0.8);
1666 Resolution_E_dPt_Pt_ITS4rebin_2->SetMarkerColor(kCyan+2);
1667 Resolution_E_dPt_Pt_ITS4rebin_2->SetLineColor(kCyan+2);
1668 Resolution_E_dPt_Pt_ITS4rebin_2->Draw("same");
1669 StylingSliceHistos( Resolution_E_dPt_Pt_ITS5rebin_2,0.8);
1670 Resolution_E_dPt_Pt_ITS5rebin_2->SetMarkerColor(kGreen+2);
1671 Resolution_E_dPt_Pt_ITS5rebin_2->SetLineColor(kGreen+2);
1672 Resolution_E_dPt_Pt_ITS5rebin_2->Draw("same");
1673 StylingSliceHistos( Resolution_E_dPt_Pt_ITS6rebin_2,0.8);
1674 Resolution_E_dPt_Pt_ITS6rebin_2->SetMarkerColor(kMagenta+2);
1675 Resolution_E_dPt_Pt_ITS6rebin_2->SetLineColor(kMagenta+2);
1676 Resolution_E_dPt_Pt_ITS6rebin_2->Draw("same");
1678 pad_c2->cd(2)->Update();
1683 //************************************ Resolution P dPt vs Pt **********************************
1685 ps_characteristics->NewPage();
1687 TCanvas * c3 = new TCanvas("c3","",700,1000); // gives the page size
1688 pad_c3 = new TPad("pad_c3","",0.05,0.05,0.95,0.85,0); // gives the size of the histo areas
1689 pad_c3->SetFillColor(0);
1690 pad_c3->GetFrame()->SetFillColor(0);
1691 pad_c3->SetBorderMode(0);
1692 pad_c3->Divide(2,2);
1695 pad_c3->cd(1)->SetLogz(1);
1696 pad_c3->cd(1)->SetLogx(1);
1697 pad_c3->cd(2)->SetLogz(1);
1698 pad_c3->cd(2)->SetLogx(1);
1700 pad_c3->cd(1)->SetRightMargin(0.17);
1702 DrawAutoGammaHisto2D( Resolution_P_dPt_Pt,
1703 "", "p_{t} [GeV/c]", "dp_{t}/p_{t,MC} [%]", "",
1706 pad_c3->cd(1)->Update();
1708 pad_c3->cd(2)->SetRightMargin(0.17);
1710 DrawAutoGammaHisto2D( Resolution_P_dPt_Ptrebin,
1711 "", "p_{t} [GeV/c]", "dp_{t}/p_{t,MC} [%]", "",
1714 pad_c3->cd(2)->Update();
1718 StylingSliceHistos(Resolution_P_dPt_Ptrebin_1,0.8);
1719 Resolution_P_dPt_Ptrebin_1->SetMarkerColor(kRed+2);
1720 Resolution_P_dPt_Ptrebin_1->SetLineColor(kBlue-8) ;
1721 DrawResolutionGammaHisto( Resolution_P_dPt_Ptrebin_1,
1722 "", "p_{t} [GeV/c]", "Peak pos. dp_{t}/p_{t,MC} [%]",
1726 pad_c3->cd(3)->Update();
1729 StylingSliceHistos(Resolution_P_dPt_Ptrebin_2,0.8);
1730 Resolution_P_dPt_Ptrebin_2->SetMarkerColor(kRed+2);
1731 Resolution_P_dPt_Ptrebin_2->SetLineColor(kBlue-8);
1732 DrawResolutionGammaHisto( Resolution_P_dPt_Ptrebin_2,
1733 "", "p_{t} [GeV/c]", " #sigma dp_{t}/p_{t,MC} [%]",
1737 pad_c3->cd(4)->Update();
1741 //******************************* Resoltution P dPt vs Pt ITS dependent ***************************
1743 ps_characteristics->NewPage();
1745 TCanvas * c4 = new TCanvas("c4","",700,1000); // gives the page size
1746 pad_c4 = new TPad("pad_c4","",0.05,0.05,0.95,0.85,0); // gives the size of the histo areas
1747 pad_c4->SetFillColor(0);
1748 pad_c4->GetFrame()->SetFillColor(0);
1749 pad_c4->SetBorderMode(0);
1750 pad_c4->Divide(1,2);
1754 StylingSliceHistos( Resolution_P_dPt_Pt_ITS0rebin_1,0.8);
1755 Resolution_P_dPt_Pt_ITS0rebin_1->SetMarkerColor(kRed+2);
1756 Resolution_P_dPt_Pt_ITS0rebin_1->SetLineColor(kRed+2);
1757 DrawResolutionGammaHisto( Resolution_P_dPt_Pt_ITS0rebin_1,
1758 "", "p_{t} [GeV/c]", "Peak pos. dp_{t}/p_{t,MC} [%]",
1762 /* StylingSliceHistos( Resolution_P_dPt_Pt_ITS1rebin_1,1);
1763 Resolution_P_dPt_Pt_ITS1rebin_1->SetMarkerColor(kBlue+2);
1764 Resolution_P_dPt_Pt_ITS1rebin_1->SetLineColor(kBlue+2);
1765 Resolution_P_dPt_Pt_ITS1rebin_1->Draw("same");
1766 */ StylingSliceHistos( Resolution_P_dPt_Pt_ITS2rebin_1,0.8);
1767 Resolution_P_dPt_Pt_ITS2rebin_1->SetMarkerColor(kViolet+2);
1768 Resolution_P_dPt_Pt_ITS2rebin_1->SetLineColor(kViolet+2);
1769 Resolution_P_dPt_Pt_ITS2rebin_1->Draw("same");
1770 /* StylingSliceHistos( Resolution_P_dPt_Pt_ITS3rebin_1,1);
1771 Resolution_P_dPt_Pt_ITS3rebin_1->SetMarkerColor(kOrange+2);
1772 Resolution_P_dPt_Pt_ITS3rebin_1->SetLineColor(kOrange+2);
1773 Resolution_P_dPt_Pt_ITS3rebin_1->Draw("same");
1774 */ StylingSliceHistos( Resolution_P_dPt_Pt_ITS4rebin_1,0.8);
1775 Resolution_P_dPt_Pt_ITS4rebin_1->SetMarkerColor(kCyan+2);
1776 Resolution_P_dPt_Pt_ITS4rebin_1->SetLineColor(kCyan+2);
1777 Resolution_P_dPt_Pt_ITS4rebin_1->Draw("same");
1778 StylingSliceHistos( Resolution_P_dPt_Pt_ITS5rebin_1,0.8);
1779 Resolution_P_dPt_Pt_ITS5rebin_1->SetMarkerColor(kGreen+2);
1780 Resolution_P_dPt_Pt_ITS5rebin_1->SetLineColor(kGreen+2);
1781 Resolution_P_dPt_Pt_ITS5rebin_1->Draw("same");
1782 StylingSliceHistos( Resolution_P_dPt_Pt_ITS6rebin_1,0.8);
1783 Resolution_P_dPt_Pt_ITS6rebin_1->SetMarkerColor(kMagenta+2);
1784 Resolution_P_dPt_Pt_ITS6rebin_1->SetLineColor(kMagenta+2);
1785 Resolution_P_dPt_Pt_ITS6rebin_1->Draw("same");
1787 pad_c4->cd(1)->Update();
1790 StylingSliceHistos( Resolution_P_dPt_Pt_ITS0rebin_2,0.8);
1791 Resolution_P_dPt_Pt_ITS0rebin_2->SetMarkerColor(kRed+2);
1792 Resolution_P_dPt_Pt_ITS0rebin_2->SetLineColor(kRed+2);
1793 DrawResolutionGammaHisto( Resolution_P_dPt_Pt_ITS0rebin_2,
1794 "", "p_{t} [GeV/c]", "#sigma dp_{t}/p_{t,MC} [%]",
1798 /* StylingSliceHistos( Resolution_P_dPt_Pt_ITS1rebin_2,1);
1799 Resolution_P_dPt_Pt_ITS1rebin_2->SetMarkerColor(kBlue+2);
1800 Resolution_P_dPt_Pt_ITS1rebin_2->SetLineColor(kBlue+2);
1801 Resolution_P_dPt_Pt_ITS1rebin_2->Draw("same");
1802 */ StylingSliceHistos( Resolution_P_dPt_Pt_ITS2rebin_2,0.8);
1803 Resolution_P_dPt_Pt_ITS2rebin_2->SetMarkerColor(kViolet+2);
1804 Resolution_P_dPt_Pt_ITS2rebin_2->SetLineColor(kViolet+2);
1805 Resolution_P_dPt_Pt_ITS2rebin_2->Draw("same");
1806 /* StylingSliceHistos( Resolution_P_dPt_Pt_ITS3rebin_2,1);
1807 Resolution_P_dPt_Pt_ITS3rebin_2->SetMarkerColor(kOrange+2);
1808 Resolution_P_dPt_Pt_ITS3rebin_2->SetLineColor(kOrange+2);
1809 Resolution_P_dPt_Pt_ITS3rebin_2->Draw("same");
1810 */ StylingSliceHistos( Resolution_P_dPt_Pt_ITS4rebin_2,0.8);
1811 Resolution_P_dPt_Pt_ITS4rebin_2->SetMarkerColor(kCyan+2);
1812 Resolution_P_dPt_Pt_ITS4rebin_2->SetLineColor(kCyan+2);
1813 Resolution_P_dPt_Pt_ITS4rebin_2->Draw("same");
1814 StylingSliceHistos( Resolution_P_dPt_Pt_ITS5rebin_2,1);
1815 Resolution_P_dPt_Pt_ITS5rebin_2->SetMarkerColor(kGreen+2);
1816 Resolution_P_dPt_Pt_ITS5rebin_2->SetLineColor(kGreen+2);
1817 Resolution_P_dPt_Pt_ITS5rebin_2->Draw("same");
1818 StylingSliceHistos( Resolution_P_dPt_Pt_ITS6rebin_2,0.8);
1819 Resolution_P_dPt_Pt_ITS6rebin_2->SetMarkerColor(kMagenta+2);
1820 Resolution_P_dPt_Pt_ITS6rebin_2->SetLineColor(kMagenta+2);
1821 Resolution_P_dPt_Pt_ITS6rebin_2->Draw("same");
1823 pad_c4->cd(2)->Update();
1827 //************************************ Resolution dZAbs vs R **********************************
1829 ps_characteristics->NewPage();
1831 TCanvas * c6 = new TCanvas("c6","",700,1000); // gives the page size
1832 pad_c6 = new TPad("pad_c6","",0.05,0.05,0.95,0.85,0); // gives the size of the histo areas
1833 pad_c6->SetFillColor(0);
1834 pad_c6->GetFrame()->SetFillColor(0);
1835 pad_c6->SetBorderMode(0);
1836 pad_c6->Divide(2,2);
1839 pad_c6->cd(1)->SetLogz(1);
1840 pad_c6->cd(1)->SetLogx(1);
1841 pad_c6->cd(2)->SetLogz(1);
1842 pad_c6->cd(2)->SetLogx(1);
1844 pad_c6->cd(1)->SetRightMargin(0.17);
1846 DrawAutoGammaHisto2D( Resolution_dZAbs_VS_R,
1847 "", "R [cm]", "dZ [cm]", "",
1850 pad_c6->cd(1)->Update();
1852 pad_c6->cd(2)->SetRightMargin(0.17);
1854 DrawAutoGammaHisto2D( Resolution_dZAbs_VS_Rrebin,
1855 "", "R [cm]", "dZ [cm]", "",
1858 pad_c6->cd(2)->Update();
1862 StylingSliceHistos(Resolution_dZAbs_VS_Rrebin_1,0.8);
1863 Resolution_dZAbs_VS_Rrebin_1->SetMarkerColor(kRed+2);
1864 Resolution_dZAbs_VS_Rrebin_1->SetLineColor(kBlue-8) ;
1865 DrawResolutionGammaHisto( Resolution_dZAbs_VS_Rrebin_1,
1866 "", "R [cm]", "Peak pos. dZ [cm]",
1870 pad_c6->cd(3)->Update();
1873 StylingSliceHistos(Resolution_dZAbs_VS_Rrebin_2,0.8);
1874 Resolution_dZAbs_VS_Rrebin_2->SetMarkerColor(kRed+2);
1875 Resolution_dZAbs_VS_Rrebin_2->SetLineColor(kBlue-8);
1876 DrawResolutionGammaHisto( Resolution_dZAbs_VS_Rrebin_2,
1877 "", "R [cm]", "#sigma dZ [cm]",
1881 pad_c6->cd(4)->Update();
1885 //************************************ Resolution dRAbs vs R **********************************
1887 ps_characteristics->NewPage();
1889 TCanvas * c7 = new TCanvas("c7","",700,1000); // gives the page size
1890 pad_c7 = new TPad("pad_c7","",0.05,0.05,0.95,0.85,0); // gives the size of the histo areas
1891 pad_c7->SetFillColor(0);
1892 pad_c7->GetFrame()->SetFillColor(0);
1893 pad_c7->SetBorderMode(0);
1894 pad_c7->Divide(2,2);
1897 pad_c7->cd(1)->SetLogz(1);
1898 pad_c7->cd(1)->SetLogx(1);
1899 pad_c7->cd(2)->SetLogz(1);
1900 pad_c7->cd(2)->SetLogx(1);
1902 pad_c7->cd(1)->SetRightMargin(0.17);
1904 DrawAutoGammaHisto2D( Resolution_dRAbs_VS_R,
1905 "", "R [cm]", "dR [cm]", "",
1908 pad_c7->cd(1)->Update();
1910 pad_c7->cd(2)->SetRightMargin(0.17);
1912 DrawAutoGammaHisto2D( Resolution_dRAbs_VS_Rrebin,
1913 "", "R [cm]", "dR [cm]", "",
1916 pad_c7->cd(2)->Update();
1920 StylingSliceHistos(Resolution_dRAbs_VS_Rrebin_1,0.8);
1921 Resolution_dRAbs_VS_Rrebin_1->SetMarkerColor(kRed+2);
1922 Resolution_dRAbs_VS_Rrebin_1->SetLineColor(kBlue-8) ;
1923 DrawResolutionGammaHisto( Resolution_dRAbs_VS_Rrebin_1,
1924 "", "R [cm]", "Peak pos. dR [cm]",
1928 pad_c7->cd(3)->Update();
1931 StylingSliceHistos(Resolution_dRAbs_VS_Rrebin_2,0.8);
1932 Resolution_dRAbs_VS_Rrebin_2->SetMarkerColor(kRed+2);
1933 Resolution_dRAbs_VS_Rrebin_2->SetLineColor(kBlue-8);
1934 DrawResolutionGammaHisto( Resolution_dRAbs_VS_Rrebin_2,
1935 "", "R [cm]", "#sigma dR [cm]",
1939 pad_c7->cd(4)->Update();
1943 //************************************ Resolution dPhiAbs vs R **********************************
1945 ps_characteristics->NewPage();
1947 TCanvas * c8 = new TCanvas("c8","",700,1000); // gives the page size
1948 pad_c8 = new TPad("pad_c8","",0.05,0.05,0.95,0.85,0); // gives the size of the histo areas
1949 pad_c8->SetFillColor(0);
1950 pad_c8->GetFrame()->SetFillColor(0);
1951 pad_c8->SetBorderMode(0);
1952 pad_c8->Divide(2,2);
1955 pad_c8->cd(1)->SetLogz(1);
1956 pad_c8->cd(1)->SetLogx(1);
1957 pad_c8->cd(2)->SetLogz(1);
1958 pad_c8->cd(2)->SetLogx(1);
1960 pad_c8->cd(1)->SetRightMargin(0.17);
1962 DrawAutoGammaHisto2D( Resolution_dPhiAbs_VS_R,
1963 "", "R [cm]", "d#phi[rad]", "",
1966 pad_c8->cd(1)->Update();
1968 pad_c8->cd(2)->SetRightMargin(0.17);
1970 DrawAutoGammaHisto2D( Resolution_dPhiAbs_VS_Rrebin,
1971 "", "R [cm]", "d#phi[rad]", "",
1974 pad_c8->cd(2)->Update();
1978 StylingSliceHistos(Resolution_dPhiAbs_VS_Rrebin_1,0.8);
1979 Resolution_dPhiAbs_VS_Rrebin_1->SetMarkerColor(kRed+2);
1980 Resolution_dPhiAbs_VS_Rrebin_1->SetLineColor(kBlue-8) ;
1981 DrawResolutionGammaHisto( Resolution_dPhiAbs_VS_Rrebin_1,
1982 "", "R [cm]", "Peak pos. d#phi[rad]",
1984 kFALSE, -0.0005, 0.001,
1986 pad_c8->cd(3)->Update();
1989 StylingSliceHistos(Resolution_dPhiAbs_VS_Rrebin_2,0.8);
1990 Resolution_dPhiAbs_VS_Rrebin_2->SetMarkerColor(kRed+2);
1991 Resolution_dPhiAbs_VS_Rrebin_2->SetLineColor(kBlue-8);
1992 DrawResolutionGammaHisto( Resolution_dPhiAbs_VS_Rrebin_2,
1993 "", "R [cm]", "#sigma d#phi[rad]",
1997 pad_c8->cd(4)->Update();
2001 //************************************ Resolution dpt vs R **********************************
2003 ps_characteristics->NewPage();
2005 TCanvas * c9 = new TCanvas("c9","",700,1000); // gives the page size
2006 pad_c9 = new TPad("pad_c9","",0.05,0.05,0.95,0.85,0); // gives the size of the histo areas
2007 pad_c9->SetFillColor(0);
2008 pad_c9->GetFrame()->SetFillColor(0);
2009 pad_c9->SetBorderMode(0);
2010 pad_c9->Divide(2,2);
2013 pad_c9->cd(1)->SetLogz(1);
2014 pad_c9->cd(1)->SetLogx(1);
2015 pad_c9->cd(2)->SetLogz(1);
2016 pad_c9->cd(2)->SetLogx(1);
2018 pad_c9->cd(1)->SetRightMargin(0.17);
2020 DrawAutoGammaHisto2D( Resolution_R_dPt,
2021 "", "R [cm]", "dp_{t}/p_{t,MC} [%]", "",
2024 pad_c9->cd(1)->Update();
2026 pad_c9->cd(2)->SetRightMargin(0.17);
2028 DrawAutoGammaHisto2D( Resolution_R_dPtrebin,
2029 "", "R [cm]", "dp_{t}/p_{t,MC} [%]", "",
2032 pad_c9->cd(2)->Update();
2036 StylingSliceHistos(Resolution_R_dPtrebin_1,0.8);
2037 Resolution_R_dPtrebin_1->SetMarkerColor(kRed+2);
2038 Resolution_R_dPtrebin_1->SetLineColor(kBlue-8) ;
2039 DrawResolutionGammaHisto( Resolution_R_dPtrebin_1,
2040 "", "R [cm]", "Peak pos. dp_{t}/p_{t,MC} [%]",
2042 kFALSE, -0.001, 0.001,
2044 pad_c9->cd(3)->Update();
2047 StylingSliceHistos(Resolution_R_dPtrebin_2,0.8);
2048 Resolution_R_dPtrebin_2->SetMarkerColor(kRed+2);
2049 Resolution_R_dPtrebin_2->SetLineColor(kBlue-8);
2050 DrawResolutionGammaHisto( Resolution_R_dPtrebin_2,
2051 "", "R [cm]", "#sigma dp_{t}/p_{t,MC} [%]",
2055 pad_c9->cd(4)->Update();
2059 //************************* Fitting for dPt in phi ********************************************************
2060 ps_characteristics->NewPage();
2062 TCanvas * c10 = new TCanvas("c10","",700,1000); // gives the page size
2063 pad_c10 = new TPad("pad_c10","",0.05,0.05,0.95,0.85,0); // gives the size of the histo areas
2064 pad_c10->SetFillColor(0);
2065 pad_c10->GetFrame()->SetFillColor(0);
2066 pad_c10->SetBorderMode(0);
2067 pad_c10->Divide(2,3);
2072 StylingSliceHistos(Resolution_Gamma_dPt_Phi_1,0.8);
2073 Resolution_Gamma_dPt_Phi_1->SetMarkerColor(kRed+2);
2074 Resolution_Gamma_dPt_Phi_1->SetLineColor(kBlue-8) ;
2075 DrawResolutionGammaHisto( Resolution_Gamma_dPt_Phi_1,
2076 "", "#phi [rad]", "Peak pos. dp_{t}/p_{t,MC} [%] Photon",
2080 pad_c10->cd(1)->Update();
2083 StylingSliceHistos(Resolution_Gamma_dPt_Phi_2,0.8);
2084 Resolution_Gamma_dPt_Phi_2->SetMarkerColor(kRed+2);
2085 Resolution_Gamma_dPt_Phi_2->SetLineColor(kBlue-8) ;
2086 DrawResolutionGammaHisto( Resolution_Gamma_dPt_Phi_2,
2087 "", "#phi [rad]", "#sigma dp_{t}/p_{t,MC} [%] Photon",
2091 pad_c10->cd(2)->Update();
2094 StylingSliceHistos(Resolution_E_dPt_Phi_1,0.8);
2095 Resolution_E_dPt_Phi_1->SetMarkerColor(kRed+2);
2096 Resolution_E_dPt_Phi_1->SetLineColor(kBlue-8) ;
2097 DrawResolutionGammaHisto( Resolution_E_dPt_Phi_1,
2098 "", "#phi [rad]", "Peak pos. dp_{t}/p_{t,MC} [%] Electron",
2100 kFALSE, -0.001, 0.001,
2102 pad_c10->cd(3)->Update();
2105 StylingSliceHistos(Resolution_E_dPt_Phi_2,0.8);
2106 Resolution_E_dPt_Phi_2->SetMarkerColor(kRed+2);
2107 Resolution_E_dPt_Phi_2->SetLineColor(kBlue-8) ;
2108 DrawResolutionGammaHisto( Resolution_E_dPt_Phi_2,
2109 "", "#phi [rad]", "#sigma dp_{t}/p_{t,MC} [%] Electron",
2113 pad_c10->cd(4)->Update();
2116 StylingSliceHistos(Resolution_P_dPt_Phi_1,0.8);
2117 Resolution_P_dPt_Phi_1->SetMarkerColor(kRed+2);
2118 Resolution_P_dPt_Phi_1->SetLineColor(kBlue-8) ;
2119 DrawResolutionGammaHisto( Resolution_P_dPt_Phi_1,
2120 "", "#phi [rad]", "Peak pos. dp_{t}/p_{t,MC} [%] Positron",
2122 kFALSE, -0.001, 0.001,
2124 pad_c10->cd(5)->Update();
2127 StylingSliceHistos(Resolution_P_dPt_Phi_2,0.8);
2128 Resolution_P_dPt_Phi_2->SetMarkerColor(kRed+2);
2129 Resolution_P_dPt_Phi_2->SetLineColor(kBlue-8) ;
2130 DrawResolutionGammaHisto( Resolution_P_dPt_Phi_2,
2131 "", "#phi [rad]", "#sigma dp_{t}/p_{t,MC} [%] Positron",
2135 pad_c10->cd(6)->Update();
2138 ps_characteristics->NewPage();
2140 //******************************** TRD investigation ******************************************************
2141 TCanvas * c11 = new TCanvas("c11","",700,1000); // gives the page size
2142 pad_c11 = new TPad("pad_c11","",0.05,0.05,0.95,0.85,0); // gives the size of the histo areas
2143 pad_c11->SetFillColor(0);
2144 pad_c11->GetFrame()->SetFillColor(0);
2145 pad_c11->SetBorderMode(0);
2146 pad_c11->Divide(2,2);
2149 pad_c11->cd(1)->SetLogz(1);
2150 pad_c11->cd(1)->SetLogx(1);
2151 pad_c11->cd(2)->SetLogz(1);
2152 pad_c11->cd(2)->SetLogx(1);
2153 pad_c11->cd(3)->SetLogz(1);
2154 pad_c11->cd(3)->SetLogx(1);
2155 pad_c11->cd(4)->SetLogz(1);
2156 pad_c11->cd(4)->SetLogx(1);
2159 pad_c11->cd(1)->SetRightMargin(0.17);
2161 DrawAutoGammaHisto2D( Resolution_E_nTRDclusters_ESDPt,
2162 "", "p_{t} [GeV/c]", "N_{clusters} Electron", "",
2165 pad_c11->cd(1)->Update();
2167 pad_c11->cd(2)->SetRightMargin(0.17);
2169 DrawAutoGammaHisto2D( Resolution_P_nTRDclusters_ESDPt,
2170 "", "p_{t} [GeV/c]", "N_{clusters} Positron", "",
2173 pad_c11->cd(2)->Update();
2175 pad_c11->cd(3)->SetRightMargin(0.17);
2177 DrawAutoGammaHisto2D( Resolution_E_nTRDtracklets_ESDPt,
2178 "", "p_{t} [GeV/c]", "N_{tracklets} Electron", "",
2181 pad_c11->cd(3)->Update();
2183 pad_c11->cd(4)->SetRightMargin(0.17);
2185 DrawAutoGammaHisto2D( Resolution_P_nTRDtracklets_ESDPt,
2186 "", "p_{t} [GeV/c]", "N_{tracklets} Positron", "",
2189 pad_c11->cd(4)->Update();
2197 ps_characteristics->Close();
2200 //****************************************************************************************************************
2201 //************************************ single plotting for better resolution *************************************
2202 //****************************************************************************************************************
2207 leg3 = new TLegend( 0.7,0.75,0.92,0.9);
2208 leg3->SetTextSize(0.03);
2209 leg3->SetFillColor(0);
2210 leg3->AddEntry(Resolution_Gamma_dPt_Phi_2,("Photons"));
2211 leg3->AddEntry(Resolution_E_dPt_Phi_2,("Electrons"));
2212 leg3->AddEntry(Resolution_P_dPt_Phi_2,("Positrons"));
2216 // ----------------------- Resolution dPt vs Phi ------------------------------------------------------------
2217 TCanvas * c2_2 = new TCanvas("c2_2","",10,10,700,1000); // gives the page size
2219 pad_c11 = new TPad("pad_c11","",0,0,1,1,0); // gives the size of the histo areas
2220 pad_c11->SetFillColor(0);
2221 pad_c11->GetFrame()->SetFillColor(0);
2222 pad_c11->SetBorderMode(0);
2223 pad_c11->Divide(1,2);
2226 pad_c11->cd(1)->SetBottomMargin(0.005);
2227 StylingSliceHistos(Resolution_E_dPt_Phi_1,0.8);
2228 Resolution_E_dPt_Phi_1->SetMarkerColor(kBlue+2);
2229 Resolution_E_dPt_Phi_1->SetLineColor(kBlue-9) ;
2230 DrawResolutionGammaHisto( Resolution_E_dPt_Phi_1,
2231 "", "#phi [rad]", "Peak pos. dp_{t}/p_{t,MC} [%]",
2233 kFALSE, -0.001, 0.001,
2235 StylingSliceHistos(Resolution_P_dPt_Phi_1,0.8);
2236 Resolution_P_dPt_Phi_1->SetMarkerColor(kRed+2);
2237 Resolution_P_dPt_Phi_1->SetLineColor(kRed-9) ;
2238 Resolution_P_dPt_Phi_1->Draw("same");
2239 StylingSliceHistos(Resolution_Gamma_dPt_Phi_1,0.8);
2240 Resolution_Gamma_dPt_Phi_1->SetMarkerColor(kCyan+3);
2241 Resolution_Gamma_dPt_Phi_1->SetLineColor(kCyan-9) ;
2242 Resolution_Gamma_dPt_Phi_1->Draw("same");
2244 DrawGammaLines(-TMath::Pi(), TMath::Pi(), 0,0,0.005);
2245 pad_c11->cd(2)->Update();
2247 pad_c11->cd(2)->SetTopMargin(0+0.01);
2248 StylingSliceHistos(Resolution_E_dPt_Phi_2,0.8);
2249 Resolution_E_dPt_Phi_2->SetMarkerColor(kBlue+2);
2250 Resolution_E_dPt_Phi_2->SetLineColor(kBlue-9) ;
2251 DrawResolutionGammaHisto( Resolution_E_dPt_Phi_2,
2252 "", "#phi [rad]", "#sigma dp_{t}/p_{t,MC} [%]",
2256 StylingSliceHistos(Resolution_P_dPt_Phi_2,0.8);
2257 Resolution_P_dPt_Phi_2->SetMarkerColor(kRed+2);
2258 Resolution_P_dPt_Phi_2->SetLineColor(kRed-9) ;
2259 Resolution_P_dPt_Phi_2->Draw("same");
2260 StylingSliceHistos(Resolution_Gamma_dPt_Phi_2,0.8);
2261 Resolution_Gamma_dPt_Phi_2->SetMarkerColor(kCyan+3);
2262 Resolution_Gamma_dPt_Phi_2->SetLineColor(kCyan-9) ;
2263 Resolution_Gamma_dPt_Phi_2->Draw("same");
2264 // leg3->Draw("same");
2266 c2_2->SaveAs(Form("%s%s/Resolution_dPt_Phi_1.%s",path,suffix,suffix));
2270 // ---------------------------- Resolution Electron, Gamma and Positron dPt s Pt -----------------------------------------
2271 TCanvas * c2_2 = new TCanvas("c2_2","",10,10,700,1000); // gives the page size
2273 pad_c11 = new TPad("pad_c11","",0,0,1,1,0); // gives the size of the histo areas
2274 pad_c11->SetFillColor(0);
2275 pad_c11->GetFrame()->SetFillColor(0);
2276 pad_c11->SetBorderMode(0);
2277 pad_c11->Divide(1,2);
2281 pad_c11->cd(1)->SetBottomMargin(0.005);
2282 StylingSliceHistos(Resolution_E_dPt_Ptrebin_1,0.8);
2283 Resolution_E_dPt_Ptrebin_1->SetMarkerColor(kBlue+2);
2284 Resolution_E_dPt_Ptrebin_1->SetLineColor(kBlue-8);
2285 DrawResolutionGammaHisto( Resolution_E_dPt_Ptrebin_1,
2286 "", "p_{t} [GeV/c]", " Peak position dp_{t}/p_{t,MC} [%]",
2290 StylingSliceHistos(Resolution_P_dPt_Ptrebin_1,0.8);
2291 Resolution_P_dPt_Ptrebin_1->SetMarkerColor(kRed+2);
2292 Resolution_P_dPt_Ptrebin_1->SetLineColor(kRed-9) ;
2293 Resolution_P_dPt_Ptrebin_1->Draw("same");
2294 StylingSliceHistos(Resolution_Gamma_dPt_Ptrebin_1,0.8);
2295 Resolution_Gamma_dPt_Ptrebin_1->SetMarkerColor(kCyan+3);
2296 Resolution_Gamma_dPt_Ptrebin_1->SetLineColor(kCyan-9) ;
2297 Resolution_Gamma_dPt_Ptrebin_1->Draw("same");
2298 DrawGammaLines(0.8, 50, 0,0,0.005);
2300 pad_c11->cd(2)->Update();
2302 pad_c11->cd(2)->SetTopMargin(0+0.01);
2303 StylingSliceHistos(Resolution_E_dPt_Ptrebin_2,0.8);
2304 Resolution_E_dPt_Ptrebin_2->SetMarkerColor(kBlue+2);
2305 Resolution_E_dPt_Ptrebin_2->SetLineColor(kBlue-8);
2306 DrawResolutionGammaHisto( Resolution_E_dPt_Ptrebin_2,
2307 "", "p_{t} [GeV/c]", " #sigma dp_{t}/p_{t,MC} [%]",
2311 StylingSliceHistos(Resolution_P_dPt_Ptrebin_2,0.8);
2312 Resolution_P_dPt_Ptrebin_2->SetMarkerColor(kRed+2);
2313 Resolution_P_dPt_Ptrebin_2->SetLineColor(kRed-9) ;
2314 Resolution_P_dPt_Ptrebin_2->Draw("same");
2315 StylingSliceHistos(Resolution_Gamma_dPt_Ptrebin_2,0.8);
2316 Resolution_Gamma_dPt_Ptrebin_2->SetMarkerColor(kCyan+3);
2317 Resolution_Gamma_dPt_Ptrebin_2->SetLineColor(kCyan-9) ;
2318 Resolution_Gamma_dPt_Ptrebin_2->Draw("same");
2319 pad_c11->cd(2)->Update();
2321 c2_2->SaveAs(Form("%s%s/Resolution_dPt_Pt_all.%s",path,suffix,suffix));
2325 // ----------------------------- Resolution dPhiAbs vs R ---------------------------------------
2326 TCanvas * c2_2 = new TCanvas("c2_2","",10,10,700,1000); // gives the page size
2328 pad_c11 = new TPad("pad_c11","",0,0,1,1,0); // gives the size of the histo areas
2329 pad_c11->SetFillColor(0);
2330 pad_c11->GetFrame()->SetFillColor(0);
2331 pad_c11->SetBorderMode(0);
2332 pad_c11->Divide(1,2);
2336 pad_c11->cd(1)->SetBottomMargin(0.005);
2337 StylingSliceHistos(Resolution_dPhiAbs_VS_Rrebin_1,0.8);
2338 Resolution_dPhiAbs_VS_Rrebin_1->SetMarkerColor(kRed+2);
2339 Resolution_dPhiAbs_VS_Rrebin_1->SetLineColor(kBlue-8) ;
2340 DrawResolutionGammaHisto( Resolution_dPhiAbs_VS_Rrebin_1,
2341 "", "R [cm]", "Peak position d#phi [rad]",
2343 kTRUE, -0.00038, 0.0004,
2345 DrawGammaLines(0.8, 120, 0,0,0.005);
2346 pad_c11->cd(1)->Update();
2348 pad_c11->cd(2)->SetTopMargin(0+0.04);
2349 StylingSliceHistos(Resolution_dPhiAbs_VS_Rrebin_2,0.8);
2350 Resolution_dPhiAbs_VS_Rrebin_2->SetMarkerColor(kRed+2);
2351 Resolution_dPhiAbs_VS_Rrebin_2->SetLineColor(kBlue-8);
2352 DrawResolutionGammaHisto( Resolution_dPhiAbs_VS_Rrebin_2,
2353 "", "R [cm]", "#sigma d#phi [rad]",
2355 kFALSE, 0.0, 0.00375,
2357 pad_c11->cd(2)->Update();
2359 c2_2->SaveAs(Form("%s%s/Resolution_dphiAbs_R.%s",path,suffix,suffix));
2363 // ----------------------------- Resolution dPt vs R -------------------------------
2364 TCanvas * c2_2 = new TCanvas("c2_2","",10,10,700,1000); // gives the page size
2366 pad_c11 = new TPad("pad_c11","",0,0,1,1,0); // gives the size of the histo areas
2367 pad_c11->SetFillColor(0);
2368 pad_c11->GetFrame()->SetFillColor(0);
2369 pad_c11->SetBorderMode(0);
2370 pad_c11->Divide(1,2);
2374 pad_c11->cd(1)->SetBottomMargin(0.005);
2375 StylingSliceHistos(Resolution_R_dPtrebin_1,0.8);
2376 Resolution_R_dPtrebin_1->SetMarkerColor(kRed+2);
2377 Resolution_R_dPtrebin_1->SetLineColor(kBlue-8) ;
2378 DrawResolutionGammaHisto( Resolution_R_dPtrebin_1,
2379 "", "R [cm]", "Peak position dp_{t}/p_{t,MC} [%]",
2383 DrawGammaLines(0.8, 120, 0,0,0.005);
2384 pad_c11->cd(2)->Update();
2386 pad_c11->cd(2)->SetTopMargin(0+0.005);
2387 StylingSliceHistos(Resolution_R_dPtrebin_2,0.8);
2388 Resolution_R_dPtrebin_2->SetMarkerColor(kRed+2);
2389 Resolution_R_dPtrebin_2->SetLineColor(kBlue-8);
2390 DrawResolutionGammaHisto( Resolution_R_dPtrebin_2,
2391 "", "R [cm]", "#sigma dp_{t}/p_{t,MC} [%]",
2395 pad_c11->cd(2)->Update();
2397 c2_2->SaveAs(Form("%s%s/Resolution_dPt_R.%s",path,suffix,suffix));
2401 // ---------------------------------- Resolution dRAbs vs R -------------------------------
2402 TCanvas * c2_2 = new TCanvas("c2_2","",10,10,700,1000); // gives the page size
2404 pad_c11 = new TPad("pad_c11","",0,0,1,1,0); // gives the size of the histo areas
2405 pad_c11->SetFillColor(0);
2406 pad_c11->GetFrame()->SetFillColor(0);
2407 pad_c11->SetBorderMode(0);
2408 pad_c11->Divide(1,2);
2412 pad_c11->cd(1)->SetBottomMargin(0.005);
2413 StylingSliceHistos(Resolution_dRAbs_VS_Rrebin_1,0.8);
2414 Resolution_dRAbs_VS_Rrebin_1->SetMarkerColor(kRed+2);
2415 Resolution_dRAbs_VS_Rrebin_1->SetLineColor(kBlue-8) ;
2416 DrawResolutionGammaHisto( Resolution_dRAbs_VS_Rrebin_1,
2417 "", "R [cm]", "Peak pos. dR [cm]",
2421 DrawGammaLines(0.8, 120, 0,0,0.005);
2422 pad_c11->cd(2)->Update();
2424 pad_c11->cd(2)->SetTopMargin(0+0.01);
2425 StylingSliceHistos(Resolution_dRAbs_VS_Rrebin_2,0.8);
2426 Resolution_dRAbs_VS_Rrebin_2->SetMarkerColor(kRed+2);
2427 Resolution_dRAbs_VS_Rrebin_2->SetLineColor(kBlue-8);
2428 DrawResolutionGammaHisto( Resolution_dRAbs_VS_Rrebin_2,
2429 "", "R [cm]", "#sigma dR [cm]",
2433 pad_c11->cd(2)->Update();
2435 c2_2->SaveAs(Form("%s%s/Resolution_dRAbs_R.%s",path,suffix,suffix));
2439 // -------------------------------- Resolution dZAbs vs R -----------------------------
2440 TCanvas * c2_2 = new TCanvas("c2_2","",10,10,700,1000); // gives the page size
2442 pad_c11 = new TPad("pad_c11","",0,0,1,1,0); // gives the size of the histo areas
2443 pad_c11->SetFillColor(0);
2444 pad_c11->GetFrame()->SetFillColor(0);
2445 pad_c11->SetBorderMode(0);
2446 pad_c11->Divide(1,2);
2450 pad_c11->cd(1)->SetBottomMargin(0.005);
2451 StylingSliceHistos(Resolution_dZAbs_VS_Rrebin_1,0.8);
2452 Resolution_dZAbs_VS_Rrebin_1->SetMarkerColor(kRed+2);
2453 Resolution_dZAbs_VS_Rrebin_1->SetLineColor(kBlue-8) ;
2454 DrawResolutionGammaHisto( Resolution_dZAbs_VS_Rrebin_1,
2455 "", "R [cm]", "Peak pos. dZ [cm]",
2459 DrawGammaLines(0.8, 120, 0,0,0.005);
2460 pad_c11->cd(2)->Update();
2462 pad_c11->cd(2)->SetTopMargin(0+0.005);
2463 StylingSliceHistos(Resolution_dZAbs_VS_Rrebin_2,0.8);
2464 Resolution_dZAbs_VS_Rrebin_2->SetMarkerColor(kRed+2);
2465 Resolution_dZAbs_VS_Rrebin_2->SetLineColor(kBlue-8);
2466 DrawResolutionGammaHisto( Resolution_dZAbs_VS_Rrebin_2,
2467 "", "R [cm]", "#sigma dZ [cm]",
2471 pad_c11->cd(2)->Update();
2473 c2_2->SaveAs(Form("%s%s/Resolution_dZAbs_R.%s",path,suffix,suffix));
2477 // -------------------------------- Resolution dPt vs Pt for different ITS clusters -----------
2478 TCanvas * c2_2 = new TCanvas("c2_2","",10,10,700,1000); // gives the page size
2480 pad_c11 = new TPad("pad_c11","",0,0,1,1,0); // gives the size of the histo areas
2481 pad_c11->SetFillColor(0);
2482 pad_c11->GetFrame()->SetFillColor(0);
2483 pad_c11->SetBorderMode(0);
2484 pad_c11->Divide(1,2);
2488 pad_c11->cd(1)->SetBottomMargin(0.005);
2489 StylingSliceHistos( Resolution_E_dPt_Pt_ITS0rebin_2,0.8);
2490 Resolution_E_dPt_Pt_ITS0rebin_2->SetMarkerColor(kRed+2);
2491 Resolution_E_dPt_Pt_ITS0rebin_2->SetLineColor(kRed+2);
2492 DrawResolutionGammaHisto( Resolution_E_dPt_Pt_ITS0rebin_2,
2493 "", "p_{t} [GeV/c]", "#sigma dp_{t}/p_{t,MC} [%] for Electrons",
2497 /* StylingSliceHistos( Resolution_E_dPt_Pt_ITS1rebin_2,1);
2498 Resolution_E_dPt_Pt_ITS1rebin_2->SetMarkerColor(kBlue+2);
2499 Resolution_E_dPt_Pt_ITS1rebin_2->SetLineColor(kBlue+2);
2500 Resolution_E_dPt_Pt_ITS1rebin_2->Draw("same");
2501 */ StylingSliceHistos( Resolution_E_dPt_Pt_ITS2rebin_2,0.8);
2502 Resolution_E_dPt_Pt_ITS2rebin_2->SetMarkerColor(kViolet+2);
2503 Resolution_E_dPt_Pt_ITS2rebin_2->SetLineColor(kViolet+2);
2504 Resolution_E_dPt_Pt_ITS2rebin_2->Draw("same");
2505 /* StylingSliceHistos( Resolution_E_dPt_Pt_ITS3rebin_2,1);
2506 Resolution_E_dPt_Pt_ITS3rebin_2->SetMarkerColor(kOrange+2);
2507 Resolution_E_dPt_Pt_ITS3rebin_2->SetLineColor(kOrange+2);
2508 Resolution_E_dPt_Pt_ITS3rebin_2->Draw("same");
2509 */ StylingSliceHistos( Resolution_E_dPt_Pt_ITS4rebin_2,0.8);
2510 Resolution_E_dPt_Pt_ITS4rebin_2->SetMarkerColor(kCyan+2);
2511 Resolution_E_dPt_Pt_ITS4rebin_2->SetLineColor(kCyan+2);
2512 Resolution_E_dPt_Pt_ITS4rebin_2->Draw("same");
2513 StylingSliceHistos( Resolution_E_dPt_Pt_ITS5rebin_2,0.8);
2514 Resolution_E_dPt_Pt_ITS5rebin_2->SetMarkerColor(kGreen+2);
2515 Resolution_E_dPt_Pt_ITS5rebin_2->SetLineColor(kGreen+2);
2516 Resolution_E_dPt_Pt_ITS5rebin_2->Draw("same");
2517 StylingSliceHistos( Resolution_E_dPt_Pt_ITS6rebin_2,0.8);
2518 Resolution_E_dPt_Pt_ITS6rebin_2->SetMarkerColor(kMagenta+2);
2519 Resolution_E_dPt_Pt_ITS6rebin_2->SetLineColor(kMagenta+2);
2520 Resolution_E_dPt_Pt_ITS6rebin_2->Draw("same");
2521 leg2 = new TLegend( 0.7,0.72,0.92,0.9);
2522 leg2->SetTextSize(0.03);
2523 leg2->SetFillColor(0);
2524 leg2->AddEntry(Resolution_E_dPt_Pt_ITS0rebin_2,("only TPC"));
2525 // leg2->AddEntry(Resolution_E_dPt_Pt_ITS1rebin_2,("1 ITS cluster"));
2526 leg2->AddEntry(Resolution_E_dPt_Pt_ITS2rebin_2,("2 ITS cluster"));
2527 // leg2->AddEntry(Resolution_E_dPt_Pt_ITS3rebin_2,("3 ITS cluster"));
2528 leg2->AddEntry(Resolution_E_dPt_Pt_ITS4rebin_2,("4 ITS cluster"));
2529 leg2->AddEntry(Resolution_E_dPt_Pt_ITS5rebin_2,("5 ITS cluster"));
2530 leg2->AddEntry(Resolution_E_dPt_Pt_ITS6rebin_2,("6 ITS cluster"));
2532 pad_c11->cd(1)->Update();
2534 pad_c11->cd(2)->SetTopMargin(0+0.01);
2535 StylingSliceHistos( Resolution_P_dPt_Pt_ITS0rebin_2,0.8);
2536 Resolution_P_dPt_Pt_ITS0rebin_2->SetMarkerColor(kRed+2);
2537 Resolution_P_dPt_Pt_ITS0rebin_2->SetLineColor(kRed+2);
2538 DrawResolutionGammaHisto( Resolution_P_dPt_Pt_ITS0rebin_2,
2539 "", "p_{t} [GeV/c]", "#sigma dp_{t}/p_{t,MC} [%] for Positrons",
2543 /* StylingSliceHistos( Resolution_P_dPt_Pt_ITS1rebin_2,1);
2544 Resolution_P_dPt_Pt_ITS1rebin_2->SetMarkerColor(kBlue+2);
2545 Resolution_P_dPt_Pt_ITS1rebin_2->SetLineColor(kBlue+2);
2546 Resolution_P_dPt_Pt_ITS1rebin_2->Draw("same");
2547 */ StylingSliceHistos( Resolution_P_dPt_Pt_ITS2rebin_2,0.8);
2548 Resolution_P_dPt_Pt_ITS2rebin_2->SetMarkerColor(kViolet+2);
2549 Resolution_P_dPt_Pt_ITS2rebin_2->SetLineColor(kViolet+2);
2550 Resolution_P_dPt_Pt_ITS2rebin_2->Draw("same");
2551 /* StylingSliceHistos( Resolution_P_dPt_Pt_ITS3rebin_2,1);
2552 Resolution_P_dPt_Pt_ITS3rebin_2->SetMarkerColor(kOrange+2);
2553 Resolution_P_dPt_Pt_ITS3rebin_2->SetLineColor(kOrange+2);
2554 Resolution_P_dPt_Pt_ITS3rebin_2->Draw("same");
2555 */ StylingSliceHistos( Resolution_P_dPt_Pt_ITS4rebin_2,0.8);
2556 Resolution_P_dPt_Pt_ITS4rebin_2->SetMarkerColor(kCyan+2);
2557 Resolution_P_dPt_Pt_ITS4rebin_2->SetLineColor(kCyan+2);
2558 Resolution_P_dPt_Pt_ITS4rebin_2->Draw("same");
2559 StylingSliceHistos( Resolution_P_dPt_Pt_ITS5rebin_2,1);
2560 Resolution_P_dPt_Pt_ITS5rebin_2->SetMarkerColor(kGreen+2);
2561 Resolution_P_dPt_Pt_ITS5rebin_2->SetLineColor(kGreen+2);
2562 Resolution_P_dPt_Pt_ITS5rebin_2->Draw("same");
2563 StylingSliceHistos( Resolution_P_dPt_Pt_ITS6rebin_2,0.8);
2564 Resolution_P_dPt_Pt_ITS6rebin_2->SetMarkerColor(kMagenta+2);
2565 Resolution_P_dPt_Pt_ITS6rebin_2->SetLineColor(kMagenta+2);
2566 Resolution_P_dPt_Pt_ITS6rebin_2->Draw("same");
2567 pad_c11->cd(2)->Update();
2569 c2_2->SaveAs(Form("%s%s/Resolution_dPt_PtITScluster.%s",path,suffix,suffix));
2573 // -------------------- TRD cluster and tracklet distributions for E and P of conversion --------------
2574 TCanvas * c2_2 = new TCanvas("c2_2","",10,10,2400,2000); // gives the page size
2576 pad_c11 = new TPad("pad_c11","",0,0,1,1,0); // gives the size of the histo areas
2577 pad_c11->SetFillColor(0);
2578 pad_c11->GetFrame()->SetFillColor(0);
2579 pad_c11->SetBorderMode(0);
2580 pad_c11->Divide(2,2);
2584 pad_c11->cd(1)->SetLogz(1);
2585 pad_c11->cd(1)->SetLogx(1);
2586 pad_c11->cd(2)->SetLogz(1);
2587 pad_c11->cd(2)->SetLogx(1);
2588 pad_c11->cd(3)->SetLogz(1);
2589 pad_c11->cd(3)->SetLogx(1);
2590 pad_c11->cd(4)->SetLogz(1);
2591 pad_c11->cd(4)->SetLogx(1);
2594 pad_c11->cd(1)->SetRightMargin(0.14);
2595 pad_c11->cd(1)->SetLeftMargin(0.14);
2596 pad_c11->cd(1)->SetTopMargin(0.01);
2597 pad_c11->cd(1)->SetBottomMargin(0.009);
2599 DrawAutoGammaHisto2DRes( Resolution_E_nTRDclusters_ESDPt,
2600 "", "p_{t} [GeV/c]", "N_{clusters} Electron", "",
2603 pad_c11->cd(1)->Update();
2605 pad_c11->cd(2)->SetRightMargin(0.14);
2606 pad_c11->cd(2)->SetLeftMargin(0.14);
2607 pad_c11->cd(2)->SetTopMargin(0.01);
2608 pad_c11->cd(2)->SetBottomMargin(0.009);
2610 DrawAutoGammaHisto2DRes( Resolution_P_nTRDclusters_ESDPt,
2611 "", "p_{t} [GeV/c]", "N_{clusters} Positron", "",
2615 pad_c11->cd(2)->Update();
2617 pad_c11->cd(3)->SetRightMargin(0.14);
2618 pad_c11->cd(3)->SetLeftMargin(0.14);
2619 pad_c11->cd(3)->SetTopMargin(0.006);
2621 DrawAutoGammaHisto2DRes( Resolution_E_nTRDtracklets_ESDPt,
2622 "", "p_{t} [GeV/c]", "N_{tracklets} Electron", "",
2625 pad_c11->cd(3)->Update();
2627 pad_c11->cd(4)->SetRightMargin(0.14);
2628 pad_c11->cd(4)->SetLeftMargin(0.14);
2629 pad_c11->cd(4)->SetTopMargin(0.006);
2631 DrawAutoGammaHisto2DRes( Resolution_P_nTRDtracklets_ESDPt,
2632 "", "p_{t} [GeV/c]", "N_{tracklets} Positron", "",
2635 pad_c11->cd(4)->Update();
2637 c2_2->SaveAs(Form("%s%s/TRDstudies.%s",path,suffix,suffix));
2641 leg4 = new TLegend( 0.7,0.75,0.92,0.9);
2642 leg4->SetTextSize(0.03);
2643 leg4->SetFillColor(0);
2644 leg4->AddEntry(ESD_ConvGamma_Pt,("Photons"));
2645 leg4->AddEntry(ESD_E_Pt,("Electrons"));
2646 leg4->AddEntry(ESD_P_Pt,("Positrons"));
2648 // ------------------ Only \sigma for already created plots ------------------------------
2649 TCanvas * c2_2 = new TCanvas("c2_2","",10,10,700,500); // gives the page size
2652 ESD_E_Pt->SetLineColor(kBlue+2) ;
2653 DrawResolutionGammaHisto( ESD_E_Pt,
2654 "", "p_{t} [GeV/c]", "N_{#gamma}",
2656 kFALSE, -0.001, 0.001,
2658 ESD_P_Pt->SetLineColor(kRed+2) ;
2659 ESD_P_Pt->Draw("same");
2660 ESD_ConvGamma_Pt->SetLineColor(kCyan+1) ;
2661 ESD_ConvGamma_Pt->Draw("same");
2664 c2_2->SaveAs(Form("%s%s/Resolution_Ptdistribution.%s",path,suffix,suffix));
2667 TCanvas * c2_2 = new TCanvas("c2_2","",10,10,700,500); // gives the page size
2669 c2_2->SetTopMargin(0+0.005);
2670 StylingSliceHistos(Resolution_dZAbs_VS_Rrebin_2,0.8);
2671 Resolution_dZAbs_VS_Rrebin_2->SetMarkerColor(kRed+2);
2672 Resolution_dZAbs_VS_Rrebin_2->SetLineColor(kBlue-8);
2673 DrawResolutionGammaHisto( Resolution_dZAbs_VS_Rrebin_2,
2674 "", "R [cm]", "#sigma dZ [cm]",
2679 c2_2->SaveAs(Form("%s%s/Resolution_Zdistributionsingle.%s",path,suffix,suffix));
2682 TCanvas * c2_2 = new TCanvas("c2_2","",10,10,700,500); // gives the page size
2684 c2_2->SetTopMargin(0+0.04);
2685 StylingSliceHistos(Resolution_dPhiAbs_VS_Rrebin_2,0.8);
2686 Resolution_dPhiAbs_VS_Rrebin_2->SetMarkerColor(kRed+2);
2687 Resolution_dPhiAbs_VS_Rrebin_2->SetLineColor(kBlue-8);
2688 DrawResolutionGammaHisto( Resolution_dPhiAbs_VS_Rrebin_2,
2689 "", "R [cm]", "#sigma d#phi [rad]",
2694 c2_2->SaveAs(Form("%s%s/Resolution_Phidistributionsingle.%s",path,suffix,suffix));
2697 TCanvas * c2_2 = new TCanvas("c2_2","",10,10,700,500); // gives the page size
2699 c2_2->SetTopMargin(0+0.01);
2700 StylingSliceHistos(Resolution_dRAbs_VS_Rrebin_2,0.8);
2701 Resolution_dRAbs_VS_Rrebin_2->SetMarkerColor(kRed+2);
2702 Resolution_dRAbs_VS_Rrebin_2->SetLineColor(kBlue-8);
2703 DrawResolutionGammaHisto( Resolution_dRAbs_VS_Rrebin_2,
2704 "", "R [cm]", "#sigma dR [cm]",
2709 c2_2->SaveAs(Form("%s%s/Resolution_Rdistributionsingle.%s",path,suffix,suffix));