]>
Commit | Line | Data |
---|---|---|
e131b05f | 1 | /************************************************************************************************* |
2 | *** Add Fragmentation Function Task *** | |
3 | ************************************************************************************************** | |
4 | The ID fragmentation function task expects an ESD filter and jet finder running before this task. | |
5 | Or it runs on delta-AODs filled with filtered tracks and jets before. | |
6 | ||
7 | ** Parameters ** | |
8 | (char) recJetsBranch: branch in AOD for (reconstructed) jets | |
9 | (char) genJetsBranch: branch in AOD for (generated) jets | |
10 | (char) jetType: "AOD" jets from recJetsBranch | |
11 | "AODMC" jets from genJetsBranch | |
12 | "KINE" jets from PYCELL | |
13 | +"b" (e.g. "AODb") jets with acceptance cuts | |
14 | (char) trackType: "AOD" reconstructed tracks from AOD filled by ESD filter (choose filter mask!) | |
15 | "AODMC" MC tracks from AOD filled by kine filter | |
16 | "KINE" kine particles from MC event | |
17 | +"2" (e.g. "AOD2") charged tracks only | |
18 | +"b" (e.g. "AOD2b") with acceptance cuts | |
19 | (UInt_t) filterMask: select filter bit of ESD filter task | |
20 | ||
21 | Typical parameters to run on 11a1* (MC_pp@7TeV): | |
22 | "clustersAOD_ANTIKT", "", "clustersAODMC2_ANTIKT", "AODMCb", "AODMC2b", AliAnalysisManager::GetGlobalInt("kHighPtFilterMask", gDebug), | |
c4856fb1 | 23 | -0.4, 0, 1000*AliAnalysisManager::GetGlobalDbl("kTrackPtCut", gDebug), 0, "_Skip00", "", "_Skip00", 0.4, -1, 0, 0, kFALSE, |
e131b05f | 24 | "PWGJE_taskPID_Jets", "", "PWGJE_taskPID_Jets_Inclusive", "" |
25 | ||
26 | ***************************************************************************************************/ | |
27 | ||
28 | void postConfig(AliAnalysisTaskIDFragmentationFunction* task, TString suffixPIDtaskJets1, TString suffixPIDtaskJets2, | |
29 | TString suffixPIDtaskInclusive1, TString suffixPIDtaskInclusive2) { | |
30 | ||
31 | task->SetBckgType(AliAnalysisTaskIDFragmentationFunction::kBckgPerp2, | |
32 | AliAnalysisTaskIDFragmentationFunction::kBckgPerp, | |
33 | AliAnalysisTaskIDFragmentationFunction::kBckgPerp2Area, | |
34 | AliAnalysisTaskIDFragmentationFunction::kBckgOutAJStat, | |
35 | AliAnalysisTaskIDFragmentationFunction::kBckgOut2J); | |
36 | ||
37 | task->SetBranchRecBackClusters(""); | |
38 | ||
39 | // Define histo bins | |
40 | //task->SetFFHistoBins(23, 5, 120, 480, 0., 120.,70, 0., 7., 52, 0., 1.3); | |
41 | task->SetQATrackHistoBins(2400,0,120); // 50 MeV binning for comp to track dN/dpt prel. plot | |
42 | ||
43 | // JS on | |
44 | task->SetJSMode(); | |
45 | ||
46 | task->SetEffMode(0); | |
47 | ||
48 | // Set name of PID framework tasks | |
49 | ||
50 | // Invalid: Second suffix set, but first one not set -> No PID tasks set | |
51 | const Int_t numJetPIDtasks = (suffixPIDtaskJets1 != "") * ((suffixPIDtaskJets1 != "") + (suffixPIDtaskJets2 != "")); | |
52 | if (numJetPIDtasks > 0) { | |
53 | TString namesJetPIDtasks[numJetPIDtasks]; | |
54 | namesJetPIDtasks[0] = suffixPIDtaskJets1; | |
55 | if (numJetPIDtasks > 1) | |
56 | namesJetPIDtasks[1] = suffixPIDtaskJets2; | |
57 | task->SetNamesOfJetPIDtasks(numJetPIDtasks, namesJetPIDtasks); | |
58 | } | |
59 | else | |
60 | task->SetNamesOfJetPIDtasks(numJetPIDtasks, 0x0); | |
61 | ||
62 | // Same for inclusive | |
63 | const Int_t numInclusivePIDtasks = (suffixPIDtaskInclusive1 != "") * | |
64 | ((suffixPIDtaskInclusive1 != "") + (suffixPIDtaskInclusive2 != "")); | |
65 | if (numInclusivePIDtasks > 0) { | |
66 | TString namesInclusivePIDtasks[numInclusivePIDtasks]; | |
67 | namesInclusivePIDtasks[0] = suffixPIDtaskInclusive1; | |
68 | if (numInclusivePIDtasks > 1) | |
69 | namesInclusivePIDtasks[1] = suffixPIDtaskInclusive2; | |
70 | task->SetNamesOfInclusivePIDtasks(numInclusivePIDtasks, namesInclusivePIDtasks); | |
71 | } | |
72 | else | |
73 | task->SetNamesOfInclusivePIDtasks(numInclusivePIDtasks, 0x0); | |
74 | ||
75 | printf("PID framework:\n"); | |
76 | printf("Jet PID tasks: "); | |
77 | for (Int_t i = 0; i < numJetPIDtasks; i++) | |
78 | printf("%s ", task->GetNamesOfJetPIDtasks()[i].Data()); | |
79 | printf("\n"); | |
80 | printf("Inclusive PID task: "); | |
81 | for (Int_t i = 0; i < numInclusivePIDtasks; i++) | |
82 | printf("%s ", task->GetNamesOfInclusivePIDtasks()[i].Data()); | |
83 | printf("\n"); | |
84 | } | |
85 | ||
86 | ||
87 | AliAnalysisTaskIDFragmentationFunction *AddTaskIDFragmentationFunction(UInt_t iFlag=1, UInt_t filterMask=32, Int_t eventClass=0){ | |
88 | ||
89 | AliAnalysisTaskIDFragmentationFunction *ff=0; | |
90 | ||
91 | // UA1 Jets | |
92 | // only reconstructed (default) | |
93 | if(iFlag&(1<<0)) ff = AddTaskIDFragmentationFunction("jetsAOD_UA1", "", "", "", "", filterMask, 0.4,0,1000., eventClass); | |
94 | // charged MC tracks and jets | |
95 | if(iFlag&(1<<1)) ff = AddTaskIDFragmentationFunction("jetsAOD_UA1", "", "jetsAODMC2_UA1", "AODMC", "AODMC2", filterMask, 0.4,0,1000., eventClass); | |
96 | // charged MC tracks and jets with acceptance cuts | |
97 | if(iFlag&(1<<2)) ff = AddTaskIDFragmentationFunction("jetsAOD_UA1", "", "jetsAODMC2_UA1", "AODMCb", "AODMC2b", filterMask, 0.4,0,1000., eventClass); | |
98 | // kine tracks in acceptance, pythia jets in acceptance | |
99 | if(iFlag&(1<<3)) ff = AddTaskIDFragmentationFunction("jetsAOD_UA1", "", "", "KINEb", "KINEb", filterMask, 0.4,0,1000., eventClass); | |
100 | // reconstructed charged tracks after cuts, MC jets in acceptance | |
101 | if(iFlag&(1<<4)) ff = AddTaskIDFragmentationFunction("jetsAOD_UA1", "", "jetsMC2b", "AODMCb", "AOD2b", filterMask, 0.4,0,1000., eventClass); | |
102 | // reconstruction efficiency: pointing with rec jet axis into gen tracks | |
103 | if(iFlag&(1<<5)) ff = AddTaskIDFragmentationFunction("jetsAOD_UA1", "", "jetsAODMC2_UA1", "AODb", "AODMC2b", filterMask, 0.4,0,1000., eventClass); | |
104 | ||
105 | ||
106 | ||
107 | // Jet background subtracted | |
108 | // anti-kt, pt cut 1 GeV | |
109 | if(iFlag&(1<<20)) ff = AddTaskIDFragmentationFunction("clustersAOD_ANTIKT", "", "", "", "", filterMask, 0.4,2,1000.,eventClass, "_Skip00"); | |
110 | // anti-kt, pt cut 2 GeV | |
111 | if(iFlag&(1<<21)) ff = AddTaskIDFragmentationFunction("clustersAOD_ANTIKT", "", "", "", "", filterMask, 0.4,2,2000.,eventClass, "_Skip00"); | |
112 | // anti-kt, pt cut 150 MeV | |
113 | if(iFlag&(1<<22)) ff = AddTaskIDFragmentationFunction("clustersAOD_ANTIKT", "", "", "", "", filterMask, 0.2,2,150.,eventClass, "_Skip00"); | |
114 | ||
115 | ||
116 | // Jet background subtracted | |
117 | if(iFlag&(1<<23)) ff = AddTaskIDFragmentationFunction("clustersAOD_ANTIKT", "", "", "", "", filterMask, 0.4,2,150.,eventClass, "_Skip00"); | |
118 | // charged MC tracks and jets | |
119 | if(iFlag&(1<<24)) ff = AddTaskIDFragmentationFunction("clustersAOD_ANTIKT", "", "jetsAODMC2_FASTJET", "AODMC", "AODMC2", filterMask, 0.4,2,150.,eventClass, "_Skip00"); | |
120 | // charged MC tracks and jets with acceptance cuts | |
121 | if(iFlag&(1<<25)) ff = AddTaskIDFragmentationFunction("clustersAOD_ANTIKT", "", "jetsAODMC2_FASTJET", "AODMCb", "AODMC2b", filterMask, 0.4,2,150., eventClass, "_Skip00"); | |
122 | ||
123 | if(iFlag&(1<<26)) ff = AddTaskIDFragmentationFunction("clustersAOD_ANTIKT", "", "", "", "", filterMask, 0.4,1,150.,eventClass, "_Skip00"); | |
124 | ||
125 | if(iFlag&(1<<27)) ff = AddTaskIDFragmentationFunction("clustersAOD_ANTIKT", "", "", "", "", filterMask, 0.4,3,150.,eventClass, "_Skip00"); | |
126 | ||
127 | // SISCONE | |
128 | if(iFlag&(1<<28)) ff = AddTaskIDFragmentationFunction("jetsAOD_SISCONE", "", "", "", "", filterMask, 0.4,1,150.,eventClass); | |
129 | if(iFlag&(1<<29)) ff = AddTaskIDFragmentationFunction("jetsAOD_SISCONE", "", "", "", "", filterMask, 0.4,2,150.,eventClass); | |
130 | if(iFlag&(1<<30)) ff = AddTaskIDFragmentationFunction("jetsAOD_SISCONE", "", "", "", "", filterMask, 0.4,3,150.,eventClass); | |
131 | ||
132 | return ff; | |
133 | } | |
134 | ||
135 | // _______________________________________________________________________________________ | |
136 | ||
137 | AliAnalysisTaskIDFragmentationFunction *AddTaskIDFragmentationFunctionAllCent( | |
138 | const char* recJetsBranch, | |
139 | const char* recJetsBackBranch, | |
140 | const char* genJetsBranch, | |
141 | const char* jetType, | |
142 | const char* trackType, | |
143 | UInt_t filterMask, | |
144 | Float_t radius, | |
145 | int kBackgroundMode, | |
146 | Int_t PtTrackMin, | |
147 | TString BrOpt="", | |
148 | TString BrOpt2="", | |
149 | TString BrOpt3="", | |
150 | Float_t radiusBckg=0.4, | |
151 | Int_t FFMaxTrackPt = -1, | |
152 | Float_t FFMinNTracks = 0, | |
153 | TString suffixPIDtaskJets1 = "", | |
154 | TString suffixPIDtaskJets2 = "", | |
155 | TString suffixPIDtaskInclusive1 = "", | |
156 | TString suffixPIDtaskInclusive2 = "") | |
157 | { | |
158 | ||
159 | // adds task with given configuration for all centralities | |
160 | ||
161 | AliAnalysisTaskIDFragmentationFunction *ff=0; | |
162 | ||
163 | for(Int_t eventClass=1; eventClass<=4; eventClass++){ | |
164 | ||
165 | ff = AddTaskIDFragmentationFunction(recJetsBranch, | |
166 | recJetsBackBranch, | |
167 | genJetsBranch, | |
168 | jetType, | |
169 | trackType, | |
170 | filterMask, | |
171 | radius, | |
172 | kBackgroundMode, | |
173 | PtTrackMin, | |
174 | eventClass, | |
175 | BrOpt, | |
176 | BrOpt2, | |
177 | BrOpt3, | |
178 | radiusBckg | |
179 | FFMaxTrackPt, | |
180 | FFMinNTracks, | |
181 | suffixPIDtaskJets1, | |
182 | suffixPIDtaskJets2, | |
183 | suffixPIDtaskInclusive1, | |
184 | suffixPIDtaskInclusive2); | |
185 | } | |
186 | ||
187 | return ff; | |
188 | } | |
189 | ||
190 | // _______________________________________________________________________________________ | |
191 | ||
192 | AliAnalysisTaskIDFragmentationFunction *AddTaskIDFragmentationFunction( | |
193 | const char* recJetsBranch, | |
194 | const char* recJetsBackBranch, | |
195 | const char* genJetsBranch, | |
196 | const char* jetType, | |
197 | const char* trackType, | |
198 | UInt_t filterMask, | |
c4856fb1 | 199 | Float_t radius, |
200 | Int_t kBackgroundMode, | |
201 | Int_t PtTrackMin, | |
202 | Int_t eventClass=0, | |
203 | TString BrOpt="", | |
204 | TString BrOpt2="", | |
205 | TString BrOpt3="", | |
206 | Float_t radiusBckg=0.4, | |
e131b05f | 207 | Int_t FFMaxTrackPt = -1, |
208 | Int_t FFMinNTracks = 0, | |
209 | UInt_t filterMaskTracks = 0, | |
c4856fb1 | 210 | Bool_t onlyConsiderLeadingJets = kFALSE, |
e131b05f | 211 | TString suffixPIDtaskJets1 = "", |
212 | TString suffixPIDtaskJets2 = "", | |
213 | TString suffixPIDtaskInclusive1 = "", | |
0422bdbc | 214 | TString suffixPIDtaskInclusive2 = "", |
215 | Float_t MC_pThard_cut = -1.) | |
e131b05f | 216 | { |
217 | // Creates a fragmentation function task, | |
218 | // configures it and adds it to the analysis manager. | |
219 | ||
220 | //****************************************************************************** | |
221 | //*** Configuration Parameter ************************************************** | |
222 | //****************************************************************************** | |
223 | ||
224 | // space for configuration parameter: histo bin, cuts, ... | |
225 | // so far only default parameter used | |
226 | ||
227 | Int_t debug = -1; // debug level, -1: not set here | |
228 | ||
229 | //****************************************************************************** | |
230 | ||
231 | ||
232 | ||
233 | // Get the pointer to the existing analysis manager via the static access method. | |
234 | //============================================================================== | |
235 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
236 | if (!mgr) { | |
237 | ::Error("AddTaskIDFragmentationFunction", "No analysis manager to connect to."); | |
238 | return NULL; | |
239 | } | |
240 | ||
241 | // Check the analysis type using the event handlers connected to the analysis manager. | |
242 | //============================================================================== | |
243 | if (!mgr->GetInputEventHandler()) { | |
244 | ::Error("AddTaskIDFragmentationFunction", "This task requires an input event handler"); | |
245 | return NULL; | |
246 | } | |
247 | ||
248 | TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
249 | Printf("Data Type: %s", type.Data()); | |
250 | ||
251 | TString branchRecBackJets(recJetsBackBranch); | |
252 | TString branchRecJets(recJetsBranch); | |
253 | TString branchGenJets(genJetsBranch); | |
254 | TString typeJets(jetType); | |
255 | TString typeTracks(trackType); | |
256 | ||
257 | if(branchRecBackJets.Length()==0) branchRecBackJets = "noRecBackJets"; | |
258 | if(branchRecJets.Length()==0) branchRecJets = "noRecJets"; | |
259 | if(branchGenJets.Length()==0) branchGenJets = "noGenJets"; | |
260 | if(typeTracks.Length()==0) typeTracks = "trackTypeUndef"; | |
261 | if(typeJets.Length()==0) typeJets = "jetTypeUndef"; | |
262 | ||
263 | // Create the task and configure it. | |
264 | //=========================================================================== | |
265 | ||
266 | AliAnalysisTaskIDFragmentationFunction *task = new AliAnalysisTaskIDFragmentationFunction( | |
07b146b5 | 267 | Form("Fragmentation_Function_%s_%s_%s_%s_filterMaskTracks%d", branchRecJets.Data(), branchGenJets.Data(), typeJets.Data(), |
268 | typeTracks.Data(), filterMaskTracks)); | |
e131b05f | 269 | |
270 | if(debug>=0) task->SetDebugLevel(debug); | |
271 | ||
272 | Printf("Rec Jets %s", branchRecJets.Data()); | |
273 | Printf("Back Rec Jets %s", branchRecBackJets.Data()); | |
274 | Printf("Gen Jets %s", branchGenJets.Data()); | |
275 | Printf("Jet Type %s", typeJets.Data()); | |
276 | Printf("Track Type %s", typeTracks.Data()); | |
277 | ||
07b146b5 | 278 | Printf("Radius cut: %f", radius); |
279 | Printf("FilterMaskTracks: %d", filterMaskTracks); | |
0422bdbc | 280 | Printf("MC_pThard_cut: %f", MC_pThard_cut); |
07b146b5 | 281 | |
e131b05f | 282 | // attach the filter mask and options |
283 | TString cAdd = ""; | |
284 | cAdd += Form("%02d",(int)((TMath::Abs(radius)+0.01)*10.)); | |
285 | cAdd += Form("_B%d",(int)((kBackgroundMode))); | |
286 | cAdd += Form("_Filter%05d",filterMask); | |
287 | cAdd += Form("_Cut%05d",PtTrackMin); | |
288 | cAdd += Form("%s",BrOpt.Data()); | |
289 | cAdd += Form("%s",BrOpt2.Data()); | |
290 | ||
291 | Printf("%s",cAdd.Data()); | |
292 | ||
293 | TString cAddb = ""; | |
294 | cAddb += Form("%02d",(int)((radiusBckg+0.01)*10.)); | |
295 | cAddb += Form("_B%d",(int)((kBackgroundMode))); | |
296 | cAddb += Form("_Filter%05d",filterMask); | |
297 | cAddb += Form("_Cut%05d",PtTrackMin); | |
298 | cAddb += Form("%s",BrOpt.Data()); | |
299 | cAddb += Form("%s",BrOpt2.Data()); | |
300 | ||
301 | Printf("%s",cAddb.Data()); | |
302 | ||
303 | TString cAddmc = ""; | |
304 | cAddmc += Form("%02d",(int)((TMath::Abs(radius)+0.01)*10.)); | |
305 | cAddmc += Form("_B%d",(int)((kBackgroundMode))); | |
306 | cAddmc += Form("_Filter%05d",filterMask); | |
307 | cAddmc += Form("_Cut%05d",PtTrackMin); | |
308 | cAddmc += Form("%s",BrOpt3.Data()); | |
309 | ||
310 | Printf("%s",cAddmc.Data()); | |
311 | ||
312 | ||
313 | if(branchRecJets.Contains("AOD")&&branchRecJets.Contains("jets")&&!branchRecJets.Contains("MC"))branchRecJets = branchRecJets + cAdd; | |
314 | if(branchRecJets.Contains("AOD")&&branchRecJets.Contains("cluster")&&!branchRecJets.Contains("MC"))branchRecJets = branchRecJets + cAdd; | |
315 | ||
316 | if(branchRecBackJets.Contains("back")&&branchRecBackJets.Contains("cluster")&&!branchRecBackJets.Contains("MC"))branchRecBackJets = branchRecBackJets + cAddb; | |
317 | ||
318 | if(branchGenJets.Contains("AOD")&&branchGenJets.Contains("MC"))branchGenJets = branchGenJets + cAddmc; | |
319 | ||
320 | Printf("Gen jets branch %s: ", branchGenJets.Data()); | |
321 | Printf("Rec jets branch %s: ", branchRecJets.Data()); | |
322 | Printf("Jet backg branch %s: ", branchRecBackJets.Data()); | |
323 | ||
324 | if(!branchRecJets.Contains("noRecJets")) task->SetBranchRecJets(branchRecJets); | |
325 | if(!branchRecBackJets.Contains("noRecBackJets")) task->SetBranchRecBackJets(branchRecBackJets); | |
326 | if(!branchGenJets.Contains("noGenJets")) task->SetBranchGenJets(branchGenJets); | |
327 | ||
328 | ||
329 | if(typeTracks.Contains("AODMC2b")) task->SetTrackTypeGen(AliAnalysisTaskIDFragmentationFunction::kTrackAODMCChargedAcceptance); | |
330 | else if(typeTracks.Contains("AODMC2")) task->SetTrackTypeGen(AliAnalysisTaskIDFragmentationFunction::kTrackAODMCCharged); | |
331 | else if(typeTracks.Contains("AODMC")) task->SetTrackTypeGen(AliAnalysisTaskIDFragmentationFunction::kTrackAODMCAll); | |
332 | else if(typeTracks.Contains("KINE2b")) task->SetTrackTypeGen(AliAnalysisTaskIDFragmentationFunction::kTrackKineChargedAcceptance); | |
333 | else if(typeTracks.Contains("KINE2")) task->SetTrackTypeGen(AliAnalysisTaskIDFragmentationFunction::kTrackKineCharged); | |
334 | else if(typeTracks.Contains("KINE")) task->SetTrackTypeGen(AliAnalysisTaskIDFragmentationFunction::kTrackKineAll); | |
335 | else if(typeTracks.Contains("AODb")) task->SetTrackTypeGen(AliAnalysisTaskIDFragmentationFunction::kTrackAODCuts); | |
336 | else if(typeTracks.Contains("AOD")) task->SetTrackTypeGen(AliAnalysisTaskIDFragmentationFunction::kTrackAOD); | |
337 | else if(typeTracks.Contains("trackTypeUndef")) task->SetTrackTypeGen(0); // undefined | |
338 | else Printf("trackType %s not found", typeTracks.Data()); | |
339 | ||
340 | if(typeJets.Contains("AODMCb")) task->SetJetTypeGen(AliAnalysisTaskIDFragmentationFunction::kJetsGenAcceptance); | |
341 | else if(typeJets.Contains("AODMC")) task->SetJetTypeGen(AliAnalysisTaskIDFragmentationFunction::kJetsGen); | |
342 | else if(typeJets.Contains("KINEb")) task->SetJetTypeGen(AliAnalysisTaskIDFragmentationFunction::kJetsKineAcceptance); | |
343 | else if(typeJets.Contains("KINE")) task->SetJetTypeGen(AliAnalysisTaskIDFragmentationFunction::kJetsKine); | |
344 | else if(typeJets.Contains("AODb")) task->SetJetTypeGen(AliAnalysisTaskIDFragmentationFunction::kJetsRecAcceptance); | |
345 | else if(typeJets.Contains("AOD")) task->SetJetTypeGen(AliAnalysisTaskIDFragmentationFunction::kJetsRec); | |
346 | else if(typeJets.Contains("jetTypeUndef")) task->SetJetTypeGen(0); // undefined | |
347 | else Printf("jetType %s not found", typeJets.Data()); | |
348 | ||
349 | if(typeJets.Contains("AODMCb")) task->SetJetTypeRecEff(AliAnalysisTaskIDFragmentationFunction::kJetsGenAcceptance); // kJetsRecAcceptance | |
350 | else if(typeJets.Contains("AODb")) task->SetJetTypeRecEff(AliAnalysisTaskIDFragmentationFunction::kJetsRecAcceptance); | |
351 | else task->SetJetTypeRecEff(0); | |
352 | ||
353 | if(!filterMaskTracks) task->SetFilterMask(filterMask); | |
354 | else task->SetFilterMask(filterMaskTracks); | |
355 | ||
356 | task->SetEventSelectionMask(AliVEvent::kMB); | |
357 | task->SetEventClass(eventClass); | |
358 | ||
359 | // Set default parameters | |
360 | // Cut selection | |
361 | ||
362 | if(PtTrackMin == 150) task->SetTrackCuts(); // default : pt > 0.150 GeV, |eta|<0.9, full phi acc | |
363 | else if(PtTrackMin == 1000) task->SetTrackCuts(1.0, -0.9, 0.9, 0., 2*TMath::Pi()); | |
364 | else if(PtTrackMin == 2000) task->SetTrackCuts(2.0, -0.9, 0.9, 0., 2*TMath::Pi()); | |
365 | else task->SetTrackCuts(0.001*PtTrackMin,-0.9, 0.9, 0., 2*TMath::Pi()); | |
366 | ||
367 | ||
368 | task->SetJetCuts(); // default: jet pt > 5 GeV, |eta|<0.5, full phi acc | |
369 | task->SetFFRadius(radius); | |
370 | task->SetFFBckgRadius(); // default: R = 0.7 | |
371 | task->SetQAMode(); // default: qaMode = 3 | |
372 | task->SetFFMode(); // default: ffMode = 1 | |
373 | task->SetIDFFMode(0); // default: IDffMode = 0 | |
374 | task->SetEffMode(0); // default: effMode = 1 | |
375 | task->SetHighPtThreshold(); // default: pt > 5 Gev | |
376 | ||
377 | task->SetBckgMode(1); // default: bgMode = 1 | |
378 | task->SetBckgType(); | |
379 | task->SetBranchRecBackClusters(Form("clustersAOD_KT04_B0_Filter%05d_Cut00150_Skip00",filterMask)); | |
380 | ||
c4856fb1 | 381 | task->SetOnlyLeadingJets(onlyConsiderLeadingJets); // default: kFALSE |
382 | ||
0422bdbc | 383 | task->SetMCPtHardCut(MC_pThard_cut); |
384 | ||
e131b05f | 385 | // Define histo bins |
386 | task->SetFFHistoBins(23, 5, 120, 480, 0., 120.,70, 0., 7.,22, 0., 1.1); | |
387 | ||
388 | task->SetQAJetHistoBins(); | |
389 | task->SetQATrackHistoBins(); | |
390 | ||
391 | if(FFMaxTrackPt>0) task->SetFFMaxTrackPt(FFMaxTrackPt); | |
392 | if(FFMinNTracks>0) task->SetFFMinNTracks(FFMinNTracks); | |
393 | ||
394 | mgr->AddTask(task); | |
395 | ||
396 | // Create ONLY the output containers for the data produced by the task. | |
397 | // Get and connect other common input/output containers via the manager as below | |
398 | //============================================================================== | |
399 | ||
97bd2587 | 400 | TString strList(Form("idfracfunc_%s_%s_%s_%s_cl%d", branchRecJets.Data(), branchGenJets.Data(), typeTracks.Data(), typeJets.Data(), eventClass)); |
e131b05f | 401 | |
402 | TString strDir(Form("%s:PWGJE_IDFragmentationFunction_%s_%s_%s_%s_cl%d", | |
403 | AliAnalysisManager::GetCommonFileName(), branchRecJets.Data(), branchGenJets. Data(), | |
404 | typeTracks.Data(), typeJets.Data(), eventClass)); | |
405 | ||
406 | ||
407 | if(FFMaxTrackPt>0){ | |
408 | strList += Form("_FFMaxPt%d", FFMaxTrackPt); | |
409 | strDir += Form("_FFMaxPt%d", FFMaxTrackPt); | |
410 | } | |
411 | if(FFMinNTracks>0){ | |
412 | strList += Form("_minNTr%d",FFMinNTracks); | |
413 | strDir += Form("_minNTr%d",FFMinNTracks); | |
414 | } | |
415 | ||
416 | if(radius<0){ | |
417 | strList += "_trackRefs"; | |
418 | strDir += "_trackRefs"; | |
419 | } | |
420 | if(filterMaskTracks){ | |
421 | strList += Form("_TrackFilter%05d",filterMaskTracks); | |
422 | strDir += Form("_TrackFilter%05d",filterMaskTracks); | |
423 | } | |
424 | ||
425 | ||
426 | AliAnalysisDataContainer *coutput_FragFunc = mgr->CreateContainer(strList,TList::Class(), | |
427 | AliAnalysisManager::kOutputContainer, | |
428 | strDir); | |
429 | ||
430 | mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer()); | |
0422bdbc | 431 | mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer());// Comment to run locally |
e131b05f | 432 | mgr->ConnectOutput (task, 1, coutput_FragFunc); |
433 | ||
434 | postConfig(task, suffixPIDtaskJets1, suffixPIDtaskJets2, suffixPIDtaskInclusive1, suffixPIDtaskInclusive2); | |
435 | ||
436 | return task; | |
437 | } | |
438 |