]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGDQ/dielectron/macros/ExtractEfficiencies.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGDQ / dielectron / macros / ExtractEfficiencies.C
1 // author: Ionut Cristian Arsene
2 // Date:  01/09/2010
3
4 #include <iostream>
5 #include <fstream>
6 using namespace std;
7
8 #include <TObjArray.h>
9 #include <TNamed.h>
10 #include <TFile.h>
11 #include <TH1.h>
12 #include <TH1D.h>
13 #include <TH2D.h>
14 #include <TH3D.h>
15 #include <TGraphErrors.h>
16 #include <TSystem.h>
17 #include <TKey.h>
18 #include <TList.h>
19 #include <TMath.h>
20 #include <TString.h>
21
22 #include "AliCFContainer.h"
23 #include "AliDielectronCFdraw.h"
24
25 /*
26 This macro makes projections and saves histograms from a list of CF containers
27 generated with the dielectron package. These histograms can later be used to
28 calculate efficiencies.
29 To use it, the following modifications are needed:
30 1) Modify the global variables listed below according to your needs.
31 2) Make projections by applying as many cut sets as needed on the CF containers.
32    Call the FillHistograms() after each cut set.
33 3) To extract efficiencies use the ExtractEfficiencies() function where one needs to 
34    specify the indexes for the nominator and denominator histograms. The
35    indexes are based on the CF step number, cut set number and histogram number
36    as defined in the global variables below.
37 */
38
39 // The CF variable indexes ------------------------------------------------
40 enum Variables {    // create an enumeration item for every variable from your CF container
41   kNothing = -1,    // kNothing should be always here
42   kPt = 0,
43   kY,
44   kThetaCS,
45   kThetaHE,
46   kM,
47   kPairType,
48   //  kPhi,
49   kLeg1_Pt,
50   kLeg1_NclsTPC,
51   kLeg1_Eta,
52   //kLeg1_Phi,
53   //  kLeg1_TPC_nSigma_Electrons,
54   //  kLeg1_P,
55   //kLeg2_Phi,
56   //  kLeg2_TPC_nSigma_Electrons,
57   kLeg2_Pt,
58   //  kLeg2_P,
59   kLeg2_NclsTPC,
60   kLeg2_Eta,
61   kNVariables       // kNVariables should be always here!
62 };
63 const Char_t* gkVarNames[kNVariables] = {     // variable names to be put on histograms axes and titles
64   "p_{T} [GeV/c]",
65   "y",
66   "cos #theta^{*}_{CS}",
67   "cos #theta^{*}_{HE}",
68   "M [GeV/c^{2}]",
69   "Pair type (0=++; 1=+-; 2=--)",
70   // "#phi(J/#Psi) [rad.]",
71   //"#phi^{leg1}",
72   //  "TPC n #sigma electrons (leg1)",
73   "p_{T}^{leg1} [GeV/c]",
74   //  "P^{leg1} [GeV/c]",
75   "# TPC clusters (leg1)",
76   "#eta^{leg1}",
77   //"#phi^{leg2}",
78   //  "TPC n #sigma electrons (leg2)",
79   "p_{T}^{leg2} [GeV/c]",
80   //  "P^{leg2} [GeV/c]",
81   "# TPC clusters (leg2)"
82   "#eta^{leg2}",
83 };
84 Int_t gNbins[kNVariables];           // number of bins for every variable --> filled automatically
85 Double_t* gBinLimits[kNVariables];   // bin limits for every variable --> filled automatically
86 // ------------------------------------------------------------------------
87
88 // Put here all the CF steps of interest ----------------------------------
89 enum Steps {        // step indexes in the CF containers to be analyzed
90   kPureMC = 0,
91   kESDSPDany = 2,
92   kESDSPDfirst = 4,
93   kESDv0SPDany = 6,
94   kESDv0SPDfirst = 8,
95   kFullSPDany = 10,
96   kFullSPDfirst = 12,
97   kNSteps = 7        // total number of steps (the number of steps above)
98 };
99 const Int_t gkStepNumbers[kNSteps] = {   // array with step indexes (all from the enumeration above)
100   kPureMC, 
101   kESDSPDany, kESDSPDfirst,
102   kESDv0SPDany, kESDv0SPDfirst,
103   kFullSPDany, kFullSPDfirst
104 };
105 const Char_t* gkStepNames[kNSteps][2] = {// names for each CF step
106   {"PureMC",         "Pure MC"},         // NOTE: short names go to histo names, long names go to titles
107   {"ESDSPDany",      "ESD track cuts, SPD any"}, 
108   {"ESDSPDfirst",    "ESD track cuts, SPD first"},
109   {"ESDv0SPDany",    "ESD track cuts, conv. cuts, SPD any"}, 
110   {"ESDv0SPDfirst",  "ESD track cuts, conv. cuts, SPD first"},
111   {"FullSPDany",     "All track cuts (with SPD any) and TPC-PID"},
112   {"FullSPDfirst",   "All track cuts (with SPD first) and TPC-PID"}
113 };
114 //------------------------------------------------------------------------
115
116 // Put here info about the cut sets for which projections will be made ---
117 const Int_t gkNCutSets = 10*3;     // number of cut sets for which histos will be filled
118 const Char_t* gkCutSetNames[gkNCutSets][2] = {   // short and long names for all the cut sets
119   // baseline
120   {"Ycut",                 "|y_{J/#Psi}|<0.9 & 0<pt_{J/#Psi}<10.0"},
121   {"Ycut1",                "|y_{J/#Psi}|<0.3 & 0<pt_{J/#Psi}<10.0"},
122   {"Ycut2",                "0.3<y_{J/#Psi}<0.9 & 0<pt_{J/#Psi}<10.0"},
123   {"Ycut3",                "-0.9<y_{J/#Psi}<-0.3 & 0<pt_{J/#Psi}<10.0"},
124   {"YcutPt1",              "|y_{J/#Psi}|<0.9 & 0.0<p_{T J/#Psi}<1.0"},
125   {"YcutPt2",              "|y_{J/#Psi}|<0.9 & 1.0<p_{T J/#Psi}<2.0"},
126   {"YcutPt3",              "|y_{J/#Psi}|<0.9 & 2.0<p_{T J/#Psi}<3.0"},
127   {"YcutPt4",              "|y_{J/#Psi}|<0.9 & 3.0<p_{T J/#Psi}<5.0"},
128   {"YcutPt5",              "|y_{J/#Psi}|<0.9 & 5.0<p_{T J/#Psi}<7.0"},
129   {"YcutPt6",              "|y_{J/#Psi}|<0.9 & 7.0<p_{T J/#Psi}<10.0"},
130   // track cuts
131   {"YcutLegsFull",       "|y_{J/#Psi}|<0.9 & 0<pt_{J/#Psi}<10.0 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
132   {"Ycut1LegsFull",      "|y_{J/#Psi}|<0.3 & 0<pt_{J/#Psi}<10.0 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
133   {"Ycut2LegsFull",      "0.3<y_{J/#Psi}<0.9 & 0<pt_{J/#Psi}<10.0 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
134   {"Ycut3LegsFull",      "-0.9<y_{J/#Psi}<-0.3 & 0<pt_{J/#Psi}<10.0 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
135   {"YcutPt1LegsFull",    "|y_{J/#Psi}|<0.9 & 0<pt_{J/#Psi}<1.0 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
136   {"YcutPt2LegsFull",    "|y_{J/#Psi}|<0.9 & 1.0<pt_{J/#Psi}<2.0 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
137   {"YcutPt3LegsFull",    "|y_{J/#Psi}|<0.9 & 2.0<pt_{J/#Psi}<3.0 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
138   {"YcutPt4LegsFull",    "|y_{J/#Psi}|<0.9 & 3.0<pt_{J/#Psi}<5.0 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
139   {"YcutPt5LegsFull",    "|y_{J/#Psi}|<0.9 & 5.0<pt_{J/#Psi}<7.0 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
140   {"YcutPt6LegsFull",    "|y_{J/#Psi}|<0.9 & 7.0<pt_{J/#Psi}<10.0 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
141   // track cuts + cut on signal integration range
142   {"YcutMcutLegsFull",       "|y_{J/#Psi}|<0.9 & 0<pt_{J/#Psi}<10.0 & 2.92<M_{inv}<3.16 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
143   {"Ycut1McutLegsFull",      "|y_{J/#Psi}|<0.3 & 0<pt_{J/#Psi}<10.0 & 2.92<M_{inv}<3.16 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
144   {"Ycut2McutLegsFull",      "0.3<y_{J/#Psi}<0.9 & 0<pt_{J/#Psi}<10.0 & 2.92<M_{inv}<3.16 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
145   {"Ycut3McutLegsFull",      "-0.9<y_{J/#Psi}<-0.3 & 0<pt_{J/#Psi}<10.0 & 2.92<M_{inv}<3.16 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
146   {"YcutPt1McutLegsFull",    "|y_{J/#Psi}|<0.9 & 0<pt_{J/#Psi}<1.0 & 2.92<M_{inv}<3.16 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
147   {"YcutPt2McutLegsFull",    "|y_{J/#Psi}|<0.9 & 1.0<pt_{J/#Psi}<2.0 & 2.92<M_{inv}<3.16 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
148   {"YcutPt3McutLegsFull",    "|y_{J/#Psi}|<0.9 & 2.0<pt_{J/#Psi}<3.0 & 2.92<M_{inv}<3.16 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
149   {"YcutPt4McutLegsFull",    "|y_{J/#Psi}|<0.9 & 3.0<pt_{J/#Psi}<5.0 & 2.92<M_{inv}<3.16 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
150   {"YcutPt5McutLegsFull",    "|y_{J/#Psi}|<0.9 & 5.0<pt_{J/#Psi}<7.0 & 2.92<M_{inv}<3.16 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"},
151   {"YcutPt6McutLegsFull",    "|y_{J/#Psi}|<0.9 & 7.0<pt_{J/#Psi}<10.0 & 2.92<M_{inv}<3.16 & |#eta_{legs}|<0.9 & p_{Tlegs}>1.0 GeV/c & Ncls_TPC>70"}
152   
153 };
154 // -----------------------------------------------------------------------
155
156 // Put here info about the histograms to be filled -----------------------
157 const Int_t gkNhistos = 3;                        // how many histograms for every (step,cut set) combination
158 const Char_t* gkHistoNames[gkNhistos][2] = {      // short and long names of the histograms
159   {"pt","p_{T}(J/#Psi)"},                         // NOTE: short names go to the histo name, long name goes to title
160   //  {"y","y(J/#Psi)"}, 
161   // {"pty","p_{T} vs y(J/#Psi)"},
162   //  {"phi","#phi(J/#Psi) [rad.]"}, 
163   //{"m","e^{+}e^{-} invariant mass"}, 
164   {"ThetaCS","cos #theta^{*}_{CS}"}, 
165   {"ThetaHE","cos #theta^{*}_{HE}"}
166   // {"Minv", "Invariant mass"}
167 };
168 const Int_t gkDims[gkNhistos][4] = {      // dimensions and variables for histograms
169 // ndim  xVar      yVar      zVar
170   {1,    kPt,      kNothing, kNothing},   // pt dependence
171   //  {1,    kY,       kNothing, kNothing},   // y dependence
172   //  {2,    kY,       kPt,      kNothing},   // pt,y dependence
173   //  {1,    kPhi,     kNothing, kNothing},   // phi dependence
174   //  {1,    kM,       kNothing, kNothing},   // inv. mass dependence
175   {1,    kThetaCS, kNothing, kNothing},   // cos theta* CS dependence
176   {1,    kThetaHE, kNothing, kNothing}    // cos theta* HE dependence
177   //{1,    kM,       kNothing, kNothing}    // invariant mass
178 };
179 // -----------------------------------------------------------------------
180
181 // ******************************************************************************** 
182 // Define here all the efficiencies you want (if any)
183 // Efficiency = (nominator histogram)/(denominator histogram)
184 // A histogram is defined by its step,cut set, and number defined according the
185 // global variables above
186 // ********************************************************************************
187 const Int_t gkNeffs = 20*3*5;
188 const Int_t gkEffs[gkNeffs][6] = {
189   //nominator: Step  Cut  Histo | denominator: Step  Cut  Histo     comment
190   // full corrections, pt dependence
191              { 5,    10,   0,                   0,    0,   0     },     // full correction, SPD any   -0.9<y<+0.9  0.0<pt<10
192              { 6,    10,   0,                   0,    0,   0     },     // full correction, SPD first -0.9<y<+0.9  0.0<pt<10
193              { 5,    11,   0,                   0,    1,   0     },     // full correction, SPD any   -0.3<y<+0.3  0.0<pt<10
194              { 6,    11,   0,                   0,    1,   0     },     // full correction, SPD first -0.3<y<+0.3  0.0<pt<10
195              { 5,    12,   0,                   0,    2,   0     },     // full correction, SPD any    0.3<y<+0.9  0.0<pt<10
196              { 6,    12,   0,                   0,    2,   0     },     // full correction, SPD first  0.3<y<+0.9  0.0<pt<10
197              { 5,    13,   0,                   0,    3,   0     },     // full correction, SPD any   -0.9<y<-0.3  0.0<pt<10
198              { 6,    13,   0,                   0,    3,   0     },     // full correction, SPD first -0.9<y<-0.3  0.0<pt<10
199              { 5,    14,   0,                   0,    4,   0     },     // full correction, SPD any,  -0.9<y<+0.9  0.0<pt<1.0
200              { 6,    14,   0,                   0,    4,   0     },     // full correction, SPD first,-0.9<y<+0.9  0.0<pt<1.0
201              { 5,    15,   0,                   0,    5,   0     },     // full correction, SPD any,  -0.9<y<+0.9  1.0<pt<2.0
202              { 6,    15,   0,                   0,    5,   0     },     // full correction, SPD first,-0.9<y<+0.9  1.0<pt<2.0
203              { 5,    16,   0,                   0,    6,   0     },     // full correction, SPD any,  -0.9<y<+0.9  2.0<pt<3.0
204              { 6,    16,   0,                   0,    6,   0     },     // full correction, SPD first,-0.9<y<+0.9  2.0<pt<3.0
205              { 5,    17,   0,                   0,    7,   0     },     // full correction, SPD any,  -0.9<y<+0.9  3.0<pt<5.0
206              { 6,    17,   0,                   0,    7,   0     },     // full correction, SPD first,-0.9<y<+0.9  3.0<pt<5.0
207              { 5,    18,   0,                   0,    8,   0     },     // full correction, SPD any,  -0.9<y<+0.9  5.0<pt<7.0
208              { 6,    18,   0,                   0,    8,   0     },     // full correction, SPD first,-0.9<y<+0.9  5.0<pt<7.0
209              { 5,    19,   0,                   0,    9,   0     },     // full correction, SPD any,  -0.9<y<+0.9  7.0<pt<10.0
210              { 6,    19,   0,                   0,    9,   0     },     // full correction, SPD first,-0.9<y<+0.9  7.0<pt<10.0
211
212              // full corrections, cosThetaCS dependence
213              { 5,    10,   1,                   0,    0,   1     },     // full correction, SPD any   -0.9<y<+0.9  0.0<pt<10
214              { 6,    10,   1,                   0,    0,   1     },     // full correction, SPD first -0.9<y<+0.9  0.0<pt<10
215              { 5,    11,   1,                   0,    1,   1     },     // full correction, SPD any   -0.3<y<+0.3  0.0<pt<10
216              { 6,    11,   1,                   0,    1,   1     },     // full correction, SPD first -0.3<y<+0.3  0.0<pt<10
217              { 5,    12,   1,                   0,    2,   1     },     // full correction, SPD any    0.3<y<+0.9  0.0<pt<10
218              { 6,    12,   1,                   0,    2,   1     },     // full correction, SPD first  0.3<y<+0.9  0.0<pt<10
219              { 5,    13,   1,                   0,    3,   1     },     // full correction, SPD any   -0.9<y<-0.3  0.0<pt<10
220              { 6,    13,   1,                   0,    3,   1     },     // full correction, SPD first -0.9<y<-0.3  0.0<pt<10
221              { 5,    14,   1,                   0,    1,   1     },     // full correction, SPD any,  -0.9<y<+0.9  0.0<pt<1.0
222              { 6,    14,   1,                   0,    1,   1     },     // full correction, SPD first,-0.9<y<+0.9  0.0<pt<1.0
223              { 5,    15,   1,                   0,    2,   1     },     // full correction, SPD any,  -0.9<y<+0.9  1.0<pt<2.0
224              { 6,    15,   1,                   0,    2,   1     },     // full correction, SPD first,-0.9<y<+0.9  1.0<pt<2.0
225              { 5,    16,   1,                   0,    3,   1     },     // full correction, SPD any,  -0.9<y<+0.9  2.0<pt<3.0
226              { 6,    16,   1,                   0,    3,   1     },     // full correction, SPD first,-0.9<y<+0.9  2.0<pt<3.0
227              { 5,    17,   1,                   0,    4,   1     },     // full correction, SPD any,  -0.9<y<+0.9  3.0<pt<5.0
228              { 6,    17,   1,                   0,    4,   1     },     // full correction, SPD first,-0.9<y<+0.9  3.0<pt<5.0
229              { 5,    18,   1,                   0,    5,   1     },     // full correction, SPD any,  -0.9<y<+0.9  5.0<pt<7.0
230              { 6,    18,   1,                   0,    5,   1     },     // full correction, SPD first,-0.9<y<+0.9  5.0<pt<7.0
231              { 5,    19,   1,                   0,    6,   1     },     // full correction, SPD any,  -0.9<y<+0.9  7.0<pt<10.0
232              { 6,    19,   1,                   0,    6,   1     },     // full correction, SPD first,-0.9<y<+0.9  7.0<pt<10.0
233
234              // full corrections, cosThetaHE dependence
235              { 5,    10,   2,                   0,    0,   2     },     // full correction, SPD any   -0.9<y<+0.9  0.0<pt<10
236              { 6,    10,   2,                   0,    0,   2     },     // full correction, SPD first -0.9<y<+0.9  0.0<pt<10
237              { 5,    11,   2,                   0,    1,   2     },     // full correction, SPD any   -0.3<y<+0.3  0.0<pt<10
238              { 6,    11,   2,                   0,    1,   2     },     // full correction, SPD first -0.3<y<+0.3  0.0<pt<10
239              { 5,    12,   2,                   0,    2,   2     },     // full correction, SPD any    0.3<y<+0.9  0.0<pt<10
240              { 6,    12,   2,                   0,    2,   2     },     // full correction, SPD first  0.3<y<+0.9  0.0<pt<10
241              { 5,    13,   2,                   0,    3,   2     },     // full correction, SPD any   -0.9<y<-0.3  0.0<pt<10
242              { 6,    13,   2,                   0,    3,   2     },     // full correction, SPD first -0.9<y<-0.3  0.0<pt<10
243              { 5,    14,   2,                   0,    4,   2     },     // full correction, SPD any,  -0.9<y<+0.9  0.0<pt<1.0
244              { 6,    14,   2,                   0,    4,   2     },     // full correction, SPD first,-0.9<y<+0.9  0.0<pt<1.0
245              { 5,    15,   2,                   0,    5,   2     },     // full correction, SPD any,  -0.9<y<+0.9  1.0<pt<2.0
246              { 6,    15,   2,                   0,    5,   2     },     // full correction, SPD first,-0.9<y<+0.9  1.0<pt<2.0
247              { 5,    16,   2,                   0,    6,   2     },     // full correction, SPD any,  -0.9<y<+0.9  2.0<pt<3.0
248              { 6,    16,   2,                   0,    6,   2     },     // full correction, SPD first,-0.9<y<+0.9  2.0<pt<3.0
249              { 5,    17,   2,                   0,    7,   2     },     // full correction, SPD any,  -0.9<y<+0.9  3.0<pt<5.0
250              { 6,    17,   2,                   0,    7,   2     },     // full correction, SPD first,-0.9<y<+0.9  3.0<pt<5.0
251              { 5,    18,   2,                   0,    8,   2     },     // full correction, SPD any,  -0.9<y<+0.9  5.0<pt<7.0
252              { 6,    18,   2,                   0,    8,   2     },     // full correction, SPD first,-0.9<y<+0.9  5.0<pt<7.0
253              { 5,    19,   2,                   0,    9,   2     },     // full correction, SPD any,  -0.9<y<+0.9  7.0<pt<10.0
254              { 6,    19,   2,                   0,    9,   2     },     // full correction, SPD first,-0.9<y<+0.9  7.0<pt<10.0             
255
256
257              // tracking corrections, pt dependence
258              { 1,    10,   0,                   0,    0,   0     },     // tracking correction, SPD any   -0.9<y<+0.9  0.0<pt<10
259              { 2,    10,   0,                   0,    0,   0     },     // tracking correction, SPD first -0.9<y<+0.9  0.0<pt<10
260              { 1,    11,   0,                   0,    1,   0     },     // tracking correction, SPD any   -0.3<y<+0.3  0.0<pt<10
261              { 2,    11,   0,                   0,    1,   0     },     // tracking correction, SPD first -0.3<y<+0.3  0.0<pt<10
262              { 1,    12,   0,                   0,    2,   0     },     // tracking correction, SPD any    0.3<y<+0.9  0.0<pt<10
263              { 2,    12,   0,                   0,    2,   0     },     // tracking correction, SPD first  0.3<y<+0.9  0.0<pt<10
264              { 1,    13,   0,                   0,    3,   0     },     // tracking correction, SPD any   -0.9<y<-0.3  0.0<pt<10
265              { 2,    13,   0,                   0,    3,   0     },     // tracking correction, SPD first -0.9<y<-0.3  0.0<pt<10
266              { 1,    14,   0,                   0,    4,   0     },     // tracking correction, SPD any,  -0.9<y<+0.9  0.0<pt<1.0
267              { 2,    14,   0,                   0,    4,   0     },     // tracking correction, SPD first,-0.9<y<+0.9  0.0<pt<1.0
268              { 1,    15,   0,                   0,    5,   0     },     // tracking correction, SPD any,  -0.9<y<+0.9  1.0<pt<2.0
269              { 2,    15,   0,                   0,    5,   0     },     // tracking correction, SPD first,-0.9<y<+0.9  1.0<pt<2.0
270              { 1,    16,   0,                   0,    6,   0     },     // tracking correction, SPD any,  -0.9<y<+0.9  2.0<pt<3.0
271              { 2,    16,   0,                   0,    6,   0     },     // tracking correction, SPD first,-0.9<y<+0.9  2.0<pt<3.0
272              { 1,    17,   0,                   0,    7,   0     },     // tracking correction, SPD any,  -0.9<y<+0.9  3.0<pt<5.0
273              { 2,    17,   0,                   0,    7,   0     },     // tracking correction, SPD first,-0.9<y<+0.9  3.0<pt<5.0
274              { 1,    18,   0,                   0,    8,   0     },     // tracking correction, SPD any,  -0.9<y<+0.9  5.0<pt<7.0
275              { 2,    18,   0,                   0,    8,   0     },     // tracking correction, SPD first,-0.9<y<+0.9  5.0<pt<7.0
276              { 1,    19,   0,                   0,    9,   0     },     // tracking correction, SPD any,  -0.9<y<+0.9  7.0<pt<10.0
277              { 2,    19,   0,                   0,    9,   0     },     // tracking correction, SPD first,-0.9<y<+0.9  7.0<pt<10.0
278
279              // tracking corrections, cosThetaCS dependence
280              { 1,    10,   1,                   0,    0,   1     },     // tracking correction, SPD any   -0.9<y<+0.9  0.0<pt<10
281              { 2,    10,   1,                   0,    0,   1     },     // tracking correction, SPD first -0.9<y<+0.9  0.0<pt<10
282              { 1,    11,   1,                   0,    1,   1     },     // tracking correction, SPD any   -0.3<y<+0.3  0.0<pt<10
283              { 2,    11,   1,                   0,    1,   1     },     // tracking correction, SPD first -0.3<y<+0.3  0.0<pt<10
284              { 1,    12,   1,                   0,    2,   1     },     // tracking correction, SPD any    0.3<y<+0.9  0.0<pt<10
285              { 2,    12,   1,                   0,    2,   1     },     // tracking correction, SPD first  0.3<y<+0.9  0.0<pt<10
286              { 1,    13,   1,                   0,    3,   1     },     // tracking correction, SPD any   -0.9<y<-0.3  0.0<pt<10
287              { 2,    13,   1,                   0,    3,   1     },     // tracking correction, SPD first -0.9<y<-0.3  0.0<pt<10
288              { 1,    14,   1,                   0,    4,   1     },     // tracking correction, SPD any,  -0.9<y<+0.9  0.0<pt<1.0
289              { 2,    14,   1,                   0,    4,   1     },     // tracking correction, SPD first,-0.9<y<+0.9  0.0<pt<1.0
290              { 1,    15,   1,                   0,    5,   1     },     // tracking correction, SPD any,  -0.9<y<+0.9  1.0<pt<2.0
291              { 2,    15,   1,                   0,    5,   1     },     // tracking correction, SPD first,-0.9<y<+0.9  1.0<pt<2.0
292              { 1,    16,   1,                   0,    6,   1     },     // tracking correction, SPD any,  -0.9<y<+0.9  2.0<pt<3.0
293              { 2,    16,   1,                   0,    6,   1     },     // tracking correction, SPD first,-0.9<y<+0.9  2.0<pt<3.0
294              { 1,    17,   1,                   0,    7,   1     },     // tracking correction, SPD any,  -0.9<y<+0.9  3.0<pt<5.0
295              { 2,    17,   1,                   0,    7,   1     },     // tracking correction, SPD first,-0.9<y<+0.9  3.0<pt<5.0
296              { 1,    18,   1,                   0,    8,   1     },     // tracking correction, SPD any,  -0.9<y<+0.9  5.0<pt<7.0
297              { 2,    18,   1,                   0,    8,   1     },     // tracking correction, SPD first,-0.9<y<+0.9  5.0<pt<7.0
298              { 1,    19,   1,                   0,    9,   1     },     // tracking correction, SPD any,  -0.9<y<+0.9  7.0<pt<10.0
299              { 2,    19,   1,                   0,    9,   1     },     // tracking correction, SPD first,-0.9<y<+0.9  7.0<pt<10.0
300
301              // tracking corrections, cosThetaHE dependence
302              { 1,    10,   2,                   0,    0,   2     },     // tracking correction, SPD any   -0.9<y<+0.9  0.0<pt<10
303              { 2,    10,   2,                   0,    0,   2     },     // tracking correction, SPD first -0.9<y<+0.9  0.0<pt<10
304              { 1,    11,   2,                   0,    1,   2     },     // tracking correction, SPD any   -0.3<y<+0.3  0.0<pt<10
305              { 2,    11,   2,                   0,    1,   2     },     // tracking correction, SPD first -0.3<y<+0.3  0.0<pt<10
306              { 1,    12,   2,                   0,    2,   2     },     // tracking correction, SPD any    0.3<y<+0.9  0.0<pt<10
307              { 2,    12,   2,                   0,    2,   2     },     // tracking correction, SPD first  0.3<y<+0.9  0.0<pt<10
308              { 1,    13,   2,                   0,    3,   2     },     // tracking correction, SPD any   -0.9<y<-0.3  0.0<pt<10
309              { 2,    13,   2,                   0,    3,   2     },     // tracking correction, SPD first -0.9<y<-0.3  0.0<pt<10
310              { 1,    14,   2,                   0,    4,   2     },     // tracking correction, SPD any,  -0.9<y<+0.9  0.0<pt<1.0
311              { 2,    14,   2,                   0,    4,   2     },     // tracking correction, SPD first,-0.9<y<+0.9  0.0<pt<1.0
312              { 1,    15,   2,                   0,    5,   2     },     // tracking correction, SPD any,  -0.9<y<+0.9  1.0<pt<2.0
313              { 2,    15,   2,                   0,    5,   2     },     // tracking correction, SPD first,-0.9<y<+0.9  1.0<pt<2.0
314              { 1,    16,   2,                   0,    6,   2     },     // tracking correction, SPD any,  -0.9<y<+0.9  2.0<pt<3.0
315              { 2,    16,   2,                   0,    6,   2     },     // tracking correction, SPD first,-0.9<y<+0.9  2.0<pt<3.0
316              { 1,    17,   2,                   0,    7,   2     },     // tracking correction, SPD any,  -0.9<y<+0.9  3.0<pt<5.0
317              { 2,    17,   2,                   0,    7,   2     },     // tracking correction, SPD first,-0.9<y<+0.9  3.0<pt<5.0
318              { 1,    18,   2,                   0,    8,   2     },     // tracking correction, SPD any,  -0.9<y<+0.9  5.0<pt<7.0
319              { 2,    18,   2,                   0,    8,   2     },     // tracking correction, SPD first,-0.9<y<+0.9  5.0<pt<7.0
320              { 1,    19,   2,                   0,    9,   2     },     // tracking correction, SPD any,  -0.9<y<+0.9  7.0<pt<10.0
321              { 2,    19,   2,                   0,    9,   2     },     // tracking correction, SPD first,-0.9<y<+0.9  7.0<pt<10.0
322
323
324              // tracking corrections with V0 rejection cut, pt dependence
325              { 3,    10,   0,                   0,    0,   0     },     // tracking correction, SPD any   -0.9<y<+0.9  0.0<pt<10
326              { 4,    10,   0,                   0,    0,   0     },     // tracking correction, SPD first -0.9<y<+0.9  0.0<pt<10
327              { 3,    11,   0,                   0,    1,   0     },     // tracking correction, SPD any   -0.3<y<+0.3  0.0<pt<10
328              { 4,    11,   0,                   0,    1,   0     },     // tracking correction, SPD first -0.3<y<+0.3  0.0<pt<10
329              { 3,    12,   0,                   0,    2,   0     },     // tracking correction, SPD any    0.3<y<+0.9  0.0<pt<10
330              { 4,    12,   0,                   0,    2,   0     },     // tracking correction, SPD first  0.3<y<+0.9  0.0<pt<10
331              { 3,    13,   0,                   0,    3,   0     },     // tracking correction, SPD any   -0.9<y<-0.3  0.0<pt<10
332              { 4,    13,   0,                   0,    3,   0     },     // tracking correction, SPD first -0.9<y<-0.3  0.0<pt<10
333              { 3,    14,   0,                   0,    4,   0     },     // tracking correction, SPD any,  -0.9<y<+0.9  0.0<pt<1.0
334              { 4,    14,   0,                   0,    4,   0     },     // tracking correction, SPD first,-0.9<y<+0.9  0.0<pt<1.0
335              { 3,    15,   0,                   0,    5,   0     },     // tracking correction, SPD any,  -0.9<y<+0.9  1.0<pt<2.0
336              { 4,    15,   0,                   0,    5,   0     },     // tracking correction, SPD first,-0.9<y<+0.9  1.0<pt<2.0
337              { 3,    16,   0,                   0,    6,   0     },     // tracking correction, SPD any,  -0.9<y<+0.9  2.0<pt<3.0
338              { 4,    16,   0,                   0,    6,   0     },     // tracking correction, SPD first,-0.9<y<+0.9  2.0<pt<3.0
339              { 3,    17,   0,                   0,    7,   0     },     // tracking correction, SPD any,  -0.9<y<+0.9  3.0<pt<5.0
340              { 4,    17,   0,                   0,    7,   0     },     // tracking correction, SPD first,-0.9<y<+0.9  3.0<pt<5.0
341              { 3,    18,   0,                   0,    8,   0     },     // tracking correction, SPD any,  -0.9<y<+0.9  5.0<pt<7.0
342              { 4,    18,   0,                   0,    8,   0     },     // tracking correction, SPD first,-0.9<y<+0.9  5.0<pt<7.0
343              { 3,    19,   0,                   0,    9,   0     },     // tracking correction, SPD any,  -0.9<y<+0.9  7.0<pt<10.0
344              { 4,    19,   0,                   0,    9,   0     },     // tracking correction, SPD first,-0.9<y<+0.9  7.0<pt<10.0
345
346              // tracking corrections with V0 rejection cut, cosThetaCS dependence
347              { 3,    10,   1,                   0,    0,   1     },     // tracking correction, SPD any   -0.9<y<+0.9  0.0<pt<10
348              { 4,    10,   1,                   0,    0,   1     },     // tracking correction, SPD first -0.9<y<+0.9  0.0<pt<10
349              { 3,    11,   1,                   0,    1,   1     },     // tracking correction, SPD any   -0.3<y<+0.3  0.0<pt<10
350              { 4,    11,   1,                   0,    1,   1     },     // tracking correction, SPD first -0.3<y<+0.3  0.0<pt<10
351              { 3,    12,   1,                   0,    2,   1     },     // tracking correction, SPD any    0.3<y<+0.9  0.0<pt<10
352              { 4,    12,   1,                   0,    2,   1     },     // tracking correction, SPD first  0.3<y<+0.9  0.0<pt<10
353              { 3,    13,   1,                   0,    3,   1     },     // tracking correction, SPD any   -0.9<y<-0.3  0.0<pt<10
354              { 4,    13,   1,                   0,    3,   1     },     // tracking correction, SPD first -0.9<y<-0.3  0.0<pt<10
355              { 3,    14,   1,                   0,    4,   1     },     // tracking correction, SPD any,  -0.9<y<+0.9  0.0<pt<1.0
356              { 4,    14,   1,                   0,    4,   1     },     // tracking correction, SPD first,-0.9<y<+0.9  0.0<pt<1.0
357              { 3,    15,   1,                   0,    5,   1     },     // tracking correction, SPD any,  -0.9<y<+0.9  1.0<pt<2.0
358              { 4,    15,   1,                   0,    5,   1     },     // tracking correction, SPD first,-0.9<y<+0.9  1.0<pt<2.0
359              { 3,    16,   1,                   0,    6,   1     },     // tracking correction, SPD any,  -0.9<y<+0.9  2.0<pt<3.0
360              { 4,    16,   1,                   0,    6,   1     },     // tracking correction, SPD first,-0.9<y<+0.9  2.0<pt<3.0
361              { 3,    17,   1,                   0,    7,   1     },     // tracking correction, SPD any,  -0.9<y<+0.9  3.0<pt<5.0
362              { 4,    17,   1,                   0,    7,   1     },     // tracking correction, SPD first,-0.9<y<+0.9  3.0<pt<5.0
363              { 3,    18,   1,                   0,    8,   1     },     // tracking correction, SPD any,  -0.9<y<+0.9  5.0<pt<7.0
364              { 4,    18,   1,                   0,    8,   1     },     // tracking correction, SPD first,-0.9<y<+0.9  5.0<pt<7.0
365              { 3,    19,   1,                   0,    9,   1     },     // tracking correction, SPD any,  -0.9<y<+0.9  7.0<pt<10.0
366              { 4,    19,   1,                   0,    9,   1     },     // tracking correction, SPD first,-0.9<y<+0.9  7.0<pt<10.0
367
368              // tracking corrections with V0 rejection cut, cosThetaHE dependence
369              { 3,    10,   2,                   0,    0,   2     },     // tracking correction, SPD any   -0.9<y<+0.9  0.0<pt<10
370              { 4,    10,   2,                   0,    0,   2     },     // tracking correction, SPD first -0.9<y<+0.9  0.0<pt<10
371              { 3,    11,   2,                   0,    1,   2     },     // tracking correction, SPD any   -0.3<y<+0.3  0.0<pt<10
372              { 4,    11,   2,                   0,    1,   2     },     // tracking correction, SPD first -0.3<y<+0.3  0.0<pt<10
373              { 3,    12,   2,                   0,    2,   2     },     // tracking correction, SPD any    0.3<y<+0.9  0.0<pt<10
374              { 4,    12,   2,                   0,    2,   2     },     // tracking correction, SPD first  0.3<y<+0.9  0.0<pt<10
375              { 3,    13,   2,                   0,    3,   2     },     // tracking correction, SPD any   -0.9<y<-0.3  0.0<pt<10
376              { 4,    13,   2,                   0,    3,   2     },     // tracking correction, SPD first -0.9<y<-0.3  0.0<pt<10
377              { 3,    14,   2,                   0,    4,   2     },     // tracking correction, SPD any,  -0.9<y<+0.9  0.0<pt<1.0
378              { 4,    14,   2,                   0,    4,   2     },     // tracking correction, SPD first,-0.9<y<+0.9  0.0<pt<1.0
379              { 3,    15,   2,                   0,    5,   2     },     // tracking correction, SPD any,  -0.9<y<+0.9  1.0<pt<2.0
380              { 4,    15,   2,                   0,    5,   2     },     // tracking correction, SPD first,-0.9<y<+0.9  1.0<pt<2.0
381              { 3,    16,   2,                   0,    6,   2     },     // tracking correction, SPD any,  -0.9<y<+0.9  2.0<pt<3.0
382              { 4,    16,   2,                   0,    6,   2     },     // tracking correction, SPD first,-0.9<y<+0.9  2.0<pt<3.0
383              { 3,    17,   2,                   0,    7,   2     },     // tracking correction, SPD any,  -0.9<y<+0.9  3.0<pt<5.0
384              { 4,    17,   2,                   0,    7,   2     },     // tracking correction, SPD first,-0.9<y<+0.9  3.0<pt<5.0
385              { 3,    18,   2,                   0,    8,   2     },     // tracking correction, SPD any,  -0.9<y<+0.9  5.0<pt<7.0
386              { 4,    18,   2,                   0,    8,   2     },     // tracking correction, SPD first,-0.9<y<+0.9  5.0<pt<7.0
387              { 3,    19,   2,                   0,    9,   2     },     // tracking correction, SPD any,  -0.9<y<+0.9  7.0<pt<10.0
388              { 4,    19,   2,                   0,    9,   2     },     // tracking correction, SPD first,-0.9<y<+0.9  7.0<pt<10.0
389
390
391              // PID corrections, pt dependence
392              { 5,    10,    0,                   1,    10,    0     },     // PID correction, SPD any   -0.9<y<+0.9  0.0<pt<10
393              { 6,    10,    0,                   2,    10,    0     },     // PID correction, SPD first -0.9<y<+0.9  0.0<pt<10
394              { 5,    11,    0,                   1,    11,    0     },     // PID correction, SPD any   -0.3<y<+0.3  0.0<pt<10
395              { 6,    11,    0,                   2,    11,    0     },     // PID correction, SPD first -0.3<y<+0.3  0.0<pt<10
396              { 5,    12,    0,                   1,    12,    0     },     // PID correction, SPD any    0.3<y<+0.9  0.0<pt<10
397              { 6,    12,    0,                   2,    12,    0     },     // PID correction, SPD first  0.3<y<+0.9  0.0<pt<10
398              { 5,    13,    0,                   1,    13,    0     },     // PID correction, SPD any   -0.9<y<-0.3  0.0<pt<10
399              { 6,    13,    0,                   2,    13,    0     },     // PID correction, SPD first -0.9<y<-0.3  0.0<pt<10
400              { 5,    14,    0,                   1,    14,    0     },     // PID correction, SPD any,  -0.9<y<+0.9  0.0<pt<1.0
401              { 6,    14,    0,                   2,    14,    0     },     // PID correction, SPD first,-0.9<y<+0.9  0.0<pt<1.0
402              { 5,    15,    0,                   1,    15,    0     },     // PID correction, SPD any,  -0.9<y<+0.9  1.0<pt<2.0
403              { 6,    15,    0,                   2,    15,    0     },     // PID correction, SPD first,-0.9<y<+0.9  1.0<pt<2.0
404              { 5,    16,    0,                   1,    16,    0     },     // PID correction, SPD any,  -0.9<y<+0.9  2.0<pt<3.0
405              { 6,    16,    0,                   2,    16,    0     },     // PID correction, SPD first,-0.9<y<+0.9  2.0<pt<3.0
406              { 5,    17,    0,                   1,    17,    0     },     // PID correction, SPD any,  -0.9<y<+0.9  3.0<pt<5.0
407              { 6,    17,    0,                   2,    17,    0     },     // PID correction, SPD first,-0.9<y<+0.9  3.0<pt<5.0
408              { 5,    18,    0,                   1,    18,    0     },     // PID correction, SPD any,  -0.9<y<+0.9  5.0<pt<7.0
409              { 6,    18,    0,                   2,    18,    0     },     // PID correction, SPD first,-0.9<y<+0.9  5.0<pt<7.0
410              { 5,    19,    0,                   1,    19,    0     },     // PID correction, SPD any,  -0.9<y<+0.9  7.0<pt<10.0
411              { 6,    19,    0,                   2,    19,    0     },     // PID correction, SPD first,-0.9<y<+0.9  7.0<pt<10.0
412
413              // PID corrections, cosThetaCS dependence
414              { 5,    10,    1,                   1,    10,    1     },     // PID correction, SPD any   -0.9<y<+0.9  0.0<pt<10
415              { 6,    10,    1,                   2,    10,    1     },     // PID correction, SPD first -0.9<y<+0.9  0.0<pt<10
416              { 5,    11,    1,                   1,    11,    1     },     // PID correction, SPD any   -0.3<y<+0.3  0.0<pt<10
417              { 6,    11,    1,                   2,    11,    1     },     // PID correction, SPD first -0.3<y<+0.3  0.0<pt<10
418              { 5,    12,    1,                   1,    12,    1     },     // PID correction, SPD any    0.3<y<+0.9  0.0<pt<10
419              { 6,    12,    1,                   2,    12,    1     },     // PID correction, SPD first  0.3<y<+0.9  0.0<pt<10
420              { 5,    13,    1,                   1,    13,    1     },     // PID correction, SPD any   -0.9<y<-0.3  0.0<pt<10
421              { 6,    13,    1,                   2,    13,    1     },     // PID correction, SPD first -0.9<y<-0.3  0.0<pt<10
422              { 5,    14,    1,                   1,    14,    1     },     // PID correction, SPD any,  -0.9<y<+0.9  0.0<pt<1.0
423              { 6,    14,    1,                   2,    14,    1     },     // PID correction, SPD first,-0.9<y<+0.9  0.0<pt<1.0
424              { 5,    15,    1,                   1,    15,    1     },     // PID correction, SPD any,  -0.9<y<+0.9  1.0<pt<2.0
425              { 6,    15,    1,                   2,    15,    1     },     // PID correction, SPD first,-0.9<y<+0.9  1.0<pt<2.0
426              { 5,    16,    1,                   1,    16,    1     },     // PID correction, SPD any,  -0.9<y<+0.9  2.0<pt<3.0
427              { 6,    16,    1,                   2,    16,    1     },     // PID correction, SPD first,-0.9<y<+0.9  2.0<pt<3.0
428              { 5,    17,    1,                   1,    17,    1     },     // PID correction, SPD any,  -0.9<y<+0.9  3.0<pt<5.0
429              { 6,    17,    1,                   2,    17,    1     },     // PID correction, SPD first,-0.9<y<+0.9  3.0<pt<5.0
430              { 5,    18,    1,                   1,    18,    1     },     // PID correction, SPD any,  -0.9<y<+0.9  5.0<pt<7.0
431              { 6,    18,    1,                   2,    18,    1     },     // PID correction, SPD first,-0.9<y<+0.9  5.0<pt<7.0
432              { 5,    19,    1,                   1,    19,    1     },     // PID correction, SPD any,  -0.9<y<+0.9  7.0<pt<10.0
433              { 6,    19,    1,                   2,    19,    1     },     // PID correction, SPD first,-0.9<y<+0.9  7.0<pt<10.0
434
435
436              // PID corrections, cosThetaHE dependence
437              { 5,    10,    2,                   1,    10,    2     },     // PID correction, SPD any   -0.9<y<+0.9  0.0<pt<10
438              { 6,    10,    2,                   2,    10,    2     },     // PID correction, SPD first -0.9<y<+0.9  0.0<pt<10
439              { 5,    11,    2,                   1,    11,    2     },     // PID correction, SPD any   -0.3<y<+0.3  0.0<pt<10
440              { 6,    11,    2,                   2,    11,    2     },     // PID correction, SPD first -0.3<y<+0.3  0.0<pt<10
441              { 5,    12,    2,                   1,    12,    2     },     // PID correction, SPD any    0.3<y<+0.9  0.0<pt<10
442              { 6,    12,    2,                   2,    12,    2     },     // PID correction, SPD first  0.3<y<+0.9  0.0<pt<10
443              { 5,    13,    2,                   1,    13,    2     },     // PID correction, SPD any   -0.9<y<-0.3  0.0<pt<10
444              { 6,    13,    2,                   2,    13,    2     },     // PID correction, SPD first -0.9<y<-0.3  0.0<pt<10
445              { 5,    14,    2,                   1,    14,    2     },     // PID correction, SPD any,  -0.9<y<+0.9  0.0<pt<1.0
446              { 6,    14,    2,                   2,    14,    2     },     // PID correction, SPD first,-0.9<y<+0.9  0.0<pt<1.0
447              { 5,    15,    2,                   1,    15,    2     },     // PID correction, SPD any,  -0.9<y<+0.9  1.0<pt<2.0
448              { 6,    15,    2,                   2,    15,    2     },     // PID correction, SPD first,-0.9<y<+0.9  1.0<pt<2.0
449              { 5,    16,    2,                   1,    16,    2     },     // PID correction, SPD any,  -0.9<y<+0.9  2.0<pt<3.0
450              { 6,    16,    2,                   2,    16,    2     },     // PID correction, SPD first,-0.9<y<+0.9  2.0<pt<3.0
451              { 5,    17,    2,                   1,    17,    2     },     // PID correction, SPD any,  -0.9<y<+0.9  3.0<pt<5.0
452              { 6,    17,    2,                   2,    17,    2     },     // PID correction, SPD first,-0.9<y<+0.9  3.0<pt<5.0
453              { 5,    18,    2,                   1,    18,    2     },     // PID correction, SPD any,  -0.9<y<+0.9  5.0<pt<7.0
454              { 6,    18,    2,                   2,    18,    2     },     // PID correction, SPD first,-0.9<y<+0.9  5.0<pt<7.0
455              { 5,    19,    2,                   1,    19,    2     },     // PID correction, SPD any,  -0.9<y<+0.9  7.0<pt<10.0
456              { 6,    19,    2,                   2,    19,    2     },     // PID correction, SPD first,-0.9<y<+0.9  7.0<pt<10.0
457              
458
459              // correction for the invariant mass integration range, pt dependence
460              { 5,    20,   0,                   5,   10,   0     },     // SPD any, -0.9<y<+0.9  0.0<pt<10
461              { 6,    20,   0,                   6,   10,   0     },     // SPD first, -0.9<y<+0.9  0.0<pt<10
462              { 5,    21,   0,                   5,   11,   0     },     // SPD any   -0.3<y<+0.3  0.0<pt<10
463              { 6,    21,   0,                   6,   11,   0     },     // SPD first -0.3<y<+0.3  0.0<pt<10
464              { 5,    22,   0,                   5,   12,   0     },     // SPD any    0.3<y<+0.9  0.0<pt<10
465              { 6,    22,   0,                   6,   12,   0     },     // SPD first  0.3<y<+0.9  0.0<pt<10
466              { 5,    23,   0,                   5,   13,   0     },     // SPD any   -0.9<y<-0.3  0.0<pt<10
467              { 6,    23,   0,                   6,   13,   0     },     // SPD first -0.9<y<-0.3  0.0<pt<10
468              { 5,    24,   0,                   5,   14,   0     },     // SPD any, -0.9<y<+0.9  0.0<pt<1.0
469              { 6,    24,   0,                   6,   14,   0     },     // SPD first, -0.9<y<+0.9  0.0<pt<1.0
470              { 5,    25,   0,                   5,   15,   0     },     // SPD any, -0.9<y<+0.9  1.0<pt<2.0
471              { 6,    25,   0,                   6,   15,   0     },     // SPD first, -0.9<y<+0.9  1.0<pt<2.0
472              { 5,    26,   0,                   5,   16,   0     },     // SPD any, -0.9<y<+0.9  2.0<pt<3.0
473              { 6,    26,   0,                   6,   16,   0     },     // SPD first, -0.9<y<+0.9  2.0<pt<3.0
474              { 5,    27,   0,                   5,   17,   0     },     // SPD any, -0.9<y<+0.9  3.0<pt<5.0
475              { 6,    27,   0,                   6,   17,   0     },     // SPD first, -0.9<y<+0.9  3.0<pt<5.0
476              { 5,    28,   0,                   5,   18,   0     },     // SPD any, -0.9<y<+0.9  5.0<pt<7
477              { 6,    28,   0,                   6,   18,   0     },     // SPD first, -0.9<y<+0.9  5.0<pt<7
478              { 5,    29,   0,                   5,   19,   0     },     // SPD any, -0.9<y<+0.9  7<pt<10
479              { 6,    29,   0,                   6,   19,   0     },      // SPD first, -0.9<y<+0.9  7.0<pt<10
480
481
482              // correction for the invariant mass integration range, cosThetaCS dependence
483              { 5,    20,   1,                   5,   10,   1     },     // SPD any, -0.9<y<+0.9  0.0<pt<10
484              { 6,    20,   1,                   6,   10,   1     },     // SPD first, -0.9<y<+0.9  0.0<pt<10
485              { 5,    21,   1,                   5,   11,   1     },     // SPD any   -0.3<y<+0.3  0.0<pt<10
486              { 6,    21,   1,                   6,   11,   1     },     // SPD first -0.3<y<+0.3  0.0<pt<10
487              { 5,    22,   1,                   5,   12,   1     },     // SPD any    0.3<y<+0.9  0.0<pt<10
488              { 6,    22,   1,                   6,   12,   1     },     // SPD first  0.3<y<+0.9  0.0<pt<10
489              { 5,    23,   1,                   5,   13,   1     },     // SPD any   -0.9<y<-0.3  0.0<pt<10
490              { 6,    23,   1,                   6,   13,   1     },     // SPD first -0.9<y<-0.3  0.0<pt<10
491              { 5,    24,   1,                   5,   14,   1     },     // SPD any, -0.9<y<+0.9  0.0<pt<1.0
492              { 6,    24,   1,                   6,   14,   1     },     // SPD first, -0.9<y<+0.9  0.0<pt<1.0
493              { 5,    25,   1,                   5,   15,   1     },     // SPD any, -0.9<y<+0.9  1.0<pt<2.0
494              { 6,    25,   1,                   6,   15,   1     },     // SPD first, -0.9<y<+0.9  1.0<pt<2.0
495              { 5,    26,   1,                   5,   16,   1     },     // SPD any, -0.9<y<+0.9  2.0<pt<3.0
496              { 6,    26,   1,                   6,   16,   1     },     // SPD first, -0.9<y<+0.9  2.0<pt<3.0
497              { 5,    27,   1,                   5,   17,   1     },     // SPD any, -0.9<y<+0.9  3.0<pt<5.0
498              { 6,    27,   1,                   6,   17,   1     },     // SPD first, -0.9<y<+0.9  3.0<pt<5.0
499              { 5,    28,   1,                   5,   18,   1     },     // SPD any, -0.9<y<+0.9  5.0<pt<7
500              { 6,    28,   1,                   6,   18,   1     },     // SPD first, -0.9<y<+0.9  5.0<pt<7
501              { 5,    29,   1,                   5,   19,   1     },     // SPD any, -0.9<y<+0.9  7<pt<10
502              { 6,    29,   1,                   6,   19,   1     },      // SPD first, -0.9<y<+0.9  7.0<pt<10
503              
504
505              // correction for the invariant mass integration range, cosThetaHE dependence
506              { 5,    20,   2,                   5,   10,   2     },     // SPD any, -0.9<y<+0.9  0.0<pt<10
507              { 6,    20,   2,                   6,   10,   2     },     // SPD first, -0.9<y<+0.9  0.0<pt<10
508              { 5,    21,   2,                   5,   11,   2     },     // SPD any   -0.3<y<+0.3  0.0<pt<10
509              { 6,    21,   2,                   6,   11,   2     },     // SPD first -0.3<y<+0.3  0.0<pt<10
510              { 5,    22,   2,                   5,   12,   2     },     // SPD any    0.3<y<+0.9  0.0<pt<10
511              { 6,    22,   2,                   6,   12,   2     },     // SPD first  0.3<y<+0.9  0.0<pt<10
512              { 5,    23,   2,                   5,   13,   2     },     // SPD any   -0.9<y<-0.3  0.0<pt<10
513              { 6,    23,   2,                   6,   13,   2     },     // SPD first -0.9<y<-0.3  0.0<pt<10
514              { 5,    24,   2,                   5,   14,   2     },     // SPD any, -0.9<y<+0.9  0.0<pt<1.0
515              { 6,    24,   2,                   6,   14,   2     },     // SPD first, -0.9<y<+0.9  0.0<pt<1.0
516              { 5,    25,   2,                   5,   15,   2     },     // SPD any, -0.9<y<+0.9  1.0<pt<2.0
517              { 6,    25,   2,                   6,   15,   2     },     // SPD first, -0.9<y<+0.9  1.0<pt<2.0
518              { 5,    26,   2,                   5,   16,   2     },     // SPD any, -0.9<y<+0.9  2.0<pt<3.0
519              { 6,    26,   2,                   6,   16,   2     },     // SPD first, -0.9<y<+0.9  2.0<pt<3.0
520              { 5,    27,   2,                   5,   17,   2     },     // SPD any, -0.9<y<+0.9  3.0<pt<5.0
521              { 6,    27,   2,                   6,   17,   2     },     // SPD first, -0.9<y<+0.9  3.0<pt<5.0
522              { 5,    28,   2,                   5,   18,   2     },     // SPD any, -0.9<y<+0.9  5.0<pt<7
523              { 6,    28,   2,                   6,   18,   2     },     // SPD first, -0.9<y<+0.9  5.0<pt<7
524              { 5,    29,   2,                   5,   19,   2     },     // SPD any, -0.9<y<+0.9  7<pt<10
525              { 6,    29,   2,                   6,   19,   2     }      // SPD first, -0.9<y<+0.9  7.0<pt<10
526              
527
528 };
529 // custom names and titles for efficiency histograms
530 const Char_t* gkEffNames[gkNeffs][3] = {
531   // full corrections, pt dependence
532   {"fullCorrectionSPDany_pt",      "Eff. vs. pt, (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",       "any,-0.9,0.9,0.0,10.0"},
533   {"fullCorrectionSPDfirst_pt",    "Eff. vs. pt, (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",     "first,-0.9,0.9,0.0,10.0"},
534   {"fullCorrectionY1SPDany_pt",    "Eff. vs. pt, (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",       "any,-0.3,0.3,0.0,10.0"},
535   {"fullCorrectionY1SPDfirst_pt",  "Eff. vs. pt, (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",     "first,-0.3,0.3,0.0,10.0"},
536   {"fullCorrectionY2SPDany_pt",    "Eff. vs. pt, (full cuts, SPD any, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",     "any,0.3,0.9,0.0,10.0"},
537   {"fullCorrectionY2SPDfirst_pt",  "Eff. vs. pt, (full cuts, SPD first, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",   "first,0.3,0.9,0.0,10.0"},
538   {"fullCorrectionY3SPDany_pt",    "Eff. vs. pt, (full cuts, SPD any, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)",   "any,-0.9,-0.3,0.0,10.0"},
539   {"fullCorrectionY3SPDfirst_pt",  "Eff. vs. pt, (full cuts, SPD first, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)", "first,-0.9,-0.3,0.0,10.0"},
540   {"fullCorrectionPt1SPDany_pt",   "Eff. vs. pt, (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",              "any,-0.9,0.9,0.0,1.0"},
541   {"fullCorrectionPt1SPDfirst_pt", "Eff. vs. pt, (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",            "first,-0.9,0.9,0.0,1.0"},
542   {"fullCorrectionPt2SPDany_pt",   "Eff. vs. pt, (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",            "any,-0.9,0.9,1.0,2.0"},
543   {"fullCorrectionPt2SPDfirst_pt", "Eff. vs. pt, (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",          "first,-0.9,0.9,1.0,2.0"},
544   {"fullCorrectionPt3SPDany_pt",   "Eff. vs. pt, (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",            "any,-0.9,0.9,2.0,3.0"},
545   {"fullCorrectionPt3SPDfirst_pt", "Eff. vs. pt, (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",          "first,-0.9,0.9,2.0,3.0"},
546   {"fullCorrectionPt4SPDany_pt",   "Eff. vs. pt, (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",            "any,-0.9,0.9,3.0,5.0"},
547   {"fullCorrectionPt4SPDfirst_pt", "Eff. vs. pt, (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",          "first,-0.9,0.9,3.0,5.0"},
548   {"fullCorrectionPt5SPDany_pt",   "Eff. vs. pt, (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",            "any,-0.9,0.9,5.0,7.0"},
549   {"fullCorrectionPt5SPDfirst_pt", "Eff. vs. pt, (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",          "first,-0.9,0.9,5.0,7.0"},
550   {"fullCorrectionPt6SPDany_pt",   "Eff. vs. pt, (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",           "any,-0.9,0.9,7.0,10.0"},
551   {"fullCorrectionPt6SPDfirst_pt", "Eff. vs. pt, (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",         "first,-0.9,0.9,7.0,10.0"},
552   // full corrections, cosThetaCS dependence
553   {"fullCorrectionSPDany_ThetaCS",      "Eff. vs. cos(#theta_{CS}), (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",       ""},
554   {"fullCorrectionSPDfirst_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",     ""},
555   {"fullCorrectionY1SPDany_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",       ""},
556   {"fullCorrectionY1SPDfirst_ThetaCS",  "Eff. vs. cos(#theta_{CS}), (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",     ""},
557   {"fullCorrectionY2SPDany_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (full cuts, SPD any, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",     ""},
558   {"fullCorrectionY2SPDfirst_ThetaCS",  "Eff. vs. cos(#theta_{CS}), (full cuts, SPD first, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",   ""},
559   {"fullCorrectionY3SPDany_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (full cuts, SPD any, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)",   ""},
560   {"fullCorrectionY3SPDfirst_ThetaCS",  "Eff. vs. cos(#theta_{CS}), (full cuts, SPD first, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)", ""},
561   {"fullCorrectionPt1SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",              ""},
562   {"fullCorrectionPt1SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",            ""},
563   {"fullCorrectionPt2SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",            ""},
564   {"fullCorrectionPt2SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",          ""},
565   {"fullCorrectionPt3SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",            ""},
566   {"fullCorrectionPt3SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",          ""},
567   {"fullCorrectionPt4SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",            ""},
568   {"fullCorrectionPt4SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",          ""},
569   {"fullCorrectionPt5SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",            ""},
570   {"fullCorrectionPt5SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",          ""},
571   {"fullCorrectionPt6SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",           ""},
572   {"fullCorrectionPt6SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",         ""},
573   // full corrections, cosThetaHE dependence
574   {"fullCorrectionSPDany_ThetaHE",      "Eff. vs. cos(#theta_{HE}), (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",       ""},
575   {"fullCorrectionSPDfirst_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",     ""},
576   {"fullCorrectionY1SPDany_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",       ""},
577   {"fullCorrectionY1SPDfirst_ThetaHE",  "Eff. vs. cos(#theta_{HE}), (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",     ""},
578   {"fullCorrectionY2SPDany_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (full cuts, SPD any, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",     ""},
579   {"fullCorrectionY2SPDfirst_ThetaHE",  "Eff. vs. cos(#theta_{HE}), (full cuts, SPD first, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",   ""},
580   {"fullCorrectionY3SPDany_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (full cuts, SPD any, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)",   ""},
581   {"fullCorrectionY3SPDfirst_ThetaHE",  "Eff. vs. cos(#theta_{HE}), (full cuts, SPD first, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)", ""},
582   {"fullCorrectionPt1SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",              ""},
583   {"fullCorrectionPt1SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",            ""},
584   {"fullCorrectionPt2SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",            ""},
585   {"fullCorrectionPt2SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",          ""},
586   {"fullCorrectionPt3SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",            ""},
587   {"fullCorrectionPt3SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",          ""},
588   {"fullCorrectionPt4SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",            ""},
589   {"fullCorrectionPt4SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",          ""},
590   {"fullCorrectionPt5SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",            ""},
591   {"fullCorrectionPt5SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",          ""},
592   {"fullCorrectionPt6SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (full cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",           ""},
593   {"fullCorrectionPt6SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (full cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",         ""},
594   // tracking corrections, pt dependence
595   {"trackingCorrectionSPDany_pt",      "Eff. vs. pt, (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",       ""},
596   {"trackingCorrectionSPDfirst_pt",    "Eff. vs. pt, (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",     ""},
597   {"trackingCorrectionY1SPDany_pt",    "Eff. vs. pt, (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",       ""},
598   {"trackingCorrectionY1SPDfirst_pt",  "Eff. vs. pt, (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",     ""},
599   {"trackingCorrectionY2SPDany_pt",    "Eff. vs. pt, (tracking cuts, SPD any, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",     ""},
600   {"trackingCorrectionY2SPDfirst_pt",  "Eff. vs. pt, (tracking cuts, SPD first, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",   ""},
601   {"trackingCorrectionY3SPDany_pt",    "Eff. vs. pt, (tracking cuts, SPD any, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)",   ""},
602   {"trackingCorrectionY3SPDfirst_pt",  "Eff. vs. pt, (tracking cuts, SPD first, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)", ""},
603   {"trackingCorrectionPt1SPDany_pt",   "Eff. vs. pt, (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",              ""},
604   {"trackingCorrectionPt1SPDfirst_pt", "Eff. vs. pt, (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",            ""},
605   {"trackingCorrectionPt2SPDany_pt",   "Eff. vs. pt, (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",            ""},
606   {"trackingCorrectionPt2SPDfirst_pt", "Eff. vs. pt, (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",          ""},
607   {"trackingCorrectionPt3SPDany_pt",   "Eff. vs. pt, (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",            ""},
608   {"trackingCorrectionPt3SPDfirst_pt", "Eff. vs. pt, (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",          ""},
609   {"trackingCorrectionPt4SPDany_pt",   "Eff. vs. pt, (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",            ""},
610   {"trackingCorrectionPt4SPDfirst_pt", "Eff. vs. pt, (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",          ""},
611   {"trackingCorrectionPt5SPDany_pt",   "Eff. vs. pt, (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",            ""},
612   {"trackingCorrectionPt5SPDfirst_pt", "Eff. vs. pt, (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",          ""},
613   {"trackingCorrectionPt6SPDany_pt",   "Eff. vs. pt, (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",           ""},
614   {"trackingCorrectionPt6SPDfirst_pt", "Eff. vs. pt, (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",         ""},
615   // tracking corrections, cosThetaCS dependence
616   {"trackingCorrectionSPDany_ThetaCS",      "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",       ""},
617   {"trackingCorrectionSPDfirst_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",     ""},
618   {"trackingCorrectionY1SPDany_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",       ""},
619   {"trackingCorrectionY1SPDfirst_ThetaCS",  "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",     ""},
620   {"trackingCorrectionY2SPDany_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",     ""},
621   {"trackingCorrectionY2SPDfirst_ThetaCS",  "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",   ""},
622   {"trackingCorrectionY3SPDany_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)",   ""},
623   {"trackingCorrectionY3SPDfirst_ThetaCS",  "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)", ""},
624   {"trackingCorrectionPt1SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",              ""},
625   {"trackingCorrectionPt1SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",            ""},
626   {"trackingCorrectionPt2SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",            ""},
627   {"trackingCorrectionPt2SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",          ""},
628   {"trackingCorrectionPt3SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",            ""},
629   {"trackingCorrectionPt3SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",          ""},
630   {"trackingCorrectionPt4SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",            ""},
631   {"trackingCorrectionPt4SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",          ""},
632   {"trackingCorrectionPt5SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",            ""},
633   {"trackingCorrectionPt5SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",          ""},
634   {"trackingCorrectionPt6SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",           ""},
635   {"trackingCorrectionPt6SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",         ""},
636   // tracking corrections, cosThetaHE dependence
637   {"trackingCorrectionSPDany_ThetaHE",      "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",       ""},
638   {"trackingCorrectionSPDfirst_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",     ""},
639   {"trackingCorrectionY1SPDany_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",       ""},
640   {"trackingCorrectionY1SPDfirst_ThetaHE",  "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",     ""},
641   {"trackingCorrectionY2SPDany_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",     ""},
642   {"trackingCorrectionY2SPDfirst_ThetaHE",  "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",   ""},
643   {"trackingCorrectionY3SPDany_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)",   ""},
644   {"trackingCorrectionY3SPDfirst_ThetaHE",  "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)", ""},
645   {"trackingCorrectionPt1SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",              ""},
646   {"trackingCorrectionPt1SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",            ""},
647   {"trackingCorrectionPt2SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",            ""},
648   {"trackingCorrectionPt2SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",          ""},
649   {"trackingCorrectionPt3SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",            ""},
650   {"trackingCorrectionPt3SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",          ""},
651   {"trackingCorrectionPt4SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",            ""},
652   {"trackingCorrectionPt4SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",          ""},
653   {"trackingCorrectionPt5SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",            ""},
654   {"trackingCorrectionPt5SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",          ""},
655   {"trackingCorrectionPt6SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",           ""},
656   {"trackingCorrectionPt6SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (tracking cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",         ""},
657   // tracking corrections with V0 cuts, pt dependence
658   {"trackingCorrectionV0SPDany_pt",      "Eff. vs. pt, (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",       ""},
659   {"trackingCorrectionV0SPDfirst_pt",    "Eff. vs. pt, (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",     ""},
660   {"trackingCorrectionY1V0SPDany_pt",    "Eff. vs. pt, (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",       ""},
661   {"trackingCorrectionY1V0SPDfirst_pt",  "Eff. vs. pt, (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",     ""},
662   {"trackingCorrectionY2V0SPDany_pt",    "Eff. vs. pt, (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",     ""},
663   {"trackingCorrectionY2V0SPDfirst_pt",  "Eff. vs. pt, (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",   ""},
664   {"trackingCorrectionY3V0SPDany_pt",    "Eff. vs. pt, (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)",   ""},
665   {"trackingCorrectionY3V0SPDfirst_pt",  "Eff. vs. pt, (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)", ""},
666   {"trackingCorrectionV0Pt1SPDany_pt",   "Eff. vs. pt, (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",              ""},
667   {"trackingCorrectionV0Pt1SPDfirst_pt", "Eff. vs. pt, (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",            ""},
668   {"trackingCorrectionV0Pt2SPDany_pt",   "Eff. vs. pt, (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",            ""},
669   {"trackingCorrectionV0Pt2SPDfirst_pt", "Eff. vs. pt, (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",          ""},
670   {"trackingCorrectionV0Pt3SPDany_pt",   "Eff. vs. pt, (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",            ""},
671   {"trackingCorrectionV0Pt3SPDfirst_pt", "Eff. vs. pt, (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",          ""},
672   {"trackingCorrectionV0Pt4SPDany_pt",   "Eff. vs. pt, (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",            ""},
673   {"trackingCorrectionV0Pt4SPDfirst_pt", "Eff. vs. pt, (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",          ""},
674   {"trackingCorrectionV0Pt5SPDany_pt",   "Eff. vs. pt, (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",            ""},
675   {"trackingCorrectionV0Pt5SPDfirst_pt", "Eff. vs. pt, (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",          ""},
676   {"trackingCorrectionV0Pt6SPDany_pt",   "Eff. vs. pt, (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",           ""},
677   {"trackingCorrectionV0Pt6SPDfirst_pt", "Eff. vs. pt, (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",         ""},
678   // tracking corrections with V0 cuts, cosThetaCS dependence
679   {"trackingCorrectionV0SPDany_ThetaCS",      "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",       ""},
680   {"trackingCorrectionV0SPDfirst_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",     ""},
681   {"trackingCorrectionY1V0SPDany_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",       ""},
682   {"trackingCorrectionY1V0SPDfirst_ThetaCS",  "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",     ""},
683   {"trackingCorrectionY2V0SPDany_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",     ""},
684   {"trackingCorrectionY2V0SPDfirst_ThetaCS",  "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",   ""},
685   {"trackingCorrectionY3V0SPDany_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)",   ""},
686   {"trackingCorrectionY3V0SPDfirst_ThetaCS",  "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)", ""},
687   {"trackingCorrectionV0Pt1SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",              ""},
688   {"trackingCorrectionV0Pt1SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",            ""},
689   {"trackingCorrectionV0Pt2SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",            ""},
690   {"trackingCorrectionV0Pt2SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",          ""},
691   {"trackingCorrectionV0Pt3SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",            ""},
692   {"trackingCorrectionV0Pt3SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",          ""},
693   {"trackingCorrectionV0Pt4SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",            ""},
694   {"trackingCorrectionV0Pt4SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",          ""},
695   {"trackingCorrectionV0Pt5SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",            ""},
696   {"trackingCorrectionV0Pt5SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",          ""},
697   {"trackingCorrectionV0Pt6SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",           ""},
698   {"trackingCorrectionV0Pt6SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",         ""},
699   // tracking corrections with V0 cuts, cosThetaHE dependence
700   {"trackingCorrectionV0SPDany_ThetaHE",      "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",       ""},
701   {"trackingCorrectionV0SPDfirst_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",     ""},
702   {"trackingCorrectionY1V0SPDany_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",       ""},
703   {"trackingCorrectionY1V0SPDfirst_ThetaHE",  "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",     ""},
704   {"trackingCorrectionY2V0SPDany_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",     ""},
705   {"trackingCorrectionY2V0SPDfirst_ThetaHE",  "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",   ""},
706   {"trackingCorrectionY3V0SPDany_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)",   ""},
707   {"trackingCorrectionY3V0SPDfirst_ThetaHE",  "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)", ""},
708   {"trackingCorrectionV0Pt1SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",              ""},
709   {"trackingCorrectionV0Pt1SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",            ""},
710   {"trackingCorrectionV0Pt2SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",            ""},
711   {"trackingCorrectionV0Pt2SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",          ""},
712   {"trackingCorrectionV0Pt3SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",            ""},
713   {"trackingCorrectionV0Pt3SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",          ""},
714   {"trackingCorrectionV0Pt4SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",            ""},
715   {"trackingCorrectionV0Pt4SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",          ""},
716   {"trackingCorrectionV0Pt5SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",            ""},
717   {"trackingCorrectionV0Pt5SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",          ""},
718   {"trackingCorrectionV0Pt6SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",           ""},
719   {"trackingCorrectionV0Pt6SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (tracking +V0 cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",         ""},
720
721   // pid corrections, pt dependence
722   {"pidCorrectionSPDany_pt",      "Eff. vs. pt, (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",       ""},
723   {"pidCorrectionSPDfirst_pt",    "Eff. vs. pt, (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",     ""},
724   {"pidCorrectionY1SPDany_pt",    "Eff. vs. pt, (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",       ""},
725   {"pidCorrectionY1SPDfirst_pt",  "Eff. vs. pt, (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",     ""},
726   {"pidCorrectionY2SPDany_pt",    "Eff. vs. pt, (pid cuts, SPD any, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",     ""},
727   {"pidCorrectionY2SPDfirst_pt",  "Eff. vs. pt, (pid cuts, SPD first, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",   ""},
728   {"pidCorrectionY3SPDany_pt",    "Eff. vs. pt, (pid cuts, SPD any, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)",   ""},
729   {"pidCorrectionY3SPDfirst_pt",  "Eff. vs. pt, (pid cuts, SPD first, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)", ""},
730   {"pidCorrectionPt1SPDany_pt",   "Eff. vs. pt, (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",              ""},
731   {"pidCorrectionPt1SPDfirst_pt", "Eff. vs. pt, (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",            ""},
732   {"pidCorrectionPt2SPDany_pt",   "Eff. vs. pt, (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",            ""},
733   {"pidCorrectionPt2SPDfirst_pt", "Eff. vs. pt, (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",          ""},
734   {"pidCorrectionPt3SPDany_pt",   "Eff. vs. pt, (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",            ""},
735   {"pidCorrectionPt3SPDfirst_pt", "Eff. vs. pt, (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",          ""},
736   {"pidCorrectionPt4SPDany_pt",   "Eff. vs. pt, (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",            ""},
737   {"pidCorrectionPt4SPDfirst_pt", "Eff. vs. pt, (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",          ""},
738   {"pidCorrectionPt5SPDany_pt",   "Eff. vs. pt, (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",            ""},
739   {"pidCorrectionPt5SPDfirst_pt", "Eff. vs. pt, (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",          ""},
740   {"pidCorrectionPt6SPDany_pt",   "Eff. vs. pt, (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",           ""},
741   {"pidCorrectionPt6SPDfirst_pt", "Eff. vs. pt, (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",         ""},
742   // pid corrections, cosThetaCS dependence
743   {"pidCorrectionSPDany_ThetaCS",      "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",       ""},
744   {"pidCorrectionSPDfirst_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",     ""},
745   {"pidCorrectionY1SPDany_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",       ""},
746   {"pidCorrectionY1SPDfirst_ThetaCS",  "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",     ""},
747   {"pidCorrectionY2SPDany_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD any, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",     ""},
748   {"pidCorrectionY2SPDfirst_ThetaCS",  "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD first, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",   ""},
749   {"pidCorrectionY3SPDany_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD any, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)",   ""},
750   {"pidCorrectionY3SPDfirst_ThetaCS",  "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD first, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)", ""},
751   {"pidCorrectionPt1SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",              ""},
752   {"pidCorrectionPt1SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",            ""},
753   {"pidCorrectionPt2SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",            ""},
754   {"pidCorrectionPt2SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",          ""},
755   {"pidCorrectionPt3SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",            ""},
756   {"pidCorrectionPt3SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",          ""},
757   {"pidCorrectionPt4SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",            ""},
758   {"pidCorrectionPt4SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",          ""},
759   {"pidCorrectionPt5SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",            ""},
760   {"pidCorrectionPt5SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",          ""},
761   {"pidCorrectionPt6SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",           ""},
762   {"pidCorrectionPt6SPDfirst_ThataCS", "Eff. vs. cos(#theta_{CS}), (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",         ""},
763   // pid corrections, cosThetaHE dependence
764   {"pidCorrectionSPDany_ThetaHE",      "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",       ""},
765   {"pidCorrectionSPDfirst_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<10.0 GeV/c)",     ""},
766   {"pidCorrectionY1SPDany_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",       ""},
767   {"pidCorrectionY1SPDfirst_ThetaHE",  "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.3 & 0<pt<10.0 GeV/c)",     ""},
768   {"pidCorrectionY2SPDany_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD any, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",     ""},
769   {"pidCorrectionY2SPDfirst_ThetaHE",  "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD first, TPC PID)/(J/#Psi in 0.3<y<0.9 & 0<pt<10.0 GeV/c)",   ""},
770   {"pidCorrectionY3SPDany_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD any, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)",   ""},
771   {"pidCorrectionY3SPDfirst_ThetaHE",  "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD first, TPC PID)/(J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c)", ""},
772   {"pidCorrectionPt1SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",              ""},
773   {"pidCorrectionPt1SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 0<pt<1.0)",            ""},
774   {"pidCorrectionPt2SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",            ""},
775   {"pidCorrectionPt2SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 1.0<pt<2.0)",          ""},
776   {"pidCorrectionPt3SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",            ""},
777   {"pidCorrectionPt3SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 2.0<pt<3.0)",          ""},
778   {"pidCorrectionPt4SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",            ""},
779   {"pidCorrectionPt4SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 3.0<pt<5.0)",          ""},
780   {"pidCorrectionPt5SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",            ""},
781   {"pidCorrectionPt5SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 5.0<pt<7.0)",          ""},
782   {"pidCorrectionPt6SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD any, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",           ""},
783   {"pidCorrectionPt6SPDfirst_ThataHE", "Eff. vs. cos(#theta_{HE}), (pid cuts, SPD first, TPC PID)/(J/#Psi in |y|<0.9 & 7.0<pt<10.0)",         ""},
784   // correction for the invariant mass integration range, pt dependence
785   {"signalFractionSPDany_pt",      "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 0<pt<10.0 GeV/c",      "any,-0.9,0.9,0.0,10.0"},
786   {"signalFractionSPDfirst_pt",    "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 0<pt<10.0 GeV/c",    "first,-0.9,0.9,0.0,10.0"},
787   {"signalFractionY1SPDany_pt",    "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.3<y<+0.3 & 0<pt<10.0 GeV/c",      "any,-0.3,0.3,0.0,10.0"},
788   {"signalFractionY1SPDfirst_pt",  "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.3<y<+0.3 & 0<pt<10.0 GeV/c",    "first,-0.3,0.3,0.0,10.0"},
789   {"signalFractionY2SPDany_pt",    "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in 0.3<y<+0.9 & 0<pt<10.0 GeV/c",       "any,0.3,0.9,0.0,10.0"},
790   {"signalFractionY2SPDfirst_pt",  "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in 0.3<y<+0.9 & 0<pt<10.0 GeV/c",     "first,0.3,0.9,0.0,10.0"},
791   {"signalFractionY3SPDany_pt",    "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c",      "any,-0.9,-0.3,0.0,10.0"},
792   {"signalFractionY3SPDfirst_pt",  "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c",    "first,-0.9,-0.3,0.0,10.0"},
793   {"signalFractionPt1SPDany_pt",   "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 0<pt<1.0 GeV/c",       "any,-0.9,0.9,0.0,1.0"},
794   {"signalFractionPt1SPDfirst_pt", "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 0<pt<1.0 GeV/c",     "first,-0.9,0.9,0.0,1.0"},
795   {"signalFractionPt2SPDany_pt",   "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 1.0<pt<2.0 GeV/c",     "any,-0.9,0.9,1.0,2.0"},
796   {"signalFractionPt2SPDfirst_pt", "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 1.0<pt<2.0 GeV/c",   "first,-0.9,0.9,1.0,2.0"},
797   {"signalFractionPt3SPDany_pt",   "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 2.0<pt<3.0 GeV/c",     "any,-0.9,0.9,2.0,3.0"},
798   {"signalFractionPt3SPDfirst_pt", "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 2.0<pt<3.0 GeV/c",   "first,-0.9,0.9,2.0,3.0"},
799   {"signalFractionPt4SPDany_pt",   "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 3.0<pt<5.0 GeV/c",     "any,-0.9,0.9,3.0,5.0"},
800   {"signalFractionPt4SPDfirst_pt", "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 3.0<pt<5.0 GeV/c",   "first,-0.9,0.9,3.0,5.0"},
801   {"signalFractionPt5SPDany_pt",   "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 5.0<pt<7.0 GeV/c",    "any,-0.9,0.9,5.0,7.0"},
802   {"signalFractionPt5SPDfirst_pt", "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 5.0<pt<7.0 GeV/c",  "first,-0.9,0.9,5.0,7.0"},
803   {"signalFractionPt6SPDany_pt",   "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 7.0<pt<10.0 GeV/c",    "any,-0.9,0.9,7.0,10.0"},
804   {"signalFractionPt6SPDfirst_pt", "Eff. vs. pt, (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 7.0<pt<10.0 GeV/c",  "first,-0.9,0.9,7.0,10.0"},
805   // correction for the invariant mass integration range, cosThetaCS dependence
806   {"signalFractionSPDany_ThetaCS",      "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 0<pt<10.0 GeV/c",      ""},
807   {"signalFractionSPDfirst_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 0<pt<10.0 GeV/c",    ""},
808   {"signalFractionY1SPDany_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.3<y<+0.3 & 0<pt<10.0 GeV/c",      ""},
809   {"signalFractionY1SPDfirst_ThetaCS",  "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.3<y<+0.3 & 0<pt<10.0 GeV/c",    ""},
810   {"signalFractionY2SPDany_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in 0.3<y<+0.9 & 0<pt<10.0 GeV/c",       ""},
811   {"signalFractionY2SPDfirst_ThetaCS",  "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in 0.3<y<+0.9 & 0<pt<10.0 GeV/c",     ""},
812   {"signalFractionY3SPDany_ThetaCS",    "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c",      ""},
813   {"signalFractionY3SPDfirst_ThetaCS",  "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c",    ""},
814   {"signalFractionPt1SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 0<pt<1.0 GeV/c",       ""},
815   {"signalFractionPt1SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 0<pt<1.0 GeV/c",     ""},
816   {"signalFractionPt2SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 1.0<pt<2.0 GeV/c",     ""},
817   {"signalFractionPt2SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 1.0<pt<2.0 GeV/c",   ""},
818   {"signalFractionPt3SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 2.0<pt<3.0 GeV/c",     ""},
819   {"signalFractionPt3SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 2.0<pt<3.0 GeV/c",   ""},
820   {"signalFractionPt4SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 3.0<pt<5.0 GeV/c",     ""},
821   {"signalFractionPt4SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 3.0<pt<5.0 GeV/c",   ""},
822   {"signalFractionPt5SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 5.0<pt<7.0 GeV/c",    ""},
823   {"signalFractionPt5SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 5.0<pt<7.0 GeV/c",  ""},
824   {"signalFractionPt6SPDany_ThetaCS",   "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 7.0<pt<10.0 GeV/c",    ""},
825   {"signalFractionPt6SPDfirst_ThetaCS", "Eff. vs. cos(#theta_{CS}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 7.0<pt<10.0 GeV/c",  ""},  
826
827   // correction for the invariant mass integration range, cosThetaHE dependence
828   {"signalFractionSPDany_ThetaHE",      "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 0<pt<10.0 GeV/c",      ""},
829   {"signalFractionSPDfirst_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 0<pt<10.0 GeV/c",    ""},
830   {"signalFractionY1SPDany_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.3<y<+0.3 & 0<pt<10.0 GeV/c",      ""},
831   {"signalFractionY1SPDfirst_ThetaHE",  "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.3<y<+0.3 & 0<pt<10.0 GeV/c",    ""},
832   {"signalFractionY2SPDany_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in 0.3<y<+0.9 & 0<pt<10.0 GeV/c",       ""},
833   {"signalFractionY2SPDfirst_ThetaHE",  "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in 0.3<y<+0.9 & 0<pt<10.0 GeV/c",     ""},
834   {"signalFractionY3SPDany_ThetaHE",    "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c",      ""},
835   {"signalFractionY3SPDfirst_ThetaHE",  "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<-0.3 & 0<pt<10.0 GeV/c",    ""},
836   {"signalFractionPt1SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 0<pt<1.0 GeV/c",       ""},
837   {"signalFractionPt1SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 0<pt<1.0 GeV/c",     ""},
838   {"signalFractionPt2SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 1.0<pt<2.0 GeV/c",     ""},
839   {"signalFractionPt2SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 1.0<pt<2.0 GeV/c",   ""},
840   {"signalFractionPt3SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 2.0<pt<3.0 GeV/c",     ""},
841   {"signalFractionPt3SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 2.0<pt<3.0 GeV/c",   ""},
842   {"signalFractionPt4SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 3.0<pt<5.0 GeV/c",     ""},
843   {"signalFractionPt4SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 3.0<pt<5.0 GeV/c",   ""},
844   {"signalFractionPt5SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 5.0<pt<7.0 GeV/c",    ""},
845   {"signalFractionPt5SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 5.0<pt<7.0 GeV/c",  ""},
846   {"signalFractionPt6SPDany_ThetaHE",   "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD any, J/#Psi in -0.9<y<+0.9 & 7.0<pt<10.0 GeV/c",    ""},
847   {"signalFractionPt6SPDfirst_ThetaHE", "Eff. vs. cos(#theta_{HE}), (2.92<M_{inv}<3.16) / (0.0<M_{inv}<5.0), SPD first, J/#Psi in -0.9<y<+0.9 & 7.0<pt<10.0 GeV/c",  ""}
848
849 };
850
851
852 // Function prototypes ---------------------------------------------------
853 Double_t* GetBinning(AliCFContainer* cont, Int_t variable, Int_t& nBins);
854 void FillHistograms(TObjArray* histosArray, AliCFContainer* cont, Int_t currentRangeStep, Bool_t firstTime);
855 void GetBinLimits(AliCFContainer* cont);
856 void DefineHistograms(TObjArray* objArray, Int_t iCutSet);
857 void AddHistogram(TObjArray* objArray, Int_t ndim, 
858                   const Char_t* name, const Char_t* title, 
859                   Int_t nbinsx, Double_t* binsx, const Char_t* xLabel = "",
860                   Int_t nbinsy=0, Double_t* binsy=0, const Char_t* yLabel = "",
861                   Int_t nbinsz=0, Double_t* binsz=0, const Char_t* zLabel = "");
862 void ProjectManyRuns(const Char_t* runList, const Char_t* pattern, Int_t howMany=1, Int_t offset = 0);
863 void ProjectAll(const Char_t* inputList, const Char_t* outfilename="HistosFromCFs.root", 
864                 Int_t howMany=1, Int_t offset=0);
865 void ExtractEfficienciesMany(const Char_t* runList, const Char_t* pattern, const Char_t* outAscii, Int_t howMany=1, Int_t offset=0);
866 void ExtractEfficiencies(const Char_t* inputFile, const Char_t* outfilename="Efficiencies.root", const Char_t* numbersFile="");
867 TH1* DivideHists(TH1* nominator, TH1* denominator, Int_t dimension);
868 //-------------------------------------------------------------------------
869
870
871 //_______________________________________________________________________________________
872 void ProjectManyRuns(const Char_t* runList,
873                      const Char_t* pattern, 
874                      Int_t howMany, Int_t offset) {
875   //
876   //
877   //
878   
879   // loop over all runs -----------------------
880   ifstream input; input.open(runList);
881   Int_t runCounter = 0;
882   while(input.good()) {
883     Char_t readString[256];
884     input.getline(readString, 256, '\n');  // get a chunk
885     TString runStr = readString;
886     Int_t run = runStr.Atoi();
887     if(run<=0) continue;
888
889     if(runCounter<offset) {
890       runCounter++;
891       continue;
892     }
893     if(runCounter>=offset+howMany) 
894       break;
895
896     cout << "=================== run " << run << " ============================" << endl;
897
898     ProjectAll(Form("%s/%s/listCF.txt", pattern, readString), 
899                Form("%s/%s/Projections.root",pattern, readString), 
900                100, 0);
901     runCounter++;
902   }
903 }
904
905
906 //_______________________________________________________________________________________
907 void ProjectAll(const Char_t* inputList, 
908                 const Char_t* outfilename, 
909                 Int_t howMany, Int_t offset) {
910   //
911   //  Main function for making projections from a list of CF containers (inputList).
912   //  The resulting histograms are placed in the ROOT file specified by outfilename
913   //
914   //  Modify the global variables above to match your requirements
915   //
916
917   // open the output file
918   TFile *outFile = new TFile(outfilename,"RECREATE");
919   // -----------------------------------------------------------------------------
920
921   // copy the current ExtractEfficiency macro in the same dir as the output file
922   TString outStr = "";
923   outStr += outfilename;
924   outStr.ReplaceAll(".root", "_ExtractEfficienciesMacro.C");
925   gSystem->Exec(Form("cp ExtractEfficiencies.C %s", outStr.Data()));
926   // ---------------------------------------------------------------------------
927   
928   // create the container for all the histograms ---------------------
929   TObjArray *histoArray=new TObjArray();
930   histoArray->SetOwner();
931   //------------------------------------------------------------------
932
933   
934   // loop over all CF files, project and merge -----------------------
935   ifstream input; input.open(inputList);
936   Int_t currentFile=0;
937   Bool_t firstTime = kTRUE;
938   while(input.good()) {
939     Char_t readString[256];
940     input.getline(readString, 256, '\n');  // get a chunk
941     TString readStringString = readString;
942     if(readStringString[0]!='/') continue;
943     if(!readStringString.Contains(".root")) continue;
944
945     if(currentFile<offset) {
946       currentFile++;
947       continue;
948     }
949     if(currentFile>=offset+howMany) 
950       break;
951
952     cout << "file: " << readString << endl;
953
954     AliDielectronCFdraw *cf=new AliDielectronCFdraw(readString);
955     AliCFContainer* cont=cf->GetCFContainer();
956
957     // ****************************************************************************
958     // Below apply all your cut sets then call the FillHistograms() function
959     // Don't forget to increment the "currentCutSet" variable after every cut set
960     // ****************************************************************************
961
962     // pair type (0 ++, 1 +-, 2 --) ----------------------------------
963     cf->SetRangeUser("PairType", 1.1, 1.9);
964     // Pair rapidity cut
965     cf->SetRangeUser("Y", -0.899, 0.899);
966     cf->SetRangeUser("Pt", 0.001, 9.999);
967     Int_t currentCutSet = 0;
968     FillHistograms(histoArray, cont, currentCutSet, firstTime);
969
970     // j/psi -0.3<y<0.3 ----------------------------------------------------
971     cf->SetRangeUser("Y", -0.299, 0.299);
972     currentCutSet++;
973     FillHistograms(histoArray, cont, currentCutSet, firstTime);
974
975     // j/psi 0.3<y<0.9 ----------------------------------------------------
976     cf->SetRangeUser("Y", 0.301, 0.899);
977     currentCutSet++;
978     FillHistograms(histoArray, cont, currentCutSet, firstTime);
979
980     // j/psi -0.9<y<-0.3 ----------------------------------------------------
981     cf->SetRangeUser("Y", -0.899, -0.301);
982     currentCutSet++;
983     FillHistograms(histoArray, cont, currentCutSet, firstTime);
984
985     // j/psi 0<pt<1.0 ----------------------------------------------------
986     cf->SetRangeUser("Y", -0.899, 0.899);
987     cf->SetRangeUser("Pt", 0.001, 0.999);
988     currentCutSet++;
989     FillHistograms(histoArray, cont, currentCutSet, firstTime);
990
991     // j/psi 1.0<pt<2.0 ----------------------------------------------------
992     cf->SetRangeUser("Pt", 1.001, 1.999);
993     currentCutSet++;
994     FillHistograms(histoArray, cont, currentCutSet, firstTime);
995
996     // j/psi 2.0<pt<3.0 ----------------------------------------------------
997     cf->SetRangeUser("Pt", 2.001, 2.999);
998     currentCutSet++;
999     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1000
1001     // j/psi 3.0<pt<5.0 ----------------------------------------------------
1002     cf->SetRangeUser("Pt", 3.001, 4.999);
1003     currentCutSet++;
1004     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1005
1006     // j/psi 5.0<pt<7.0 ----------------------------------------------------
1007     cf->SetRangeUser("Pt", 5.001, 6.999);
1008     currentCutSet++;
1009     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1010
1011     // j/psi 7.0<pt<10.0 ----------------------------------------------------
1012     cf->SetRangeUser("Pt", 7.001, 9.999);
1013     currentCutSet++;
1014     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1015
1016     // Leg pseudo-rapidity cut ---------------------------------------
1017     cf->SetRangeUser("Pt", 0.001, 9.999);
1018     cf->SetRangeUser("Y", -0.899, 0.899);
1019     cf->SetRangeUser("Leg1_Eta", -0.899, 0.899);
1020     cf->SetRangeUser("Leg2_Eta", -0.899, 0.899);
1021     cf->SetRangeUser("Leg1_Pt", 1.001, 10.0);
1022     cf->SetRangeUser("Leg2_Pt", 1.001, 10.0);
1023     cf->SetRangeUser("Leg1_NclsTPC", 70.1, 160.0);
1024     cf->SetRangeUser("Leg2_NclsTPC", 70.1, 160.0);
1025     currentCutSet++;
1026     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1027
1028     // j/psi -0.3<y<0.3 ----------------------------------------------------
1029     cf->SetRangeUser("Y", -0.299, 0.299);
1030     currentCutSet++;
1031     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1032
1033     // j/psi 0.3<y<0.9 ----------------------------------------------------
1034     cf->SetRangeUser("Y", 0.301, 0.899);
1035     currentCutSet++;
1036     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1037
1038     // j/psi -0.9<y<-0.3 ----------------------------------------------------
1039     cf->SetRangeUser("Y", -0.899, -0.301);
1040     currentCutSet++;
1041     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1042
1043     // j/psi 0<pt<1.0 ----------------------------------------------------
1044     cf->SetRangeUser("Y", -0.899, 0.899);
1045     cf->SetRangeUser("Pt", 0.001, 0.999);
1046     currentCutSet++;
1047     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1048
1049     // j/psi 1.0<pt<2.0 ----------------------------------------------------
1050     cf->SetRangeUser("Pt", 1.001, 1.999);
1051     currentCutSet++;
1052     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1053
1054     // j/psi 2.0<pt<3.0 ----------------------------------------------------
1055     cf->SetRangeUser("Pt", 2.001, 2.999);
1056     currentCutSet++;
1057     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1058
1059     // j/psi 3.0<pt<5.0 ----------------------------------------------------
1060     cf->SetRangeUser("Pt", 3.001, 4.999);
1061     currentCutSet++;
1062     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1063
1064     // j/psi 5.0<pt<7.0 ----------------------------------------------------
1065     cf->SetRangeUser("Pt", 5.001, 6.999);
1066     currentCutSet++;
1067     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1068
1069     // j/psi 7.0<pt<10.0 ----------------------------------------------------
1070     cf->SetRangeUser("Pt", 7.001, 9.999);
1071     currentCutSet++;
1072     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1073
1074     
1075     // j/psi 2.92<M<3.16
1076     cf->SetRangeUser("Pt", 0.001, 9.999);
1077     cf->SetRangeUser("Y", -0.899, 0.899);
1078     cf->SetRangeUser("M", 2.9201, 3.1599);
1079     currentCutSet++;
1080     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1081
1082     // j/psi -0.3<y<0.3 ----------------------------------------------------
1083     cf->SetRangeUser("Y", -0.299, 0.299);
1084     currentCutSet++;
1085     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1086
1087     // j/psi 0.3<y<0.9 ----------------------------------------------------
1088     cf->SetRangeUser("Y", 0.301, 0.899);
1089     currentCutSet++;
1090     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1091
1092     // j/psi -0.9<y<-0.3 ----------------------------------------------------
1093     cf->SetRangeUser("Y", -0.899, -0.301);
1094     currentCutSet++;
1095     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1096
1097     // j/psi 0<pt<1.0 ----------------------------------------------------
1098     cf->SetRangeUser("Pt", 0.001, 0.999);
1099     cf->SetRangeUser("Y", -0.899, 0.899);
1100     currentCutSet++;
1101     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1102
1103     // j/psi 1.0<pt<2.0 ----------------------------------------------------
1104     cf->SetRangeUser("Pt", 1.001, 1.999);
1105     currentCutSet++;
1106     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1107
1108     // j/psi 2.0<pt<3.0 ----------------------------------------------------
1109     cf->SetRangeUser("Pt", 2.001, 2.999);
1110     currentCutSet++;
1111     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1112
1113     // j/psi 3.0<pt<5.0 ----------------------------------------------------
1114     cf->SetRangeUser("Pt", 3.001, 4.999);
1115     currentCutSet++;
1116     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1117
1118     // j/psi 5.0<pt<7.0 ----------------------------------------------------
1119     cf->SetRangeUser("Pt", 5.001, 6.999);
1120     currentCutSet++;
1121     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1122
1123     // j/psi 7.0<pt<10.0 ----------------------------------------------------
1124     cf->SetRangeUser("Pt", 7.001, 9.999);
1125     currentCutSet++;
1126     FillHistograms(histoArray, cont, currentCutSet, firstTime);
1127     
1128
1129     currentFile++;
1130     firstTime = kFALSE;
1131     delete cont;
1132     delete cf;
1133   }  // end loop over CF files
1134
1135   outFile->cd();  
1136   histoArray->Write();
1137   outFile->Close();
1138   delete histoArray;
1139   return;
1140 }
1141
1142
1143 //_______________________________________________________________________________________
1144 void ExtractEfficienciesMany(const Char_t* runList, const Char_t* pattern, const Char_t* outAscii, Int_t howMany, Int_t offset) {
1145   //
1146   //
1147   //
1148
1149   // loop over all runs -----------------------
1150   ifstream input; input.open(runList);
1151   Int_t runCounter = 0;
1152
1153   TGraphErrors* trends[gkNeffs];
1154   Double_t weightedEffs[gkNeffs];
1155   Double_t weightedErrs[gkNeffs];
1156   Int_t nPoints[gkNeffs];
1157   Double_t nTotalEvents[gkNeffs];
1158   for(Int_t iTrend=0; iTrend<gkNeffs; iTrend++) {
1159     trends[iTrend] = new TGraphErrors();
1160     trends[iTrend]->SetName(gkEffNames[iTrend][0]);
1161     trends[iTrend]->SetTitle(gkEffNames[iTrend][1]);
1162     weightedEffs[iTrend] = 0.0; weightedErrs[iTrend] = 0.0;
1163     nPoints[iTrend] = 0;
1164     nTotalEvents[iTrend] = 0;
1165   }
1166   TFile* file=0x0;
1167   TFile* normalizationFile=0x0;
1168   TNamed* object;
1169   
1170   while(input.good()) {
1171     Char_t readString[256];
1172     input.getline(readString, 256, '\n');  // get a chunk
1173     TString runStr = readString;
1174     Int_t run = runStr.Atoi();
1175
1176     if(run<=0) continue;
1177
1178     if(runCounter<offset) {
1179       runCounter++;
1180       continue;
1181     }
1182     if(runCounter>=offset+howMany) 
1183       break;
1184
1185     cout << "=================== run " << run << " ============================" << endl;
1186     TString periodStr;
1187     if(run<=117222) periodStr = "LHC10b.pass2";
1188     if(run>117222 && run<=120829) periodStr = "LHC10c.pass2";
1189     if(run>121000 && run<=126437) periodStr = "LHC10d.pass2";
1190     Double_t nPhysicsEvents = 0;
1191     normalizationFile = TFile::Open(Form("/lustre/alice/train/V006.pp/2011-03-18_2242.6024/mergedRuns/pp/7TeV/%s/%d.ana/iarsene_normalization.root", periodStr.Data(), run));
1192     cout << "# physics events = ";
1193     if(normalizationFile) {
1194       TObjArray *histos=(TObjArray*)normalizationFile->Get("iarsene_normalization");
1195       TH1I* triggers=(TH1I*)histos->FindObject("TriggersHistogram");
1196       nPhysicsEvents = triggers->GetBinContent(2);   // PHYSICS events
1197       cout << nPhysicsEvents;
1198       normalizationFile->Close();
1199     }
1200     else
1201       cout << " NOT FOUND";
1202     cout << endl;
1203
1204     ExtractEfficiencies(Form("%s/%s/Projections.root",pattern,readString), 
1205                         Form("%s/%s/Efficiencies.root",pattern,readString));
1206     file = TFile::Open(Form("%s/%s/Efficiencies.root",pattern,readString));
1207     if(file && !file->IsZombie()) {   
1208       for(Int_t iTrend=0; iTrend<gkNeffs; iTrend++) {
1209         object = (TNamed*)file->Get(Form("%s_value",gkEffNames[iTrend][0]));
1210         if(!object) continue;
1211         Float_t eff = (TString(object->GetTitle())).Atof();
1212         trends[iTrend]->SetPoint(nPoints[iTrend], run, eff);
1213         object = (TNamed*)file->Get(Form("%s_error",gkEffNames[iTrend][0]));
1214         if(!object) continue;
1215         Float_t err = (TString(object->GetTitle())).Atof();
1216         trends[iTrend]->SetPointError(nPoints[iTrend], 0.0, err);
1217         weightedEffs[iTrend] += nPhysicsEvents*eff;
1218         weightedErrs[iTrend] += nPhysicsEvents*nPhysicsEvents*err*err;
1219         nTotalEvents[iTrend] += nPhysicsEvents;
1220         //      cout << "trend " << iTrend << "; eff = " << eff << endl;
1221         nPoints[iTrend]+=1;
1222       }
1223       file->Close();
1224     }
1225     if(normalizationFile)
1226       normalizationFile->Close();
1227     runCounter++;
1228   }
1229
1230   // write the efficiencies also in an ascii file
1231   ofstream asciiOut;
1232   asciiOut.open(outAscii);
1233
1234   TFile *saveTrend = new TFile(Form("%s.trend.root", runList), "RECREATE");
1235   TNamed *weightedFactors;
1236   TNamed *weightedErrors;
1237   TNamed *nEventsObject;
1238   for(Int_t iTrend=0; iTrend<gkNeffs; iTrend++) {
1239     trends[iTrend]->Write();
1240     weightedEffs[iTrend] /= nTotalEvents[iTrend];
1241     weightedErrs[iTrend] = TMath::Sqrt(weightedErrs[gkNeffs])/nTotalEvents[iTrend];
1242     weightedFactors = new TNamed(Form("%s_weighted", gkEffNames[iTrend][0]),
1243                                  Form("%f", weightedEffs[iTrend]));
1244     weightedErrors = new TNamed(Form("%s_weightedErr", gkEffNames[iTrend][0]),
1245                                  Form("%f", weightedErrs[iTrend]));
1246     weightedFactors->Write();
1247     weightedErrors->Write();
1248     nEventsObject = new TNamed(Form("TotalEvents_%s",gkEffNames[iTrend][0]), Form("%f",nTotalEvents[iTrend]));
1249     nEventsObject->Write();
1250     // write a table into an ascii file ---------------------------------
1251     TString effNameStr(gkEffNames[iTrend][2]);
1252     // The array contains y,pt rapidity intervals for this efficiency, and/or other variables
1253     // Always, the first element of the array should be "any" or "first"
1254     TObjArray* array = effNameStr.Tokenize(",");
1255     if(array->GetEntries()<=1) continue;
1256     asciiOut << iTrend << "\t";
1257     if(((TObjString*)array->At(0))->GetString()=="any")
1258       asciiOut << "1";
1259     else if(((TObjString*)array->At(0))->GetString()=="first")
1260       asciiOut << "2";
1261     for(Int_t iStr=1; iStr<array->GetEntries(); iStr++)
1262       asciiOut << "\t" << ((TObjString*)array->At(iStr))->GetString().Data();
1263     asciiOut << "\t " << weightedEffs[iTrend] << endl;
1264   }
1265   // At the end of the ascii file write the format and brief explanations
1266   asciiOut << endl;
1267   asciiOut << "# Format:  efficiencyId    SPD(1-any/2-first)     yLow       yHigh      ptLow      ptHigh      efficiency" << endl;
1268   asciiOut << "# Efficiency descriptions (based on efficiencyId) : " << endl;
1269   for(Int_t iTrend=0; iTrend<gkNeffs; iTrend++) {
1270     TString effNameStr(gkEffNames[iTrend][2]);
1271     TObjArray* array = effNameStr.Tokenize(",");
1272     if(array->GetEntries()<=1) continue;
1273     asciiOut << "# " << iTrend << " - " << gkEffNames[iTrend][1] << endl;
1274   }
1275
1276   saveTrend->Close();
1277 }
1278
1279 //_______________________________________________________________________________________
1280 void ExtractEfficiencies(const Char_t* inputFilename,
1281                          const Char_t* outfilename,
1282                          const Char_t* numbersFile) {
1283   //
1284   // Main function to extract efficiencies
1285   //
1286
1287   // Open the output file
1288   TFile *output = new TFile(outfilename, "RECREATE");
1289   // ---------------------------------------------------------------------------
1290
1291   // copy the current ExtractEfficiency macro in the same dir as the output file
1292   TString outStr = "";
1293   outStr += outfilename;
1294   outStr.ReplaceAll(".root", "_ExtractEfficienciesMacro.C");
1295   gSystem->Exec(Form("cp ExtractEfficiencies.C %s", outStr.Data()));
1296   // ---------------------------------------------------------------------------
1297
1298   // open the input file and read out all the histograms
1299   TFile *file = TFile::Open(inputFilename);
1300   if(!file || file->IsZombie()) return;
1301   
1302   TObjArray *effArray = new TObjArray();
1303   effArray->SetOwner();
1304   TH1* nominator;
1305   TH1* denominator;
1306   TNamed* effValue;
1307   TNamed* effError;
1308   ofstream asciiOut;
1309   if(numbersFile[0]!='\0') {
1310     asciiOut.open(numbersFile);
1311     asciiOut << "#Format:  Name  |  Value   |   Abs. Error" << endl;
1312   }
1313   for(Int_t iEff=0; iEff<gkNeffs; iEff++) {
1314     //    cout << gkEffNames[iEff][0] << " (" << gkEffNames[iEff][1] << " )" << endl;
1315     if(gkDims[gkEffs[iEff][2]][0]==1) {      // 1-dim histos
1316       nominator = (TH1D*)(file->Get(Form("%s_%s_%s",gkStepNames[gkEffs[iEff][0]][0],
1317                                           gkCutSetNames[gkEffs[iEff][1]][0],
1318                                           gkHistoNames[gkEffs[iEff][2]][0])));
1319       denominator = (TH1D*)(file->Get(Form("%s_%s_%s",gkStepNames[gkEffs[iEff][3]][0],
1320                                             gkCutSetNames[gkEffs[iEff][4]][0],
1321                                             gkHistoNames[gkEffs[iEff][5]][0])));
1322       if(!nominator) continue;
1323       if(!denominator) continue;
1324       nominator->GetYaxis()->SetTitle("efficiency");
1325     }
1326     if(gkDims[gkEffs[iEff][2]][0]==2) {      // 2-dim histos
1327       nominator = (TH2D*)(file->Get(Form("%s_%s_%s",gkStepNames[gkEffs[iEff][0]][0],
1328                                           gkCutSetNames[gkEffs[iEff][1]][0],
1329                                           gkHistoNames[gkEffs[iEff][2]][0])));
1330       denominator = (TH2D*)(file->Get(Form("%s_%s_%s",gkStepNames[gkEffs[iEff][3]][0],
1331                                             gkCutSetNames[gkEffs[iEff][4]][0],
1332                                             gkHistoNames[gkEffs[iEff][5]][0])));
1333       if(!nominator) continue;
1334       if(!denominator) continue;
1335       nominator->GetZaxis()->SetTitle("efficiency");
1336     }
1337     if(gkDims[gkEffs[iEff][2]][0]==3) {      // 3-dim histos
1338       nominator = (TH3D*)(file->Get(Form("%s_%s_%s",gkStepNames[gkEffs[iEff][0]][0],
1339                                           gkCutSetNames[gkEffs[iEff][1]][0],
1340                                           gkHistoNames[gkEffs[iEff][2]][0])));
1341       denominator = (TH3D*)(file->Get(Form("%s_%s_%s",gkStepNames[gkEffs[iEff][3]][0],
1342                                             gkCutSetNames[gkEffs[iEff][4]][0],
1343                                             gkHistoNames[gkEffs[iEff][5]][0])));
1344       if(!nominator) continue;
1345       if(!denominator) continue;
1346     }
1347     Double_t nomIntegral = nominator->Integral();
1348     Double_t denomIntegral = denominator->Integral();
1349     Double_t eff = (denomIntegral>0 ? nomIntegral/denomIntegral : 0);
1350     // Error calculation: take into account that nominator and denominator are correlated.
1351     // The nominator is a subset of denominator
1352     Double_t error = eff;
1353     if(nomIntegral>0 && denomIntegral>0)
1354       error = eff*TMath::Sqrt(TMath::Abs(denomIntegral-nomIntegral)/nomIntegral/denomIntegral);
1355     //nominator->Divide(denominator);
1356     TH1* ratio = DivideHists(nominator, denominator, gkDims[gkEffs[iEff][2]][0]);
1357     //    cout << "efficiency = " << nomIntegral << " / " << denomIntegral << " = "
1358     //   << eff << " +/- " << error << endl;
1359     TString title = gkEffNames[iEff][1];
1360     title += Form(", integrated eff. = %f #pm %f", eff, error);
1361     ratio->SetTitle(title.Data());
1362     ratio->SetName(gkEffNames[iEff][0]);
1363     effArray->Add(ratio);
1364
1365     if(numbersFile[0]!='\0') {
1366       asciiOut << gkEffNames[iEff][0] << "\t" << eff << "\t" << error << endl;
1367     }
1368     effValue = new TNamed(Form("%s_value", gkEffNames[iEff][0]),
1369                           Form("%f", eff));
1370     effArray->Add(effValue);
1371     effError = new TNamed(Form("%s_error", gkEffNames[iEff][0]),
1372                           Form("%f", error));
1373     effArray->Add(effError);
1374   }
1375
1376   output->cd();
1377   effArray->Write();
1378   output->Close();
1379   file->Close();
1380   asciiOut.close();
1381 }
1382
1383
1384 //________________________________________________________________________________________
1385 void DefineHistograms(TObjArray* histoArray, Int_t iCutSet) {
1386   //
1387   // Define the histograms to be filled for every step and a given cut set
1388   // This function is called by the FillHistograms() if the firstTime flag is set
1389
1390   for(Int_t iStep=0; iStep<kNSteps; iStep++) {
1391     for(Int_t iHisto = 0; iHisto<gkNhistos; iHisto++) {
1392       AddHistogram(histoArray, gkDims[iHisto][0],
1393                    Form("%s_%s_%s", gkStepNames[iStep][0], gkCutSetNames[iCutSet][0], gkHistoNames[iHisto][0]),
1394                    Form("%s, %s, %s", gkHistoNames[iHisto][1], gkStepNames[iStep][1], gkCutSetNames[iCutSet][1]),
1395                    gNbins[gkDims[iHisto][1]], gBinLimits[gkDims[iHisto][1]], gkVarNames[gkDims[iHisto][1]],
1396                    (gkDims[iHisto][2]!=kNothing ? gNbins[gkDims[iHisto][2]] : 0), 
1397                    (gkDims[iHisto][2]!=kNothing ? gBinLimits[gkDims[iHisto][2]] : 0),
1398                    (gkDims[iHisto][2]!=kNothing ? gkVarNames[gkDims[iHisto][2]] : ""),
1399                    (gkDims[iHisto][3]!=kNothing ? gNbins[gkDims[iHisto][3]] : 0), 
1400                    (gkDims[iHisto][3]!=kNothing ? gBinLimits[gkDims[iHisto][3]] : 0),
1401                    (gkDims[iHisto][3]!=kNothing ? gkVarNames[gkDims[iHisto][3]] : ""));
1402       
1403     }  // end loop over histos
1404   }   // end loop over steps
1405 }
1406
1407
1408 //_________________________________________________________________________________________
1409 void AddHistogram(TObjArray* histoArray, Int_t ndim, 
1410                   const Char_t* name, const Char_t* title, 
1411                   Int_t nbinsx, Double_t* binsx, const Char_t* xLabel,
1412                   Int_t nbinsy, Double_t* binsy, const Char_t* yLabel,
1413                   Int_t nbinsz, Double_t* binsz, const Char_t* zLabel) {
1414   //
1415   // Create a 1,2 or 3 - dimensional histogram and add it to the object array
1416   //
1417   if(ndim<1 || ndim>3) return;
1418   TH1* histo;
1419   if(ndim==1) {
1420     histo = new TH1D(name, title, nbinsx, binsx);
1421     histo->Sumw2();
1422     histo->GetXaxis()->SetTitle(xLabel);
1423   }
1424   if(ndim==2) {
1425     histo = new TH2D(name, title, nbinsx, binsx, nbinsy, binsy);
1426     histo->Sumw2();
1427     histo->GetXaxis()->SetTitle(xLabel);
1428     histo->GetYaxis()->SetTitle(yLabel);
1429   }
1430   if(ndim==3) {
1431     histo = new TH3D(name, title, nbinsx, binsx, nbinsy, binsy, nbinsz, binsz);
1432     histo->Sumw2();
1433     histo->GetXaxis()->SetTitle(xLabel);
1434     histo->GetYaxis()->SetTitle(yLabel);
1435     histo->GetZaxis()->SetTitle(zLabel);
1436   }
1437   histoArray->Add(histo);
1438 }
1439
1440 //__________________________________________________________________________________________
1441 void FillHistograms(TObjArray* histosArray, AliCFContainer* cont, Int_t currentCutSet, Bool_t firstTime) {
1442   //
1443   // Fill the user defined histograms for a given cut set
1444   // 
1445   // If the firstTime flag is on then update the bin limits and call DefineHistograms()
1446   if(firstTime) {
1447     GetBinLimits(cont);
1448     DefineHistograms(histosArray, currentCutSet);
1449   }
1450
1451   TH1* histo;
1452   for(Int_t iStep=0; iStep<kNSteps; ++iStep) {  // loop over CF container steps
1453     for(Int_t iHisto=0; iHisto<gkNhistos; iHisto++) {
1454       // fill 1-dim histos
1455       if(gkDims[iHisto][0]==1) {
1456         histo = (TH1D*)histosArray->FindObject(Form("%s_%s_%s",gkStepNames[iStep][0],
1457                                                     gkCutSetNames[currentCutSet][0],
1458                                                     gkHistoNames[iHisto][0]));
1459         //histo->Add(cont->Project(gkDims[iHisto][1],gkStepNumbers[iStep]));
1460
1461         //cout << "Histo: " << Form("%s_%s_%s",gkStepNames[iStep][0],gkCutSetNames[currentCutSet][0],gkHistoNames[iHisto][0]) << endl;
1462         //cout << "bin lims x: ";
1463         //for(Int_t iBinx=1; iBinx<=histo->GetXaxis()->GetNbins(); iBinx++)
1464         //  cout << histo->GetXaxis()->GetBinLowEdge(iBinx) << "  ";
1465         //cout << histo->GetXaxis()->GetBinUpEdge(histo->GetXaxis()->GetNbins()) << endl;
1466         histo->Add(cont->Project(gkStepNumbers[iStep],gkDims[iHisto][1]));
1467       }
1468       // fill 2-dim histos
1469       if(gkDims[iHisto][0]==2) {
1470         histo = (TH2D*)histosArray->FindObject(Form("%s_%s_%s",gkStepNames[iStep][0],
1471                                                     gkCutSetNames[currentCutSet][0],
1472                                                     gkHistoNames[iHisto][0]));
1473         //histo->Add(cont->Project(gkDims[iHisto][1], gkDims[iHisto][2], gkStepNumbers[iStep]));
1474         //cout << "Histo: " << Form("%s_%s_%s",gkStepNames[iStep][0],gkCutSetNames[currentCutSet][0],gkHistoNames[iHisto][0]) << endl;
1475         //cout << "bin lims x: ";
1476         //for(Int_t iBinx=1; iBinx<=histo->GetXaxis()->GetNbins(); iBinx++)
1477         //  cout << histo->GetXaxis()->GetBinLowEdge(iBinx) << "  ";
1478         //cout << histo->GetXaxis()->GetBinUpEdge(histo->GetXaxis()->GetNbins()) << endl;
1479         //cout << "bin lims y: ";
1480         //for(Int_t iBiny=1; iBiny<=histo->GetYaxis()->GetNbins(); iBiny++)
1481         //  cout << histo->GetYaxis()->GetBinLowEdge(iBiny) << "  ";
1482         //cout << histo->GetYaxis()->GetBinUpEdge(histo->GetYaxis()->GetNbins()) << endl;
1483         histo->Add(cont->Project(gkStepNumbers[iStep], gkDims[iHisto][1], gkDims[iHisto][2]));
1484       }
1485       // fill 3-dim histos
1486       if(gkDims[iHisto][0]==3) {
1487         histo = (TH3D*)histosArray->FindObject(Form("%s_%s_%s",gkStepNames[iStep][0],
1488                                                     gkCutSetNames[currentCutSet][0],
1489                                                     gkHistoNames[iHisto][0]));
1490         //histo->Add(cont->Project(gkDims[iHisto][1], gkDims[iHisto][2], gkDims[iHisto][3], gkStepNumbers[iStep]));
1491         histo->Add(cont->Project(gkStepNumbers[iStep], gkDims[iHisto][1], gkDims[iHisto][2], gkDims[iHisto][3]));
1492       }
1493     }   // end loop over histos
1494   }  // end loop over steps
1495 }
1496
1497 //____________________________________________________________________________________________
1498 void GetBinLimits(AliCFContainer* cont) {
1499   //
1500   // Extract the bin limits from the CF container
1501   //
1502   cout << "********* New cut set ****************" << endl;
1503   for(Int_t iVar=0; iVar<kNVariables; iVar++) {
1504     gNbins[iVar] = 0;
1505     gBinLimits[iVar] = GetBinning(cont, iVar, gNbins[iVar]);
1506     cout << "n bins on " << cont->GetVarTitle(iVar) << " : " << gNbins[iVar];
1507     cout << "; range = " << gBinLimits[iVar][0] << " --> " << gBinLimits[iVar][gNbins[iVar]] << endl;
1508     //cout << "bin limits = ";
1509     //for(Int_t iBin=0; iBin<=gNbins[iVar]; iBin++) 
1510     //  cout << gBinLimits[iVar][iBin] << "  ";
1511     //cout << endl;
1512   }
1513 }
1514
1515 //________________________________________________________________________________________
1516 Double_t* GetBinning(AliCFContainer* cont, Int_t variable, 
1517                      Int_t& nBins) {
1518   //
1519   // Get the number of bins and the bin limits for the projection of a given variable
1520   //
1521   //TH1D* tempHist = cont->Project(variable, kPureMC);
1522   TH1* tempHist = cont->Project(kPureMC, variable);
1523   nBins = tempHist->GetXaxis()->GetNbins();
1524   Double_t* binLimits = new Double_t[nBins+1];
1525   for(Int_t i=1; i<=nBins; i++)
1526     binLimits[i-1]=tempHist->GetXaxis()->GetBinLowEdge(i);
1527   binLimits[nBins] = tempHist->GetXaxis()->GetBinLowEdge(nBins) + 
1528     tempHist->GetXaxis()->GetBinWidth(nBins);
1529   return binLimits;
1530 }
1531
1532 //________________________________________________________________________________________
1533 TH1* DivideHists(TH1* nominator, TH1* denominator, Int_t dimension) {
1534   //
1535   // divide 2 histograms with error propagation
1536   //
1537   TH1* ratio;
1538   if(dimension==3) {
1539     Int_t nBinsXNom = nominator->GetXaxis()->GetNbins();
1540     Int_t nBinsXDenom = denominator->GetXaxis()->GetNbins();
1541     Int_t nBinsYNom = nominator->GetYaxis()->GetNbins();
1542     Int_t nBinsYDenom = denominator->GetYaxis()->GetNbins();
1543     Int_t nBinsZNom = nominator->GetZaxis()->GetNbins();
1544     Int_t nBinsZDenom = denominator->GetZaxis()->GetNbins();
1545     if(nBinsXNom!=nBinsXDenom || nBinsYNom!=nBinsYDenom || nBinsZNom!=nBinsZDenom) {
1546       cout << "Trying to divide histograms with different number of bins" << endl;
1547       return 0x0;
1548     }
1549     ratio = (TH3D*)nominator->Clone("ratio");
1550     ratio->Reset();
1551     for(Int_t iXbin=1; iXbin<=nBinsXNom; ++iXbin) {
1552       for(Int_t iYbin=1; iYbin<=nBinsYNom; ++iYbin) {
1553         for(Int_t iZbin=1; iZbin<=nBinsZNom; ++iZbin) {
1554           Double_t countsN = nominator->GetBinContent(iXbin, iYbin, iZbin);
1555           Double_t countsD = denominator->GetBinContent(iXbin, iYbin, iZbin);
1556           if(countsN<1 || countsD<1) continue;    // zero entry bins
1557           Double_t eff = countsN/countsD;
1558           Double_t error = eff*TMath::Sqrt(TMath::Abs(countsD-countsN)/countsN/countsD);
1559           ratio->SetBinContent(iXbin, iYbin, iZbin, eff);
1560           ratio->SetBinError(iXbin, iYbin, iZbin, error);
1561         }
1562       }
1563     }
1564     return ratio;
1565   }
1566
1567   if(dimension==2) {
1568     Int_t nBinsXNom = nominator->GetXaxis()->GetNbins();
1569     Int_t nBinsXDenom = denominator->GetXaxis()->GetNbins();
1570     Int_t nBinsYNom = nominator->GetYaxis()->GetNbins();
1571     Int_t nBinsYDenom = denominator->GetYaxis()->GetNbins();
1572     if(nBinsXNom!=nBinsXDenom || nBinsYNom!=nBinsYDenom) {
1573       cout << "Trying to divide histograms with different number of bins" << endl;
1574       return 0x0;
1575     }
1576     ratio = (TH2D*)nominator->Clone("ratio");
1577     ratio->Reset();
1578     for(Int_t iXbin=1; iXbin<=nBinsXNom; ++iXbin) {
1579       for(Int_t iYbin=1; iYbin<=nBinsYNom; ++iYbin) {
1580         Double_t countsN = nominator->GetBinContent(iXbin, iYbin);
1581         Double_t countsD = denominator->GetBinContent(iXbin, iYbin);
1582         if(countsN<1 || countsD<1) continue;    // zero entry bins
1583         Double_t eff = countsN/countsD;
1584         Double_t error = eff*TMath::Sqrt(TMath::Abs(countsD-countsN)/countsN/countsD);
1585         ratio->SetBinContent(iXbin, iYbin, eff);
1586         ratio->SetBinError(iXbin, iYbin, error);
1587       }
1588     }
1589     return ratio;
1590   }
1591
1592   if(dimension==1) {
1593     Int_t nBinsXNom = nominator->GetXaxis()->GetNbins();
1594     Int_t nBinsXDenom = denominator->GetXaxis()->GetNbins();
1595     if(nBinsXNom!=nBinsXDenom) {
1596       cout << "Trying to divide histograms with different number of bins" << endl;
1597       return 0x0;
1598     }
1599     ratio = (TH1D*)nominator->Clone("ratio");
1600     ratio->Reset();
1601     for(Int_t iXbin=1; iXbin<=nBinsXNom; ++iXbin) {
1602       Double_t countsN = nominator->GetBinContent(iXbin);
1603       Double_t countsD = denominator->GetBinContent(iXbin);
1604       if(countsN<1 || countsD<1) continue;    // zero entry bins
1605       Double_t eff = countsN/countsD;
1606       Double_t error = eff*TMath::Sqrt(TMath::Abs(countsD-countsN)/countsN/countsD);
1607       ratio->SetBinContent(iXbin, eff);
1608       ratio->SetBinError(iXbin, error);
1609     }
1610     return ratio;
1611   }
1612     
1613   return 0x0;
1614 }