]>
Commit | Line | Data |
---|---|---|
fdceab34 | 1 | //DEFINITION OF A FEW CONSTANTS |
de88b926 | 2 | #define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5)) |
3 | ||
67ebd013 | 4 | const Float_t phimin = 0.; |
5 | const Float_t phimax = 2.*TMath::Pi(); | |
6 | const Float_t etamin = -0.9; | |
7 | const Float_t etamax = 0.9; | |
67ebd013 | 8 | |
dae7dd67 | 9 | const Int_t mintrackrefsTPC = 0; |
10 | const Int_t mintrackrefsITS = 0; | |
fdceab34 | 11 | |
4658ef53 | 12 | /* AddTask setting up the containers and adding the tasks for computing the efficiency of the Hybrid Tracks. Tasks works on ESDs and AODs (datatype established automatically). |
13 | Input: | |
14 | hybridTrackDef: "2010" or "2011", indicates whether the 2010 definition or the 2011 definition of the hybrid tracks should be used. Only important in ESD. | |
15 | prodType: Data or MC period, | |
16 | beamType: "pp", "pPb" or "PbPb" | |
17 | triggerMask: Event Selection Trigger Mask | |
18 | bSelHijingParticles: kTRUE, select only particles from Hijing event. kFALSE, select all particles of the cocktail | |
19 | usePythiaxsec: kFALSE, do not use the Pythia cross section information file. This might reduce the number of errors and file opening issues. | |
20 | */ | |
21 | ||
22 | void AddTaskHybridTrackEfficiency(TString hybridTrackDef = "2011", char *prodType = "LHC11h", TString beamType = "PbPb", UInt_t triggerMask = AliVEvent::kMB, Bool_t bSelHijingParticles = kFALSE, Bool_t usePythiaxsec = kFALSE) | |
fdceab34 | 23 | { |
4658ef53 | 24 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); |
25 | if (!mgr) { | |
092db0d7 | 26 | Error("AddTaskHybridTrackEfficiency", "No analysis manager to connect to."); |
4658ef53 | 27 | return NULL; |
28 | } | |
29 | TString dataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
7b90d977 | 30 | |
4658ef53 | 31 | if(dataType=="AOD") { |
32 | AddTaskHybridTrackEfficiencyAOD(prodType, beamType, triggerMask, bSelHijingParticles, usePythiaxsec); | |
03372fd1 | 33 | } |
4658ef53 | 34 | if(dataType=="ESD") { |
35 | if(hybridTrackDef.Contains("2010")) | |
36 | AddTaskHybridTrackEfficiencyESD2010(prodType, beamType, triggerMask, bSelHijingParticles, usePythiaxsec); | |
37 | if(hybridTrackDef.Contains("2011")) | |
38 | AddTaskHybridTrackEfficiencyESD2011(prodType, beamType, triggerMask, bSelHijingParticles, usePythiaxsec); | |
03372fd1 | 39 | } |
9477b466 | 40 | } |
03372fd1 | 41 | |
4658ef53 | 42 | void AddTaskHybridTrackEfficiencyAOD(char *prodType = "LHC11h", TString beamType = "PbPb", UInt_t triggerMask = AliVEvent::kMB, Bool_t bSelHijingParticles = kFALSE, Bool_t usePythiaxsec = kFALSE) |
9477b466 | 43 | { |
44 | Int_t filterMask1; //standard global tracks | |
45 | Int_t filterMask2; //complementary tracks | |
46 | Int_t filterMask; //the sum: hybrid tracks | |
47 | ||
9477b466 | 48 | TString strRunPeriod = TString(prodType); |
49 | strRunPeriod.ToLower(); | |
50 | ||
51 | if (strRunPeriod == "lhc10h" || strRunPeriod == "lhc11h" || | |
52 | strRunPeriod == "lhc12a" || strRunPeriod == "lhc12b" || strRunPeriod == "lhc12c" || strRunPeriod == "lhc12d" || | |
53 | strRunPeriod == "lhc12e" || strRunPeriod == "lhc12f" || strRunPeriod == "lhc12g" || strRunPeriod == "lhc12g" || | |
54 | strRunPeriod == "lhc12h" || strRunPeriod == "lhc12i" || | |
55 | strRunPeriod == "lhc13b" || strRunPeriod == "lhc13c" || strRunPeriod == "lhc13d" || strRunPeriod == "lhc13e" || | |
56 | strRunPeriod == "lhc13f" || strRunPeriod == "lhc13g" || | |
57 | strRunPeriod == "lhc12a15e" || strRunPeriod == "lhc13b4" || strRunPeriod == "lhc13b4_fix" || | |
58 | strRunPeriod == "lhc13b4_plus" || strRunPeriod == "lhc12a15f" || strRunPeriod.Contains("lhc12a17") || strRunPeriod.Contains("lhc14a1")) { | |
59 | filterMask = 768; | |
60 | filterMask1 = 256; | |
61 | filterMask2 = 512; | |
62 | bIncludeNoITS = kFALSE; | |
63 | if(strRunPeriod == "lhc10h") bIncludeNoITS = kTRUE; | |
64 | } | |
65 | else if (strRunPeriod == "lhc11a" || strRunPeriod == "lhc10hold" || strRunPeriod == "lhc12a15a" || strRunPeriod.Contains("lhc11a2")) { | |
66 | filterMask = 272; | |
67 | filterMask1 = 16; | |
68 | filterMask2 = 256; | |
69 | bIncludeNoITS = kTRUE; | |
70 | } | |
ba02ea81 | 71 | else { |
092db0d7 | 72 | ::Error("AddTaskHybridTrackEfficiency","Period string not of predefined type. Add it to the list in this macro."); |
ba02ea81 | 73 | return NULL; |
74 | } | |
9477b466 | 75 | |
4658ef53 | 76 | AliPWG4HighPtSpectra *taskSpectraSUM = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,10,0,1,triggerMask,"CENT_10_SUM",bSelHijingParticles,usePythiaxsec,filterMask ); //Sum: the hybrid tracks. |
77 | AliPWG4HighPtSpectra *taskSpectraRESTR = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,10,0,5,triggerMask,"CENT_10_RESTR",bSelHijingParticles,usePythiaxsec,filterMask1); //High quality tracks | |
78 | AliPWG4HighPtSpectra *taskSpectraNOSPD = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,10,7,5,triggerMask,"CENT_10_COMPL",bSelHijingParticles,usePythiaxsec,filterMask2); //Complementary tracks | |
79 | if(beamType=="PbPb" || beamType=="pPb") { //also vary the centrality | |
80 | for(int cent = 0; cent<4; cent++) { | |
81 | AliPWG4HighPtSpectra *taskSpectraCent0 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,cent,0,1,triggerMask,Form("CENT_%d_SUM",cent),bSelHijingParticles,usePythiaxsec,filterMask ); | |
82 | AliPWG4HighPtSpectra *taskSpectraCent0 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,cent,0,5,triggerMask,Form("CENT_%d_RESTR",cent),bSelHijingParticles,usePythiaxsec,filterMask1 ); | |
83 | AliPWG4HighPtSpectra *taskSpectraCent0 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,cent,7,5,triggerMask,Form("CENT_%d_COMPL",cent),bSelHijingParticles,usePythiaxsec,filterMask2 ); | |
84 | } | |
9477b466 | 85 | } |
03372fd1 | 86 | } |
87 | ||
4658ef53 | 88 | void AddTaskHybridTrackEfficiencyESD2010(char *prodType = "LHC10h", TString beamType = "PbPb", UInt_t triggerMask = AliVEvent::kMB, Bool_t bSelHijingParticles = kFALSE, Bool_t usePythiaxsec = kFALSE) |
03372fd1 | 89 | { |
4658ef53 | 90 | AliPWG4HighPtSpectra *taskSpectra00cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,10,0,0,triggerMask,"CENT_10_RAA" ,bSelHijingParticles,usePythiaxsec); // RAA track cuts |
91 | AliPWG4HighPtSpectra *taskSpectra01cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,10,0,1,triggerMask,"CENT_10_RESTR",bSelHijingParticles,usePythiaxsec); // High quality tracks | |
92 | AliPWG4HighPtSpectra *taskSpectra70cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,10,7,0,triggerMask,"CENT_10_NOITS",bSelHijingParticles,usePythiaxsec); // Complementary tracks. Subtype: no ITS refit | |
93 | AliPWG4HighPtSpectra *taskSpectra71cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,10,7,1,triggerMask,"CENT_10_NOSPD",bSelHijingParticles,usePythiaxsec); // Complementary tracks. Subtype: no SPD requirement | |
94 | ||
95 | if(beamType=="PbPb" || beamType=="pPb") { //also vary the centrality | |
96 | for(int cent=0; cent<4; cent++) { | |
97 | AliPWG4HighPtSpectra *taskSpectra00 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,cent,0,0,triggerMask,Form("CENT_%d_RAA" ,cent),bSelHijingParticles,usePythiaxsec); | |
98 | AliPWG4HighPtSpectra *taskSpectra01 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,cent,0,1,triggerMask,Form("CENT_%d_RESTR",cent),bSelHijingParticles,usePythiaxsec); | |
99 | AliPWG4HighPtSpectra *taskSpectra70 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,cent,7,0,triggerMask,Form("CENT_%d_NOITS",cent),bSelHijingParticles,usePythiaxsec); | |
100 | AliPWG4HighPtSpectra *taskSpectra71 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,cent,7,1,triggerMask,Form("CENT_%d_NOSPD",cent),bSelHijingParticles,usePythiaxsec); | |
101 | } | |
102 | } | |
103 | } | |
03372fd1 | 104 | |
4658ef53 | 105 | void AddTaskHybridTrackEfficiencyESD2011(char *prodType = "LHC10h", TString beamType = "PbPb", UInt_t triggerMask = AliVEvent::kMB, Bool_t bSelHijingParticles = kFALSE, Bool_t usePythiaxsec = kFALSE) |
106 | { | |
107 | AliPWG4HighPtSpectra *taskSpectra00cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,10,0,0,triggerMask,"CENT_10_RAA" ,bSelHijingParticles,usePythiaxsec); // RAA track cuts | |
cddc4188 | 108 | AliPWG4HighPtSpectra *taskSpectra01cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,10,0,5,triggerMask,"CENT_10_RESTR",bSelHijingParticles,usePythiaxsec); // High quality tracks |
109 | AliPWG4HighPtSpectra *taskSpectra71cent10 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,10,7,5,triggerMask,"CENT_10_NOSPD",bSelHijingParticles,usePythiaxsec); // Complementary tracks. Subtype: no SPD requirement | |
4658ef53 | 110 | |
111 | if(beamType=="PbPb" || beamType=="pPb") { //also vary the centrality | |
112 | for(int cent=0; cent<4; cent++) { | |
113 | AliPWG4HighPtSpectra *taskSpectra00 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,cent,0,0,triggerMask,Form("CENT_%d_RAA" ,cent),bSelHijingParticles,usePythiaxsec); | |
cddc4188 | 114 | AliPWG4HighPtSpectra *taskSpectra01 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,cent,0,5,triggerMask,Form("CENT_%d_RESTR",cent),bSelHijingParticles,usePythiaxsec); |
115 | AliPWG4HighPtSpectra *taskSpectra71 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,cent,7,5,triggerMask,Form("CENT_%d_NOSPD",cent),bSelHijingParticles,usePythiaxsec); | |
7b90d977 | 116 | } |
4658ef53 | 117 | } |
118 | } | |
119 | ||
120 | void AddTaskHybridTrackEfficiencyQA_AOD_train(char *prodType = "LHC11h", TString beamType = "PbPb", UInt_t triggerMask = AliVEvent::kMB, Bool_t bSelHijingParticles = kFALSE, Bool_t usePythiaxsec = kFALSE) | |
121 | { | |
122 | Int_t filterMask1; //standard global tracks | |
123 | Int_t filterMask2; //complementary tracks | |
124 | Int_t filterMask; //the sum: hybrid tracks | |
125 | ||
126 | TString strRunPeriod = TString(prodType); | |
127 | strRunPeriod.ToLower(); | |
03372fd1 | 128 | |
4658ef53 | 129 | if (strRunPeriod == "lhc10h" || strRunPeriod == "lhc11h" || |
130 | strRunPeriod == "lhc12a" || strRunPeriod == "lhc12b" || strRunPeriod == "lhc12c" || strRunPeriod == "lhc12d" || | |
131 | strRunPeriod == "lhc12e" || strRunPeriod == "lhc12f" || strRunPeriod == "lhc12g" || strRunPeriod == "lhc12g" || | |
132 | strRunPeriod == "lhc12h" || strRunPeriod == "lhc12i" || | |
133 | strRunPeriod == "lhc13b" || strRunPeriod == "lhc13c" || strRunPeriod == "lhc13d" || strRunPeriod == "lhc13e" || | |
134 | strRunPeriod == "lhc13f" || strRunPeriod == "lhc13g" || | |
135 | strRunPeriod == "lhc12a15e" || strRunPeriod == "lhc13b4" || strRunPeriod == "lhc13b4_fix" || | |
136 | strRunPeriod == "lhc13b4_plus" || strRunPeriod == "lhc12a15f" || strRunPeriod.Contains("lhc12a17") || strRunPeriod.Contains("lhc14a1")) { | |
137 | filterMask = 768; | |
138 | filterMask1 = 256; | |
139 | filterMask2 = 512; | |
140 | } | |
141 | else if (strRunPeriod == "lhc11a" || strRunPeriod == "lhc10hold" || strRunPeriod == "lhc12a15a" || strRunPeriod.Contains("lhc11a2")) { | |
142 | filterMask = 272; | |
143 | filterMask1 = 16; | |
144 | filterMask2 = 256; | |
145 | } | |
146 | else { | |
092db0d7 | 147 | ::Error("AddTaskHybridTrackEfficiency","Period string not of predefined type. Add it to the list in this macro."); |
4658ef53 | 148 | return NULL; |
7b90d977 | 149 | } |
150 | ||
4658ef53 | 151 | AliPWG4HighPtSpectra *taskSpectraSUM = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,10,0,1,triggerMask,"SUM" ,bSelHijingParticles,usePythiaxsec,filterMask ); //Sum: the hybrid tracks. |
152 | AliPWG4HighPtSpectra *taskSpectraRESTR = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,10,0,5,triggerMask,"RESTR",bSelHijingParticles,usePythiaxsec,filterMask1); //With SPD and ITS refit. | |
153 | AliPWG4HighPtSpectra *taskSpectraNOSPD = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,10,7,5,triggerMask,"NOSPD",bSelHijingParticles,usePythiaxsec,filterMask2); //Only ITS refit, not SPD. | |
154 | if(beamType=="PbPb" || beamType=="pPb") { //also vary the centrality | |
155 | AliPWG4HighPtSpectra *taskSpectraCent0 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,0 ,0,1,triggerMask,"CENT0",bSelHijingParticles,usePythiaxsec,filterMask ); | |
156 | AliPWG4HighPtSpectra *taskSpectraCent1 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,1 ,0,1,triggerMask,"CENT1",bSelHijingParticles,usePythiaxsec,filterMask ); | |
157 | AliPWG4HighPtSpectra *taskSpectraCent2 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,2 ,0,1,triggerMask,"CENT2",bSelHijingParticles,usePythiaxsec,filterMask ); | |
158 | AliPWG4HighPtSpectra *taskSpectraCent3 = ConfigureTaskPWG4HighPtSpectra(prodType,beamType,3 ,0,1,triggerMask,"CENT3",bSelHijingParticles,usePythiaxsec,filterMask ); | |
159 | } | |
7b90d977 | 160 | } |
161 | ||
4658ef53 | 162 | AliPWG4HighPtSpectra* ConfigureTaskPWG4HighPtSpectra(char *prodType = "LHC10e14", TString beamType = "PbPb", Int_t centClass = 0, |
03372fd1 | 163 | Int_t trackType = 0, Int_t cuts = 0, UInt_t triggerMask = AliVEvent::kMB, |
4658ef53 | 164 | TString taskName, Bool_t bSelHijingParticles = kFALSE, |
9477b466 | 165 | Bool_t usePythiaxsec = kTRUE, Int_t filterMask = 0) |
7b90d977 | 166 | { |
167 | ||
168 | /* | |
9477b466 | 169 | trackType: 0 = global |
7b90d977 | 170 | 1 = TPC stand alone |
171 | 2 = TPC stand alone constrained to SPD vertex | |
9477b466 | 172 | 4 = TPC stand alone constrained to SPD vertex with QA track selection on global tracks |
173 | 5 = Hybrid tracks: constrained TPConly for which no tight ITS is available | |
174 | 6 = Hybrid tracks: constrained loose global for which no tight ITS is available | |
5a0bd31f | 175 | cuts: 0 (global) = standard ITSTPC2010 a la RAA analysis |
176 | 1 (global) = ITSrefit, no SPD requirements -> standard for jet analysis | |
177 | 2 (global) = ITSrefit + no hits in SPD | |
9477b466 | 178 | 3 (global) = standard ITS tight cuts with nCrossed rows cut for hybrid tracks |
7b90d977 | 179 | 0 (TPC) = standard TPC + NClusters>70 |
180 | 1 (TPC) = standard TPC + NClusters>0 --> to study new TPC QA recommendations | |
9477b466 | 181 | 0 (hybrid 5) = constrained TPConly for which no tight ITS is available |
182 | 0 (hybrid 6) = constrained loose global for which no tight ITS is available | |
7b90d977 | 183 | */ |
184 | ||
67ebd013 | 185 | // Creates HighPtSpectra analysis task and adds it to the analysis manager. |
fdceab34 | 186 | |
380cff49 | 187 | //Load common track cut class |
5c4489e2 | 188 | gROOT->LoadMacro("$ALICE_ROOT/PWGJE/macros/CreateTrackCutsPWGJE.C"); |
380cff49 | 189 | |
fdceab34 | 190 | // A. Get the pointer to the existing analysis manager via the static access method. |
191 | //============================================================================== | |
192 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
193 | if (!mgr) { | |
092db0d7 | 194 | Error("AddTaskHybridTrackEfficiency", "No analysis manager to connect to."); |
fdceab34 | 195 | return NULL; |
196 | } | |
4658ef53 | 197 | TString dataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" |
fdceab34 | 198 | |
199 | // B. Check the analysis type using the event handlers connected to the analysis | |
200 | // manager. The availability of MC handler can also be checked here. | |
201 | //============================================================================== | |
202 | if (!mgr->GetInputEventHandler()) { | |
092db0d7 | 203 | ::Error("AddTaskHybridTrackEfficiency", "This task requires an input event handler"); |
fdceab34 | 204 | return NULL; |
205 | } | |
9477b466 | 206 | |
fdceab34 | 207 | // C. Create the task, add it to manager. |
208 | //=========================================================================== | |
67ebd013 | 209 | //CONTAINER DEFINITION |
fdceab34 | 210 | Info("AliPWG4HighPtSpectra","SETUP CONTAINER"); |
211 | //the sensitive variables, their indices | |
67ebd013 | 212 | UInt_t ipt = 0; |
213 | UInt_t iphi = 1; | |
214 | UInt_t ieta = 2; | |
dae7dd67 | 215 | UInt_t incls = 3; |
67ebd013 | 216 | |
fdceab34 | 217 | //Setting up the container grid... |
de88b926 | 218 | UInt_t nstep = 4; //Steps/Modes for containers |
7b90d977 | 219 | Int_t kStepReconstructed = 0; |
220 | Int_t kStepSecondaries = 1; | |
221 | Int_t kStepReconstructedMC = 2; | |
222 | Int_t kStepMCAcceptance = 3; | |
b1cd0099 | 223 | |
224 | //redefine pt ranges in case of Jet-Jet production | |
de88b926 | 225 | Float_t ptBinEdges[4][4]; |
226 | Float_t ptmin = 0.0 ; | |
227 | Float_t ptmax = 100.0 ; | |
228 | ||
229 | ptBinEdges[0][0] = 2.; | |
230 | ptBinEdges[0][1] = 0.2; | |
231 | ptBinEdges[1][0] = 6.; | |
232 | ptBinEdges[1][1] = 0.5; | |
233 | ptBinEdges[2][0] = 20.; | |
234 | ptBinEdges[2][1] = 2.; | |
235 | ptBinEdges[3][0] = 100.; | |
236 | ptBinEdges[3][1] = 5.; | |
237 | ||
dae7dd67 | 238 | const Int_t nvar = 4; //number of variables on the grid: pt:phi:eta:NClsIter1 |
de88b926 | 239 | |
240 | const Int_t nbin11 = round((ptBinEdges[0][0]-ptmin)/ptBinEdges[0][1]); | |
241 | const Int_t nbin12 = round((ptBinEdges[1][0]-ptBinEdges[0][0])/ptBinEdges[1][1])+nbin11; | |
242 | const Int_t nbin13 = round((ptBinEdges[2][0]-ptBinEdges[1][0])/ptBinEdges[2][1])+nbin12; | |
243 | const Int_t nbin14 = round((ptBinEdges[3][0]-ptBinEdges[2][0])/ptBinEdges[3][1])+nbin13; | |
244 | ||
245 | const Int_t nbin1 = nbin14; //bins in pt | |
03372fd1 | 246 | const Int_t nbin2 = 36; //bins in phi |
247 | const Int_t nbin3 = 10; //bins in eta | |
248 | const Int_t nbin4 = 1;//6; //bins in NClsIter1: 0 70 80 90 100 120 | |
dae7dd67 | 249 | |
fdceab34 | 250 | |
fdceab34 | 251 | //arrays for the number of bins in each dimension |
252 | Int_t iBin[nvar]; | |
253 | iBin[0]=nbin1; | |
67ebd013 | 254 | iBin[1]=nbin2; |
255 | iBin[2]=nbin3; | |
dae7dd67 | 256 | iBin[3]=nbin4; |
ec555a3c | 257 | |
fdceab34 | 258 | //arrays for lower bounds : |
259 | Double_t *binLim1=new Double_t[nbin1+1]; | |
67ebd013 | 260 | Double_t *binLim2=new Double_t[nbin2+1]; |
261 | Double_t *binLim3=new Double_t[nbin3+1]; | |
dae7dd67 | 262 | Double_t *binLim4=new Double_t[nbin4+1]; |
ec555a3c | 263 | |
67ebd013 | 264 | //values for bin lower bounds |
265 | for(Int_t i=0; i<=nbin1; i++) { | |
b1cd0099 | 266 | if(i<=nbin11) binLim1[i]=(Double_t)ptmin + (ptBinEdges[0][0]-ptmin)/nbin11*(Double_t)i ; |
de88b926 | 267 | if(i<=nbin12 && i>nbin11) binLim1[i]=(Double_t)ptBinEdges[0][0] + (ptBinEdges[1][0]-ptBinEdges[0][0])/(nbin12-nbin11)*((Double_t)i-(Double_t)nbin11) ; |
268 | if(i<=nbin13 && i>nbin12) binLim1[i]=(Double_t)ptBinEdges[1][0] + (ptBinEdges[2][0]-ptBinEdges[1][0])/(nbin13-nbin12)*((Double_t)i-(Double_t)nbin12) ; | |
269 | if(i<=nbin14 && i>nbin13) binLim1[i]=(Double_t)ptBinEdges[2][0] + (ptBinEdges[3][0]-ptBinEdges[2][0])/(nbin14-nbin13)*((Double_t)i-(Double_t)nbin13) ; | |
67ebd013 | 270 | } |
67ebd013 | 271 | for(Int_t i=0; i<=nbin2; i++) binLim2[i]=(Double_t)phimin + (phimax-phimin)/nbin2*(Double_t)i ; |
272 | for(Int_t i=0; i<=nbin3; i++) binLim3[i]=(Double_t)etamin + (etamax-etamin)/nbin3*(Double_t)i ; | |
03372fd1 | 273 | binLim4[0] = 70.;//0.; |
274 | binLim4[1] = 160.;//70.; | |
275 | // binLim4[2] = 80.; | |
276 | // binLim4[3] = 90.; | |
277 | // binLim4[4] = 100.; | |
278 | // binLim4[5] = 120.; | |
279 | // binLim4[6] = 160.; | |
dae7dd67 | 280 | |
67ebd013 | 281 | |
282 | AliCFContainer* containerPos = new AliCFContainer("containerPos","container for positive tracks",nstep,nvar,iBin); | |
283 | //setting the bin limits | |
284 | containerPos -> SetBinLimits(ipt,binLim1); | |
285 | containerPos -> SetBinLimits(iphi,binLim2); | |
286 | containerPos -> SetBinLimits(ieta,binLim3); | |
dae7dd67 | 287 | containerPos -> SetBinLimits(incls,binLim4); |
fdceab34 | 288 | |
67ebd013 | 289 | AliCFContainer* containerNeg = new AliCFContainer("containerNeg","container for negative tracks",nstep,nvar,iBin); |
fdceab34 | 290 | //setting the bin limits |
67ebd013 | 291 | containerNeg -> SetBinLimits(ipt,binLim1); |
292 | containerNeg -> SetBinLimits(iphi,binLim2); | |
293 | containerNeg -> SetBinLimits(ieta,binLim3); | |
dae7dd67 | 294 | containerNeg -> SetBinLimits(incls,binLim4); |
67ebd013 | 295 | |
fdceab34 | 296 | //CREATE THE CUTS ----------------------------------------------- |
9477b466 | 297 | //Use AliESDtrackCuts, only for ESD analysis |
327d12da | 298 | AliESDtrackCuts *trackCuts = new AliESDtrackCuts("AliESDtrackCuts","Standard Cuts"); |
299 | AliESDtrackCuts *trackCutsReject = 0x0; | |
380cff49 | 300 | |
4658ef53 | 301 | if(dataType=="ESD") { |
9477b466 | 302 | //Standard Cuts |
303 | //Set track cuts for global tracks | |
304 | if(trackType==0 && cuts==0) { | |
305 | // tight global tracks - RAA analysis | |
306 | trackCuts = CreateTrackCutsPWGJE(1000); | |
307 | } | |
308 | if(trackType==0 && cuts==1) { | |
309 | //Cuts global tracks with ITSrefit requirement and SPDrequirement for jet analysis | |
310 | trackCuts = CreateTrackCutsPWGJE(10001006); | |
311 | } | |
312 | if(trackType==0 && cuts==5) { | |
313 | //Cuts global tracks with ITSrefit requirement and SPDrequirement for jet analysis + NCrossedRowsCut>120 recommended in 2011 | |
314 | trackCuts = CreateTrackCutsPWGJE(10001008); | |
315 | } | |
316 | ||
317 | if(trackType==0 && cuts==2) { | |
318 | //Cuts global tracks with ITSrefit requirement but without SPD | |
319 | if (!strcmp(prodType,"LHC12a15e")) | |
320 | trackCuts = CreateTrackCutsPWGJE(10011008); | |
321 | else | |
322 | trackCuts = CreateTrackCutsPWGJE(10011006); | |
323 | } | |
324 | if(trackType==7 && cuts==0) { | |
325 | // no requirements on SPD and ITSrefit failed | |
326 | trackCuts = CreateTrackCutsPWGJE(10041006); //no ITSrefit requirement | |
327 | trackCutsReject = CreateTrackCutsPWGJE(1006); //ITSrefit requirement | |
328 | trackCutsReject->SetEtaRange(etamin,etamax); | |
329 | trackCutsReject->SetPtRange(0.15, 1e10); | |
330 | } | |
331 | if(trackType==7 && cuts==4) { | |
332 | // tight global tracks + NCrossedRowsCut>120 recommended in 2011 | |
333 | trackCuts = CreateTrackCutsPWGJE(10041008); | |
334 | trackCutsReject = CreateTrackCutsPWGJE(1008); | |
335 | trackCutsReject->SetEtaRange(-0.9,0.9); | |
336 | trackCutsReject->SetPtRange(0.15, 1e10); | |
337 | } | |
338 | if(trackType==7 && cuts==1) { | |
339 | //Cuts global tracks with ITSrefit requirement but without SPD | |
340 | trackCuts = CreateTrackCutsPWGJE(10011006); | |
341 | } | |
342 | if(trackType==7 && cuts==5) { | |
343 | // tight global tracks + NCrossedRowsCut>120 recommended in 2011 | |
344 | trackCuts = CreateTrackCutsPWGJE(10011008); | |
345 | } | |
346 | ||
347 | if(trackType==7 && cuts==2) { | |
348 | // no requirements on SPD and ITSrefit failed | |
349 | trackCuts = CreateTrackCutsPWGJE(10041006); //no ITSrefit requirement filter 256 | |
350 | trackCutsReject = CreateTrackCutsPWGJE(10001006); //ITSrefit requirement filter 16 | |
351 | trackCutsReject->SetEtaRange(etamin,etamax); | |
352 | trackCutsReject->SetPtRange(0.15, 1e10); | |
353 | } | |
354 | if(trackType==7 && cuts==6) { | |
355 | // no requirements on SPD and ITSrefit failed | |
356 | trackCuts = CreateTrackCutsPWGJE(10041008); //no ITSrefit requirement filter 256 | |
357 | trackCutsReject = CreateTrackCutsPWGJE(10001008); //ITSrefit requirement filter 16 | |
358 | trackCutsReject->SetEtaRange(-0.9,0.9); | |
359 | trackCutsReject->SetPtRange(0.15, 1e10); | |
360 | } | |
361 | ||
362 | ||
363 | ||
364 | if(trackType==1 && cuts==0) { | |
365 | //Set track cuts for TPConly tracks | |
366 | trackCuts = CreateTrackCutsPWGJE(2001); | |
367 | } | |
368 | if(trackType==2 && cuts==0) { | |
369 | // Set track cuts for TPConly constrained tracks | |
370 | trackCuts = CreateTrackCutsPWGJE(2001); | |
371 | } | |
372 | trackCuts->SetEtaRange(etamin,etamax); | |
373 | trackCuts->SetPtRange(0.15, 1e10); | |
7b90d977 | 374 | } |
43032097 | 375 | |
ec555a3c | 376 | // Gen-Level kinematic cuts |
fdceab34 | 377 | AliCFTrackKineCuts *mcKineCuts = new AliCFTrackKineCuts("mcKineCuts","MC-level kinematic cuts"); |
67ebd013 | 378 | mcKineCuts->SetPtRange(0.15,1e10); |
dae7dd67 | 379 | mcKineCuts->SetEtaRange(etamin,etamax);//-0.5,0.5); |
fdceab34 | 380 | mcKineCuts->SetRequireIsCharged(kTRUE); |
381 | ||
382 | //Acceptance Cuts | |
dae7dd67 | 383 | //AliCFAcceptanceCuts *mcAccCuts = new AliCFAcceptanceCuts("mcAccCuts","MC acceptance cuts"); |
fdceab34 | 384 | // mcAccCuts->SetMinNHitITS(mintrackrefsITS); |
dae7dd67 | 385 | //mcAccCuts->SetMinNHitTPC(mintrackrefsTPC); |
fdceab34 | 386 | |
5ef6e458 | 387 | TObjArray* recMCList = new TObjArray(0); |
fdceab34 | 388 | TObjArray* secList = new TObjArray(0) ; |
389 | ||
390 | printf("CREATE MC KINE CUTS\n"); | |
5ef6e458 | 391 | TObjArray* recList = new TObjArray(0); |
fdceab34 | 392 | TObjArray* mcList = new TObjArray(0) ; |
393 | mcList->AddLast(mcKineCuts); | |
5ef6e458 | 394 | recList->AddLast(mcKineCuts); |
dae7dd67 | 395 | //mcList->AddLast(mcAccCuts); |
fdceab34 | 396 | |
397 | //CREATE THE INTERFACE TO CORRECTION FRAMEWORK USED IN THE TASK | |
398 | printf("CREATE INTERFACE AND CUTS\n"); | |
67ebd013 | 399 | AliCFManager* manPos = new AliCFManager("manPos","Manager for Positive tracks") ; |
400 | manPos->SetParticleContainer(containerPos); | |
9b58297c | 401 | manPos->SetParticleCutsList(kStepReconstructed,recList); |
9b58297c | 402 | manPos->SetParticleCutsList(kStepSecondaries,secList); |
403 | manPos->SetParticleCutsList(kStepReconstructedMC,recMCList); | |
404 | manPos->SetParticleCutsList(kStepMCAcceptance,mcList); | |
67ebd013 | 405 | |
406 | AliCFManager* manNeg = new AliCFManager("manNeg","Manager for Negative tracks") ; | |
407 | manNeg->SetParticleContainer(containerNeg); | |
9b58297c | 408 | manNeg->SetParticleCutsList(kStepReconstructed,recList); |
9b58297c | 409 | manNeg->SetParticleCutsList(kStepSecondaries,secList); |
410 | manNeg->SetParticleCutsList(kStepReconstructedMC,recMCList); | |
411 | manNeg->SetParticleCutsList(kStepMCAcceptance,mcList); | |
67ebd013 | 412 | |
0714a353 | 413 | TString trigName = ""; |
414 | if (triggerMask == AliVEvent::kAnyINT) | |
415 | trigName += "kAnyINT"; | |
416 | else if (triggerMask == AliVEvent::kAny) | |
417 | trigName += "kAny"; | |
418 | else if(triggerMask == AliVEvent::kINT7) | |
419 | trigName += "kINT7"; | |
420 | else if(triggerMask == AliVEvent::kMB) | |
421 | trigName += "kMB"; | |
422 | else if(triggerMask == AliVEvent::kEMC7) | |
423 | trigName += "kEMC7"; | |
424 | else if(triggerMask == AliVEvent::kEMCEJE) | |
425 | trigName += "kEMCEJE"; | |
426 | else if(triggerMask == AliVEvent::kEMCEGA) | |
427 | trigName += "kEMCEGA"; | |
428 | ||
67ebd013 | 429 | |
4658ef53 | 430 | AliPWG4HighPtSpectra *taskPWG4HighPtSpectra = new AliPWG4HighPtSpectra(Form("AliPWG4HighPtSpectra%s_%s",taskName.Data(),trigName.Data())); |
34fc6450 | 431 | taskPWG4HighPtSpectra->SetTrackType(trackType); |
4658ef53 | 432 | if(dataType=="AOD") |
9477b466 | 433 | taskPWG4HighPtSpectra->SetFilterMask(filterMask); |
434 | else { | |
435 | taskPWG4HighPtSpectra->SetCuts(trackCuts); | |
436 | taskPWG4HighPtSpectra->SetCutsReject(trackCutsReject); | |
437 | } | |
43032097 | 438 | taskPWG4HighPtSpectra->SetCFManagerPos(manPos); //here is set the CF manager + |
439 | taskPWG4HighPtSpectra->SetCFManagerNeg(manNeg); //here is set the CF manager - | |
5d87a047 | 440 | taskPWG4HighPtSpectra->SetTriggerMask(triggerMask); |
4658ef53 | 441 | taskPWG4HighPtSpectra->SelectHIJINGOnly(bSelHijingParticles); |
442 | taskPWG4HighPtSpectra->SetReadAODData(dataType=="AOD"? kTRUE : kFALSE); | |
9477b466 | 443 | if(!usePythiaxsec) |
444 | taskPWG4HighPtSpectra->SetNoPythiaInfo(); | |
67ebd013 | 445 | |
4658ef53 | 446 | if(beamType=="PbPb" || beamType=="pPb") { |
7b90d977 | 447 | taskPWG4HighPtSpectra->SetIsPbPb(kTRUE); |
448 | taskPWG4HighPtSpectra->SetCentralityClass(centClass); | |
449 | } | |
dae7dd67 | 450 | // taskPWG4HighPtSpectra->SetSigmaConstrainedMax(5.); |
7b90d977 | 451 | |
e50809ff | 452 | |
fdceab34 | 453 | // E. Create ONLY the output containers for the data produced by the task. |
454 | // Get and connect other common input/output containers via the manager as below | |
455 | //============================================================================== | |
456 | ||
43032097 | 457 | //------ output containers ------ |
fdceab34 | 458 | TString outputfile = AliAnalysisManager::GetCommonFileName(); |
4658ef53 | 459 | outputfile += Form(":PWG4_HighPtSpectra%s_%s",taskName.Data(),trigName.Data()); |
03372fd1 | 460 | |
461 | AliAnalysisDataContainer *coutput0 = 0x0; | |
462 | AliAnalysisDataContainer *coutput1 = 0x0; | |
463 | AliAnalysisDataContainer *coutput2 = 0x0; | |
4658ef53 | 464 | AliAnalysisDataContainer *cout_cuts0 = 0x0; |
03372fd1 | 465 | |
4658ef53 | 466 | coutput0 = mgr->CreateContainer(Form("chist0HighPtSpectra%s_%s",taskName.Data(),trigName.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,outputfile); |
467 | coutput1 = mgr->CreateContainer(Form("ccontainer0HighPtSpectra%s_%s",taskName.Data(),trigName.Data()), AliCFContainer::Class(),AliAnalysisManager::kOutputContainer,outputfile); | |
468 | coutput2 = mgr->CreateContainer(Form("ccontainer1HighPtSpectra%s_%s",taskName.Data(),trigName.Data()), AliCFContainer::Class(),AliAnalysisManager::kOutputContainer,outputfile); | |
469 | cout_cuts0 = mgr->CreateContainer(Form("qa_SpectraTrackCuts%s_%s",taskName.Data(),trigName.Data()), AliESDtrackCuts::Class(), AliAnalysisManager::kParamContainer,outputfile); | |
0714a353 | 470 | |
fdceab34 | 471 | mgr->AddTask(taskPWG4HighPtSpectra); |
472 | ||
473 | mgr->ConnectInput(taskPWG4HighPtSpectra,0,mgr->GetCommonInputContainer()); | |
474 | mgr->ConnectOutput(taskPWG4HighPtSpectra,0,coutput0); | |
475 | mgr->ConnectOutput(taskPWG4HighPtSpectra,1,coutput1); | |
67ebd013 | 476 | mgr->ConnectOutput(taskPWG4HighPtSpectra,2,coutput2); |
e5abcde9 | 477 | mgr->ConnectOutput(taskPWG4HighPtSpectra,3,cout_cuts0); |
fdceab34 | 478 | |
479 | // Return task pointer at the end | |
480 | return taskPWG4HighPtSpectra; | |
481 | } |