Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QuickDeltaPtExtractor.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file QuickDeltaPtExtractor.C
1 // ----------------------------------------------------------------------------
2 // 'QuickDeltaPtExtractor.C'
3 // Derek Anderson
4 // 04.25.2023
5 //
6 // Quickly apply cuts to and extract plots of the track
7 // DeltaPt/Pt from the track evaluator.
8 // ----------------------------------------------------------------------------
9 
10 // standard c includes
11 #include <iostream>
12 // root includes
13 #include "TH1.h"
14 #include "TH2.h"
15 #include "TF1.h"
16 #include "TPad.h"
17 #include "TFile.h"
18 #include "TLine.h"
19 #include "TGraph.h"
20 #include "TError.h"
21 #include "TString.h"
22 #include "TNtuple.h"
23 #include "TLegend.h"
24 #include "TPaveText.h"
25 #include "TDirectory.h"
26 
27 using namespace std;
28 
29 // global constants
30 static const Ssiz_t NTxt = 3;
31 static const Ssiz_t NPad = 2;
32 static const Ssiz_t NPar = 3;
33 static const Ssiz_t NVtx = 4;
34 static const Ssiz_t NRange = 2;
35 static const Ssiz_t NProj = 8;
36 static const Ssiz_t NTrkCuts = 6;
37 static const Ssiz_t NDPtCuts = 7;
38 static const Ssiz_t NSigCuts = 5;
39 static const TString SInTrack = "ntp_track";
40 static const TString SInTruth = "ntp_gtrack";
41 
42 // default parameters
43 static const TString SInDef = "input/embed_only/final_merge/sPhenixG4_forPtCheck_embedScanOn_embedOnly.pt2040n100pim.d8m5y2023.root";
44 static const TString SOutDef = "varyDeltaPtCut.withPtDependentDeltaPtCut.pt2040n100pim.d10m5y2023.root";
45 
46 
47 
48 void QuickDeltaPtExtractor(const TString sInput = SInDef, const TString sOutput = SOutDef) {
49 
50  // lower verbosity
51  gErrorIgnoreLevel = kError;
52  cout << "\n Beginning delta-pt extractor script..." << endl;
53 
54  // cut parameters
55  const UInt_t nInttTrkMin = 1;
56  const UInt_t nMVtxTrkMin = 2;
57  const UInt_t nTpcTrkMin = 35;
58  const Double_t qualTrkMax = 10.;
59  const Double_t vzTrkMax = 10.;
60  const Double_t ptTrkMin = 0.1;
61  const Double_t ptDeltaMax[NDPtCuts] = {0.5, 0.25, 0.1, 0.05, 0.03, 0.02, 0.01};
62  const Double_t ptDeltaSig[NSigCuts] = {1., 1.5, 2., 2.5, 3.};
63  const Double_t normRange[NRange] = {0.2, 1.2};
64 
65  // histogram parameters
66  const TString sPtTrueBase = "PtTrue";
67  const TString sPtRecoBase = "PtReco";
68  const TString sPtFracBase = "PtFrac";
69  const TString sPtDeltaBase = "DeltaPt";
70  const TString sPtTrkTruBase = "PtTrkTruth";
71  const TString sPtProjBase = "DeltaPtProj";
72  const TString sRejCutBase = "Reject_flatDPtCut";
73  const TString sRejSigBase = "Reject_sigmaCut";
74  const TString sMuHiBase = "MeanPlusSigma";
75  const TString sMuLoBase = "MeanMinusSigma";
76  const TString sSigBase = "ProjectionSigma";
77  const TString sMuBase = "ProjectionMean";
78  const TString sEffBase = "Efficiency";
79  const TString sProjSuffix[NProj] = {"_pt05", "_pt1", "_pt2", "_pt5", "_pt10", "_pt20", "_pt30", "_pt40"};
80  const TString sDPtSuffix[NDPtCuts] = {"_dPt50", "_dPt25", "_dPt10", "_dPt05", "_dPt03", "_dPt02", "_dPt01"};
81  const TString sSigSuffix[NSigCuts] = {"_sigDPt1", "_sidDpt15", "_sigDPt2", "_sigDPt25", "_sigDPt3"};
82 
83  // plot parameters
84  const UInt_t iCutToDraw = NDPtCuts - 3;
85  const UInt_t iSigToDraw = NSigCuts - 3;
86  const UInt_t nEffRebin = 5;
87  const Bool_t doEffRebin = true;
88  const TString sBeforeTitle = "Before #Deltap_{T}/p_{T} cuts";
89  const TString sAfterCutTitle = "After #Deltap_{T}/p_{T} < 0.03 cut";
90  const TString sAfterSigTitle = "After 2 #times #sigma(#Deltap_{T}/p_{T}) cut";
91 
92  // histogram text parameters
93  const TString sTitle = "";
94  const TString sCounts = "counts";
95  const TString sPtTrueAxis = "p_{T}^{true} [GeV/c]";
96  const TString sPtRecoAxis = "p_{T}^{reco} [GeV/c]";
97  const TString sPtFracAxis = "p_{T}^{reco} / p_{T}^{true}";
98  const TString sPtDeltaAxis = "#Deltap_{T} / p_{T}^{reco}";
99  const TString sDeltaCutAxis = "max #Deltap_{T} / p_{T}^{reco}";
100  const TString sSigmaCutAxis = "n #times #sigma(#Deltap_{T} / p_{T}^{reco})";
101  const TString sSigProjAxis = "#sigma(#Deltap_{T} / p_{T}^{reco})";
102  const TString sMuProjAxis = "#mu(#Deltap_{T} / p_{T}^{reco}) #pm (n #times #sigma(#Deltap_{T} / p_{T}^{reco}))";
103  const TString sRejectAxis = "rejection factor";
104  const TString sEffAxis = "#epsilon_{trk}";
105 
106  // sigma calculation parameters
107  const Double_t ptProj[NProj] = {0.5, 1., 2., 5., 10., 20., 30., 40.};
108  const Double_t sigHiGuess[NPar] = {1., -1., 1.};
109  const Double_t sigLoGuess[NPar] = {1., -1., 1.};
110  const Double_t deltaFitRange[NRange] = {0., 0.1};
111  const Double_t ptFitRange[NRange] = {0.5, 40.};
112 
113  // histogram style parameters
114  const UInt_t fColTrue(923);
115  const UInt_t fColPure(923);
116  const UInt_t fColTrk(809);
117  const UInt_t fMarTrue(20);
118  const UInt_t fMarPure(20);
119  const UInt_t fMarTrk(46);
120  const UInt_t fColProj[NProj] = {799, 633, 899, 617, 879, 859, 839, 819};
121  const UInt_t fMarProj[NProj] = {20, 22, 23, 21, 33, 34, 47, 20};
122  const UInt_t fColCut[NDPtCuts] = {899, 909, 879, 889, 859, 869, 839};
123  const UInt_t fMarCut[NDPtCuts] = {24, 26, 32, 25, 27, 28, 30};
124  const Float_t rPtRange[NRange] = {0., 60.};
125  const Float_t rFracRange[NRange] = {0., 4.};
126  const Float_t rDeltaRange[NRange] = {0., 0.1};
127 
128  // graph/fit style parameters
129  const UInt_t fColFit[NProj] = {803, 636, 893, 620, 883, 863, 843, 813};
130  const UInt_t fColSigFit[NSigCuts] = {893, 903, 873, 883, 863};
131  const UInt_t fColSig[NSigCuts] = {899, 909, 879, 889, 859};
132  const UInt_t fMarSig[NSigCuts] = {24, 26, 32, 25, 27};
133 
134  // legend parameters
135  const TString sLegTrue("truth");
136  const TString sLegTrack("tracks (w/ cuts)");
137  const TString sLegMu("Mean #Deltap_{T} / p_{T}^{reco} (n = 0)");
138  const TString sInfo[NTxt] = {
139  "#bf{#it{sPHENIX}} Simulation",
140  "100 #pi^{-}/event, p_{T} #in (20, 40) GeV/c",
141  "#bf{Only #pi^{-}}"
142  };
143  const TString sLegProj[NProj] = {
144  "p_{T}^{reco} = 0.5 GeV/c",
145  "p_{T}^{reco} = 1 GeV/c",
146  "p_{T}^{reco} = 2 GeV/c",
147  "p_{T}^{reco} = 5 GeV/c",
148  "p_{T}^{reco} = 10 GeV/c",
149  "p_{T}^{reco} = 20 GeV/c",
150  "p_{T}^{reco} = 30 GeV/c",
151  "p_{T}^{reco} = 40 GeV/c"
152  };
153  const TString sLegCut[NDPtCuts] = {
154  "#Deltap_{T} / p_{T}^{reco} < 0.5",
155  "#Deltap_{T} / p_{T}^{reco} < 0.25",
156  "#Deltap_{T} / p_{T}^{reco} < 0.1",
157  "#Deltap_{T} / p_{T}^{reco} < 0.05",
158  "#Deltap_{T} / p_{T}^{reco} < 0.03",
159  "#Deltap_{T} / p_{T}^{reco} < 0.02",
160  "#Deltap_{T} / p_{T}^{reco} < 0.01"
161  };
162  const TString sLegProjSig[NSigCuts] = {
163  "n = 1",
164  "n = 1.5",
165  "n = 2",
166  "n = 2.5",
167  "n = 3"
168  };
169  const TString sLegDelta[NSigCuts] = {
170  "1 #times #sigma(#Deltap_{T} / p_{T}^{reco})",
171  "1.5 #times #sigma(#Deltap_{T} / p_{T}^{reco})",
172  "2 #times #sigma(#Deltap_{T} / p_{T}^{reco})",
173  "2.5 #times #sigma(#Deltap_{T} / p_{T}^{reco})",
174  "3 #times #sigma(#Deltap_{T} / p_{T}^{reco})"
175  };
176  const TString sLegSig[NSigCuts] = {
177  "#Deltap_{T} / p_{T}^{reco} #in 1 #times sigma(#Deltap_{T} / p_{T}^{reco})",
178  "#Deltap_{T} / p_{T}^{reco} #in 1.5 #times sigma(#Deltap_{T} / p_{T}^{reco})",
179  "#Deltap_{T} / p_{T}^{reco} #in 2 #times sigma(#Deltap_{T} / p_{T}^{reco})",
180  "#Deltap_{T} / p_{T}^{reco} #in 2.5 #times sigma(#Deltap_{T} / p_{T}^{reco})",
181  "#Deltap_{T} / p_{T}^{reco} #in 3 #times sigma(#Deltap_{T} / p_{T}^{reco})"
182  };
183  const TString sTrkCuts[NTrkCuts] = {
184  "|v_{z}| < 10 cm",
185  "N_{hit}^{intt} #geq 1",
186  "N_{hit}^{mvtx} > 2",
187  "N_{hit}^{tpc} > 35",
188  "p_{T}^{reco} > 0.1 GeV/c",
189  "quality < 10"
190  };
191 
192  // open files
193  TFile *fOutput = new TFile(sOutput.Data(), "recreate");
194  TFile *fInput = new TFile(sInput.Data(), "read");
195  if (!fInput || !fOutput) {
196  cerr << "PANIC: couldn't open a file!\n"
197  << " fInput = " << fInput << "\n"
198  << " fOutput = " << fOutput << "\n"
199  << endl;
200  return;
201  }
202  cout << " Opened files." << endl;
203 
204  // grab input tuples
205  TNtuple *ntTrack = (TNtuple*) fInput -> Get(SInTrack.Data());
206  TNtuple *ntTruth = (TNtuple*) fInput -> Get(SInTruth.Data());
207  if (!ntTrack || !ntTruth) {
208  cerr << "PANIC: couldn't grab aninput tuple!\n"
209  << " ntTrack = " << ntTrack << "\n"
210  << " ntTruth = " << ntTruth << "\n"
211  << endl;
212  return;
213  }
214  cout << " Grabbed input tuples." << endl;
215 
216  // declare track tuple addresses
217  Float_t trk_event;
218  Float_t trk_seed;
219  Float_t trk_trackID;
220  Float_t trk_crossing;
221  Float_t trk_px;
222  Float_t trk_py;
223  Float_t trk_pz;
224  Float_t trk_pt;
225  Float_t trk_eta;
226  Float_t trk_phi;
227  Float_t trk_deltapt;
228  Float_t trk_deltaeta;
229  Float_t trk_deltaphi;
230  Float_t trk_charge;
231  Float_t trk_quality;
232  Float_t trk_chisq;
233  Float_t trk_ndf;
234  Float_t trk_nhits;
235  Float_t trk_nmaps;
236  Float_t trk_nintt;
237  Float_t trk_ntpc;
238  Float_t trk_nmms;
239  Float_t trk_ntpc1;
240  Float_t trk_ntpc11;
241  Float_t trk_ntpc2;
242  Float_t trk_ntpc3;
243  Float_t trk_nlmaps;
244  Float_t trk_nlintt;
245  Float_t trk_nltpc;
246  Float_t trk_nlmms;
247  Float_t trk_layers;
248  Float_t trk_vertexID;
249  Float_t trk_vx;
250  Float_t trk_vy;
251  Float_t trk_vz;
252  Float_t trk_dca2d;
253  Float_t trk_dca2dsigma;
254  Float_t trk_dca3dxy;
255  Float_t trk_dca3dxysigma;
256  Float_t trk_dca3dz;
257  Float_t trk_dca3dzsigma;
258  Float_t trk_pcax;
259  Float_t trk_pcay;
260  Float_t trk_pcaz;
261  Float_t trk_gtrackID;
262  Float_t trk_gflavor;
263  Float_t trk_gnhits;
264  Float_t trk_gnmaps;
265  Float_t trk_gnintt;
266  Float_t trk_gntpc;
267  Float_t trk_gnmms;
268  Float_t trk_gnlmaps;
269  Float_t trk_gnlintt;
270  Float_t trk_gnltpc;
271  Float_t trk_gnlmms;
272  Float_t trk_gpx;
273  Float_t trk_gpy;
274  Float_t trk_gpz;
275  Float_t trk_gpt;
276  Float_t trk_geta;
277  Float_t trk_gphi;
278  Float_t trk_gvx;
279  Float_t trk_gvy;
280  Float_t trk_gvz;
281  Float_t trk_gvt;
282  Float_t trk_gfpx;
283  Float_t trk_gfpy;
284  Float_t trk_gfpz;
285  Float_t trk_gfx;
286  Float_t trk_gfy;
287  Float_t trk_gfz;
288  Float_t trk_gembed;
289  Float_t trk_gprimary;
290  Float_t trk_nfromtruth;
291  Float_t trk_nwrong;
292  Float_t trk_ntrumaps;
293  Float_t trk_ntruintt;
294  Float_t trk_ntrutpc;
295  Float_t trk_ntrumms;
296  Float_t trk_ntrutpc1;
297  Float_t trk_ntrutpc11;
298  Float_t trk_ntrutpc2;
299  Float_t trk_ntrutpc3;
300  Float_t trk_layersfromtruth;
301  Float_t trk_nhittpcall;
302  Float_t trk_nhittpcin;
303  Float_t trk_nhittpcmid;
304  Float_t trk_nhittpcout;
305  Float_t trk_nclusall;
306  Float_t trk_nclustpc;
307  Float_t trk_nclusintt;
308  Float_t trk_nclusmaps;
309  Float_t trk_nclusmms;
310 
311  // declare truth tuple addresses
312  Float_t tru_event;
313  Float_t tru_seed;
314  Float_t tru_gntracks;
315  Float_t tru_gtrackID;
316  Float_t tru_gflavor;
317  Float_t tru_gnhits;
318  Float_t tru_gnmaps;
319  Float_t tru_gnintt;
320  Float_t tru_gnmms;
321  Float_t tru_gnintt1;
322  Float_t tru_gnintt2;
323  Float_t tru_gnintt3;
324  Float_t tru_gnintt4;
325  Float_t tru_gnintt5;
326  Float_t tru_gnintt6;
327  Float_t tru_gnintt7;
328  Float_t tru_gnintt8;
329  Float_t tru_gntpc;
330  Float_t tru_gnlmaps;
331  Float_t tru_gnlintt;
332  Float_t tru_gnltpc;
333  Float_t tru_gnlmms;
334  Float_t tru_gpx;
335  Float_t tru_gpy;
336  Float_t tru_gpz;
337  Float_t tru_gpt;
338  Float_t tru_geta;
339  Float_t tru_gphi;
340  Float_t tru_gvx;
341  Float_t tru_gvy;
342  Float_t tru_gvz;
343  Float_t tru_gvt;
344  Float_t tru_gfpx;
345  Float_t tru_gfpy;
346  Float_t tru_gfpz;
347  Float_t tru_gfx;
348  Float_t tru_gfy;
349  Float_t tru_gfz;
350  Float_t tru_gembed;
351  Float_t tru_gprimary;
352  Float_t tru_trackID;
353  Float_t tru_px;
354  Float_t tru_py;
355  Float_t tru_pz;
356  Float_t tru_pt;
357  Float_t tru_eta;
358  Float_t tru_phi;
359  Float_t tru_deltapt;
360  Float_t tru_deltaeta;
361  Float_t tru_deltaphi;
362  Float_t tru_charge;
363  Float_t tru_quality;
364  Float_t tru_chisq;
365  Float_t tru_ndf;
366  Float_t tru_nhits;
367  Float_t tru_layers;
368  Float_t tru_nmaps;
369  Float_t tru_nintt;
370  Float_t tru_ntpc;
371  Float_t tru_nmms;
372  Float_t tru_ntpc1;
373  Float_t tru_ntpc11;
374  Float_t tru_ntpc2;
375  Float_t tru_ntpc3;
376  Float_t tru_nlmaps;
377  Float_t tru_nlintt;
378  Float_t tru_nltpc;
379  Float_t tru_nlmms;
380  Float_t tru_vertexID;
381  Float_t tru_vx;
382  Float_t tru_vy;
383  Float_t tru_vz;
384  Float_t tru_dca2d;
385  Float_t tru_dca2dsigma;
386  Float_t tru_dca3dxy;
387  Float_t tru_dca3dxysigma;
388  Float_t tru_dca3dz;
389  Float_t tru_dca3dzsigma;
390  Float_t tru_pcax;
391  Float_t tru_pcay;
392  Float_t tru_pcaz;
393  Float_t tru_nfromtruth;
394  Float_t tru_nwrong;
395  Float_t tru_ntrumaps;
396  Float_t tru_ntruintt;
397  Float_t tru_ntrutpc;
398  Float_t tru_ntrumms;
399  Float_t tru_ntrutpc1;
400  Float_t tru_ntrutpc11;
401  Float_t tru_ntrutpc2;
402  Float_t tru_ntrutpc3;
403  Float_t tru_layersfromtruth;
404  Float_t tru_nhittpcall;
405  Float_t tru_nhittpcin;
406  Float_t tru_nhittpcmid;
407  Float_t tru_nhittpcout;
408  Float_t tru_nclusall;
409  Float_t tru_nclustpc;
410  Float_t tru_nclusintt;
411  Float_t tru_nclusmaps;
412  Float_t tru_nclusmms;
413 
414  // set track branch addresses
415  ntTrack -> SetBranchAddress("event", &trk_event);
416  ntTrack -> SetBranchAddress("seed", &trk_seed);
417  ntTrack -> SetBranchAddress("trackID", &trk_trackID);
418  ntTrack -> SetBranchAddress("crossing", &trk_crossing);
419  ntTrack -> SetBranchAddress("px", &trk_px);
420  ntTrack -> SetBranchAddress("py", &trk_py);
421  ntTrack -> SetBranchAddress("pz", &trk_pz);
422  ntTrack -> SetBranchAddress("pt", &trk_pt);
423  ntTrack -> SetBranchAddress("eta", &trk_eta);
424  ntTrack -> SetBranchAddress("phi", &trk_phi);
425  ntTrack -> SetBranchAddress("deltapt", &trk_deltapt);
426  ntTrack -> SetBranchAddress("deltaeta", &trk_deltaeta);
427  ntTrack -> SetBranchAddress("deltaphi", &trk_deltaphi);
428  ntTrack -> SetBranchAddress("charge", &trk_charge);
429  ntTrack -> SetBranchAddress("quality", &trk_quality);
430  ntTrack -> SetBranchAddress("chisq", &trk_chisq);
431  ntTrack -> SetBranchAddress("ndf", &trk_ndf);
432  ntTrack -> SetBranchAddress("nhits", &trk_nhits);
433  ntTrack -> SetBranchAddress("nmaps", &trk_nmaps);
434  ntTrack -> SetBranchAddress("nintt", &trk_nintt);
435  ntTrack -> SetBranchAddress("ntpc", &trk_ntpc);
436  ntTrack -> SetBranchAddress("nmms", &trk_nmms);
437  ntTrack -> SetBranchAddress("ntpc1", &trk_ntpc1);
438  ntTrack -> SetBranchAddress("ntpc11", &trk_ntpc11);
439  ntTrack -> SetBranchAddress("ntpc2", &trk_ntpc2);
440  ntTrack -> SetBranchAddress("ntpc3", &trk_ntpc3);
441  ntTrack -> SetBranchAddress("nlmaps", &trk_nlmaps);
442  ntTrack -> SetBranchAddress("nlintt", &trk_nlintt);
443  ntTrack -> SetBranchAddress("nltpc", &trk_nltpc);
444  ntTrack -> SetBranchAddress("nlmms", &trk_nlmms);
445  ntTrack -> SetBranchAddress("layers", &trk_layers);
446  ntTrack -> SetBranchAddress("vertexID", &trk_vertexID);
447  ntTrack -> SetBranchAddress("vx", &trk_vx);
448  ntTrack -> SetBranchAddress("vy", &trk_vy);
449  ntTrack -> SetBranchAddress("vz", &trk_vz);
450  ntTrack -> SetBranchAddress("dca2d", &trk_dca2d);
451  ntTrack -> SetBranchAddress("dca2dsigma", &trk_dca2dsigma);
452  ntTrack -> SetBranchAddress("dca3dxy", &trk_dca3dxy);
453  ntTrack -> SetBranchAddress("dca3dxysigma", &trk_dca3dxysigma);
454  ntTrack -> SetBranchAddress("dca3dz", &trk_dca3dz);
455  ntTrack -> SetBranchAddress("dca3dzsigma", &trk_dca3dzsigma);
456  ntTrack -> SetBranchAddress("pcax", &trk_pcax);
457  ntTrack -> SetBranchAddress("pcay", &trk_pcay);
458  ntTrack -> SetBranchAddress("pcaz", &trk_pcaz);
459  ntTrack -> SetBranchAddress("gtrackID", &trk_gtrackID);
460  ntTrack -> SetBranchAddress("gflavor", &trk_gflavor);
461  ntTrack -> SetBranchAddress("gnhits", &trk_gnhits);
462  ntTrack -> SetBranchAddress("gnmaps", &trk_gnmaps);
463  ntTrack -> SetBranchAddress("gnintt", &trk_gnintt);
464  ntTrack -> SetBranchAddress("gntpc", &trk_gntpc);
465  ntTrack -> SetBranchAddress("gnmms", &trk_gnmms);
466  ntTrack -> SetBranchAddress("gnlmaps", &trk_gnlmaps);
467  ntTrack -> SetBranchAddress("gnlintt", &trk_gnlintt);
468  ntTrack -> SetBranchAddress("gnltpc", &trk_gnltpc);
469  ntTrack -> SetBranchAddress("gnlmms", &trk_gnlmms);
470  ntTrack -> SetBranchAddress("gpx", &trk_gpx);
471  ntTrack -> SetBranchAddress("gpy", &trk_gpy);
472  ntTrack -> SetBranchAddress("gpz", &trk_gpz);
473  ntTrack -> SetBranchAddress("gpt", &trk_gpt);
474  ntTrack -> SetBranchAddress("geta", &trk_geta);
475  ntTrack -> SetBranchAddress("gphi", &trk_gphi);
476  ntTrack -> SetBranchAddress("gvx", &trk_gvx);
477  ntTrack -> SetBranchAddress("gvy", &trk_gvy);
478  ntTrack -> SetBranchAddress("gvz", &trk_gvz);
479  ntTrack -> SetBranchAddress("gvt", &trk_gvt);
480  ntTrack -> SetBranchAddress("gfpx", &trk_gfpx);
481  ntTrack -> SetBranchAddress("gfpy", &trk_gfpy);
482  ntTrack -> SetBranchAddress("gfpz", &trk_gfpz);
483  ntTrack -> SetBranchAddress("gfx", &trk_gfx);
484  ntTrack -> SetBranchAddress("gfy", &trk_gfy);
485  ntTrack -> SetBranchAddress("gfz", &trk_gfz);
486  ntTrack -> SetBranchAddress("gembed", &trk_gembed);
487  ntTrack -> SetBranchAddress("gprimary", &trk_gprimary);
488  ntTrack -> SetBranchAddress("nfromtruth", &trk_nfromtruth);
489  ntTrack -> SetBranchAddress("nwrong", &trk_nwrong);
490  ntTrack -> SetBranchAddress("ntrumaps", &trk_ntrumaps);
491  ntTrack -> SetBranchAddress("ntruintt", &trk_ntruintt);
492  ntTrack -> SetBranchAddress("ntrutpc", &trk_ntrutpc);
493  ntTrack -> SetBranchAddress("ntrumms", &trk_ntrumms);
494  ntTrack -> SetBranchAddress("ntrutpc1", &trk_ntrutpc1);
495  ntTrack -> SetBranchAddress("ntrutpc11", &trk_ntrutpc11);
496  ntTrack -> SetBranchAddress("ntrutpc2", &trk_ntrutpc2);
497  ntTrack -> SetBranchAddress("ntrutpc3", &trk_ntrutpc3);
498  ntTrack -> SetBranchAddress("layersfromtruth", &trk_layersfromtruth);
499  ntTrack -> SetBranchAddress("nhittpcall", &trk_nhittpcall);
500  ntTrack -> SetBranchAddress("nhittpcin", &trk_nhittpcin);
501  ntTrack -> SetBranchAddress("nhittpcmid", &trk_nhittpcmid);
502  ntTrack -> SetBranchAddress("nhittpcout", &trk_nhittpcout);
503  ntTrack -> SetBranchAddress("nclusall", &trk_nclusall);
504  ntTrack -> SetBranchAddress("nclustpc", &trk_nclustpc);
505  ntTrack -> SetBranchAddress("nclusintt", &trk_nclusintt);
506  ntTrack -> SetBranchAddress("nclusmaps", &trk_nclusmaps);
507  ntTrack -> SetBranchAddress("nclusmms", &trk_nclusmms);
508 
509  // Set branch addresses.
510  ntTruth -> SetBranchAddress("event", &tru_event);
511  ntTruth -> SetBranchAddress("seed", &tru_seed);
512  ntTruth -> SetBranchAddress("gntracks", &tru_gntracks);
513  ntTruth -> SetBranchAddress("gtrackID", &tru_gtrackID);
514  ntTruth -> SetBranchAddress("gflavor", &tru_gflavor);
515  ntTruth -> SetBranchAddress("gnhits", &tru_gnhits);
516  ntTruth -> SetBranchAddress("gnmaps", &tru_gnmaps);
517  ntTruth -> SetBranchAddress("gnintt", &tru_gnintt);
518  ntTruth -> SetBranchAddress("gnmms", &tru_gnmms);
519  ntTruth -> SetBranchAddress("gnintt1", &tru_gnintt1);
520  ntTruth -> SetBranchAddress("gnintt2", &tru_gnintt2);
521  ntTruth -> SetBranchAddress("gnintt3", &tru_gnintt3);
522  ntTruth -> SetBranchAddress("gnintt4", &tru_gnintt4);
523  ntTruth -> SetBranchAddress("gnintt5", &tru_gnintt5);
524  ntTruth -> SetBranchAddress("gnintt6", &tru_gnintt6);
525  ntTruth -> SetBranchAddress("gnintt7", &tru_gnintt7);
526  ntTruth -> SetBranchAddress("gnintt8", &tru_gnintt8);
527  ntTruth -> SetBranchAddress("gntpc", &tru_gntpc);
528  ntTruth -> SetBranchAddress("gnlmaps", &tru_gnlmaps);
529  ntTruth -> SetBranchAddress("gnlintt", &tru_gnlintt);
530  ntTruth -> SetBranchAddress("gnltpc", &tru_gnltpc);
531  ntTruth -> SetBranchAddress("gnlmms", &tru_gnlmms);
532  ntTruth -> SetBranchAddress("gpx", &tru_gpx);
533  ntTruth -> SetBranchAddress("gpy", &tru_gpy);
534  ntTruth -> SetBranchAddress("gpz", &tru_gpz);
535  ntTruth -> SetBranchAddress("gpt", &tru_gpt);
536  ntTruth -> SetBranchAddress("geta", &tru_geta);
537  ntTruth -> SetBranchAddress("gphi", &tru_gphi);
538  ntTruth -> SetBranchAddress("gvx", &tru_gvx);
539  ntTruth -> SetBranchAddress("gvy", &tru_gvy);
540  ntTruth -> SetBranchAddress("gvz", &tru_gvz);
541  ntTruth -> SetBranchAddress("gvt", &tru_gvt);
542  ntTruth -> SetBranchAddress("gfpx", &tru_gfpx);
543  ntTruth -> SetBranchAddress("gfpy", &tru_gfpy);
544  ntTruth -> SetBranchAddress("gfpz", &tru_gfpz);
545  ntTruth -> SetBranchAddress("gfx", &tru_gfx);
546  ntTruth -> SetBranchAddress("gfy", &tru_gfy);
547  ntTruth -> SetBranchAddress("gfz", &tru_gfz);
548  ntTruth -> SetBranchAddress("gembed", &tru_gembed);
549  ntTruth -> SetBranchAddress("gprimary", &tru_gprimary);
550  ntTruth -> SetBranchAddress("trackID", &tru_trackID);
551  ntTruth -> SetBranchAddress("px", &tru_px);
552  ntTruth -> SetBranchAddress("py", &tru_py);
553  ntTruth -> SetBranchAddress("pz", &tru_pz);
554  ntTruth -> SetBranchAddress("pt", &tru_pt);
555  ntTruth -> SetBranchAddress("eta", &tru_eta);
556  ntTruth -> SetBranchAddress("phi", &tru_phi);
557  ntTruth -> SetBranchAddress("deltapt", &tru_deltapt);
558  ntTruth -> SetBranchAddress("deltaeta", &tru_deltaeta);
559  ntTruth -> SetBranchAddress("deltaphi", &tru_deltaphi);
560  ntTruth -> SetBranchAddress("charge", &tru_charge);
561  ntTruth -> SetBranchAddress("quality", &tru_quality);
562  ntTruth -> SetBranchAddress("chisq", &tru_chisq);
563  ntTruth -> SetBranchAddress("ndf", &tru_ndf);
564  ntTruth -> SetBranchAddress("nhits", &tru_nhits);
565  ntTruth -> SetBranchAddress("layers", &tru_layers);
566  ntTruth -> SetBranchAddress("nmaps", &tru_nmaps);
567  ntTruth -> SetBranchAddress("nintt", &tru_nintt);
568  ntTruth -> SetBranchAddress("ntpc", &tru_ntpc);
569  ntTruth -> SetBranchAddress("nmms", &tru_nmms);
570  ntTruth -> SetBranchAddress("ntpc1", &tru_ntpc1);
571  ntTruth -> SetBranchAddress("ntpc11", &tru_ntpc11);
572  ntTruth -> SetBranchAddress("ntpc2", &tru_ntpc2);
573  ntTruth -> SetBranchAddress("ntpc3", &tru_ntpc3);
574  ntTruth -> SetBranchAddress("nlmaps", &tru_nlmaps);
575  ntTruth -> SetBranchAddress("nlintt", &tru_nlintt);
576  ntTruth -> SetBranchAddress("nltpc", &tru_nltpc);
577  ntTruth -> SetBranchAddress("nlmms", &tru_nlmms);
578  ntTruth -> SetBranchAddress("vertexID", &tru_vertexID);
579  ntTruth -> SetBranchAddress("vx", &tru_vx);
580  ntTruth -> SetBranchAddress("vy", &tru_vy);
581  ntTruth -> SetBranchAddress("vz", &tru_vz);
582  ntTruth -> SetBranchAddress("dca2d", &tru_dca2d);
583  ntTruth -> SetBranchAddress("dca2dsigma", &tru_dca2dsigma);
584  ntTruth -> SetBranchAddress("dca3dxy", &tru_dca3dxy);
585  ntTruth -> SetBranchAddress("dca3dxysigma", &tru_dca3dxysigma);
586  ntTruth -> SetBranchAddress("dca3dz", &tru_dca3dz);
587  ntTruth -> SetBranchAddress("dca3dzsigma", &tru_dca3dzsigma);
588  ntTruth -> SetBranchAddress("pcax", &tru_pcax);
589  ntTruth -> SetBranchAddress("pcay", &tru_pcay);
590  ntTruth -> SetBranchAddress("pcaz", &tru_pcaz);
591  ntTruth -> SetBranchAddress("nfromtruth", &tru_nfromtruth);
592  ntTruth -> SetBranchAddress("nwrong", &tru_nwrong);
593  ntTruth -> SetBranchAddress("ntrumaps", &tru_ntrumaps);
594  ntTruth -> SetBranchAddress("ntruintt", &tru_ntruintt);
595  ntTruth -> SetBranchAddress("ntrutpc", &tru_ntrutpc);
596  ntTruth -> SetBranchAddress("ntrumms", &tru_ntrumms);
597  ntTruth -> SetBranchAddress("ntrutpc1", &tru_ntrutpc1);
598  ntTruth -> SetBranchAddress("ntrutpc11", &tru_ntrutpc11);
599  ntTruth -> SetBranchAddress("ntrutpc2", &tru_ntrutpc2);
600  ntTruth -> SetBranchAddress("ntrutpc3", &tru_ntrutpc3);
601  ntTruth -> SetBranchAddress("layersfromtruth", &tru_layersfromtruth);
602  ntTruth -> SetBranchAddress("nhittpcall", &tru_nhittpcall);
603  ntTruth -> SetBranchAddress("nhittpcin", &tru_nhittpcin);
604  ntTruth -> SetBranchAddress("nhittpcmid", &tru_nhittpcmid);
605  ntTruth -> SetBranchAddress("nhittpcout", &tru_nhittpcout);
606  ntTruth -> SetBranchAddress("nclusall", &tru_nclusall);
607  ntTruth -> SetBranchAddress("nclustpc", &tru_nclustpc);
608  ntTruth -> SetBranchAddress("nclusintt", &tru_nclusintt);
609  ntTruth -> SetBranchAddress("nclusmaps", &tru_nclusmaps);
610  ntTruth -> SetBranchAddress("nclusmms", &tru_nclusmms);
611  cout << " Set track tuple branches." << endl;
612 
613  // declare histograms
614  TH1D *hEff;
615  TH1D *hPtTruth;
616  TH1D *hPtDelta;
617  TH1D *hPtTrack;
618  TH1D *hPtFrac;
619  TH1D *hPtTrkTru;
620  TH1D *hPtDeltaProj[NProj];
621  TH1D *hPtDeltaCut[NDPtCuts];
622  TH1D *hPtDeltaSig[NSigCuts];
623  TH1D *hPtTrackCut[NDPtCuts];
624  TH1D *hPtTrackSig[NSigCuts];
625  TH1D *hPtFracCut[NDPtCuts];
626  TH1D *hPtFracSig[NSigCuts];
627  TH1D *hPtTrkTruCut[NDPtCuts];
628  TH1D *hPtTrkTruSig[NSigCuts];
629  TH1D *hEffCut[NDPtCuts];
630  TH1D *hEffSig[NSigCuts];
631 
632  TH2D *hPtDeltaVsFrac;
633  TH2D *hPtDeltaVsTrue;
634  TH2D *hPtDeltaVsTrack;
635  TH2D *hPtTrueVsTrack;
636  TH2D *hPtDeltaVsFracCut[NDPtCuts];
637  TH2D *hPtDeltaVsFracSig[NSigCuts];
638  TH2D *hPtDeltaVsTrueCut[NDPtCuts];
639  TH2D *hPtDeltaVsTrueSig[NSigCuts];
640  TH2D *hPtDeltaVsTrackCut[NDPtCuts];
641  TH2D *hPtDeltaVsTrackSig[NSigCuts];
642  TH2D *hPtTrueVsTrackCut[NDPtCuts];
643  TH2D *hPtTrueVsTrackSig[NSigCuts];
644 
645  // histogram binning
646  const UInt_t nPtBins(1000);
647  const UInt_t nFracBins(1000);
648  const UInt_t nDeltaBins(5000);
649  const Float_t rPtBins[NRange] = {0., 100.};
650  const Float_t rFracBins[NRange] = {0., 10.};
651  const Float_t rDeltaBins[NRange] = {0., 5.};
652 
653  // create names
654  TString sPtTruth("h");
655  TString sPtDelta("h");
656  TString sPtTrack("h");
657  TString sPtFrac("h");
658  TString sPtTrkTru("h");
659  sPtTruth.Append(sPtTrueBase.Data());
660  sPtDelta.Append(sPtDeltaBase.Data());
661  sPtTrack.Append(sPtRecoBase.Data());
662  sPtFrac.Append(sPtFracBase.Data());
663  sPtTrkTru.Append(sPtTrkTruBase.Data());
664 
665  TString sPtDeltaVsFrac("h");
666  TString sPtDeltaVsTrue("h");
667  TString sPtDeltaVsTrack("h");
668  TString sPtTrueVsTrack("h");
669  sPtDeltaVsFrac.Append(sPtDeltaBase.Data());
670  sPtDeltaVsTrue.Append(sPtDeltaBase.Data());
671  sPtDeltaVsTrack.Append(sPtDeltaBase.Data());
672  sPtTrueVsTrack.Append(sPtTrueBase.Data());
673  sPtDeltaVsFrac.Append("Vs");
674  sPtDeltaVsTrue.Append("Vs");
675  sPtDeltaVsTrack.Append("Vs");
676  sPtTrueVsTrack.Append("Vs");
677  sPtDeltaVsFrac.Append(sPtFracBase.Data());
678  sPtDeltaVsTrue.Append(sPtTrueBase.Data());
679  sPtDeltaVsTrack.Append(sPtRecoBase.Data());
680  sPtTrueVsTrack.Append(sPtRecoBase.Data());
681 
682  // delta-pt projection names
683  TString sPtProj[NProj];
684  for (Ssiz_t iProj = 0; iProj < NProj; iProj++) {
685  sPtProj[iProj] = "h";
686  sPtProj[iProj].Append(sPtProjBase.Data());
687  sPtProj[iProj].Append(sProjSuffix[iProj].Data());
688  }
689 
690  // flat delta-pt cut names
691  TString sPtDeltaCut[NDPtCuts];
692  TString sPtTrackCut[NDPtCuts];
693  TString sPtFracCut[NDPtCuts];
694  TString sPtTrkTruCut[NDPtCuts];
695  TString sPtDeltaVsFracCut[NDPtCuts];
696  TString sPtDeltaVsTrueCut[NDPtCuts];
697  TString sPtDeltaVsTrackCut[NDPtCuts];
698  TString sPtTrueVsTrackCut[NDPtCuts];
699  for (Ssiz_t iCut = 0; iCut < NDPtCuts; iCut++) {
700  sPtDeltaCut[iCut] = "h";
701  sPtTrackCut[iCut] = "h";
702  sPtFracCut[iCut] = "h";
703  sPtTrkTruCut[iCut] = "h";
704  sPtDeltaCut[iCut].Append(sPtDeltaBase.Data());
705  sPtTrackCut[iCut].Append(sPtRecoBase.Data());
706  sPtFracCut[iCut].Append(sPtFracBase.Data());
707  sPtTrkTruCut[iCut].Append(sPtTrkTruBase.Data());
708  sPtDeltaCut[iCut].Append(sDPtSuffix[iCut].Data());
709  sPtTrackCut[iCut].Append(sDPtSuffix[iCut].Data());
710  sPtFracCut[iCut].Append(sDPtSuffix[iCut].Data());
711  sPtTrkTruCut[iCut].Append(sDPtSuffix[iCut].Data());
712 
713  sPtDeltaVsFracCut[iCut] = "h";
714  sPtDeltaVsTrueCut[iCut] = "h";
715  sPtDeltaVsTrackCut[iCut] = "h";
716  sPtTrueVsTrackCut[iCut] = "h";
717  sPtDeltaVsFracCut[iCut].Append(sPtDeltaBase.Data());
718  sPtDeltaVsFracCut[iCut].Append(sPtDeltaBase.Data());
719  sPtDeltaVsTrueCut[iCut].Append(sPtDeltaBase.Data());
720  sPtDeltaVsTrackCut[iCut].Append(sPtDeltaBase.Data());
721  sPtTrueVsTrackCut[iCut].Append(sPtTrueBase.Data());
722  sPtDeltaVsFracCut[iCut].Append("Vs");
723  sPtDeltaVsTrueCut[iCut].Append("Vs");
724  sPtDeltaVsTrackCut[iCut].Append("Vs");
725  sPtTrueVsTrackCut[iCut].Append("Vs");
726  sPtDeltaVsFracCut[iCut].Append(sPtFracBase.Data());
727  sPtDeltaVsTrueCut[iCut].Append(sPtTrueBase.Data());
728  sPtDeltaVsTrackCut[iCut].Append(sPtRecoBase.Data());
729  sPtTrueVsTrackCut[iCut].Append(sPtRecoBase.Data());
730  sPtDeltaVsFracCut[iCut].Append(sDPtSuffix[iCut].Data());
731  sPtDeltaVsTrueCut[iCut].Append(sDPtSuffix[iCut].Data());
732  sPtDeltaVsTrackCut[iCut].Append(sDPtSuffix[iCut].Data());
733  sPtTrueVsTrackCut[iCut].Append(sDPtSuffix[iCut].Data());
734  }
735 
736  // pt-dependent delta-pt cut names
737  TString sPtDeltaSig[NSigCuts];
738  TString sPtTrackSig[NSigCuts];
739  TString sPtFracSig[NSigCuts];
740  TString sPtTrkTruSig[NSigCuts];
741  TString sPtDeltaVsFracSig[NSigCuts];
742  TString sPtDeltaVsTrueSig[NSigCuts];
743  TString sPtDeltaVsTrackSig[NSigCuts];
744  TString sPtTrueVsTrackSig[NSigCuts];
745  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
746  sPtDeltaSig[iSig] = "h";
747  sPtTrackSig[iSig] = "h";
748  sPtFracSig[iSig] = "h";
749  sPtTrkTruSig[iSig] = "h";
750  sPtDeltaSig[iSig].Append(sPtDeltaBase.Data());
751  sPtTrackSig[iSig].Append(sPtRecoBase.Data());
752  sPtFracSig[iSig].Append(sPtFracBase.Data());
753  sPtTrkTruSig[iSig].Append(sPtTrkTruBase.Data());
754  sPtDeltaSig[iSig].Append(sSigSuffix[iSig].Data());
755  sPtTrackSig[iSig].Append(sSigSuffix[iSig].Data());
756  sPtFracSig[iSig].Append(sSigSuffix[iSig].Data());
757  sPtTrkTruSig[iSig].Append(sSigSuffix[iSig].Data());
758 
759  sPtDeltaVsFracSig[iSig] = "h";
760  sPtDeltaVsTrueSig[iSig] = "h";
761  sPtDeltaVsTrackSig[iSig] = "h";
762  sPtTrueVsTrackSig[iSig] = "h";
763  sPtDeltaVsFracSig[iSig].Append(sPtDeltaBase.Data());
764  sPtDeltaVsFracSig[iSig].Append(sPtDeltaBase.Data());
765  sPtDeltaVsTrueSig[iSig].Append(sPtDeltaBase.Data());
766  sPtDeltaVsTrackSig[iSig].Append(sPtDeltaBase.Data());
767  sPtTrueVsTrackSig[iSig].Append(sPtTrueBase.Data());
768  sPtDeltaVsFracSig[iSig].Append("Vs");
769  sPtDeltaVsTrueSig[iSig].Append("Vs");
770  sPtDeltaVsTrackSig[iSig].Append("Vs");
771  sPtTrueVsTrackSig[iSig].Append("Vs");
772  sPtDeltaVsFracSig[iSig].Append(sPtFracBase.Data());
773  sPtDeltaVsTrueSig[iSig].Append(sPtTrueBase.Data());
774  sPtDeltaVsTrackSig[iSig].Append(sPtRecoBase.Data());
775  sPtTrueVsTrackSig[iSig].Append(sPtRecoBase.Data());
776  sPtDeltaVsFracSig[iSig].Append(sSigSuffix[iSig].Data());
777  sPtDeltaVsTrueSig[iSig].Append(sSigSuffix[iSig].Data());
778  sPtDeltaVsTrackSig[iSig].Append(sSigSuffix[iSig].Data());
779  sPtTrueVsTrackSig[iSig].Append(sSigSuffix[iSig].Data());
780  }
781 
782  // initialize histograms
783  hPtTruth = new TH1D(sPtTruth.Data(), "", nPtBins, rPtBins[0], rPtBins[1]);
784  hPtDelta = new TH1D(sPtDelta.Data(), "", nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
785  hPtTrack = new TH1D(sPtTrack.Data(), "", nPtBins, rPtBins[0], rPtBins[1]);
786  hPtFrac = new TH1D(sPtFrac.Data(), "", nFracBins, rFracBins[0], rFracBins[1]);
787  hPtTrkTru = new TH1D(sPtTrkTru.Data(), "", nPtBins, rPtBins[0], rPtBins[1]);
788  hPtTruth -> Sumw2();
789  hPtDelta -> Sumw2();
790  hPtTrack -> Sumw2();
791  hPtFrac -> Sumw2();
792  hPtTrkTru -> Sumw2();
793 
794  hPtDeltaVsFrac = new TH2D(sPtDeltaVsFrac.Data(), "", nFracBins, rFracBins[0], rFracBins[1], nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
795  hPtDeltaVsTrue = new TH2D(sPtDeltaVsTrue.Data(), "", nPtBins, rPtBins[0], rPtBins[1], nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
796  hPtDeltaVsTrack = new TH2D(sPtDeltaVsTrack.Data(), "", nPtBins, rPtBins[0], rPtBins[1], nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
797  hPtTrueVsTrack = new TH2D(sPtTrueVsTrack.Data(), "", nPtBins, rPtBins[0], rPtBins[1], nPtBins, rPtBins[0], rPtBins[1]);
798  hPtDeltaVsFrac -> Sumw2();
799  hPtDeltaVsTrue -> Sumw2();
800  hPtDeltaVsTrack -> Sumw2();
801  hPtTrueVsTrack -> Sumw2();
802 
803  // delta-pt projection histograms
804  for (Ssiz_t iProj = 0; iProj < NProj; iProj++) {
805  hPtDeltaProj[iProj] = new TH1D(sPtProj[iProj].Data(), "", nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
806  hPtDeltaProj[iProj] -> Sumw2();
807  }
808 
809  // flat delta-pt cut histograms
810  for (Ssiz_t iCut = 0; iCut < NDPtCuts; iCut++) {
811  hPtDeltaCut[iCut] = new TH1D(sPtDeltaCut[iCut].Data(), "", nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
812  hPtTrackCut[iCut] = new TH1D(sPtTrackCut[iCut].Data(), "", nPtBins, rPtBins[0], rPtBins[1]);
813  hPtFracCut[iCut] = new TH1D(sPtFracCut[iCut].Data(), "", nFracBins, rFracBins[0], rFracBins[1]);
814  hPtTrkTruCut[iCut] = new TH1D(sPtTrkTruCut[iCut].Data(), "", nPtBins, rPtBins[0], rPtBins[1]);
815  hPtDeltaCut[iCut] -> Sumw2();
816  hPtTrackCut[iCut] -> Sumw2();
817  hPtFracCut[iCut] -> Sumw2();
818  hPtTrkTruCut[iCut] -> Sumw2();
819 
820  hPtDeltaVsFracCut[iCut] = new TH2D(sPtDeltaVsFracCut[iCut].Data(), "", nFracBins, rFracBins[0], rFracBins[1], nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
821  hPtDeltaVsTrueCut[iCut] = new TH2D(sPtDeltaVsTrueCut[iCut].Data(), "", nPtBins, rPtBins[0], rPtBins[1], nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
822  hPtDeltaVsTrackCut[iCut] = new TH2D(sPtDeltaVsTrackCut[iCut].Data(), "", nPtBins, rPtBins[0], rPtBins[1], nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
823  hPtTrueVsTrackCut[iCut] = new TH2D(sPtTrueVsTrackCut[iCut].Data(), "", nPtBins, rPtBins[0], rPtBins[1], nPtBins, rPtBins[0], rPtBins[1]);
824  hPtDeltaVsFracCut[iCut] -> Sumw2();
825  hPtDeltaVsTrueCut[iCut] -> Sumw2();
826  hPtDeltaVsTrackCut[iCut] -> Sumw2();
827  hPtTrueVsTrackCut[iCut] -> Sumw2();
828  }
829 
830  // pt-dependent delta-pt cut histograms
831  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
832  hPtDeltaSig[iSig] = new TH1D(sPtDeltaSig[iSig].Data(), "", nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
833  hPtTrackSig[iSig] = new TH1D(sPtTrackSig[iSig].Data(), "", nPtBins, rPtBins[0], rPtBins[1]);
834  hPtFracSig[iSig] = new TH1D(sPtFracSig[iSig].Data(), "", nFracBins, rFracBins[0], rFracBins[1]);
835  hPtTrkTruSig[iSig] = new TH1D(sPtTrkTruSig[iSig].Data(), "", nPtBins, rPtBins[0], rPtBins[1]);
836  hPtDeltaSig[iSig] -> Sumw2();
837  hPtTrackSig[iSig] -> Sumw2();
838  hPtFracSig[iSig] -> Sumw2();
839  hPtTrkTruSig[iSig] -> Sumw2();
840 
841  hPtDeltaVsFracSig[iSig] = new TH2D(sPtDeltaVsFracSig[iSig].Data(), "", nFracBins, rFracBins[0], rFracBins[1], nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
842  hPtDeltaVsTrueSig[iSig] = new TH2D(sPtDeltaVsTrueSig[iSig].Data(), "", nPtBins, rPtBins[0], rPtBins[1], nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
843  hPtDeltaVsTrackSig[iSig] = new TH2D(sPtDeltaVsTrackSig[iSig].Data(), "", nPtBins, rPtBins[0], rPtBins[1], nDeltaBins, rDeltaBins[0], rDeltaBins[1]);
844  hPtTrueVsTrackSig[iSig] = new TH2D(sPtTrueVsTrackSig[iSig].Data(), "", nPtBins, rPtBins[0], rPtBins[1], nPtBins, rPtBins[0], rPtBins[1]);
845  hPtDeltaVsFracSig[iSig] -> Sumw2();
846  hPtDeltaVsTrueSig[iSig] -> Sumw2();
847  hPtDeltaVsTrackSig[iSig] -> Sumw2();
848  hPtTrueVsTrackSig[iSig] -> Sumw2();
849  }
850 
851  // grab no. of entries
852  const Long64_t nTrks = ntTrack -> GetEntries();
853  const Long64_t nTrus = ntTruth -> GetEntries();
854  cout << " Beginning tuple loops: " << nTrks << " reco. tracks and " << nTrus << " particles to process" << endl;
855 
856  // for sigma calculatin
857  Double_t muProj[NProj];
858  Double_t sigProj[NProj];
859  Double_t muHiProj[NSigCuts][NProj];
860  Double_t muLoProj[NSigCuts][NProj];
861  for (Ssiz_t iProj = 0; iProj < NProj; iProj++) {
862  muProj[iProj] = 0.;
863  sigProj[iProj] = 0.;
864  }
865  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
866  for (Ssiz_t iProj = 0; iProj < NProj; iProj++) {
867  muHiProj[iSig][iProj] = 0.;
868  muLoProj[iSig][iProj] = 0.;
869  }
870  }
871 
872  // for reject calculation
873  UInt_t nNormCut[NDPtCuts];
874  UInt_t nNormSig[NSigCuts];
875  UInt_t nWeirdCut[NDPtCuts];
876  UInt_t nWeirdSig[NSigCuts];
877  Double_t rejCut[NDPtCuts];
878  Double_t rejSig[NSigCuts];
879  for (Ssiz_t iCut = 0; iCut < NDPtCuts; iCut++) {
880  nNormCut[iCut] = 0;
881  nWeirdCut[iCut] = 0;
882  rejCut[iCut] = 0.;
883  }
884  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
885  nNormSig[iSig] = 0;
886  nWeirdSig[iSig] = 0;
887  rejSig[iSig] = 0.;
888  }
889  cout << " First loop over reco. tracks:" << endl;
890 
891  // 1st track loop
892  Long64_t nBytesTrk = 0;
893  for (Long64_t iTrk = 0; iTrk < nTrks; iTrk++) {
894 
895  // grab entry
896  const Long64_t bytesTrk = ntTrack -> GetEntry(iTrk);
897  if (bytesTrk < 0.) {
898  cerr << "WARNING: something wrong with track #" << iTrk << "! Aborting loop!" << endl;
899  break;
900  }
901  nBytesTrk += bytesTrk;
902 
903  // announce progress
904  const Long64_t iProgTrk = iTrk + 1;
905  //if (iProgTrk == nTrks) {
906  // cout << " Processing track " << iProgTrk << "/" << nTrks << "..." << endl;
907  //} else {
908  // cout << " Processing track " << iProgTrk << "/" << nTrks << "...\r" << flush;
909  //}
910 
911  // do calculations
912  const Double_t ptFrac = trk_pt / trk_gpt;
913  const Double_t ptDelta = trk_deltapt / trk_pt;
914 
915  // apply trk cuts
916  const Bool_t isInZVtxCut = (abs(trk_vz) < vzTrkMax);
917  const Bool_t isInInttCut = (trk_nintt >= nInttTrkMin);
918  const Bool_t isInMVtxCut = (trk_nlmaps > nMVtxTrkMin);
919  const Bool_t isInTpcCut = (trk_ntpc > nTpcTrkMin);
920  const Bool_t isInPtCut = (trk_pt > ptTrkMin);
921  const Bool_t isInQualCut = (trk_quality < qualTrkMax);
922  const Bool_t isGoodTrk = (isInZVtxCut && isInInttCut && isInMVtxCut && isInTpcCut && isInPtCut && isInQualCut);
923  if (!isGoodTrk) continue;
924 
925  if (trk_pt < 20) {
926  cout << "CHECK intt = " << trk_nintt << ", mvtx = " << trk_nlmaps << ", tpc = " << trk_ntpc << ", quality = " << trk_quality << ", ptTrue = " << trk_gpt
927  << ", dcaXY = " << trk_dca3dxy << ", dcaZ = " << trk_dca3dz << endl;
928  }
929 
930  // fill histograms
931  hPtDelta -> Fill(ptDelta);
932  hPtTrack -> Fill(trk_pt);
933  hPtFrac -> Fill(ptFrac);
934  hPtTrkTru -> Fill(trk_gpt);
935  hPtDeltaVsFrac -> Fill(ptFrac, ptDelta);
936  hPtDeltaVsTrue -> Fill(trk_gpt, ptDelta);
937  hPtDeltaVsTrack -> Fill(trk_pt, ptDelta);
938  hPtTrueVsTrack -> Fill(trk_pt, trk_gpt);
939 
940  // apply delta-pt cuts
941  const Bool_t isNormalTrk = ((ptFrac > normRange[0]) && (ptFrac < normRange[1]));
942  for (Ssiz_t iCut = 0; iCut < NDPtCuts; iCut++) {
943  const Bool_t isInDeltaPtCut = (ptDelta < ptDeltaMax[iCut]);
944  if (isInDeltaPtCut) {
945 
946  // fill histograms
947  hPtDeltaCut[iCut] -> Fill(ptDelta);
948  hPtTrackCut[iCut] -> Fill(trk_pt);
949  hPtFracCut[iCut] -> Fill(ptFrac);
950  hPtTrkTruCut[iCut] -> Fill(trk_gpt);
951  hPtDeltaVsFracCut[iCut] -> Fill(ptFrac, ptDelta);
952  hPtDeltaVsTrueCut[iCut] -> Fill(trk_gpt, ptDelta);
953  hPtDeltaVsTrackCut[iCut] -> Fill(trk_pt, ptDelta);
954  hPtTrueVsTrackCut[iCut] -> Fill(trk_pt, trk_gpt);
955 
956  // increment counters
957  if (isNormalTrk) {
958  ++nNormCut[iCut];
959  } else {
960  ++nWeirdCut[iCut];
961  }
962  }
963  } // end delta-pt cut
964  } // end 1st track loop
965  cout << " First loop over reco. tracks finished!" << endl;
966 
967  // calculate flat delta-pt rejection factors
968  for (Ssiz_t iCut = 0; iCut < NDPtCuts; iCut++) {
969  rejCut[iCut] = (Double_t) nNormCut[iCut] / (Double_t) nWeirdCut[iCut];
970  }
971  cout << " Calculated flat delta-pt rejection factors." << endl;
972 
973  // projection fit names
974  TString sFitProj[NProj];
975  for (Ssiz_t iProj = 0; iProj < NProj; iProj++) {
976  sFitProj[iProj] = "f";
977  sFitProj[iProj].Append(sPtProjBase.Data());
978  sFitProj[iProj].Append(sProjSuffix[iProj].Data());
979  }
980 
981  // project slices of delta-pt and get sigmas
982  const UInt_t fWidFit = 2;
983  const UInt_t fLinFit = 1;
984 
985  TF1 *fPtDeltaProj[NProj];
986  for (Ssiz_t iProj = 0; iProj < NProj; iProj++) {
987 
988  // do projection
989  const UInt_t iBinProj = hPtDeltaVsTrack -> GetXaxis() -> FindBin(ptProj[iProj]);
990  hPtDeltaProj[iProj] = hPtDeltaVsTrack -> ProjectionY(sPtProj[iProj], iBinProj, iBinProj, "");
991 
992  // get initial values for fit
993  const Float_t ampGuess = hPtDeltaProj[iProj] -> GetMaximum();
994  const Float_t muGuess = hPtDeltaProj[iProj] -> GetMean();
995  const Float_t sigGuess = hPtDeltaProj[iProj] -> GetRMS();
996 
997  // fit with gaussian
998  fPtDeltaProj[iProj] = new TF1(sFitProj[iProj].Data(), "gaus", deltaFitRange[0], deltaFitRange[1]);
999  fPtDeltaProj[iProj] -> SetLineColor(fColFit[iProj]);
1000  fPtDeltaProj[iProj] -> SetLineStyle(fLinFit);
1001  fPtDeltaProj[iProj] -> SetLineWidth(fWidFit);
1002  fPtDeltaProj[iProj] -> SetParameter(0, ampGuess);
1003  fPtDeltaProj[iProj] -> SetParameter(1, muGuess);
1004  fPtDeltaProj[iProj] -> SetParameter(2, sigGuess);
1005  hPtDeltaProj[iProj] -> Fit(sFitProj[iProj].Data(), "R");
1006 
1007  // add values to arrays
1008  muProj[iProj] = fPtDeltaProj[iProj] -> GetParameter(1);
1009  sigProj[iProj] = fPtDeltaProj[iProj] -> GetParameter(2);
1010  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
1011  muHiProj[iSig][iProj] = muProj[iProj] + (ptDeltaSig[iSig] * sigProj[iProj]);
1012  muLoProj[iSig][iProj] = muProj[iProj] - (ptDeltaSig[iSig] * sigProj[iProj]);
1013  }
1014  } // end projection loop
1015  cout << " Obtained delta-pt projections, fits, and sigmas." << endl;
1016 
1017  // sigma graph names
1018  TString sMuProj("gr");
1019  TString sSigProj("gr");
1020  sMuProj.Append(sMuBase.Data());
1021  sSigProj.Append(sSigBase.Data());
1022 
1023  TString sGrMuHiProj[NSigCuts];
1024  TString sGrMuLoProj[NSigCuts];
1025  TString sFnMuHiProj[NSigCuts];
1026  TString sFnMuLoProj[NSigCuts];
1027  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
1028  sGrMuHiProj[iSig] = "gr";
1029  sGrMuLoProj[iSig] = "gr";
1030  sFnMuHiProj[iSig] = "f";
1031  sFnMuLoProj[iSig] = "f";
1032  sGrMuHiProj[iSig].Append(sMuHiBase.Data());
1033  sGrMuLoProj[iSig].Append(sMuLoBase.Data());
1034  sFnMuHiProj[iSig].Append(sMuHiBase.Data());
1035  sFnMuLoProj[iSig].Append(sMuLoBase.Data());
1036  sGrMuHiProj[iSig].Append(sSigSuffix[iSig].Data());
1037  sGrMuLoProj[iSig].Append(sSigSuffix[iSig].Data());
1038  sFnMuHiProj[iSig].Append(sSigSuffix[iSig].Data());
1039  sFnMuLoProj[iSig].Append(sSigSuffix[iSig].Data());
1040  }
1041 
1042  // construct sigma graphs
1043  TGraph *grMuProj = new TGraph(NProj, ptProj, muProj);
1044  TGraph *grSigProj = new TGraph(NProj, ptProj, sigProj);
1045  grMuProj -> SetName(sMuProj);
1046  grSigProj -> SetName(sSigProj);
1047 
1048  TF1 *fMuHiProj[NSigCuts];
1049  TF1 *fMuLoProj[NSigCuts];
1050  TGraph *grMuHiProj[NSigCuts];
1051  TGraph *grMuLoProj[NSigCuts];
1052  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
1053 
1054  // create graphs
1055  grMuHiProj[iSig] = new TGraph(NProj, ptProj, muHiProj[iSig]);
1056  grMuLoProj[iSig] = new TGraph(NProj, ptProj, muLoProj[iSig]);
1057  grMuHiProj[iSig] -> SetName(sGrMuHiProj[iSig].Data());
1058  grMuLoProj[iSig] -> SetName(sGrMuLoProj[iSig].Data());
1059 
1060  // create fit functions
1061  fMuHiProj[iSig] = new TF1(sFnMuHiProj[iSig].Data(), "pol2", rPtRange[0], rPtRange[1]);
1062  fMuLoProj[iSig] = new TF1(sFnMuLoProj[iSig].Data(), "pol2", rPtRange[0], rPtRange[1]);
1063  fMuHiProj[iSig] -> SetLineColor(fColSigFit[iSig]);
1064  fMuLoProj[iSig] -> SetLineColor(fColSigFit[iSig]);
1065  fMuHiProj[iSig] -> SetLineStyle(fLinFit);
1066  fMuLoProj[iSig] -> SetLineStyle(fLinFit);
1067  fMuHiProj[iSig] -> SetLineWidth(fWidFit);
1068  fMuLoProj[iSig] -> SetLineWidth(fWidFit);
1069  fMuHiProj[iSig] -> SetParameter(0, sigHiGuess[0]);
1070  fMuLoProj[iSig] -> SetParameter(0, sigLoGuess[0]);
1071  fMuHiProj[iSig] -> SetParameter(1, sigHiGuess[1]);
1072  fMuLoProj[iSig] -> SetParameter(1, sigLoGuess[1]);
1073  fMuHiProj[iSig] -> SetParameter(2, sigHiGuess[2]);
1074  fMuLoProj[iSig] -> SetParameter(2, sigLoGuess[2]);
1075 
1076  // fit graphs
1077  grMuHiProj[iSig] -> Fit(sFnMuHiProj[iSig].Data(), "", "", ptFitRange[0], ptFitRange[1]);
1078  grMuLoProj[iSig] -> Fit(sFnMuLoProj[iSig].Data(), "", "", ptFitRange[0], ptFitRange[1]);
1079  }
1080  cout << " Created and fit sigma graphs.\n"
1081  << " Second loop over reco. tracks:"
1082  << endl;
1083 
1084  // 2nd track loop
1085  nBytesTrk = 0;
1086  for (Long64_t iTrk = 0; iTrk < nTrks; iTrk++) {
1087 
1088  // grab entry
1089  const Long64_t bytesTrk = ntTrack -> GetEntry(iTrk);
1090  if (bytesTrk < 0.) {
1091  cerr << "WARNING: something wrong with track #" << iTrk << "! Aborting loop!" << endl;
1092  break;
1093  }
1094  nBytesTrk += bytesTrk;
1095 
1096  // announce progress
1097  const Long64_t iProgTrk = iTrk + 1;
1098  if (iProgTrk == nTrks) {
1099  cout << " Processing track " << iProgTrk << "/" << nTrks << "..." << endl;
1100  } else {
1101  cout << " Processing track " << iProgTrk << "/" << nTrks << "...\r" << flush;
1102  }
1103 
1104  // do calculations
1105  const Double_t ptFrac = trk_pt / trk_gpt;
1106  const Double_t ptDelta = trk_deltapt / trk_pt;
1107 
1108  // apply trk cuts
1109  const Bool_t isInZVtxCut = (abs(trk_vz) < vzTrkMax);
1110  const Bool_t isInInttCut = (trk_nintt >= nInttTrkMin);
1111  const Bool_t isInMVtxCut = (trk_nlmaps > nMVtxTrkMin);
1112  const Bool_t isInTpcCut = (trk_ntpc > nTpcTrkMin);
1113  const Bool_t isInPtCut = (trk_pt > ptTrkMin);
1114  const Bool_t isInQualCut = (trk_quality < qualTrkMax);
1115  const Bool_t isGoodTrk = (isInZVtxCut && isInInttCut && isInMVtxCut && isInTpcCut && isInPtCut && isInQualCut);
1116  if (!isGoodTrk) continue;
1117 
1118  // apply delta-pt cuts
1119  const Bool_t isNormalTrk = ((ptFrac > normRange[0]) && (ptFrac < normRange[1]));
1120  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
1121 
1122  // get bounds
1123  const Float_t ptDeltaMin = fMuLoProj[iSig] -> Eval(trk_pt);
1124  const Float_t ptDeltaMax = fMuHiProj[iSig] -> Eval(trk_pt);
1125 
1126  const Bool_t isInDeltaPtSigma = ((ptDelta >= ptDeltaMin) && (ptDelta <= ptDeltaMax));
1127  if (isInDeltaPtSigma) {
1128 
1129  // fill histograms
1130  hPtDeltaSig[iSig] -> Fill(ptDelta);
1131  hPtTrackSig[iSig] -> Fill(trk_pt);
1132  hPtFracSig[iSig] -> Fill(ptFrac);
1133  hPtTrkTruSig[iSig] -> Fill(trk_gpt);
1134  hPtDeltaVsFracSig[iSig] -> Fill(ptFrac, ptDelta);
1135  hPtDeltaVsTrueSig[iSig] -> Fill(trk_gpt, ptDelta);
1136  hPtDeltaVsTrackSig[iSig] -> Fill(trk_pt, ptDelta);
1137  hPtTrueVsTrackSig[iSig] -> Fill(trk_pt, trk_gpt);
1138 
1139  // increment counters
1140  if (isNormalTrk) {
1141  ++nNormSig[iSig];
1142  } else {
1143  ++nWeirdSig[iSig];
1144  }
1145  }
1146  } // end delta-pt cut
1147  } // end 1st track loop
1148  cout << " Second loop over reco. tracks finished!" << endl;
1149 
1150  // calculate pt-dependent delta-pt rejection factors
1151  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
1152  rejSig[iSig] = (Double_t) nNormSig[iSig] / (Double_t) nWeirdSig[iSig];
1153  }
1154  cout << " Calculated pt-depdendent delta-pt rejection factors.\n"
1155  << " Loop over particles:"
1156  << endl;
1157 
1158  // truth loop
1159  Long64_t nBytesTru = 0;
1160  for (Long64_t iTru = 0; iTru < nTrus; iTru++) {
1161 
1162  // grab entry
1163  const Long64_t bytesTru = ntTruth -> GetEntry(iTru);
1164  if (bytesTru < 0.) {
1165  cerr << "WARNING: something wrong with particle #" << iTru << "! Aborting loop!" << endl;
1166  break;
1167  }
1168  nBytesTru += bytesTru;
1169 
1170  // announce progress
1171  const Long64_t iProgTru = iTru + 1;
1172  if (iProgTru == nTrus) {
1173  cout << " Processing particle " << iProgTru << "/" << nTrus << "..." << endl;
1174  } else {
1175  cout << " Processing particle" << iProgTru << "/" << nTrus << "...\r" << flush;
1176  }
1177 
1178  // fill truth histogram
1179  const Bool_t isPrimary = (tru_gprimary == 1);
1180  if (isPrimary) {
1181  hPtTruth -> Fill(tru_gpt);
1182  }
1183  } // end track loop
1184  cout << " Loop over particles finished!" << endl;
1185 
1186  // announce rejection factors
1187  cout << " Finished tuple loops! Rejection factors:" << endl;
1188 
1189  // flat delta-t rejection factors
1190  cout << " Flat delta-pt cuts" << endl;
1191  for (Ssiz_t iCut = 0; iCut < NDPtCuts; iCut++) {
1192  cout << " n(Norm, Weird) = (" << nNormCut[iCut] << ", " << nWeirdCut[iCut] << "), rejection = " << rejCut[iCut] << endl;
1193  }
1194 
1195  // flat delta-t rejection factors
1196  cout << " Pt-dependent delta-pt cuts" << endl;
1197  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
1198  cout << " n(Norm, Weird) = (" << nNormSig[iSig] << ", " << nWeirdSig[iSig] << "), rejection = " << rejSig[iSig] << endl;
1199  }
1200 
1201  // make rejection graphs
1202  TString sRejCut("gr");
1203  TString sRejSig("gr");
1204  sRejCut.Append(sRejCutBase.Data());
1205  sRejSig.Append(sRejSigBase.Data());
1206 
1207  TGraph *grRejCut = new TGraph(NDPtCuts, ptDeltaMax, rejCut);
1208  TGraph *grRejSig = new TGraph(NSigCuts, ptDeltaSig, rejSig);
1209  grRejCut -> SetName(sRejCut.Data());
1210  grRejSig -> SetName(sRejSig.Data());
1211  cout << " Made rejection factor graph." << endl;
1212 
1213  // rebin efficiency histograms if needed
1214  if (doEffRebin) {
1215  hPtTruth -> Rebin(nEffRebin);
1216  hPtTrkTru -> Rebin(nEffRebin);
1217  for (Ssiz_t iCut = 0; iCut < NDPtCuts; iCut++) {
1218  hPtTrkTruCut[iCut] -> Rebin(nEffRebin);
1219  }
1220  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
1221  hPtTrkTruSig[iSig] -> Rebin(nEffRebin);
1222  }
1223  cout << " Rebinned efficiency histograms." << endl;
1224  }
1225 
1226  // calculate efficiencies
1227  TString sEff("h");
1228  sEff.Append(sEffBase.Data());
1229 
1230  // flat delta-pt cut efficiency names
1231  TString sEffCut[NDPtCuts];
1232  for (Ssiz_t iCut = 0; iCut < NDPtCuts; iCut++) {
1233  sEffCut[iCut] = "h";
1234  sEffCut[iCut].Append(sEffBase.Data());
1235  sEffCut[iCut].Append(sDPtSuffix[iCut].Data());
1236  }
1237 
1238  // pt-dependent delta-pt cut efficiency names
1239  TString sEffSig[NSigCuts];
1240  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
1241  sEffSig[iSig] = "h";
1242  sEffSig[iSig].Append(sEffBase.Data());
1243  sEffSig[iSig].Append(sSigSuffix[iSig].Data());
1244  }
1245 
1246  hEff = (TH1D*) hPtTruth -> Clone();
1247  hEff -> SetName(sEff.Data());
1248  hEff -> Reset("ICES");
1249  hEff -> Divide(hPtTrkTru, hPtTruth, 1., 1.);
1250 
1251  // flat delta-pt cut efficiencies
1252  for (Ssiz_t iCut = 0; iCut < NDPtCuts; iCut++) {
1253  hEffCut[iCut] = (TH1D*) hPtTruth -> Clone();
1254  hEffCut[iCut] -> SetName(sEffCut[iCut].Data());
1255  hEffCut[iCut] -> Reset("ICES");
1256  hEffCut[iCut] -> Divide(hPtTrkTruCut[iCut], hPtTruth, 1., 1.);
1257  }
1258 
1259  // pt-dependent delta-pt cut efficiencies
1260  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
1261  hEffSig[iSig] = (TH1D*) hPtTruth -> Clone();
1262  hEffSig[iSig] -> SetName(sEffSig[iSig].Data());
1263  hEffSig[iSig] -> Reset("ICES");
1264  hEffSig[iSig] -> Divide(hPtTrkTruSig[iSig], hPtTruth, 1., 1.);
1265  }
1266  cout << " Calculated efficiencies." << endl;
1267 
1268  // set styles
1269  const UInt_t fFil(0);
1270  const UInt_t fLin(1);
1271  const UInt_t fWid(1);
1272  const UInt_t fTxt(42);
1273  const UInt_t fAln(12);
1274  const UInt_t fCnt(1);
1275  const Float_t fLab[NPad] = {0.074, 0.04};
1276  const Float_t fTit[NPad] = {0.074, 0.04};
1277  const Float_t fOffX[NPad] = {1.1, 1.};
1278  const Float_t fOffY[NPad] = {0.7, 1.3};
1279  const Float_t fOffZ[NPad] = {1.1, 1.1};
1280  grRejCut -> SetMarkerColor(fColTrue);
1281  grRejCut -> SetMarkerStyle(fMarTrue);
1282  grRejCut -> SetFillColor(fColTrue);
1283  grRejCut -> SetFillStyle(fFil);
1284  grRejCut -> SetLineColor(fColTrue);
1285  grRejCut -> SetLineStyle(fLin);
1286  grRejCut -> SetLineWidth(fWid);
1287  grRejCut -> SetTitle(sTitle.Data());
1288  grRejCut -> GetXaxis() -> SetRangeUser(rDeltaRange[0], rDeltaRange[1]);
1289  grRejCut -> GetXaxis() -> SetTitle(sDeltaCutAxis.Data());
1290  grRejCut -> GetXaxis() -> SetTitleFont(fTxt);
1291  grRejCut -> GetXaxis() -> SetTitleSize(fTit[1]);
1292  grRejCut -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1293  grRejCut -> GetXaxis() -> SetLabelFont(fTxt);
1294  grRejCut -> GetXaxis() -> SetLabelSize(fLab[1]);
1295  grRejCut -> GetXaxis() -> CenterTitle(fCnt);
1296  grRejCut -> GetYaxis() -> SetTitle(sRejectAxis.Data());
1297  grRejCut -> GetYaxis() -> SetTitleFont(fTxt);
1298  grRejCut -> GetYaxis() -> SetTitleSize(fTit[1]);
1299  grRejCut -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1300  grRejCut -> GetYaxis() -> SetLabelFont(fTxt);
1301  grRejCut -> GetYaxis() -> SetLabelSize(fLab[1]);
1302  grRejCut -> GetYaxis() -> CenterTitle(fCnt);
1303  grRejSig -> SetMarkerColor(fColTrue);
1304  grRejSig -> SetMarkerStyle(fMarTrue);
1305  grRejSig -> SetFillColor(fColTrue);
1306  grRejSig -> SetFillStyle(fFil);
1307  grRejSig -> SetLineColor(fColTrue);
1308  grRejSig -> SetLineStyle(fLin);
1309  grRejSig -> SetLineWidth(fWid);
1310  grRejSig -> SetTitle(sTitle.Data());
1311  grRejSig -> GetXaxis() -> SetRangeUser(rDeltaRange[0], rDeltaRange[1]);
1312  grRejSig -> GetXaxis() -> SetTitle(sSigmaCutAxis.Data());
1313  grRejSig -> GetXaxis() -> SetTitleFont(fTxt);
1314  grRejSig -> GetXaxis() -> SetTitleSize(fTit[1]);
1315  grRejSig -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1316  grRejSig -> GetXaxis() -> SetLabelFont(fTxt);
1317  grRejSig -> GetXaxis() -> SetLabelSize(fLab[1]);
1318  grRejSig -> GetXaxis() -> CenterTitle(fCnt);
1319  grRejSig -> GetYaxis() -> SetTitle(sRejectAxis.Data());
1320  grRejSig -> GetYaxis() -> SetTitleFont(fTxt);
1321  grRejSig -> GetYaxis() -> SetTitleSize(fTit[1]);
1322  grRejSig -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1323  grRejSig -> GetYaxis() -> SetLabelFont(fTxt);
1324  grRejSig -> GetYaxis() -> SetLabelSize(fLab[1]);
1325  grRejSig -> GetYaxis() -> CenterTitle(fCnt);
1326  hEff -> SetMarkerColor(fColTrk);
1327  hEff -> SetMarkerStyle(fMarTrk);
1328  hEff -> SetFillColor(fColTrk);
1329  hEff -> SetFillStyle(fFil);
1330  hEff -> SetLineColor(fColTrk);
1331  hEff -> SetLineStyle(fLin);
1332  hEff -> SetLineWidth(fWid);
1333  hEff -> SetTitle(sTitle.Data());
1334  hEff -> SetTitleFont(fTxt);
1335  hEff -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1336  hEff -> GetXaxis() -> SetTitle(sPtTrueAxis.Data());
1337  hEff -> GetXaxis() -> SetTitleFont(fTxt);
1338  hEff -> GetXaxis() -> SetTitleSize(fTit[0]);
1339  hEff -> GetXaxis() -> SetTitleOffset(fOffX[0]);
1340  hEff -> GetXaxis() -> SetLabelFont(fTxt);
1341  hEff -> GetXaxis() -> SetLabelSize(fLab[0]);
1342  hEff -> GetXaxis() -> CenterTitle(fCnt);
1343  hEff -> GetYaxis() -> SetTitle(sEffAxis.Data());
1344  hEff -> GetYaxis() -> SetTitleFont(fTxt);
1345  hEff -> GetYaxis() -> SetTitleSize(fTit[0]);
1346  hEff -> GetYaxis() -> SetTitleOffset(fOffY[0]);
1347  hEff -> GetYaxis() -> SetLabelFont(fTxt);
1348  hEff -> GetYaxis() -> SetLabelSize(fLab[0]);
1349  hEff -> GetYaxis() -> CenterTitle(fCnt);
1350  hPtTruth -> SetMarkerColor(fColTrue);
1351  hPtTruth -> SetMarkerStyle(fMarTrue);
1352  hPtTruth -> SetFillColor(fColTrue);
1353  hPtTruth -> SetFillStyle(fFil);
1354  hPtTruth -> SetLineColor(fColTrue);
1355  hPtTruth -> SetLineStyle(fLin);
1356  hPtTruth -> SetLineWidth(fWid);
1357  hPtTruth -> SetTitle(sTitle.Data());
1358  hPtTruth -> SetTitleFont(fTxt);
1359  hPtTruth -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1360  hPtTruth -> GetXaxis() -> SetTitle(sPtTrueAxis.Data());
1361  hPtTruth -> GetXaxis() -> SetTitleFont(fTxt);
1362  hPtTruth -> GetXaxis() -> SetTitleSize(fTit[1]);
1363  hPtTruth -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1364  hPtTruth -> GetXaxis() -> SetLabelFont(fTxt);
1365  hPtTruth -> GetXaxis() -> SetLabelSize(fLab[1]);
1366  hPtTruth -> GetXaxis() -> CenterTitle(fCnt);
1367  hPtTruth -> GetYaxis() -> SetTitle(sCounts.Data());
1368  hPtTruth -> GetYaxis() -> SetTitleFont(fTxt);
1369  hPtTruth -> GetYaxis() -> SetTitleSize(fTit[1]);
1370  hPtTruth -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1371  hPtTruth -> GetYaxis() -> SetLabelFont(fTxt);
1372  hPtTruth -> GetYaxis() -> SetLabelSize(fLab[1]);
1373  hPtTruth -> GetYaxis() -> CenterTitle(fCnt);
1374  hPtDelta -> SetMarkerColor(fColTrue);
1375  hPtDelta -> SetMarkerStyle(fMarTrue);
1376  hPtDelta -> SetFillColor(fColTrue);
1377  hPtDelta -> SetFillStyle(fFil);
1378  hPtDelta -> SetLineColor(fColTrue);
1379  hPtDelta -> SetLineStyle(fLin);
1380  hPtDelta -> SetLineWidth(fWid);
1381  hPtDelta -> SetTitle(sTitle.Data());
1382  hPtDelta -> SetTitleFont(fTxt);
1383  hPtDelta -> GetXaxis() -> SetRangeUser(rDeltaRange[0], rDeltaRange[1]);
1384  hPtDelta -> GetXaxis() -> SetTitle(sPtDeltaAxis.Data());
1385  hPtDelta -> GetXaxis() -> SetTitleFont(fTxt);
1386  hPtDelta -> GetXaxis() -> SetTitleSize(fTit[1]);
1387  hPtDelta -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1388  hPtDelta -> GetXaxis() -> SetLabelFont(fTxt);
1389  hPtDelta -> GetXaxis() -> SetLabelSize(fLab[1]);
1390  hPtDelta -> GetXaxis() -> CenterTitle(fCnt);
1391  hPtDelta -> GetYaxis() -> SetTitle(sCounts.Data());
1392  hPtDelta -> GetYaxis() -> SetTitleFont(fTxt);
1393  hPtDelta -> GetYaxis() -> SetTitleSize(fTit[1]);
1394  hPtDelta -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1395  hPtDelta -> GetYaxis() -> SetLabelFont(fTxt);
1396  hPtDelta -> GetYaxis() -> SetLabelSize(fLab[1]);
1397  hPtDelta -> GetYaxis() -> CenterTitle(fCnt);
1398  hPtTrack -> SetMarkerColor(fColTrue);
1399  hPtTrack -> SetMarkerStyle(fMarTrue);
1400  hPtTrack -> SetFillColor(fColTrue);
1401  hPtTrack -> SetFillStyle(fFil);
1402  hPtTrack -> SetLineColor(fColTrue);
1403  hPtTrack -> SetLineStyle(fLin);
1404  hPtTrack -> SetLineWidth(fWid);
1405  hPtTrack -> SetTitle(sTitle.Data());
1406  hPtTrack -> SetTitleFont(fTxt);
1407  hPtTrack -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1408  hPtTrack -> GetXaxis() -> SetTitle(sPtRecoAxis.Data());
1409  hPtTrack -> GetXaxis() -> SetTitleFont(fTxt);
1410  hPtTrack -> GetXaxis() -> SetTitleSize(fTit[1]);
1411  hPtTrack -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1412  hPtTrack -> GetXaxis() -> SetLabelFont(fTxt);
1413  hPtTrack -> GetXaxis() -> SetLabelSize(fLab[1]);
1414  hPtTrack -> GetXaxis() -> CenterTitle(fCnt);
1415  hPtTrack -> GetYaxis() -> SetTitle(sCounts.Data());
1416  hPtTrack -> GetYaxis() -> SetTitleFont(fTxt);
1417  hPtTrack -> GetYaxis() -> SetTitleSize(fTit[1]);
1418  hPtTrack -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1419  hPtTrack -> GetYaxis() -> SetLabelFont(fTxt);
1420  hPtTrack -> GetYaxis() -> SetLabelSize(fLab[1]);
1421  hPtTrack -> GetYaxis() -> CenterTitle(fCnt);
1422  hPtFrac -> SetMarkerColor(fColTrue);
1423  hPtFrac -> SetMarkerStyle(fMarTrue);
1424  hPtFrac -> SetFillColor(fColTrue);
1425  hPtFrac -> SetFillStyle(fFil);
1426  hPtFrac -> SetLineColor(fColTrue);
1427  hPtFrac -> SetLineStyle(fLin);
1428  hPtFrac -> SetLineWidth(fWid);
1429  hPtFrac -> SetTitle(sTitle.Data());
1430  hPtFrac -> SetTitleFont(fTxt);
1431  hPtFrac -> GetXaxis() -> SetRangeUser(rFracRange[0], rFracRange[1]);
1432  hPtFrac -> GetXaxis() -> SetTitle(sPtFracAxis.Data());
1433  hPtFrac -> GetXaxis() -> SetTitleFont(fTxt);
1434  hPtFrac -> GetXaxis() -> SetTitleSize(fTit[1]);
1435  hPtFrac -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1436  hPtFrac -> GetXaxis() -> SetLabelFont(fTxt);
1437  hPtFrac -> GetXaxis() -> SetLabelSize(fLab[1]);
1438  hPtFrac -> GetXaxis() -> CenterTitle(fCnt);
1439  hPtFrac -> GetYaxis() -> SetTitle(sCounts.Data());
1440  hPtFrac -> GetYaxis() -> SetTitleFont(fTxt);
1441  hPtFrac -> GetYaxis() -> SetTitleSize(fTit[1]);
1442  hPtFrac -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1443  hPtFrac -> GetYaxis() -> SetLabelFont(fTxt);
1444  hPtFrac -> GetYaxis() -> SetLabelSize(fLab[1]);
1445  hPtFrac -> GetYaxis() -> CenterTitle(fCnt);
1446  hPtTrkTru -> SetMarkerColor(fColTrk);
1447  hPtTrkTru -> SetMarkerStyle(fMarTrk);
1448  hPtTrkTru -> SetFillColor(fColTrk);
1449  hPtTrkTru -> SetFillStyle(fFil);
1450  hPtTrkTru -> SetLineColor(fColTrk);
1451  hPtTrkTru -> SetLineStyle(fLin);
1452  hPtTrkTru -> SetLineWidth(fWid);
1453  hPtTrkTru -> SetTitle(sTitle.Data());
1454  hPtTrkTru -> SetTitleFont(fTxt);
1455  hPtTrkTru -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1456  hPtTrkTru -> GetXaxis() -> SetTitle(sPtTrueAxis.Data());
1457  hPtTrkTru -> GetXaxis() -> SetTitleFont(fTxt);
1458  hPtTrkTru -> GetXaxis() -> SetTitleSize(fTit[1]);
1459  hPtTrkTru -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1460  hPtTrkTru -> GetXaxis() -> SetLabelFont(fTxt);
1461  hPtTrkTru -> GetXaxis() -> SetLabelSize(fLab[1]);
1462  hPtTrkTru -> GetXaxis() -> CenterTitle(fCnt);
1463  hPtTrkTru -> GetYaxis() -> SetTitle(sCounts.Data());
1464  hPtTrkTru -> GetYaxis() -> SetTitleFont(fTxt);
1465  hPtTrkTru -> GetYaxis() -> SetTitleSize(fTit[1]);
1466  hPtTrkTru -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1467  hPtTrkTru -> GetYaxis() -> SetLabelFont(fTxt);
1468  hPtTrkTru -> GetYaxis() -> SetLabelSize(fLab[1]);
1469  hPtTrkTru -> GetYaxis() -> CenterTitle(fCnt);
1470  hPtDeltaVsFrac -> SetMarkerColor(fColTrk);
1471  hPtDeltaVsFrac -> SetMarkerStyle(fMarTrk);
1472  hPtDeltaVsFrac -> SetFillColor(fColTrk);
1473  hPtDeltaVsFrac -> SetFillStyle(fFil);
1474  hPtDeltaVsFrac -> SetLineColor(fColTrk);
1475  hPtDeltaVsFrac -> SetLineStyle(fLin);
1476  hPtDeltaVsFrac -> SetLineWidth(fWid);
1477  hPtDeltaVsFrac -> SetTitle(sTitle.Data());
1478  hPtDeltaVsFrac -> SetTitleFont(fTxt);
1479  hPtDeltaVsFrac -> GetXaxis() -> SetRangeUser(rFracRange[0], rFracRange[1]);
1480  hPtDeltaVsFrac -> GetXaxis() -> SetTitle(sPtFracAxis.Data());
1481  hPtDeltaVsFrac -> GetXaxis() -> SetTitleFont(fTxt);
1482  hPtDeltaVsFrac -> GetXaxis() -> SetTitleSize(fTit[1]);
1483  hPtDeltaVsFrac -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1484  hPtDeltaVsFrac -> GetXaxis() -> SetLabelFont(fTxt);
1485  hPtDeltaVsFrac -> GetXaxis() -> SetLabelSize(fLab[1]);
1486  hPtDeltaVsFrac -> GetXaxis() -> CenterTitle(fCnt);
1487  hPtDeltaVsFrac -> GetYaxis() -> SetRangeUser(rDeltaRange[0], rDeltaRange[1]);
1488  hPtDeltaVsFrac -> GetYaxis() -> SetTitle(sPtDeltaAxis.Data());
1489  hPtDeltaVsFrac -> GetYaxis() -> SetTitleFont(fTxt);
1490  hPtDeltaVsFrac -> GetYaxis() -> SetTitleSize(fTit[1]);
1491  hPtDeltaVsFrac -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1492  hPtDeltaVsFrac -> GetYaxis() -> SetLabelFont(fTxt);
1493  hPtDeltaVsFrac -> GetYaxis() -> SetLabelSize(fLab[1]);
1494  hPtDeltaVsFrac -> GetYaxis() -> CenterTitle(fCnt);
1495  hPtDeltaVsFrac -> GetZaxis() -> SetTitle(sCounts.Data());
1496  hPtDeltaVsFrac -> GetZaxis() -> SetTitleFont(fTxt);
1497  hPtDeltaVsFrac -> GetZaxis() -> SetTitleSize(fTit[1]);
1498  hPtDeltaVsFrac -> GetZaxis() -> SetTitleOffset(fOffZ[1]);
1499  hPtDeltaVsFrac -> GetZaxis() -> SetLabelFont(fTxt);
1500  hPtDeltaVsFrac -> GetZaxis() -> SetLabelSize(fLab[1]);
1501  hPtDeltaVsFrac -> GetZaxis() -> CenterTitle(fCnt);
1502  hPtDeltaVsTrue -> SetMarkerColor(fColTrk);
1503  hPtDeltaVsTrue -> SetMarkerStyle(fMarTrk);
1504  hPtDeltaVsTrue -> SetFillColor(fColTrk);
1505  hPtDeltaVsTrue -> SetFillStyle(fFil);
1506  hPtDeltaVsTrue -> SetLineColor(fColTrk);
1507  hPtDeltaVsTrue -> SetLineStyle(fLin);
1508  hPtDeltaVsTrue -> SetLineWidth(fWid);
1509  hPtDeltaVsTrue -> SetTitle(sTitle.Data());
1510  hPtDeltaVsTrue -> SetTitleFont(fTxt);
1511  hPtDeltaVsTrue -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1512  hPtDeltaVsTrue -> GetXaxis() -> SetTitle(sPtTrueAxis.Data());
1513  hPtDeltaVsTrue -> GetXaxis() -> SetTitleFont(fTxt);
1514  hPtDeltaVsTrue -> GetXaxis() -> SetTitleSize(fTit[1]);
1515  hPtDeltaVsTrue -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1516  hPtDeltaVsTrue -> GetXaxis() -> SetLabelFont(fTxt);
1517  hPtDeltaVsTrue -> GetXaxis() -> SetLabelSize(fLab[1]);
1518  hPtDeltaVsTrue -> GetXaxis() -> CenterTitle(fCnt);
1519  hPtDeltaVsTrue -> GetYaxis() -> SetRangeUser(rDeltaRange[0], rDeltaRange[1]);
1520  hPtDeltaVsTrue -> GetYaxis() -> SetTitle(sPtDeltaAxis.Data());
1521  hPtDeltaVsTrue -> GetYaxis() -> SetTitleFont(fTxt);
1522  hPtDeltaVsTrue -> GetYaxis() -> SetTitleSize(fTit[1]);
1523  hPtDeltaVsTrue -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1524  hPtDeltaVsTrue -> GetYaxis() -> SetLabelFont(fTxt);
1525  hPtDeltaVsTrue -> GetYaxis() -> SetLabelSize(fLab[1]);
1526  hPtDeltaVsTrue -> GetYaxis() -> CenterTitle(fCnt);
1527  hPtDeltaVsTrue -> GetZaxis() -> SetTitle(sCounts.Data());
1528  hPtDeltaVsTrue -> GetZaxis() -> SetTitleFont(fTxt);
1529  hPtDeltaVsTrue -> GetZaxis() -> SetTitleSize(fTit[1]);
1530  hPtDeltaVsTrue -> GetZaxis() -> SetTitleOffset(fOffZ[1]);
1531  hPtDeltaVsTrue -> GetZaxis() -> SetLabelFont(fTxt);
1532  hPtDeltaVsTrue -> GetZaxis() -> SetLabelSize(fLab[1]);
1533  hPtDeltaVsTrue -> GetZaxis() -> CenterTitle(fCnt);
1534  hPtDeltaVsTrack -> SetMarkerColor(fColTrk);
1535  hPtDeltaVsTrack -> SetMarkerStyle(fMarTrk);
1536  hPtDeltaVsTrack -> SetFillColor(fColTrk);
1537  hPtDeltaVsTrack -> SetFillStyle(fFil);
1538  hPtDeltaVsTrack -> SetLineColor(fColTrk);
1539  hPtDeltaVsTrack -> SetLineStyle(fLin);
1540  hPtDeltaVsTrack -> SetLineWidth(fWid);
1541  hPtDeltaVsTrack -> SetTitle(sTitle.Data());
1542  hPtDeltaVsTrack -> SetTitleFont(fTxt);
1543  hPtDeltaVsTrack -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1544  hPtDeltaVsTrack -> GetXaxis() -> SetTitle(sPtRecoAxis.Data());
1545  hPtDeltaVsTrack -> GetXaxis() -> SetTitleFont(fTxt);
1546  hPtDeltaVsTrack -> GetXaxis() -> SetTitleSize(fTit[1]);
1547  hPtDeltaVsTrack -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1548  hPtDeltaVsTrack -> GetXaxis() -> SetLabelFont(fTxt);
1549  hPtDeltaVsTrack -> GetXaxis() -> SetLabelSize(fLab[1]);
1550  hPtDeltaVsTrack -> GetXaxis() -> CenterTitle(fCnt);
1551  hPtDeltaVsTrack -> GetYaxis() -> SetRangeUser(rDeltaRange[0], rDeltaRange[1]);
1552  hPtDeltaVsTrack -> GetYaxis() -> SetTitle(sPtDeltaAxis.Data());
1553  hPtDeltaVsTrack -> GetYaxis() -> SetTitleFont(fTxt);
1554  hPtDeltaVsTrack -> GetYaxis() -> SetTitleSize(fTit[1]);
1555  hPtDeltaVsTrack -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1556  hPtDeltaVsTrack -> GetYaxis() -> SetLabelFont(fTxt);
1557  hPtDeltaVsTrack -> GetYaxis() -> SetLabelSize(fLab[1]);
1558  hPtDeltaVsTrack -> GetYaxis() -> CenterTitle(fCnt);
1559  hPtDeltaVsTrack -> GetZaxis() -> SetTitle(sCounts.Data());
1560  hPtDeltaVsTrack -> GetZaxis() -> SetTitleFont(fTxt);
1561  hPtDeltaVsTrack -> GetZaxis() -> SetTitleSize(fTit[1]);
1562  hPtDeltaVsTrack -> GetZaxis() -> SetTitleOffset(fOffZ[1]);
1563  hPtDeltaVsTrack -> GetZaxis() -> SetLabelFont(fTxt);
1564  hPtDeltaVsTrack -> GetZaxis() -> SetLabelSize(fLab[1]);
1565  hPtDeltaVsTrack -> GetZaxis() -> CenterTitle(fCnt);
1566  hPtTrueVsTrack -> SetMarkerColor(fColTrk);
1567  hPtTrueVsTrack -> SetMarkerStyle(fMarTrk);
1568  hPtTrueVsTrack -> SetFillColor(fColTrk);
1569  hPtTrueVsTrack -> SetFillStyle(fFil);
1570  hPtTrueVsTrack -> SetLineColor(fColTrk);
1571  hPtTrueVsTrack -> SetLineStyle(fLin);
1572  hPtTrueVsTrack -> SetLineWidth(fWid);
1573  hPtTrueVsTrack -> SetTitle(sTitle.Data());
1574  hPtTrueVsTrack -> SetTitleFont(fTxt);
1575  hPtTrueVsTrack -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1576  hPtTrueVsTrack -> GetXaxis() -> SetTitle(sPtRecoAxis.Data());
1577  hPtTrueVsTrack -> GetXaxis() -> SetTitleFont(fTxt);
1578  hPtTrueVsTrack -> GetXaxis() -> SetTitleSize(fTit[1]);
1579  hPtTrueVsTrack -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1580  hPtTrueVsTrack -> GetXaxis() -> SetLabelFont(fTxt);
1581  hPtTrueVsTrack -> GetXaxis() -> SetLabelSize(fLab[1]);
1582  hPtTrueVsTrack -> GetXaxis() -> CenterTitle(fCnt);
1583  hPtTrueVsTrack -> GetYaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1584  hPtTrueVsTrack -> GetYaxis() -> SetTitle(sPtTrueAxis.Data());
1585  hPtTrueVsTrack -> GetYaxis() -> SetTitleFont(fTxt);
1586  hPtTrueVsTrack -> GetYaxis() -> SetTitleSize(fTit[1]);
1587  hPtTrueVsTrack -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1588  hPtTrueVsTrack -> GetYaxis() -> SetLabelFont(fTxt);
1589  hPtTrueVsTrack -> GetYaxis() -> SetLabelSize(fLab[1]);
1590  hPtTrueVsTrack -> GetYaxis() -> CenterTitle(fCnt);
1591  hPtTrueVsTrack -> GetZaxis() -> SetTitle(sCounts.Data());
1592  hPtTrueVsTrack -> GetZaxis() -> SetTitleFont(fTxt);
1593  hPtTrueVsTrack -> GetZaxis() -> SetTitleSize(fTit[1]);
1594  hPtTrueVsTrack -> GetZaxis() -> SetTitleOffset(fOffZ[1]);
1595  hPtTrueVsTrack -> GetZaxis() -> SetLabelFont(fTxt);
1596  hPtTrueVsTrack -> GetZaxis() -> SetLabelSize(fLab[1]);
1597  hPtTrueVsTrack -> GetZaxis() -> CenterTitle(fCnt);
1598 
1599  // set styles of delta-pt projection histograms
1600  grMuProj -> SetMarkerColor(fColTrue);
1601  grMuProj -> SetMarkerStyle(fMarTrue);
1602  grMuProj -> SetFillColor(fColTrue);
1603  grMuProj -> SetFillStyle(fFil);
1604  grMuProj -> SetLineColor(fColTrue);
1605  grMuProj -> SetLineStyle(fLin);
1606  grMuProj -> SetLineWidth(fWid);
1607  grMuProj -> SetTitle(sTitle.Data());
1608  grMuProj -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1609  grMuProj -> GetXaxis() -> SetTitle(sPtRecoAxis.Data());
1610  grMuProj -> GetXaxis() -> SetTitleFont(fTxt);
1611  grMuProj -> GetXaxis() -> SetTitleSize(fTit[1]);
1612  grMuProj -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1613  grMuProj -> GetXaxis() -> SetLabelFont(fTxt);
1614  grMuProj -> GetXaxis() -> SetLabelSize(fLab[1]);
1615  grMuProj -> GetXaxis() -> CenterTitle(fCnt);
1616  grMuProj -> GetYaxis() -> SetTitle(sMuProjAxis.Data());
1617  grMuProj -> GetYaxis() -> SetTitleFont(fTxt);
1618  grMuProj -> GetYaxis() -> SetTitleSize(fTit[1]);
1619  grMuProj -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1620  grMuProj -> GetYaxis() -> SetLabelFont(fTxt);
1621  grMuProj -> GetYaxis() -> SetLabelSize(fLab[1]);
1622  grMuProj -> GetYaxis() -> CenterTitle(fCnt);
1623  grSigProj -> SetMarkerColor(fColTrue);
1624  grSigProj -> SetMarkerStyle(fMarTrue);
1625  grSigProj -> SetFillColor(fColTrue);
1626  grSigProj -> SetFillStyle(fFil);
1627  grSigProj -> SetLineColor(fColTrue);
1628  grSigProj -> SetLineStyle(fLin);
1629  grSigProj -> SetLineWidth(fWid);
1630  grSigProj -> SetTitle(sTitle.Data());
1631  grSigProj -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1632  grSigProj -> GetXaxis() -> SetTitle(sPtRecoAxis.Data());
1633  grSigProj -> GetXaxis() -> SetTitleFont(fTxt);
1634  grSigProj -> GetXaxis() -> SetTitleSize(fTit[1]);
1635  grSigProj -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1636  grSigProj -> GetXaxis() -> SetLabelFont(fTxt);
1637  grSigProj -> GetXaxis() -> SetLabelSize(fLab[1]);
1638  grSigProj -> GetXaxis() -> CenterTitle(fCnt);
1639  grSigProj -> GetYaxis() -> SetTitle(sSigProjAxis.Data());
1640  grSigProj -> GetYaxis() -> SetTitleFont(fTxt);
1641  grSigProj -> GetYaxis() -> SetTitleSize(fTit[1]);
1642  grSigProj -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1643  grSigProj -> GetYaxis() -> SetLabelFont(fTxt);
1644  grSigProj -> GetYaxis() -> SetLabelSize(fLab[1]);
1645  grSigProj -> GetYaxis() -> CenterTitle(fCnt);
1646  for (Ssiz_t iProj = 0; iProj < NProj; iProj++) {
1647  hPtDeltaProj[iProj] -> SetMarkerColor(fColProj[iProj]);
1648  hPtDeltaProj[iProj] -> SetMarkerStyle(fMarProj[iProj]);
1649  hPtDeltaProj[iProj] -> SetFillColor(fColProj[iProj]);
1650  hPtDeltaProj[iProj] -> SetFillStyle(fFil);
1651  hPtDeltaProj[iProj] -> SetLineColor(fColProj[iProj]);
1652  hPtDeltaProj[iProj] -> SetLineStyle(fLin);
1653  hPtDeltaProj[iProj] -> SetLineWidth(fWid);
1654  hPtDeltaProj[iProj] -> SetTitle(sTitle.Data());
1655  hPtDeltaProj[iProj] -> SetTitleFont(fTxt);
1656  hPtDeltaProj[iProj] -> GetXaxis() -> SetRangeUser(rDeltaRange[0], rDeltaRange[1]);
1657  hPtDeltaProj[iProj] -> GetXaxis() -> SetTitle(sPtDeltaAxis.Data());
1658  hPtDeltaProj[iProj] -> GetXaxis() -> SetTitleFont(fTxt);
1659  hPtDeltaProj[iProj] -> GetXaxis() -> SetTitleSize(fTit[1]);
1660  hPtDeltaProj[iProj] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1661  hPtDeltaProj[iProj] -> GetXaxis() -> SetLabelFont(fTxt);
1662  hPtDeltaProj[iProj] -> GetXaxis() -> SetLabelSize(fLab[1]);
1663  hPtDeltaProj[iProj] -> GetXaxis() -> CenterTitle(fCnt);
1664  hPtDeltaProj[iProj] -> GetYaxis() -> SetTitle(sCounts.Data());
1665  hPtDeltaProj[iProj] -> GetYaxis() -> SetTitleFont(fTxt);
1666  hPtDeltaProj[iProj] -> GetYaxis() -> SetTitleSize(fTit[1]);
1667  hPtDeltaProj[iProj] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1668  hPtDeltaProj[iProj] -> GetYaxis() -> SetLabelFont(fTxt);
1669  hPtDeltaProj[iProj] -> GetYaxis() -> SetLabelSize(fLab[1]);
1670  hPtDeltaProj[iProj] -> GetYaxis() -> CenterTitle(fCnt);
1671  }
1672  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
1673  grMuHiProj[iSig] -> SetMarkerColor(fColSig[iSig]);
1674  grMuHiProj[iSig] -> SetMarkerStyle(fMarSig[iSig]);
1675  grMuHiProj[iSig] -> SetFillColor(fColSig[iSig]);
1676  grMuHiProj[iSig] -> SetFillStyle(fFil);
1677  grMuHiProj[iSig] -> SetLineColor(fColSig[iSig]);
1678  grMuHiProj[iSig] -> SetLineStyle(fLin);
1679  grMuHiProj[iSig] -> SetLineWidth(fWid);
1680  grMuHiProj[iSig] -> SetTitle(sTitle.Data());
1681  grMuHiProj[iSig] -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1682  grMuHiProj[iSig] -> GetXaxis() -> SetTitle(sPtRecoAxis.Data());
1683  grMuHiProj[iSig] -> GetXaxis() -> SetTitleFont(fTxt);
1684  grMuHiProj[iSig] -> GetXaxis() -> SetTitleSize(fTit[1]);
1685  grMuHiProj[iSig] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1686  grMuHiProj[iSig] -> GetXaxis() -> SetLabelFont(fTxt);
1687  grMuHiProj[iSig] -> GetXaxis() -> SetLabelSize(fLab[1]);
1688  grMuHiProj[iSig] -> GetXaxis() -> CenterTitle(fCnt);
1689  grMuHiProj[iSig] -> GetYaxis() -> SetTitle(sMuProjAxis.Data());
1690  grMuHiProj[iSig] -> GetYaxis() -> SetTitleFont(fTxt);
1691  grMuHiProj[iSig] -> GetYaxis() -> SetTitleSize(fTit[1]);
1692  grMuHiProj[iSig] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1693  grMuHiProj[iSig] -> GetYaxis() -> SetLabelFont(fTxt);
1694  grMuHiProj[iSig] -> GetYaxis() -> SetLabelSize(fLab[1]);
1695  grMuHiProj[iSig] -> GetYaxis() -> CenterTitle(fCnt);
1696  grMuLoProj[iSig] -> SetMarkerColor(fColSig[iSig]);
1697  grMuLoProj[iSig] -> SetMarkerStyle(fMarSig[iSig]);
1698  grMuLoProj[iSig] -> SetFillColor(fColSig[iSig]);
1699  grMuLoProj[iSig] -> SetFillStyle(fFil);
1700  grMuLoProj[iSig] -> SetLineColor(fColSig[iSig]);
1701  grMuLoProj[iSig] -> SetLineStyle(fLin);
1702  grMuLoProj[iSig] -> SetLineWidth(fWid);
1703  grMuLoProj[iSig] -> SetTitle(sTitle.Data());
1704  grMuLoProj[iSig] -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1705  grMuLoProj[iSig] -> GetXaxis() -> SetTitle(sPtRecoAxis.Data());
1706  grMuLoProj[iSig] -> GetXaxis() -> SetTitleFont(fTxt);
1707  grMuLoProj[iSig] -> GetXaxis() -> SetTitleSize(fTit[1]);
1708  grMuLoProj[iSig] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1709  grMuLoProj[iSig] -> GetXaxis() -> SetLabelFont(fTxt);
1710  grMuLoProj[iSig] -> GetXaxis() -> SetLabelSize(fLab[1]);
1711  grMuLoProj[iSig] -> GetXaxis() -> CenterTitle(fCnt);
1712  grMuLoProj[iSig] -> GetYaxis() -> SetTitle(sMuProjAxis.Data());
1713  grMuLoProj[iSig] -> GetYaxis() -> SetTitleFont(fTxt);
1714  grMuLoProj[iSig] -> GetYaxis() -> SetTitleSize(fTit[1]);
1715  grMuLoProj[iSig] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1716  grMuLoProj[iSig] -> GetYaxis() -> SetLabelFont(fTxt);
1717  grMuLoProj[iSig] -> GetYaxis() -> SetLabelSize(fLab[1]);
1718  grMuLoProj[iSig] -> GetYaxis() -> CenterTitle(fCnt);
1719  }
1720 
1721  // set styles of flat delta-pt cut histograms
1722  for (Ssiz_t iCut = 0; iCut < NDPtCuts; iCut++) {
1723  hEffCut[iCut] -> SetMarkerColor(fColCut[iCut]);
1724  hEffCut[iCut] -> SetMarkerStyle(fMarCut[iCut]);
1725  hEffCut[iCut] -> SetFillColor(fColCut[iCut]);
1726  hEffCut[iCut] -> SetFillStyle(fFil);
1727  hEffCut[iCut] -> SetLineColor(fColCut[iCut]);
1728  hEffCut[iCut] -> SetLineStyle(fLin);
1729  hEffCut[iCut] -> SetLineWidth(fWid);
1730  hEffCut[iCut] -> SetTitle(sTitle.Data());
1731  hEffCut[iCut] -> SetTitleFont(fTxt);
1732  hEffCut[iCut] -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1733  hEffCut[iCut] -> GetXaxis() -> SetTitle(sPtTrueAxis.Data());
1734  hEffCut[iCut] -> GetXaxis() -> SetTitleFont(fTxt);
1735  hEffCut[iCut] -> GetXaxis() -> SetTitleSize(fTit[0]);
1736  hEffCut[iCut] -> GetXaxis() -> SetTitleOffset(fOffX[0]);
1737  hEffCut[iCut] -> GetXaxis() -> SetLabelFont(fTxt);
1738  hEffCut[iCut] -> GetXaxis() -> SetLabelSize(fLab[0]);
1739  hEffCut[iCut] -> GetXaxis() -> CenterTitle(fCnt);
1740  hEffCut[iCut] -> GetYaxis() -> SetTitle(sEffAxis.Data());
1741  hEffCut[iCut] -> GetYaxis() -> SetTitleFont(fTxt);
1742  hEffCut[iCut] -> GetYaxis() -> SetTitleSize(fTit[0]);
1743  hEffCut[iCut] -> GetYaxis() -> SetTitleOffset(fOffY[0]);
1744  hEffCut[iCut] -> GetYaxis() -> SetLabelFont(fTxt);
1745  hEffCut[iCut] -> GetYaxis() -> SetLabelSize(fLab[0]);
1746  hEffCut[iCut] -> GetYaxis() -> CenterTitle(fCnt);
1747  hPtDeltaCut[iCut] -> SetMarkerColor(fColCut[iCut]);
1748  hPtDeltaCut[iCut] -> SetMarkerStyle(fMarCut[iCut]);
1749  hPtDeltaCut[iCut] -> SetFillColor(fColCut[iCut]);
1750  hPtDeltaCut[iCut] -> SetFillStyle(fFil);
1751  hPtDeltaCut[iCut] -> SetLineColor(fColCut[iCut]);
1752  hPtDeltaCut[iCut] -> SetLineStyle(fLin);
1753  hPtDeltaCut[iCut] -> SetLineWidth(fWid);
1754  hPtDeltaCut[iCut] -> SetTitle(sTitle.Data());
1755  hPtDeltaCut[iCut] -> SetTitleFont(fTxt);
1756  hPtDeltaCut[iCut] -> GetXaxis() -> SetRangeUser(rDeltaRange[0], rDeltaRange[1]);
1757  hPtDeltaCut[iCut] -> GetXaxis() -> SetTitle(sPtDeltaAxis.Data());
1758  hPtDeltaCut[iCut] -> GetXaxis() -> SetTitleFont(fTxt);
1759  hPtDeltaCut[iCut] -> GetXaxis() -> SetTitleSize(fTit[1]);
1760  hPtDeltaCut[iCut] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1761  hPtDeltaCut[iCut] -> GetXaxis() -> SetLabelFont(fTxt);
1762  hPtDeltaCut[iCut] -> GetXaxis() -> SetLabelSize(fLab[1]);
1763  hPtDeltaCut[iCut] -> GetXaxis() -> CenterTitle(fCnt);
1764  hPtDeltaCut[iCut] -> GetYaxis() -> SetTitle(sCounts.Data());
1765  hPtDeltaCut[iCut] -> GetYaxis() -> SetTitleFont(fTxt);
1766  hPtDeltaCut[iCut] -> GetYaxis() -> SetTitleSize(fTit[1]);
1767  hPtDeltaCut[iCut] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1768  hPtDeltaCut[iCut] -> GetYaxis() -> SetLabelFont(fTxt);
1769  hPtDeltaCut[iCut] -> GetYaxis() -> SetLabelSize(fLab[1]);
1770  hPtDeltaCut[iCut] -> GetYaxis() -> CenterTitle(fCnt);
1771  hPtTrackCut[iCut] -> SetMarkerColor(fColCut[iCut]);
1772  hPtTrackCut[iCut] -> SetMarkerStyle(fMarCut[iCut]);
1773  hPtTrackCut[iCut] -> SetFillColor(fColCut[iCut]);
1774  hPtTrackCut[iCut] -> SetFillStyle(fFil);
1775  hPtTrackCut[iCut] -> SetLineColor(fColCut[iCut]);
1776  hPtTrackCut[iCut] -> SetLineStyle(fLin);
1777  hPtTrackCut[iCut] -> SetLineWidth(fWid);
1778  hPtTrackCut[iCut] -> SetTitle(sTitle.Data());
1779  hPtTrackCut[iCut] -> SetTitleFont(fTxt);
1780  hPtTrackCut[iCut] -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1781  hPtTrackCut[iCut] -> GetXaxis() -> SetTitle(sPtRecoAxis.Data());
1782  hPtTrackCut[iCut] -> GetXaxis() -> SetTitleFont(fTxt);
1783  hPtTrackCut[iCut] -> GetXaxis() -> SetTitleSize(fTit[1]);
1784  hPtTrackCut[iCut] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1785  hPtTrackCut[iCut] -> GetXaxis() -> SetLabelFont(fTxt);
1786  hPtTrackCut[iCut] -> GetXaxis() -> SetLabelSize(fLab[1]);
1787  hPtTrackCut[iCut] -> GetXaxis() -> CenterTitle(fCnt);
1788  hPtTrackCut[iCut] -> GetYaxis() -> SetTitle(sCounts.Data());
1789  hPtTrackCut[iCut] -> GetYaxis() -> SetTitleFont(fTxt);
1790  hPtTrackCut[iCut] -> GetYaxis() -> SetTitleSize(fTit[1]);
1791  hPtTrackCut[iCut] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1792  hPtTrackCut[iCut] -> GetYaxis() -> SetLabelFont(fTxt);
1793  hPtTrackCut[iCut] -> GetYaxis() -> SetLabelSize(fLab[1]);
1794  hPtTrackCut[iCut] -> GetYaxis() -> CenterTitle(fCnt);
1795  hPtFracCut[iCut] -> SetMarkerColor(fColCut[iCut]);
1796  hPtFracCut[iCut] -> SetMarkerStyle(fMarCut[iCut]);
1797  hPtFracCut[iCut] -> SetFillColor(fColCut[iCut]);
1798  hPtFracCut[iCut] -> SetFillStyle(fFil);
1799  hPtFracCut[iCut] -> SetLineColor(fColCut[iCut]);
1800  hPtFracCut[iCut] -> SetLineStyle(fLin);
1801  hPtFracCut[iCut] -> SetLineWidth(fWid);
1802  hPtFracCut[iCut] -> SetTitle(sTitle.Data());
1803  hPtFracCut[iCut] -> SetTitleFont(fTxt);
1804  hPtFracCut[iCut] -> GetXaxis() -> SetRangeUser(rFracRange[0], rFracRange[1]);
1805  hPtFracCut[iCut] -> GetXaxis() -> SetTitle(sPtFracAxis.Data());
1806  hPtFracCut[iCut] -> GetXaxis() -> SetTitleFont(fTxt);
1807  hPtFracCut[iCut] -> GetXaxis() -> SetTitleSize(fTit[1]);
1808  hPtFracCut[iCut] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1809  hPtFracCut[iCut] -> GetXaxis() -> SetLabelFont(fTxt);
1810  hPtFracCut[iCut] -> GetXaxis() -> SetLabelSize(fLab[1]);
1811  hPtFracCut[iCut] -> GetXaxis() -> CenterTitle(fCnt);
1812  hPtFracCut[iCut] -> GetYaxis() -> SetTitle(sCounts.Data());
1813  hPtFracCut[iCut] -> GetYaxis() -> SetTitleFont(fTxt);
1814  hPtFracCut[iCut] -> GetYaxis() -> SetTitleSize(fTit[1]);
1815  hPtFracCut[iCut] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1816  hPtFracCut[iCut] -> GetYaxis() -> SetLabelFont(fTxt);
1817  hPtFracCut[iCut] -> GetYaxis() -> SetLabelSize(fLab[1]);
1818  hPtFracCut[iCut] -> GetYaxis() -> CenterTitle(fCnt);
1819  hPtTrkTruCut[iCut] -> SetMarkerColor(fColCut[iCut]);
1820  hPtTrkTruCut[iCut] -> SetMarkerStyle(fMarCut[iCut]);
1821  hPtTrkTruCut[iCut] -> SetFillColor(fColCut[iCut]);
1822  hPtTrkTruCut[iCut] -> SetFillStyle(fFil);
1823  hPtTrkTruCut[iCut] -> SetLineColor(fColCut[iCut]);
1824  hPtTrkTruCut[iCut] -> SetLineStyle(fLin);
1825  hPtTrkTruCut[iCut] -> SetLineWidth(fWid);
1826  hPtTrkTruCut[iCut] -> SetTitle(sTitle.Data());
1827  hPtTrkTruCut[iCut] -> SetTitleFont(fTxt);
1828  hPtTrkTruCut[iCut] -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1829  hPtTrkTruCut[iCut] -> GetXaxis() -> SetTitle(sPtTrueAxis.Data());
1830  hPtTrkTruCut[iCut] -> GetXaxis() -> SetTitleFont(fTxt);
1831  hPtTrkTruCut[iCut] -> GetXaxis() -> SetTitleSize(fTit[1]);
1832  hPtTrkTruCut[iCut] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1833  hPtTrkTruCut[iCut] -> GetXaxis() -> SetLabelFont(fTxt);
1834  hPtTrkTruCut[iCut] -> GetXaxis() -> SetLabelSize(fLab[1]);
1835  hPtTrkTruCut[iCut] -> GetXaxis() -> CenterTitle(fCnt);
1836  hPtTrkTruCut[iCut] -> GetYaxis() -> SetTitle(sCounts.Data());
1837  hPtTrkTruCut[iCut] -> GetYaxis() -> SetTitleFont(fTxt);
1838  hPtTrkTruCut[iCut] -> GetYaxis() -> SetTitleSize(fTit[1]);
1839  hPtTrkTruCut[iCut] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1840  hPtTrkTruCut[iCut] -> GetYaxis() -> SetLabelFont(fTxt);
1841  hPtTrkTruCut[iCut] -> GetYaxis() -> SetLabelSize(fLab[1]);
1842  hPtTrkTruCut[iCut] -> GetYaxis() -> CenterTitle(fCnt);
1843  hPtDeltaVsFracCut[iCut] -> SetMarkerColor(fColCut[iCut]);
1844  hPtDeltaVsFracCut[iCut] -> SetMarkerStyle(fMarCut[iCut]);
1845  hPtDeltaVsFracCut[iCut] -> SetFillColor(fColCut[iCut]);
1846  hPtDeltaVsFracCut[iCut] -> SetFillStyle(fFil);
1847  hPtDeltaVsFracCut[iCut] -> SetLineColor(fColCut[iCut]);
1848  hPtDeltaVsFracCut[iCut] -> SetLineStyle(fLin);
1849  hPtDeltaVsFracCut[iCut] -> SetLineWidth(fWid);
1850  hPtDeltaVsFracCut[iCut] -> SetTitle(sTitle.Data());
1851  hPtDeltaVsFracCut[iCut] -> SetTitleFont(fTxt);
1852  hPtDeltaVsFracCut[iCut] -> GetXaxis() -> SetRangeUser(rFracRange[0], rFracRange[1]);
1853  hPtDeltaVsFracCut[iCut] -> GetXaxis() -> SetTitle(sPtFracAxis.Data());
1854  hPtDeltaVsFracCut[iCut] -> GetXaxis() -> SetTitleFont(fTxt);
1855  hPtDeltaVsFracCut[iCut] -> GetXaxis() -> SetTitleSize(fTit[1]);
1856  hPtDeltaVsFracCut[iCut] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1857  hPtDeltaVsFracCut[iCut] -> GetXaxis() -> SetLabelFont(fTxt);
1858  hPtDeltaVsFracCut[iCut] -> GetXaxis() -> SetLabelSize(fLab[1]);
1859  hPtDeltaVsFracCut[iCut] -> GetXaxis() -> CenterTitle(fCnt);
1860  hPtDeltaVsFracCut[iCut] -> GetYaxis() -> SetRangeUser(rDeltaRange[0], rDeltaRange[1]);
1861  hPtDeltaVsFracCut[iCut] -> GetYaxis() -> SetTitle(sPtDeltaAxis.Data());
1862  hPtDeltaVsFracCut[iCut] -> GetYaxis() -> SetTitleFont(fTxt);
1863  hPtDeltaVsFracCut[iCut] -> GetYaxis() -> SetTitleSize(fTit[1]);
1864  hPtDeltaVsFracCut[iCut] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1865  hPtDeltaVsFracCut[iCut] -> GetYaxis() -> SetLabelFont(fTxt);
1866  hPtDeltaVsFracCut[iCut] -> GetYaxis() -> SetLabelSize(fLab[1]);
1867  hPtDeltaVsFracCut[iCut] -> GetYaxis() -> CenterTitle(fCnt);
1868  hPtDeltaVsFracCut[iCut] -> GetZaxis() -> SetTitle(sCounts.Data());
1869  hPtDeltaVsFracCut[iCut] -> GetZaxis() -> SetTitleFont(fTxt);
1870  hPtDeltaVsFracCut[iCut] -> GetZaxis() -> SetTitleSize(fTit[1]);
1871  hPtDeltaVsFracCut[iCut] -> GetZaxis() -> SetTitleOffset(fOffZ[1]);
1872  hPtDeltaVsFracCut[iCut] -> GetZaxis() -> SetLabelFont(fTxt);
1873  hPtDeltaVsFracCut[iCut] -> GetZaxis() -> SetLabelSize(fLab[1]);
1874  hPtDeltaVsFracCut[iCut] -> GetZaxis() -> CenterTitle(fCnt);
1875  hPtDeltaVsTrueCut[iCut] -> SetMarkerColor(fColTrk);
1876  hPtDeltaVsTrueCut[iCut] -> SetMarkerStyle(fMarTrk);
1877  hPtDeltaVsTrueCut[iCut] -> SetFillColor(fColTrk);
1878  hPtDeltaVsTrueCut[iCut] -> SetFillStyle(fFil);
1879  hPtDeltaVsTrueCut[iCut] -> SetLineColor(fColTrk);
1880  hPtDeltaVsTrueCut[iCut] -> SetLineStyle(fLin);
1881  hPtDeltaVsTrueCut[iCut] -> SetLineWidth(fWid);
1882  hPtDeltaVsTrueCut[iCut] -> SetTitle(sTitle.Data());
1883  hPtDeltaVsTrueCut[iCut] -> SetTitleFont(fTxt);
1884  hPtDeltaVsTrueCut[iCut] -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1885  hPtDeltaVsTrueCut[iCut] -> GetXaxis() -> SetTitle(sPtTrueAxis.Data());
1886  hPtDeltaVsTrueCut[iCut] -> GetXaxis() -> SetTitleFont(fTxt);
1887  hPtDeltaVsTrueCut[iCut] -> GetXaxis() -> SetTitleSize(fTit[1]);
1888  hPtDeltaVsTrueCut[iCut] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1889  hPtDeltaVsTrueCut[iCut] -> GetXaxis() -> SetLabelFont(fTxt);
1890  hPtDeltaVsTrueCut[iCut] -> GetXaxis() -> SetLabelSize(fLab[1]);
1891  hPtDeltaVsTrueCut[iCut] -> GetXaxis() -> CenterTitle(fCnt);
1892  hPtDeltaVsTrueCut[iCut] -> GetYaxis() -> SetRangeUser(rDeltaRange[0], rDeltaRange[1]);
1893  hPtDeltaVsTrueCut[iCut] -> GetYaxis() -> SetTitle(sPtDeltaAxis.Data());
1894  hPtDeltaVsTrueCut[iCut] -> GetYaxis() -> SetTitleFont(fTxt);
1895  hPtDeltaVsTrueCut[iCut] -> GetYaxis() -> SetTitleSize(fTit[1]);
1896  hPtDeltaVsTrueCut[iCut] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1897  hPtDeltaVsTrueCut[iCut] -> GetYaxis() -> SetLabelFont(fTxt);
1898  hPtDeltaVsTrueCut[iCut] -> GetYaxis() -> SetLabelSize(fLab[1]);
1899  hPtDeltaVsTrueCut[iCut] -> GetYaxis() -> CenterTitle(fCnt);
1900  hPtDeltaVsTrueCut[iCut] -> GetZaxis() -> SetTitle(sCounts.Data());
1901  hPtDeltaVsTrueCut[iCut] -> GetZaxis() -> SetTitleFont(fTxt);
1902  hPtDeltaVsTrueCut[iCut] -> GetZaxis() -> SetTitleSize(fTit[1]);
1903  hPtDeltaVsTrueCut[iCut] -> GetZaxis() -> SetTitleOffset(fOffZ[1]);
1904  hPtDeltaVsTrueCut[iCut] -> GetZaxis() -> SetLabelFont(fTxt);
1905  hPtDeltaVsTrueCut[iCut] -> GetZaxis() -> SetLabelSize(fLab[1]);
1906  hPtDeltaVsTrueCut[iCut] -> GetZaxis() -> CenterTitle(fCnt);
1907  hPtDeltaVsTrackCut[iCut] -> SetMarkerColor(fColTrk);
1908  hPtDeltaVsTrackCut[iCut] -> SetMarkerStyle(fMarTrk);
1909  hPtDeltaVsTrackCut[iCut] -> SetFillColor(fColTrk);
1910  hPtDeltaVsTrackCut[iCut] -> SetFillStyle(fFil);
1911  hPtDeltaVsTrackCut[iCut] -> SetLineColor(fColTrk);
1912  hPtDeltaVsTrackCut[iCut] -> SetLineStyle(fLin);
1913  hPtDeltaVsTrackCut[iCut] -> SetLineWidth(fWid);
1914  hPtDeltaVsTrackCut[iCut] -> SetTitle(sTitle.Data());
1915  hPtDeltaVsTrackCut[iCut] -> SetTitleFont(fTxt);
1916  hPtDeltaVsTrackCut[iCut] -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1917  hPtDeltaVsTrackCut[iCut] -> GetXaxis() -> SetTitle(sPtRecoAxis.Data());
1918  hPtDeltaVsTrackCut[iCut] -> GetXaxis() -> SetTitleFont(fTxt);
1919  hPtDeltaVsTrackCut[iCut] -> GetXaxis() -> SetTitleSize(fTit[1]);
1920  hPtDeltaVsTrackCut[iCut] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1921  hPtDeltaVsTrackCut[iCut] -> GetXaxis() -> SetLabelFont(fTxt);
1922  hPtDeltaVsTrackCut[iCut] -> GetXaxis() -> SetLabelSize(fLab[1]);
1923  hPtDeltaVsTrackCut[iCut] -> GetXaxis() -> CenterTitle(fCnt);
1924  hPtDeltaVsTrackCut[iCut] -> GetYaxis() -> SetRangeUser(rDeltaRange[0], rDeltaRange[1]);
1925  hPtDeltaVsTrackCut[iCut] -> GetYaxis() -> SetTitle(sPtDeltaAxis.Data());
1926  hPtDeltaVsTrackCut[iCut] -> GetYaxis() -> SetTitleFont(fTxt);
1927  hPtDeltaVsTrackCut[iCut] -> GetYaxis() -> SetTitleSize(fTit[1]);
1928  hPtDeltaVsTrackCut[iCut] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1929  hPtDeltaVsTrackCut[iCut] -> GetYaxis() -> SetLabelFont(fTxt);
1930  hPtDeltaVsTrackCut[iCut] -> GetYaxis() -> SetLabelSize(fLab[1]);
1931  hPtDeltaVsTrackCut[iCut] -> GetYaxis() -> CenterTitle(fCnt);
1932  hPtDeltaVsTrackCut[iCut] -> GetZaxis() -> SetTitle(sCounts.Data());
1933  hPtDeltaVsTrackCut[iCut] -> GetZaxis() -> SetTitleFont(fTxt);
1934  hPtDeltaVsTrackCut[iCut] -> GetZaxis() -> SetTitleSize(fTit[1]);
1935  hPtDeltaVsTrackCut[iCut] -> GetZaxis() -> SetTitleOffset(fOffZ[1]);
1936  hPtDeltaVsTrackCut[iCut] -> GetZaxis() -> SetLabelFont(fTxt);
1937  hPtDeltaVsTrackCut[iCut] -> GetZaxis() -> SetLabelSize(fLab[1]);
1938  hPtDeltaVsTrackCut[iCut] -> GetZaxis() -> CenterTitle(fCnt);
1939  hPtTrueVsTrackCut[iCut] -> SetMarkerColor(fColCut[iCut]);
1940  hPtTrueVsTrackCut[iCut] -> SetMarkerStyle(fMarCut[iCut]);
1941  hPtTrueVsTrackCut[iCut] -> SetFillColor(fColCut[iCut]);
1942  hPtTrueVsTrackCut[iCut] -> SetFillStyle(fFil);
1943  hPtTrueVsTrackCut[iCut] -> SetLineColor(fColCut[iCut]);
1944  hPtTrueVsTrackCut[iCut] -> SetLineStyle(fLin);
1945  hPtTrueVsTrackCut[iCut] -> SetLineWidth(fWid);
1946  hPtTrueVsTrackCut[iCut] -> SetTitle(sTitle.Data());
1947  hPtTrueVsTrackCut[iCut] -> SetTitleFont(fTxt);
1948  hPtTrueVsTrackCut[iCut] -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1949  hPtTrueVsTrackCut[iCut] -> GetXaxis() -> SetTitle(sPtRecoAxis.Data());
1950  hPtTrueVsTrackCut[iCut] -> GetXaxis() -> SetTitleFont(fTxt);
1951  hPtTrueVsTrackCut[iCut] -> GetXaxis() -> SetTitleSize(fTit[1]);
1952  hPtTrueVsTrackCut[iCut] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
1953  hPtTrueVsTrackCut[iCut] -> GetXaxis() -> SetLabelFont(fTxt);
1954  hPtTrueVsTrackCut[iCut] -> GetXaxis() -> SetLabelSize(fLab[1]);
1955  hPtTrueVsTrackCut[iCut] -> GetXaxis() -> CenterTitle(fCnt);
1956  hPtTrueVsTrackCut[iCut] -> GetYaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1957  hPtTrueVsTrackCut[iCut] -> GetYaxis() -> SetTitle(sPtTrueAxis.Data());
1958  hPtTrueVsTrackCut[iCut] -> GetYaxis() -> SetTitleFont(fTxt);
1959  hPtTrueVsTrackCut[iCut] -> GetYaxis() -> SetTitleSize(fTit[1]);
1960  hPtTrueVsTrackCut[iCut] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
1961  hPtTrueVsTrackCut[iCut] -> GetYaxis() -> SetLabelFont(fTxt);
1962  hPtTrueVsTrackCut[iCut] -> GetYaxis() -> SetLabelSize(fLab[1]);
1963  hPtTrueVsTrackCut[iCut] -> GetYaxis() -> CenterTitle(fCnt);
1964  hPtTrueVsTrackCut[iCut] -> GetZaxis() -> SetTitle(sCounts.Data());
1965  hPtTrueVsTrackCut[iCut] -> GetZaxis() -> SetTitleFont(fTxt);
1966  hPtTrueVsTrackCut[iCut] -> GetZaxis() -> SetTitleSize(fTit[1]);
1967  hPtTrueVsTrackCut[iCut] -> GetZaxis() -> SetTitleOffset(fOffZ[1]);
1968  hPtTrueVsTrackCut[iCut] -> GetZaxis() -> SetLabelFont(fTxt);
1969  hPtTrueVsTrackCut[iCut] -> GetZaxis() -> SetLabelSize(fLab[1]);
1970  hPtTrueVsTrackCut[iCut] -> GetZaxis() -> CenterTitle(fCnt);
1971  }
1972 
1973  // set styles of flat delta-pt cut histograms
1974  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
1975  hEffSig[iSig] -> SetMarkerColor(fColSig[iSig]);
1976  hEffSig[iSig] -> SetMarkerStyle(fMarSig[iSig]);
1977  hEffSig[iSig] -> SetFillColor(fColSig[iSig]);
1978  hEffSig[iSig] -> SetFillStyle(fFil);
1979  hEffSig[iSig] -> SetLineColor(fColSig[iSig]);
1980  hEffSig[iSig] -> SetLineStyle(fLin);
1981  hEffSig[iSig] -> SetLineWidth(fWid);
1982  hEffSig[iSig] -> SetTitle(sTitle.Data());
1983  hEffSig[iSig] -> SetTitleFont(fTxt);
1984  hEffSig[iSig] -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
1985  hEffSig[iSig] -> GetXaxis() -> SetTitle(sPtTrueAxis.Data());
1986  hEffSig[iSig] -> GetXaxis() -> SetTitleFont(fTxt);
1987  hEffSig[iSig] -> GetXaxis() -> SetTitleSize(fTit[0]);
1988  hEffSig[iSig] -> GetXaxis() -> SetTitleOffset(fOffX[0]);
1989  hEffSig[iSig] -> GetXaxis() -> SetLabelFont(fTxt);
1990  hEffSig[iSig] -> GetXaxis() -> SetLabelSize(fLab[0]);
1991  hEffSig[iSig] -> GetXaxis() -> CenterTitle(fCnt);
1992  hEffSig[iSig] -> GetYaxis() -> SetTitle(sEffAxis.Data());
1993  hEffSig[iSig] -> GetYaxis() -> SetTitleFont(fTxt);
1994  hEffSig[iSig] -> GetYaxis() -> SetTitleSize(fTit[0]);
1995  hEffSig[iSig] -> GetYaxis() -> SetTitleOffset(fOffY[0]);
1996  hEffSig[iSig] -> GetYaxis() -> SetLabelFont(fTxt);
1997  hEffSig[iSig] -> GetYaxis() -> SetLabelSize(fLab[0]);
1998  hEffSig[iSig] -> GetYaxis() -> CenterTitle(fCnt);
1999  hPtDeltaSig[iSig] -> SetMarkerColor(fColSig[iSig]);
2000  hPtDeltaSig[iSig] -> SetMarkerStyle(fMarSig[iSig]);
2001  hPtDeltaSig[iSig] -> SetFillColor(fColSig[iSig]);
2002  hPtDeltaSig[iSig] -> SetFillStyle(fFil);
2003  hPtDeltaSig[iSig] -> SetLineColor(fColSig[iSig]);
2004  hPtDeltaSig[iSig] -> SetLineStyle(fLin);
2005  hPtDeltaSig[iSig] -> SetLineWidth(fWid);
2006  hPtDeltaSig[iSig] -> SetTitle(sTitle.Data());
2007  hPtDeltaSig[iSig] -> SetTitleFont(fTxt);
2008  hPtDeltaSig[iSig] -> GetXaxis() -> SetRangeUser(rDeltaRange[0], rDeltaRange[1]);
2009  hPtDeltaSig[iSig] -> GetXaxis() -> SetTitle(sPtDeltaAxis.Data());
2010  hPtDeltaSig[iSig] -> GetXaxis() -> SetTitleFont(fTxt);
2011  hPtDeltaSig[iSig] -> GetXaxis() -> SetTitleSize(fTit[1]);
2012  hPtDeltaSig[iSig] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
2013  hPtDeltaSig[iSig] -> GetXaxis() -> SetLabelFont(fTxt);
2014  hPtDeltaSig[iSig] -> GetXaxis() -> SetLabelSize(fLab[1]);
2015  hPtDeltaSig[iSig] -> GetXaxis() -> CenterTitle(fCnt);
2016  hPtDeltaSig[iSig] -> GetYaxis() -> SetTitle(sCounts.Data());
2017  hPtDeltaSig[iSig] -> GetYaxis() -> SetTitleFont(fTxt);
2018  hPtDeltaSig[iSig] -> GetYaxis() -> SetTitleSize(fTit[1]);
2019  hPtDeltaSig[iSig] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
2020  hPtDeltaSig[iSig] -> GetYaxis() -> SetLabelFont(fTxt);
2021  hPtDeltaSig[iSig] -> GetYaxis() -> SetLabelSize(fLab[1]);
2022  hPtDeltaSig[iSig] -> GetYaxis() -> CenterTitle(fCnt);
2023  hPtTrackSig[iSig] -> SetMarkerColor(fColSig[iSig]);
2024  hPtTrackSig[iSig] -> SetMarkerStyle(fMarSig[iSig]);
2025  hPtTrackSig[iSig] -> SetFillColor(fColSig[iSig]);
2026  hPtTrackSig[iSig] -> SetFillStyle(fFil);
2027  hPtTrackSig[iSig] -> SetLineColor(fColSig[iSig]);
2028  hPtTrackSig[iSig] -> SetLineStyle(fLin);
2029  hPtTrackSig[iSig] -> SetLineWidth(fWid);
2030  hPtTrackSig[iSig] -> SetTitle(sTitle.Data());
2031  hPtTrackSig[iSig] -> SetTitleFont(fTxt);
2032  hPtTrackSig[iSig] -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
2033  hPtTrackSig[iSig] -> GetXaxis() -> SetTitle(sPtRecoAxis.Data());
2034  hPtTrackSig[iSig] -> GetXaxis() -> SetTitleFont(fTxt);
2035  hPtTrackSig[iSig] -> GetXaxis() -> SetTitleSize(fTit[1]);
2036  hPtTrackSig[iSig] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
2037  hPtTrackSig[iSig] -> GetXaxis() -> SetLabelFont(fTxt);
2038  hPtTrackSig[iSig] -> GetXaxis() -> SetLabelSize(fLab[1]);
2039  hPtTrackSig[iSig] -> GetXaxis() -> CenterTitle(fCnt);
2040  hPtTrackSig[iSig] -> GetYaxis() -> SetTitle(sCounts.Data());
2041  hPtTrackSig[iSig] -> GetYaxis() -> SetTitleFont(fTxt);
2042  hPtTrackSig[iSig] -> GetYaxis() -> SetTitleSize(fTit[1]);
2043  hPtTrackSig[iSig] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
2044  hPtTrackSig[iSig] -> GetYaxis() -> SetLabelFont(fTxt);
2045  hPtTrackSig[iSig] -> GetYaxis() -> SetLabelSize(fLab[1]);
2046  hPtTrackSig[iSig] -> GetYaxis() -> CenterTitle(fCnt);
2047  hPtFracSig[iSig] -> SetMarkerColor(fColSig[iSig]);
2048  hPtFracSig[iSig] -> SetMarkerStyle(fMarSig[iSig]);
2049  hPtFracSig[iSig] -> SetFillColor(fColSig[iSig]);
2050  hPtFracSig[iSig] -> SetFillStyle(fFil);
2051  hPtFracSig[iSig] -> SetLineColor(fColSig[iSig]);
2052  hPtFracSig[iSig] -> SetLineStyle(fLin);
2053  hPtFracSig[iSig] -> SetLineWidth(fWid);
2054  hPtFracSig[iSig] -> SetTitle(sTitle.Data());
2055  hPtFracSig[iSig] -> SetTitleFont(fTxt);
2056  hPtFracSig[iSig] -> GetXaxis() -> SetRangeUser(rFracRange[0], rFracRange[1]);
2057  hPtFracSig[iSig] -> GetXaxis() -> SetTitle(sPtFracAxis.Data());
2058  hPtFracSig[iSig] -> GetXaxis() -> SetTitleFont(fTxt);
2059  hPtFracSig[iSig] -> GetXaxis() -> SetTitleSize(fTit[1]);
2060  hPtFracSig[iSig] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
2061  hPtFracSig[iSig] -> GetXaxis() -> SetLabelFont(fTxt);
2062  hPtFracSig[iSig] -> GetXaxis() -> SetLabelSize(fLab[1]);
2063  hPtFracSig[iSig] -> GetXaxis() -> CenterTitle(fCnt);
2064  hPtFracSig[iSig] -> GetYaxis() -> SetTitle(sCounts.Data());
2065  hPtFracSig[iSig] -> GetYaxis() -> SetTitleFont(fTxt);
2066  hPtFracSig[iSig] -> GetYaxis() -> SetTitleSize(fTit[1]);
2067  hPtFracSig[iSig] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
2068  hPtFracSig[iSig] -> GetYaxis() -> SetLabelFont(fTxt);
2069  hPtFracSig[iSig] -> GetYaxis() -> SetLabelSize(fLab[1]);
2070  hPtFracSig[iSig] -> GetYaxis() -> CenterTitle(fCnt);
2071  hPtTrkTruSig[iSig] -> SetMarkerColor(fColSig[iSig]);
2072  hPtTrkTruSig[iSig] -> SetMarkerStyle(fMarSig[iSig]);
2073  hPtTrkTruSig[iSig] -> SetFillColor(fColSig[iSig]);
2074  hPtTrkTruSig[iSig] -> SetFillStyle(fFil);
2075  hPtTrkTruSig[iSig] -> SetLineColor(fColSig[iSig]);
2076  hPtTrkTruSig[iSig] -> SetLineStyle(fLin);
2077  hPtTrkTruSig[iSig] -> SetLineWidth(fWid);
2078  hPtTrkTruSig[iSig] -> SetTitle(sTitle.Data());
2079  hPtTrkTruSig[iSig] -> SetTitleFont(fTxt);
2080  hPtTrkTruSig[iSig] -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
2081  hPtTrkTruSig[iSig] -> GetXaxis() -> SetTitle(sPtTrueAxis.Data());
2082  hPtTrkTruSig[iSig] -> GetXaxis() -> SetTitleFont(fTxt);
2083  hPtTrkTruSig[iSig] -> GetXaxis() -> SetTitleSize(fTit[1]);
2084  hPtTrkTruSig[iSig] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
2085  hPtTrkTruSig[iSig] -> GetXaxis() -> SetLabelFont(fTxt);
2086  hPtTrkTruSig[iSig] -> GetXaxis() -> SetLabelSize(fLab[1]);
2087  hPtTrkTruSig[iSig] -> GetXaxis() -> CenterTitle(fCnt);
2088  hPtTrkTruSig[iSig] -> GetYaxis() -> SetTitle(sCounts.Data());
2089  hPtTrkTruSig[iSig] -> GetYaxis() -> SetTitleFont(fTxt);
2090  hPtTrkTruSig[iSig] -> GetYaxis() -> SetTitleSize(fTit[1]);
2091  hPtTrkTruSig[iSig] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
2092  hPtTrkTruSig[iSig] -> GetYaxis() -> SetLabelFont(fTxt);
2093  hPtTrkTruSig[iSig] -> GetYaxis() -> SetLabelSize(fLab[1]);
2094  hPtTrkTruSig[iSig] -> GetYaxis() -> CenterTitle(fCnt);
2095  hPtDeltaVsFracSig[iSig] -> SetMarkerColor(fColSig[iSig]);
2096  hPtDeltaVsFracSig[iSig] -> SetMarkerStyle(fMarSig[iSig]);
2097  hPtDeltaVsFracSig[iSig] -> SetFillColor(fColSig[iSig]);
2098  hPtDeltaVsFracSig[iSig] -> SetFillStyle(fFil);
2099  hPtDeltaVsFracSig[iSig] -> SetLineColor(fColSig[iSig]);
2100  hPtDeltaVsFracSig[iSig] -> SetLineStyle(fLin);
2101  hPtDeltaVsFracSig[iSig] -> SetLineWidth(fWid);
2102  hPtDeltaVsFracSig[iSig] -> SetTitle(sTitle.Data());
2103  hPtDeltaVsFracSig[iSig] -> SetTitleFont(fTxt);
2104  hPtDeltaVsFracSig[iSig] -> GetXaxis() -> SetRangeUser(rFracRange[0], rFracRange[1]);
2105  hPtDeltaVsFracSig[iSig] -> GetXaxis() -> SetTitle(sPtFracAxis.Data());
2106  hPtDeltaVsFracSig[iSig] -> GetXaxis() -> SetTitleFont(fTxt);
2107  hPtDeltaVsFracSig[iSig] -> GetXaxis() -> SetTitleSize(fTit[1]);
2108  hPtDeltaVsFracSig[iSig] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
2109  hPtDeltaVsFracSig[iSig] -> GetXaxis() -> SetLabelFont(fTxt);
2110  hPtDeltaVsFracSig[iSig] -> GetXaxis() -> SetLabelSize(fLab[1]);
2111  hPtDeltaVsFracSig[iSig] -> GetXaxis() -> CenterTitle(fCnt);
2112  hPtDeltaVsFracSig[iSig] -> GetYaxis() -> SetRangeUser(rDeltaRange[0], rDeltaRange[1]);
2113  hPtDeltaVsFracSig[iSig] -> GetYaxis() -> SetTitle(sPtDeltaAxis.Data());
2114  hPtDeltaVsFracSig[iSig] -> GetYaxis() -> SetTitleFont(fTxt);
2115  hPtDeltaVsFracSig[iSig] -> GetYaxis() -> SetTitleSize(fTit[1]);
2116  hPtDeltaVsFracSig[iSig] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
2117  hPtDeltaVsFracSig[iSig] -> GetYaxis() -> SetLabelFont(fTxt);
2118  hPtDeltaVsFracSig[iSig] -> GetYaxis() -> SetLabelSize(fLab[1]);
2119  hPtDeltaVsFracSig[iSig] -> GetYaxis() -> CenterTitle(fCnt);
2120  hPtDeltaVsFracSig[iSig] -> GetZaxis() -> SetTitle(sCounts.Data());
2121  hPtDeltaVsFracSig[iSig] -> GetZaxis() -> SetTitleFont(fTxt);
2122  hPtDeltaVsFracSig[iSig] -> GetZaxis() -> SetTitleSize(fTit[1]);
2123  hPtDeltaVsFracSig[iSig] -> GetZaxis() -> SetTitleOffset(fOffZ[1]);
2124  hPtDeltaVsFracSig[iSig] -> GetZaxis() -> SetLabelFont(fTxt);
2125  hPtDeltaVsFracSig[iSig] -> GetZaxis() -> SetLabelSize(fLab[1]);
2126  hPtDeltaVsFracSig[iSig] -> GetZaxis() -> CenterTitle(fCnt);
2127  hPtDeltaVsTrueSig[iSig] -> SetMarkerColor(fColTrk);
2128  hPtDeltaVsTrueSig[iSig] -> SetMarkerStyle(fMarTrk);
2129  hPtDeltaVsTrueSig[iSig] -> SetFillColor(fColTrk);
2130  hPtDeltaVsTrueSig[iSig] -> SetFillStyle(fFil);
2131  hPtDeltaVsTrueSig[iSig] -> SetLineColor(fColTrk);
2132  hPtDeltaVsTrueSig[iSig] -> SetLineStyle(fLin);
2133  hPtDeltaVsTrueSig[iSig] -> SetLineWidth(fWid);
2134  hPtDeltaVsTrueSig[iSig] -> SetTitle(sTitle.Data());
2135  hPtDeltaVsTrueSig[iSig] -> SetTitleFont(fTxt);
2136  hPtDeltaVsTrueSig[iSig] -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
2137  hPtDeltaVsTrueSig[iSig] -> GetXaxis() -> SetTitle(sPtTrueAxis.Data());
2138  hPtDeltaVsTrueSig[iSig] -> GetXaxis() -> SetTitleFont(fTxt);
2139  hPtDeltaVsTrueSig[iSig] -> GetXaxis() -> SetTitleSize(fTit[1]);
2140  hPtDeltaVsTrueSig[iSig] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
2141  hPtDeltaVsTrueSig[iSig] -> GetXaxis() -> SetLabelFont(fTxt);
2142  hPtDeltaVsTrueSig[iSig] -> GetXaxis() -> SetLabelSize(fLab[1]);
2143  hPtDeltaVsTrueSig[iSig] -> GetXaxis() -> CenterTitle(fCnt);
2144  hPtDeltaVsTrueSig[iSig] -> GetYaxis() -> SetRangeUser(rDeltaRange[0], rDeltaRange[1]);
2145  hPtDeltaVsTrueSig[iSig] -> GetYaxis() -> SetTitle(sPtDeltaAxis.Data());
2146  hPtDeltaVsTrueSig[iSig] -> GetYaxis() -> SetTitleFont(fTxt);
2147  hPtDeltaVsTrueSig[iSig] -> GetYaxis() -> SetTitleSize(fTit[1]);
2148  hPtDeltaVsTrueSig[iSig] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
2149  hPtDeltaVsTrueSig[iSig] -> GetYaxis() -> SetLabelFont(fTxt);
2150  hPtDeltaVsTrueSig[iSig] -> GetYaxis() -> SetLabelSize(fLab[1]);
2151  hPtDeltaVsTrueSig[iSig] -> GetYaxis() -> CenterTitle(fCnt);
2152  hPtDeltaVsTrueSig[iSig] -> GetZaxis() -> SetTitle(sCounts.Data());
2153  hPtDeltaVsTrueSig[iSig] -> GetZaxis() -> SetTitleFont(fTxt);
2154  hPtDeltaVsTrueSig[iSig] -> GetZaxis() -> SetTitleSize(fTit[1]);
2155  hPtDeltaVsTrueSig[iSig] -> GetZaxis() -> SetTitleOffset(fOffZ[1]);
2156  hPtDeltaVsTrueSig[iSig] -> GetZaxis() -> SetLabelFont(fTxt);
2157  hPtDeltaVsTrueSig[iSig] -> GetZaxis() -> SetLabelSize(fLab[1]);
2158  hPtDeltaVsTrueSig[iSig] -> GetZaxis() -> CenterTitle(fCnt);
2159  hPtDeltaVsTrackSig[iSig] -> SetMarkerColor(fColTrk);
2160  hPtDeltaVsTrackSig[iSig] -> SetMarkerStyle(fMarTrk);
2161  hPtDeltaVsTrackSig[iSig] -> SetFillColor(fColTrk);
2162  hPtDeltaVsTrackSig[iSig] -> SetFillStyle(fFil);
2163  hPtDeltaVsTrackSig[iSig] -> SetLineColor(fColTrk);
2164  hPtDeltaVsTrackSig[iSig] -> SetLineStyle(fLin);
2165  hPtDeltaVsTrackSig[iSig] -> SetLineWidth(fWid);
2166  hPtDeltaVsTrackSig[iSig] -> SetTitle(sTitle.Data());
2167  hPtDeltaVsTrackSig[iSig] -> SetTitleFont(fTxt);
2168  hPtDeltaVsTrackSig[iSig] -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
2169  hPtDeltaVsTrackSig[iSig] -> GetXaxis() -> SetTitle(sPtRecoAxis.Data());
2170  hPtDeltaVsTrackSig[iSig] -> GetXaxis() -> SetTitleFont(fTxt);
2171  hPtDeltaVsTrackSig[iSig] -> GetXaxis() -> SetTitleSize(fTit[1]);
2172  hPtDeltaVsTrackSig[iSig] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
2173  hPtDeltaVsTrackSig[iSig] -> GetXaxis() -> SetLabelFont(fTxt);
2174  hPtDeltaVsTrackSig[iSig] -> GetXaxis() -> SetLabelSize(fLab[1]);
2175  hPtDeltaVsTrackSig[iSig] -> GetXaxis() -> CenterTitle(fCnt);
2176  hPtDeltaVsTrackSig[iSig] -> GetYaxis() -> SetRangeUser(rDeltaRange[0], rDeltaRange[1]);
2177  hPtDeltaVsTrackSig[iSig] -> GetYaxis() -> SetTitle(sPtDeltaAxis.Data());
2178  hPtDeltaVsTrackSig[iSig] -> GetYaxis() -> SetTitleFont(fTxt);
2179  hPtDeltaVsTrackSig[iSig] -> GetYaxis() -> SetTitleSize(fTit[1]);
2180  hPtDeltaVsTrackSig[iSig] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
2181  hPtDeltaVsTrackSig[iSig] -> GetYaxis() -> SetLabelFont(fTxt);
2182  hPtDeltaVsTrackSig[iSig] -> GetYaxis() -> SetLabelSize(fLab[1]);
2183  hPtDeltaVsTrackSig[iSig] -> GetYaxis() -> CenterTitle(fCnt);
2184  hPtDeltaVsTrackSig[iSig] -> GetZaxis() -> SetTitle(sCounts.Data());
2185  hPtDeltaVsTrackSig[iSig] -> GetZaxis() -> SetTitleFont(fTxt);
2186  hPtDeltaVsTrackSig[iSig] -> GetZaxis() -> SetTitleSize(fTit[1]);
2187  hPtDeltaVsTrackSig[iSig] -> GetZaxis() -> SetTitleOffset(fOffZ[1]);
2188  hPtDeltaVsTrackSig[iSig] -> GetZaxis() -> SetLabelFont(fTxt);
2189  hPtDeltaVsTrackSig[iSig] -> GetZaxis() -> SetLabelSize(fLab[1]);
2190  hPtDeltaVsTrackSig[iSig] -> GetZaxis() -> CenterTitle(fCnt);
2191  hPtTrueVsTrackSig[iSig] -> SetMarkerColor(fColSig[iSig]);
2192  hPtTrueVsTrackSig[iSig] -> SetMarkerStyle(fMarSig[iSig]);
2193  hPtTrueVsTrackSig[iSig] -> SetFillColor(fColSig[iSig]);
2194  hPtTrueVsTrackSig[iSig] -> SetFillStyle(fFil);
2195  hPtTrueVsTrackSig[iSig] -> SetLineColor(fColSig[iSig]);
2196  hPtTrueVsTrackSig[iSig] -> SetLineStyle(fLin);
2197  hPtTrueVsTrackSig[iSig] -> SetLineWidth(fWid);
2198  hPtTrueVsTrackSig[iSig] -> SetTitle(sTitle.Data());
2199  hPtTrueVsTrackSig[iSig] -> SetTitleFont(fTxt);
2200  hPtTrueVsTrackSig[iSig] -> GetXaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
2201  hPtTrueVsTrackSig[iSig] -> GetXaxis() -> SetTitle(sPtRecoAxis.Data());
2202  hPtTrueVsTrackSig[iSig] -> GetXaxis() -> SetTitleFont(fTxt);
2203  hPtTrueVsTrackSig[iSig] -> GetXaxis() -> SetTitleSize(fTit[1]);
2204  hPtTrueVsTrackSig[iSig] -> GetXaxis() -> SetTitleOffset(fOffX[1]);
2205  hPtTrueVsTrackSig[iSig] -> GetXaxis() -> SetLabelFont(fTxt);
2206  hPtTrueVsTrackSig[iSig] -> GetXaxis() -> SetLabelSize(fLab[1]);
2207  hPtTrueVsTrackSig[iSig] -> GetXaxis() -> CenterTitle(fCnt);
2208  hPtTrueVsTrackSig[iSig] -> GetYaxis() -> SetRangeUser(rPtRange[0], rPtRange[1]);
2209  hPtTrueVsTrackSig[iSig] -> GetYaxis() -> SetTitle(sPtTrueAxis.Data());
2210  hPtTrueVsTrackSig[iSig] -> GetYaxis() -> SetTitleFont(fTxt);
2211  hPtTrueVsTrackSig[iSig] -> GetYaxis() -> SetTitleSize(fTit[1]);
2212  hPtTrueVsTrackSig[iSig] -> GetYaxis() -> SetTitleOffset(fOffY[1]);
2213  hPtTrueVsTrackSig[iSig] -> GetYaxis() -> SetLabelFont(fTxt);
2214  hPtTrueVsTrackSig[iSig] -> GetYaxis() -> SetLabelSize(fLab[1]);
2215  hPtTrueVsTrackSig[iSig] -> GetYaxis() -> CenterTitle(fCnt);
2216  hPtTrueVsTrackSig[iSig] -> GetZaxis() -> SetTitle(sCounts.Data());
2217  hPtTrueVsTrackSig[iSig] -> GetZaxis() -> SetTitleFont(fTxt);
2218  hPtTrueVsTrackSig[iSig] -> GetZaxis() -> SetTitleSize(fTit[1]);
2219  hPtTrueVsTrackSig[iSig] -> GetZaxis() -> SetTitleOffset(fOffZ[1]);
2220  hPtTrueVsTrackSig[iSig] -> GetZaxis() -> SetLabelFont(fTxt);
2221  hPtTrueVsTrackSig[iSig] -> GetZaxis() -> SetLabelSize(fLab[1]);
2222  hPtTrueVsTrackSig[iSig] -> GetZaxis() -> CenterTitle(fCnt);
2223  }
2224  cout << " Set styles." << endl;
2225 
2226  // make legends
2227  const UInt_t fColLe = 0;
2228  const UInt_t fFilLe = 0;
2229  const UInt_t fLinLe = 0;
2230  const Float_t yObjLe = 0.1 + ((NDPtCuts + 2) * 0.05);
2231  const Float_t yObjMu = 0.1 + ((NSigCuts + 1) * 0.05);
2232  const Float_t yObjDel = 0.1 + (NSigCuts * 0.05);
2233  const Float_t yObjPro = 0.1 + (NProj * 0.05);
2234  const Float_t yObjSig = 0.1 + ((NSigCuts + 2) * 0.05);
2235  const Float_t fLegXY[NVtx] = {0.1, 0.1, 0.3, yObjLe};
2236  const Float_t fLegMuXY[NVtx] = {0.1, 0.1, 0.3, yObjMu};
2237  const Float_t fLegDelXY[NVtx] = {0.1, 0.1, 0.3, yObjDel};
2238  const Float_t fLegProXY[NVtx] = {0.1, 0.1, 0.3, yObjPro};
2239  const Float_t fLegSigXY[NVtx] = {0.1, 0.1, 0.3, yObjSig};
2240 
2241  TLegend *leg = new TLegend(fLegXY[0], fLegXY[1], fLegXY[2], fLegXY[3]);
2242  leg -> SetFillColor(fColLe);
2243  leg -> SetFillStyle(fFilLe);
2244  leg -> SetLineColor(fColLe);
2245  leg -> SetLineStyle(fLinLe);
2246  leg -> SetTextFont(fTxt);
2247  leg -> SetTextAlign(fAln);
2248  leg -> AddEntry(hPtTruth, sLegTrue.Data(), "pf");
2249  leg -> AddEntry(hPtTrkTru, sLegTrack.Data(), "pf");
2250  for (Ssiz_t iCut = 0; iCut < NDPtCuts; iCut++) {
2251  leg -> AddEntry(hPtTrkTruCut[iCut], sLegCut[iCut].Data(), "pf");
2252  }
2253 
2254  TLegend *legMu = new TLegend(fLegMuXY[0], fLegMuXY[1], fLegMuXY[2], fLegMuXY[3]);
2255  legMu -> SetFillColor(fColLe);
2256  legMu -> SetFillStyle(fFilLe);
2257  legMu -> SetLineColor(fColLe);
2258  legMu -> SetLineStyle(fLinLe);
2259  legMu -> SetTextFont(fTxt);
2260  legMu -> SetTextAlign(fAln);
2261  legMu -> AddEntry(grMuProj, sLegMu.Data(), "p");
2262  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
2263  legMu -> AddEntry(grMuHiProj[iSig], sLegProjSig[iSig].Data(), "p");
2264  }
2265 
2266  TLegend *legDel = new TLegend(fLegDelXY[0], fLegDelXY[1], fLegDelXY[2], fLegDelXY[3]);
2267  legDel -> SetFillColor(fColLe);
2268  legDel -> SetFillStyle(fFilLe);
2269  legDel -> SetLineColor(fColLe);
2270  legDel -> SetLineStyle(fLinLe);
2271  legDel -> SetTextFont(fTxt);
2272  legDel -> SetTextAlign(fAln);
2273  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
2274  legDel -> AddEntry(fMuHiProj[iSig], sLegDelta[iSig].Data(), "l");
2275  }
2276 
2277  TLegend *legPro = new TLegend(fLegProXY[0], fLegProXY[1], fLegProXY[2], fLegProXY[3]);
2278  legPro -> SetFillColor(fColLe);
2279  legPro -> SetFillStyle(fFilLe);
2280  legPro -> SetLineColor(fColLe);
2281  legPro -> SetLineStyle(fLinLe);
2282  legPro -> SetTextFont(fTxt);
2283  legPro -> SetTextAlign(fAln);
2284  for (Ssiz_t iProj = 0; iProj < NProj; iProj++) {
2285  legPro -> AddEntry(hPtDeltaProj[iProj], sLegProj[iProj].Data(), "pf");
2286  }
2287 
2288  TLegend *legSig = new TLegend(fLegSigXY[0], fLegSigXY[1], fLegSigXY[2], fLegSigXY[3]);
2289  legSig -> SetFillColor(fColLe);
2290  legSig -> SetFillStyle(fFilLe);
2291  legSig -> SetLineColor(fColLe);
2292  legSig -> SetLineStyle(fLinLe);
2293  legSig -> SetTextFont(fTxt);
2294  legSig -> SetTextAlign(fAln);
2295  legSig -> AddEntry(hPtTruth, sLegTrue.Data(), "pf");
2296  legSig -> AddEntry(hPtTrkTru, sLegTrack.Data(), "pf");
2297  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
2298  legSig -> AddEntry(hPtTrkTruSig[iSig], sLegSig[iSig].Data(), "pf");
2299  }
2300  cout << " Made legends." << endl;
2301 
2302  // make text boxes
2303  const UInt_t fColInf = 0;
2304  const UInt_t fFilInf = 0;
2305  const UInt_t fLinInf = 0;
2306  const Float_t yObjInf = 0.1 + (NTxt * 0.05);
2307  const Float_t yObjCut = 0.1 + (NTrkCuts * 0.05);
2308  const Float_t fInfXY[NVtx] = {0.3, 0.1, 0.5, yObjInf};
2309  const Float_t fCutXY[NVtx] = {0.5, 0.1, 0.7, yObjCut};
2310 
2311  TPaveText *info = new TPaveText(fInfXY[0], fInfXY[1], fInfXY[2], fInfXY[3], "NDC NB");
2312  info -> SetFillColor(fColInf);
2313  info -> SetFillStyle(fFilInf);
2314  info -> SetLineColor(fColInf);
2315  info -> SetLineStyle(fLinInf);
2316  info -> SetTextFont(fTxt);
2317  info -> SetTextAlign(fAln);
2318  for (Ssiz_t iTxt = 0; iTxt < NTxt; iTxt++) {
2319  info -> AddText(sInfo[iTxt].Data());
2320  }
2321 
2322  TPaveText *cuts = new TPaveText(fCutXY[0], fCutXY[1], fCutXY[2], fCutXY[3], "NDC NB");
2323  cuts -> SetFillColor(fColInf);
2324  cuts -> SetFillStyle(fFilInf);
2325  cuts -> SetLineColor(fColInf);
2326  cuts -> SetLineStyle(fLinInf);
2327  cuts -> SetTextFont(fTxt);
2328  cuts -> SetTextAlign(fAln);
2329  for (Ssiz_t iTrkCut = 0; iTrkCut < NTrkCuts; iTrkCut++) {
2330  cuts -> AddText(sTrkCuts[iTrkCut].Data());
2331  }
2332  cout << " Made text." << endl;
2333 
2334  // make line
2335  const UInt_t fColLi = 1;
2336  const UInt_t fLinLi = 9;
2337  const UInt_t fWidLi = 1;
2338  const Float_t fLinXY[NVtx] = {rPtRange[0], 1., rPtRange[1], 1.};
2339 
2340  TLine *line = new TLine(fLinXY[0], fLinXY[1], fLinXY[2], fLinXY[3]);
2341  line -> SetLineColor(fColLi);
2342  line -> SetLineStyle(fLinLi);
2343  line -> SetLineWidth(fWidLi);
2344  cout << " Made line." << endl;
2345 
2346  // make plots
2347  const UInt_t width(750);
2348  const UInt_t width2D(1500);
2349  const UInt_t height(950);
2350  const UInt_t heightNR(750);
2351  const UInt_t fMode(0);
2352  const UInt_t fBord(2);
2353  const UInt_t fGrid(0);
2354  const UInt_t fTick(1);
2355  const UInt_t fLogX(0);
2356  const UInt_t fLogY1(1);
2357  const UInt_t fLogY2(1);
2358  const UInt_t fLogYNR(0);
2359  const UInt_t fFrame(0);
2360  const Float_t fMarginL(0.15);
2361  const Float_t fMarginR(0.02);
2362  const Float_t fMarginR2D(0.15);
2363  const Float_t fMarginT1(0.005);
2364  const Float_t fMarginT2(0.02);
2365  const Float_t fMarginTNR(0.02);
2366  const Float_t fMarginB1(0.25);
2367  const Float_t fMarginB2(0.005);
2368  const Float_t fMarginBNR(0.15);
2369  const Float_t fEffXY[NVtx] = {0., 0., 1., 0.35};
2370  const Float_t fTrksXY[NVtx] = {0., 0.35, 1., 1.};
2371  const Float_t fTwoDimXY[NVtx] = {0., 0., 0.5, 1.};
2372  const Float_t fProjectXY[NVtx] = {0.5, 0., 1., 1.};
2373  const Float_t fBeforeDPtXY[NVtx] = {0., 0., 0.5, 1.};
2374  const Float_t fAfterDPtXY[NVtx] = {0.5, 0., 1., 1.};
2375 
2376  TCanvas *cEffCut = new TCanvas("cEfficiency_FlatCut", "", width, height);
2377  TPad *pEffCut = new TPad("pEffCut", "", fEffXY[0], fEffXY[1], fEffXY[2], fEffXY[3]);
2378  TPad *pTrkCut = new TPad("pTrkCut", "", fTrksXY[0], fTrksXY[1], fTrksXY[2], fTrksXY[3]);
2379  cEffCut -> SetGrid(fGrid, fGrid);
2380  cEffCut -> SetTicks(fTick, fTick);
2381  cEffCut -> SetBorderMode(fMode);
2382  cEffCut -> SetBorderSize(fBord);
2383  pEffCut -> SetGrid(fGrid, fGrid);
2384  pEffCut -> SetTicks(fTick, fTick);
2385  pEffCut -> SetLogx(fLogX);
2386  pEffCut -> SetLogy(fLogY1);
2387  pEffCut -> SetBorderMode(fMode);
2388  pEffCut -> SetBorderSize(fBord);
2389  pEffCut -> SetFrameBorderMode(fFrame);
2390  pEffCut -> SetLeftMargin(fMarginL);
2391  pEffCut -> SetRightMargin(fMarginR);
2392  pEffCut -> SetTopMargin(fMarginT1);
2393  pEffCut -> SetBottomMargin(fMarginB1);
2394  pTrkCut -> SetGrid(fGrid, fGrid);
2395  pTrkCut -> SetTicks(fTick, fTick);
2396  pTrkCut -> SetLogx(fLogX);
2397  pTrkCut -> SetLogy(fLogY2);
2398  pTrkCut -> SetBorderMode(fMode);
2399  pTrkCut -> SetBorderSize(fBord);
2400  pTrkCut -> SetFrameBorderMode(fFrame);
2401  pTrkCut -> SetLeftMargin(fMarginL);
2402  pTrkCut -> SetRightMargin(fMarginR);
2403  pTrkCut -> SetTopMargin(fMarginT2);
2404  pTrkCut -> SetBottomMargin(fMarginB2);
2405  cEffCut -> cd();
2406  pEffCut -> Draw();
2407  pTrkCut -> Draw();
2408  pEffCut -> cd();
2409  hEff -> Draw();
2410  for (Ssiz_t iCut = 0; iCut < NDPtCuts; iCut++) {
2411  hEffCut[iCut] -> Draw("SAME");
2412  }
2413  line -> Draw();
2414  pTrkCut -> cd();
2415  hPtTruth -> Draw();
2416  hPtTrkTru -> Draw("SAME");
2417  for (Ssiz_t iCut = 0; iCut < NDPtCuts; iCut++) {
2418  hPtTrkTruCut[iCut] -> Draw("SAME");
2419  }
2420  leg -> Draw();
2421  info -> Draw();
2422  cuts -> Draw();
2423  fOutput -> cd();
2424  cEffCut -> Write();
2425  cEffCut -> Close();
2426 
2427  TCanvas *cEffSig = new TCanvas("cEfficiency_SigmaCut", "", width, height);
2428  TPad *pEffSig = new TPad("pEffSig", "", fEffXY[0], fEffXY[1], fEffXY[2], fEffXY[3]);
2429  TPad *pTrkSig = new TPad("pTrkSig", "", fTrksXY[0], fTrksXY[1], fTrksXY[2], fTrksXY[3]);
2430  cEffSig -> SetGrid(fGrid, fGrid);
2431  cEffSig -> SetTicks(fTick, fTick);
2432  cEffSig -> SetBorderMode(fMode);
2433  cEffSig -> SetBorderSize(fBord);
2434  pEffSig -> SetGrid(fGrid, fGrid);
2435  pEffSig -> SetTicks(fTick, fTick);
2436  pEffSig -> SetLogx(fLogX);
2437  pEffSig -> SetLogy(fLogY1);
2438  pEffSig -> SetBorderMode(fMode);
2439  pEffSig -> SetBorderSize(fBord);
2440  pEffSig -> SetFrameBorderMode(fFrame);
2441  pEffSig -> SetLeftMargin(fMarginL);
2442  pEffSig -> SetRightMargin(fMarginR);
2443  pEffSig -> SetTopMargin(fMarginT1);
2444  pEffSig -> SetBottomMargin(fMarginB1);
2445  pTrkSig -> SetGrid(fGrid, fGrid);
2446  pTrkSig -> SetTicks(fTick, fTick);
2447  pTrkSig -> SetLogx(fLogX);
2448  pTrkSig -> SetLogy(fLogY2);
2449  pTrkSig -> SetBorderMode(fMode);
2450  pTrkSig -> SetBorderSize(fBord);
2451  pTrkSig -> SetFrameBorderMode(fFrame);
2452  pTrkSig -> SetLeftMargin(fMarginL);
2453  pTrkSig -> SetRightMargin(fMarginR);
2454  pTrkSig -> SetTopMargin(fMarginT2);
2455  pTrkSig -> SetBottomMargin(fMarginB2);
2456  cEffSig -> cd();
2457  pEffSig -> Draw();
2458  pTrkSig -> Draw();
2459  pEffSig -> cd();
2460  hEff -> Draw();
2461  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
2462  hEffSig[iSig] -> Draw("SAME");
2463  }
2464  line -> Draw();
2465  pTrkSig -> cd();
2466  hPtTruth -> Draw();
2467  hPtTrkTru -> Draw("SAME");
2468  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
2469  hPtTrkTruSig[iSig] -> Draw("SAME");
2470  }
2471  legSig -> Draw();
2472  info -> Draw();
2473  cuts -> Draw();
2474  fOutput -> cd();
2475  cEffSig -> Write();
2476  cEffSig -> Close();
2477 
2478  TCanvas *cRejCut = new TCanvas("cReject_FlatCut", "", width, heightNR);
2479  cRejCut -> SetGrid(fGrid, fGrid);
2480  cRejCut -> SetTicks(fTick, fTick);
2481  cRejCut -> SetBorderMode(fMode);
2482  cRejCut -> SetBorderSize(fBord);
2483  cRejCut -> SetFrameBorderMode(fFrame);
2484  cRejCut -> SetLeftMargin(fMarginL);
2485  cRejCut -> SetRightMargin(fMarginR);
2486  cRejCut -> SetTopMargin(fMarginTNR);
2487  cRejCut -> SetBottomMargin(fMarginBNR);
2488  cRejCut -> SetLogx(fLogX);
2489  cRejCut -> SetLogy(fLogYNR);
2490  cRejCut -> cd();
2491  grRejCut -> Draw("ALP");
2492  info -> Draw();
2493  cuts -> Draw();
2494  fOutput -> cd();
2495  cRejCut -> Write();
2496  cRejCut -> Close();
2497 
2498  TCanvas *cRejSig = new TCanvas("cReject_SigmaCut", "", width, heightNR);
2499  cRejSig -> SetGrid(fGrid, fGrid);
2500  cRejSig -> SetTicks(fTick, fTick);
2501  cRejSig -> SetBorderMode(fMode);
2502  cRejSig -> SetBorderSize(fBord);
2503  cRejSig -> SetFrameBorderMode(fFrame);
2504  cRejSig -> SetLeftMargin(fMarginL);
2505  cRejSig -> SetRightMargin(fMarginR);
2506  cRejSig -> SetTopMargin(fMarginTNR);
2507  cRejSig -> SetBottomMargin(fMarginBNR);
2508  cRejSig -> SetLogx(fLogX);
2509  cRejSig -> SetLogy(fLogYNR);
2510  cRejSig -> cd();
2511  grRejSig -> Draw("ALP");
2512  info -> Draw();
2513  cuts -> Draw();
2514  fOutput -> cd();
2515  cRejSig -> Write();
2516  cRejSig -> Close();
2517 
2518  TCanvas *cPtTruVsTrkCut = new TCanvas("cPtTruthVsReco_FlatCut", "", width2D, heightNR);
2519  TPad *pBeforeCut = new TPad("pBeforeCut", "", fBeforeDPtXY[0], fBeforeDPtXY[1], fBeforeDPtXY[2], fBeforeDPtXY[3]);
2520  TPad *pAfterCut = new TPad("pAfterCut", "", fAfterDPtXY[0], fAfterDPtXY[1], fAfterDPtXY[2], fAfterDPtXY[3]);
2521  cPtTruVsTrkCut -> SetGrid(fGrid, fGrid);
2522  cPtTruVsTrkCut -> SetTicks(fTick, fTick);
2523  cPtTruVsTrkCut -> SetBorderMode(fMode);
2524  cPtTruVsTrkCut -> SetBorderSize(fBord);
2525  pBeforeCut -> SetGrid(fGrid, fGrid);
2526  pBeforeCut -> SetTicks(fTick, fTick);
2527  pBeforeCut -> SetLogx(fLogX);
2528  pBeforeCut -> SetLogy(fLogYNR);
2529  pBeforeCut -> SetBorderMode(fMode);
2530  pBeforeCut -> SetBorderSize(fBord);
2531  pBeforeCut -> SetFrameBorderMode(fFrame);
2532  pBeforeCut -> SetLeftMargin(fMarginL);
2533  pBeforeCut -> SetRightMargin(fMarginR2D);
2534  pBeforeCut -> SetBottomMargin(fMarginBNR);
2535  pAfterCut -> SetGrid(fGrid, fGrid);
2536  pAfterCut -> SetTicks(fTick, fTick);
2537  pAfterCut -> SetLogx(fLogX);
2538  pAfterCut -> SetLogy(fLogYNR);
2539  pAfterCut -> SetBorderMode(fMode);
2540  pAfterCut -> SetBorderSize(fBord);
2541  pAfterCut -> SetFrameBorderMode(fFrame);
2542  pAfterCut -> SetLeftMargin(fMarginL);
2543  pAfterCut -> SetRightMargin(fMarginR2D);
2544  pAfterCut -> SetBottomMargin(fMarginBNR);
2545  cPtTruVsTrkCut -> cd();
2546  pBeforeCut -> Draw();
2547  pAfterCut -> Draw();
2548  pBeforeCut -> cd();
2549  hPtTrueVsTrack -> SetTitle(sBeforeTitle.Data());
2550  hPtTrueVsTrack -> Draw("colz");
2551  cuts -> Draw();
2552  pAfterCut -> cd();
2553  hPtTrueVsTrackCut[iCutToDraw] -> SetTitle(sAfterCutTitle.Data());
2554  hPtTrueVsTrackCut[iCutToDraw] -> Draw("colz");
2555  info -> Draw();
2556  fOutput -> cd();
2557  cPtTruVsTrkCut -> Write();
2558  cPtTruVsTrkCut -> Close();
2559 
2560  TCanvas *cPtTruVsTrkSig = new TCanvas("cPtTruthVsReco_SigmaCut", "", width2D, heightNR);
2561  TPad *pBeforeSig = new TPad("pBeforeSig", "", fBeforeDPtXY[0], fBeforeDPtXY[1], fBeforeDPtXY[2], fBeforeDPtXY[3]);
2562  TPad *pAfterSig = new TPad("pAfterSig", "", fAfterDPtXY[0], fAfterDPtXY[1], fAfterDPtXY[2], fAfterDPtXY[3]);
2563  cPtTruVsTrkSig -> SetGrid(fGrid, fGrid);
2564  cPtTruVsTrkSig -> SetTicks(fTick, fTick);
2565  cPtTruVsTrkSig -> SetBorderMode(fMode);
2566  cPtTruVsTrkSig -> SetBorderSize(fBord);
2567  pBeforeSig -> SetGrid(fGrid, fGrid);
2568  pBeforeSig -> SetTicks(fTick, fTick);
2569  pBeforeSig -> SetLogx(fLogX);
2570  pBeforeSig -> SetLogy(fLogYNR);
2571  pBeforeSig -> SetBorderMode(fMode);
2572  pBeforeSig -> SetBorderSize(fBord);
2573  pBeforeSig -> SetFrameBorderMode(fFrame);
2574  pBeforeSig -> SetLeftMargin(fMarginL);
2575  pBeforeSig -> SetRightMargin(fMarginR2D);
2576  pBeforeSig -> SetBottomMargin(fMarginBNR);
2577  pAfterSig -> SetGrid(fGrid, fGrid);
2578  pAfterSig -> SetTicks(fTick, fTick);
2579  pAfterSig -> SetLogx(fLogX);
2580  pAfterSig -> SetLogy(fLogYNR);
2581  pAfterSig -> SetBorderMode(fMode);
2582  pAfterSig -> SetBorderSize(fBord);
2583  pAfterSig -> SetFrameBorderMode(fFrame);
2584  pAfterSig -> SetLeftMargin(fMarginL);
2585  pAfterSig -> SetRightMargin(fMarginR2D);
2586  pAfterSig -> SetBottomMargin(fMarginBNR);
2587  cPtTruVsTrkSig -> cd();
2588  pBeforeSig -> Draw();
2589  pAfterSig -> Draw();
2590  pBeforeSig -> cd();
2591  hPtTrueVsTrack -> Draw("colz");
2592  cuts -> Draw();
2593  pAfterSig -> cd();
2594  hPtTrueVsTrackSig[iSigToDraw] -> SetTitle(sAfterSigTitle.Data());
2595  hPtTrueVsTrackSig[iSigToDraw] -> Draw("colz");
2596  info -> Draw();
2597  fOutput -> cd();
2598  cPtTruVsTrkSig -> Write();
2599  cPtTruVsTrkSig -> Close();
2600 
2601  TCanvas *cPtDelVsTrk = new TCanvas("cPtDeltaVsTrack", "", width2D, heightNR);
2602  TPad *pTwoDim = new TPad("pTwoDim", "", fTwoDimXY[0], fTwoDimXY[1], fTwoDimXY[2], fTwoDimXY[3]);
2603  TPad *pProject = new TPad("pProjections", "", fProjectXY[0], fProjectXY[1], fProjectXY[2], fProjectXY[3]);
2604  cPtDelVsTrk -> SetGrid(fGrid, fGrid);
2605  cPtDelVsTrk -> SetTicks(fTick, fTick);
2606  cPtDelVsTrk -> SetBorderMode(fMode);
2607  cPtDelVsTrk -> SetBorderSize(fBord);
2608  pTwoDim -> SetGrid(fGrid, fGrid);
2609  pTwoDim -> SetTicks(fTick, fTick);
2610  pTwoDim -> SetLogx(fLogX);
2611  pTwoDim -> SetLogy(fLogYNR);
2612  pTwoDim -> SetBorderMode(fMode);
2613  pTwoDim -> SetBorderSize(fBord);
2614  pTwoDim -> SetFrameBorderMode(fFrame);
2615  pTwoDim -> SetLeftMargin(fMarginL);
2616  pTwoDim -> SetRightMargin(fMarginR2D);
2617  pTwoDim -> SetTopMargin(fMarginTNR);
2618  pTwoDim -> SetBottomMargin(fMarginBNR);
2619  pProject -> SetGrid(fGrid, fGrid);
2620  pProject -> SetTicks(fTick, fTick);
2621  pProject -> SetLogx(fLogX);
2622  pProject -> SetLogy(fLogYNR);
2623  pProject -> SetBorderMode(fMode);
2624  pProject -> SetBorderSize(fBord);
2625  pProject -> SetFrameBorderMode(fFrame);
2626  pProject -> SetLeftMargin(fMarginL);
2627  pProject -> SetRightMargin(fMarginR2D);
2628  pProject -> SetTopMargin(fMarginTNR);
2629  pProject -> SetBottomMargin(fMarginBNR);
2630  cPtDelVsTrk -> cd();
2631  pTwoDim -> Draw();
2632  pProject -> Draw();
2633  pTwoDim -> cd();
2634  hPtDeltaVsTrack -> Draw("colz");
2635  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
2636  fMuHiProj[iSig] -> Draw("same");
2637  fMuLoProj[iSig] -> Draw("same");
2638  }
2639  legDel -> Draw();
2640  cuts -> Draw();
2641  pProject -> cd();
2642  hPtDeltaProj[0] -> Draw();
2643  fPtDeltaProj[0] -> Draw("same");
2644  for (Ssiz_t iProj = 1; iProj < NProj; iProj++) {
2645  hPtDeltaProj[iProj] -> Draw("same");
2646  fPtDeltaProj[iProj] -> Draw("same");
2647  }
2648  legPro -> Draw();
2649  info -> Draw();
2650  fOutput -> cd();
2651  cPtDelVsTrk -> Write();
2652  cPtDelVsTrk -> Close();
2653 
2654  TCanvas *cDeltaPt = new TCanvas("cDeltaPt", "", width, heightNR);
2655  cDeltaPt -> SetGrid(fGrid, fGrid);
2656  cDeltaPt -> SetTicks(fTick, fTick);
2657  cDeltaPt -> SetBorderMode(fMode);
2658  cDeltaPt -> SetBorderSize(fBord);
2659  cDeltaPt -> SetFrameBorderMode(fFrame);
2660  cDeltaPt -> SetLeftMargin(fMarginL);
2661  cDeltaPt -> SetRightMargin(fMarginR);
2662  cDeltaPt -> SetTopMargin(fMarginTNR);
2663  cDeltaPt -> SetBottomMargin(fMarginBNR);
2664  cDeltaPt -> SetLogx(fLogX);
2665  cDeltaPt -> SetLogy(fLogYNR);
2666  cDeltaPt -> cd();
2667  hPtDelta -> Draw();
2668  info -> Draw();
2669  cuts -> Draw();
2670  fOutput -> cd();
2671  cDeltaPt -> Write();
2672  cDeltaPt -> Close();
2673 
2674  TCanvas *cMuProj = new TCanvas("cMuDeltaPt", "", width, heightNR);
2675  cMuProj -> SetGrid(fGrid, fGrid);
2676  cMuProj -> SetTicks(fTick, fTick);
2677  cMuProj -> SetBorderMode(fMode);
2678  cMuProj -> SetBorderSize(fBord);
2679  cMuProj -> SetFrameBorderMode(fFrame);
2680  cMuProj -> SetLeftMargin(fMarginL);
2681  cMuProj -> SetRightMargin(fMarginR);
2682  cMuProj -> SetTopMargin(fMarginTNR);
2683  cMuProj -> SetBottomMargin(fMarginBNR);
2684  cMuProj -> SetLogx(fLogX);
2685  cMuProj -> SetLogy(fLogYNR);
2686  cMuProj -> cd();
2687  grMuProj -> Draw("ALP");
2688  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
2689  grMuHiProj[iSig] -> Draw("LP");
2690  grMuLoProj[iSig] -> Draw("LP");
2691  }
2692  legMu -> Draw();
2693  info -> Draw();
2694  cuts -> Draw();
2695  fOutput -> cd();
2696  cMuProj -> Write();
2697  cMuProj -> Close();
2698 
2699  TCanvas *cSigProj = new TCanvas("cSigmaDeltaPt", "", width, heightNR);
2700  cSigProj -> SetGrid(fGrid, fGrid);
2701  cSigProj -> SetTicks(fTick, fTick);
2702  cSigProj -> SetBorderMode(fMode);
2703  cSigProj -> SetBorderSize(fBord);
2704  cSigProj -> SetFrameBorderMode(fFrame);
2705  cSigProj -> SetLeftMargin(fMarginL);
2706  cSigProj -> SetRightMargin(fMarginR);
2707  cSigProj -> SetTopMargin(fMarginTNR);
2708  cSigProj -> SetBottomMargin(fMarginBNR);
2709  cSigProj -> SetLogx(fLogX);
2710  cSigProj -> SetLogy(fLogYNR);
2711  cSigProj -> cd();
2712  grSigProj -> Draw("ALP");
2713  info -> Draw();
2714  cuts -> Draw();
2715  fOutput -> cd();
2716  cSigProj -> Write();
2717  cSigProj -> Close();
2718  cout << " Made plots." << endl;
2719 
2720  // make directories
2721  TDirectory *dNoCut = (TDirectory*) fOutput -> mkdir("NoCuts");
2722  TDirectory *dFlatCut = (TDirectory*) fOutput -> mkdir("FlatCuts");
2723  TDirectory *dSigmaCut = (TDirectory*) fOutput -> mkdir("SigmaCuts");
2724  TDirectory *dProject = (TDirectory*) fOutput -> mkdir("Projections");
2725 
2726  // save histograms
2727  fOutput -> cd();
2728  dNoCut -> cd();
2729  hEff -> Write();
2730  hPtTruth -> Write();
2731  hPtDelta -> Write();
2732  hPtTrack -> Write();
2733  hPtFrac -> Write();
2734  hPtTrkTru -> Write();
2735  hPtDeltaVsFrac -> Write();
2736  hPtDeltaVsTrue -> Write();
2737  hPtDeltaVsTrack -> Write();
2738  hPtTrueVsTrack -> Write();
2739 
2740  // save flat delta-pt cut histograms
2741  dFlatCut -> cd();
2742  grRejCut -> Write();
2743  for (Ssiz_t iCut = 0; iCut < NDPtCuts; iCut++) {
2744  hEffCut[iCut] -> Write();
2745  hPtDeltaCut[iCut] -> Write();
2746  hPtTrackCut[iCut] -> Write();
2747  hPtFracCut[iCut] -> Write();
2748  hPtTrkTruCut[iCut] -> Write();
2749  hPtDeltaVsFracCut[iCut] -> Write();
2750  hPtDeltaVsTrueCut[iCut] -> Write();
2751  hPtDeltaVsTrackCut[iCut] -> Write();
2752  hPtTrueVsTrackCut[iCut] -> Write();
2753  }
2754 
2755  // save pt-dependent delta-pt cut histograms
2756  dSigmaCut -> cd();
2757  grRejSig -> Write();
2758  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
2759  hEffSig[iSig] -> Write();
2760  hPtDeltaSig[iSig] -> Write();
2761  hPtTrackSig[iSig] -> Write();
2762  hPtFracSig[iSig] -> Write();
2763  hPtTrkTruSig[iSig] -> Write();
2764  hPtDeltaVsFracSig[iSig] -> Write();
2765  hPtDeltaVsTrueSig[iSig] -> Write();
2766  hPtDeltaVsTrackSig[iSig] -> Write();
2767  hPtTrueVsTrackSig[iSig] -> Write();
2768  }
2769 
2770  // save delta-pt projection histograms
2771  dProject -> cd();
2772  grMuProj -> Write();
2773  grSigProj -> Write();
2774  for (Ssiz_t iProj = 0; iProj < NProj; iProj++) {
2775  hPtDeltaProj[iProj] -> Write();
2776  fPtDeltaProj[iProj] -> Write();
2777  }
2778  for (Ssiz_t iSig = 0; iSig < NSigCuts; iSig++) {
2779  fMuHiProj[iSig] -> Write();
2780  fMuLoProj[iSig] -> Write();
2781  grMuHiProj[iSig] -> Write();
2782  grMuLoProj[iSig] -> Write();
2783  }
2784  cout << " Saved histograms." << endl;
2785 
2786  // close files
2787  fOutput -> cd();
2788  fOutput -> Close();
2789  fInput -> cd();
2790  fInput -> Close();
2791  cout << " Finished delta-pt extractor script!\n" << endl;
2792 
2793 }
2794 
2795 // end ------------------------------------------------------------------------