]>
Commit | Line | Data |
---|---|---|
69652c63 | 1 | AliAnalysisTaskParticleCorrelation *AddTaskPartCorr |
2 | ( | |
3 | TString inputDataType, | |
4 | TString calorimeter, | |
5 | Bool_t kPrintSettings = kTRUE, | |
6 | Bool_t kSimulation = kFALSE, | |
7 | Bool_t outputAOD=kFALSE, | |
f676c850 | 8 | TString period = "" |
69652c63 | 9 | ) { |
10 | ||
90eb3a19 | 11 | // Creates a PartCorr task, configures it and adds it to the analysis manager. |
12 | ||
13 | // Get the pointer to the existing analysis manager via the static access method. | |
14 | //============================================================================== | |
15 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
16 | if (!mgr) { | |
17 | ::Error("AddTaskPartCorr", "No analysis manager to connect to."); | |
18 | return NULL; | |
19 | } | |
2244659d | 20 | |
1e3689fa | 21 | Bool_t kUseKinematics = kFALSE; |
22 | if(kSimulation) { | |
23 | kUseKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE; | |
2244659d | 24 | if (!kUseKinematics && inputDataType == "AOD") kUseKinematics = kTRUE; //AOD primary should be available ... |
1e3689fa | 25 | } |
26 | ||
27 | cout<<"********* ACCESS KINE? "<<kUseKinematics<<endl; | |
28 | ||
29 | // Configure analysis | |
30 | //=========================================================================== | |
31 | ||
32 | // *** Reader *** | |
2244659d | 33 | AliCaloTrackReader * reader =0x0 ; |
34 | if(inputDataType.Contains("AOD")) reader = new AliCaloTrackAODReader(); | |
35 | else if(inputDataType=="ESD") reader = new AliCaloTrackESDReader(); | |
36 | else if(inputDataType=="MC" && inputDataType == "ESD") reader = new AliCaloTrackMCReader(); | |
1e3689fa | 37 | reader->SetDebug(-1);//10 for lots of messages |
38 | reader->SwitchOnCTS(); | |
39 | //reader->SetDeltaAODFileName(""); | |
40 | //if(!kSimulation) reader->SetFiredTriggerClassName("CINT1B-ABCE-NOPF-ALL"); | |
911e17cd | 41 | if(calorimeter == "EMCAL") { |
afabc52f | 42 | reader->SwitchOnEMCALCells(); |
69652c63 | 43 | reader->SwitchOnEMCAL(); |
911e17cd | 44 | } |
45 | if(calorimeter == "PHOS") { | |
afabc52f | 46 | reader->SwitchOnPHOSCells(); |
47 | reader->SwitchOnPHOS(); | |
911e17cd | 48 | } |
1e3689fa | 49 | |
2244659d | 50 | // for case inputDataType="deltaAOD", no need to fill the EMCAL/PHOS cluster lists |
51 | if(inputDataType.Contains("delta")){ | |
1e3689fa | 52 | reader->SwitchOffEMCAL(); |
53 | reader->SwitchOffPHOS(); | |
54 | reader->SwitchOffEMCALCells(); | |
55 | reader->SwitchOffPHOSCells(); | |
1e86c71e | 56 | } |
1e3689fa | 57 | |
4a55403a | 58 | if(kUseKinematics){ |
afabc52f | 59 | if(inputDataType == "ESD"){ |
60 | reader->SwitchOnStack(); | |
61 | reader->SwitchOffAODMCParticles(); | |
62 | } | |
63 | else if(inputDataType == "AOD"){ | |
64 | reader->SwitchOffStack(); | |
65 | reader->SwitchOnAODMCParticles(); | |
66 | } | |
4a55403a | 67 | } |
69652c63 | 68 | |
69 | //----------------------------------------------------------------- | |
70 | // Switch on cluster energy smearing | |
71 | // -> SIMULATION | |
72 | // -> EMCAL | |
73 | //----------------------------------------------------------------- | |
74 | ||
75 | if (kSimulation && calorimeter == "EMCAL") { | |
76 | //switch on cluster energy smearing | |
77 | reader->SwitchOnClusterEnergySmearing(); | |
78 | reader->SetSmearingParameters(0,0.07); | |
f676c850 | 79 | reader->SetSmearingParameters(1,0.00); |
80 | reader->SetSmearingParameters(2,0.00); | |
69652c63 | 81 | } |
82 | ||
afabc52f | 83 | |
69652c63 | 84 | //----------------------------------------------------------------- |
85 | // Z vertex cut | |
0b13c1f9 | 86 | reader->SetZvertexCut(10.); |
69652c63 | 87 | //----------------------------------------------------------------- |
88 | ||
89 | //----------------------------------------------------------------- | |
90 | // Min particle pT | |
91 | //----------------------------------------------------------------- | |
2244659d | 92 | reader->SetEMCALPtMin(0.3); |
93 | reader->SetPHOSPtMin(0.3); | |
94 | reader->SetCTSPtMin(0.1); | |
69652c63 | 95 | |
96 | if(outputAOD) reader->SwitchOnWriteDeltaAOD() ; | |
4a55403a | 97 | if(kPrintSettings) reader->Print(""); |
afabc52f | 98 | |
69652c63 | 99 | |
100 | //----------------------------------------------------------------- | |
101 | // Bad cluster removal | |
102 | // -> REAL DATA ONLY | |
103 | //----------------------------------------------------------------- | |
104 | reader->SwitchOnSuspiciousClustersRemoval(); | |
105 | ||
106 | ||
fa991e42 | 107 | // *** Calorimeters Utils *** |
108 | AliCalorimeterUtils *cu = new AliCalorimeterUtils; | |
69652c63 | 109 | |
110 | //----------------------------------------------------------------- | |
111 | // Non-linearity corrections | |
112 | // -> REAL DATA AND SIMULATION | |
113 | // -> EMCAL | |
114 | //----------------------------------------------------------------- | |
115 | if (calorimeter == "EMCAL") { | |
116 | cu->SwitchOnCorrectClusterLinearity(); | |
117 | if (!kSimulation) { | |
118 | cu->GetEMCALRecoUtils()->SetNonLinearityFunction(AliEMCALRecoUtils::kBeamTestCorrected); | |
69652c63 | 119 | } |
120 | else { | |
121 | cu->GetEMCALRecoUtils()->SetNonLinearityFunction(AliEMCALRecoUtils::kPi0MC); | |
122 | cu->GetEMCALRecoUtils()->SetNonLinearityParam(0,1.001 ) ; | |
123 | cu->GetEMCALRecoUtils()->SetNonLinearityParam(1,-0.01264) ; | |
124 | cu->GetEMCALRecoUtils()->SetNonLinearityParam(2,-0.03632) ; | |
125 | cu->GetEMCALRecoUtils()->SetNonLinearityParam(3,0.1798 ) ; | |
126 | cu->GetEMCALRecoUtils()->SetNonLinearityParam(4,-0.522 ) ; | |
127 | } | |
128 | } | |
129 | ||
130 | //----------------------------------------------------------------- | |
131 | // Remove clusters close to borders, | |
132 | // at least max energy cell is 1 cell away | |
133 | //----------------------------------------------------------------- | |
fa991e42 | 134 | cu->SetNumberOfCellsFromEMCALBorder(1); |
1e3689fa | 135 | cu->SetNumberOfCellsFromPHOSBorder(2); |
1e3689fa | 136 | |
1e3689fa | 137 | |
69652c63 | 138 | //----------------------------------------------------------------- |
139 | // Remove EMCAL hottest channels | |
140 | // -> REAL DATA AND SIMULATION | |
141 | // -> EMCAL | |
142 | // Recover the file from alien | |
143 | // /alice/cern.ch/user/g/gconesab/BadChannelsDB | |
144 | //----------------------------------------------------------------- | |
f676c850 | 145 | if (calorimeter == "EMCAL" && period !="") { |
69652c63 | 146 | cu->SwitchOnBadChannelsRemoval(); |
147 | cu->SwitchOnDistToBadChannelRecalculation(); | |
148 | TFile * fbad = new TFile("BadChannels.root","read"); | |
149 | TH2I * hbad0 = (TH2I*)fbad->Get("EMCALBadChannelMap_Mod0"); | |
150 | TH2I * hbad1 = (TH2I*)fbad->Get("EMCALBadChannelMap_Mod1"); | |
151 | TH2I * hbad2 = (TH2I*)fbad->Get("EMCALBadChannelMap_Mod2"); | |
152 | TH2I * hbad3 = (TH2I*)fbad->Get("EMCALBadChannelMap_Mod3"); | |
153 | cu->SetEMCALChannelStatusMap(0,hbad0); | |
154 | cu->SetEMCALChannelStatusMap(1,hbad1); | |
155 | cu->SetEMCALChannelStatusMap(2,hbad2); | |
156 | cu->SetEMCALChannelStatusMap(3,hbad3); | |
157 | } | |
158 | ||
159 | ||
160 | //----------------------------------------------------------------- | |
161 | // Misalignment + recalculate position | |
162 | // -> REAL DATA and SIMULATION | |
163 | // -> EMCAL | |
164 | //----------------------------------------------------------------- | |
165 | if (calorimeter == "EMCAL") { | |
166 | cu->SetEMCALGeometryName("EMCAL_FIRSTYEARV1"); | |
167 | cu->GetEMCALRecoUtils()->SetParticleType(AliEMCALRecoUtils::kPhoton); | |
168 | cu->GetEMCALRecoUtils()->SetW0(4.5); | |
169 | cu->GetEMCALRecoUtils()->SetPositionAlgorithm(AliEMCALRecoUtils::kPosTowerGlobal); | |
170 | cu->SwitchOnLoadOwnEMCALGeometryMatrices(); | |
171 | TGeoHMatrix *matrix[4]; | |
172 | ||
173 | double rotationMatrix[4][9] = {-0.014587, -0.999892, -0.002031, 0.999892, -0.014591, 0.001979, -0.002009, -0.002002, 0.999996, | |
174 | -0.014587, 0.999892, 0.002031, 0.999892, 0.014591, -0.001979, -0.002009, 0.002002, -0.999996, | |
175 | -0.345864, -0.938278, -0.003412, 0.938276, -0.345874, 0.003010, -0.004004, -0.002161, 0.999990, | |
176 | -0.345861, 0.938280, 0.003412, 0.938276, 0.345874, -0.003010, -0.004004, 0.002161, -0.999990}; | |
177 | ||
178 | double translationMatrix[4][3] = {0.351659, 447.576446, 176.269742, | |
179 | 1.062577, 446.893974, -173.728870, | |
180 | -154.213287, 419.306156, 176.753692, | |
181 | -153.018950, 418.623681, -173.243605}; | |
182 | for(int j=0; j<4; j++) | |
183 | { | |
184 | matrix[j] = new TGeoHMatrix(); | |
185 | matrix[j]->SetRotation(rotationMatrix[j]); | |
186 | matrix[j]->SetTranslation(translationMatrix[j]); | |
187 | matrix[j]->Print(); | |
188 | cu->SetEMCALGeometryMatrixInSM(matrix[j],j); | |
189 | } | |
190 | cu->SwitchOnRecalculateClusterTrackMatching(); | |
191 | } | |
192 | ||
193 | //----------------------------------------------------------------- | |
194 | // Time dependent corrections | |
195 | // -> REAL_DATA ONLY | |
196 | // -> EMCAL | |
197 | // Recover file from alien | |
198 | // /alice/cern.ch/user/g/gconesab/TimeDepCorrectionDB | |
199 | //----------------------------------------------------------------- | |
f676c850 | 200 | if (!kSimulation && calorimeter == "EMCAL" && period!="") { |
69652c63 | 201 | cu->GetEMCALRecoUtils()->SwitchOnTimeDepCorrection(); |
202 | char cmd[200] ; | |
203 | sprintf(cmd, ".!tar xvfz CorrectionFiles.tgz >& /dev/null") ; | |
204 | gROOT->ProcessLine(cmd) ; | |
205 | } | |
1e3689fa | 206 | |
207 | ||
69652c63 | 208 | //------------------------------------------------------------------------ |
209 | // Recalibration factors | |
210 | // -> REAL DATA ONLY | |
211 | // -> EMCAL | |
212 | // Recover the file from alien for LHC10d pass2 | |
213 | // /alice/cern.ch/user/g/gconesab/RecalDB/december2010 -> LHC10d pass2 | |
214 | // /alice/cern.ch/user/g/gconesab/RecalDB/summer_december2010 -> LHC10e pass1 | |
215 | // ****** | |
216 | // For other periods/passes, see | |
217 | // https://twiki.cern.ch/twiki/bin/view/ALICE/EMCalOffline#Summary_of_Calibration_and_Align | |
218 | //------------------------------------------------------------------------ | |
219 | ||
f676c850 | 220 | if (calorimeter == "EMCAL" && period !="") { |
69652c63 | 221 | cu->SwitchOnRecalibration(); |
222 | TFile* f = 0x0 ; | |
223 | if (!kSimulation) { | |
224 | if (period == "LHC10d") f = new TFile("RecalibrationFactors_LHC10d.root","read"); | |
225 | else if (period == "LHC10e") f = new TFile("RecalibrationFactors_LHC10e.root","read"); | |
226 | else Fatal("AddTaskPartCorr","run period not supported"); | |
227 | } | |
228 | else { | |
229 | f = new TFile("DecalibrationFactors.root","read"); | |
230 | } | |
231 | if (!f || !f->IsOpen()) Fatal("AddTaskPartCorr","Re(De)-calibration file not found"); | |
232 | ||
233 | Info("AddTaskPartCorr",Form("Using calibration files for period %s",period.Data())); | |
234 | ||
235 | TH2F * h0 = (TH2F*)f->Get("EMCALRecalFactors_SM0"); | |
236 | TH2F * h1 = (TH2F*)f->Get("EMCALRecalFactors_SM1"); | |
237 | TH2F * h2 = (TH2F*)f->Get("EMCALRecalFactors_SM2"); | |
238 | TH2F * h3 = (TH2F*)f->Get("EMCALRecalFactors_SM3"); | |
239 | cu->SetEMCALChannelRecalibrationFactors(0,h0); | |
240 | cu->SetEMCALChannelRecalibrationFactors(1,h1); | |
241 | cu->SetEMCALChannelRecalibrationFactors(2,h2); | |
242 | cu->SetEMCALChannelRecalibrationFactors(3,h3); | |
243 | } | |
244 | ||
245 | cu->SetDebug(-1); | |
246 | ||
247 | ||
a3aebfff | 248 | // ##### Analysis algorithm settings #### |
afabc52f | 249 | |
4df35693 | 250 | // ------------------------------------------------- |
32301b07 | 251 | // --- Photon/Pi0/Omega/Electron Analysis --- |
4df35693 | 252 | // ------------------------------------------------- |
253 | ||
254 | AliAnaPhoton *anaphoton = new AliAnaPhoton(); | |
255 | anaphoton->SetDebug(-1); //10 for lots of messages | |
2244659d | 256 | |
57eb7f00 | 257 | if(calorimeter == "PHOS"){ |
69652c63 | 258 | anaphoton->SetNCellCut(2); |
f676c850 | 259 | anaphoton->SetMinPt(0.3); |
1e3689fa | 260 | anaphoton->SetMinDistanceToBadChannel(2, 4, 5); |
57eb7f00 | 261 | } |
262 | else {//EMCAL | |
69652c63 | 263 | anaphoton->SetNCellCut(1); |
264 | anaphoton->SetMinPt(0.); | |
f676c850 | 265 | //if(!kUseKinematics) anaphoton->SetTimeCut(400,900);// Time window of [400-900] ns |
266 | anaphoton->SetMinDistanceToBadChannel(1, 2, 3); | |
57eb7f00 | 267 | } |
4df35693 | 268 | anaphoton->SetCalorimeter(calorimeter); |
269 | if(kUseKinematics) anaphoton->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
270 | else anaphoton->SwitchOffDataMC() ; | |
271 | anaphoton->SwitchOffCaloPID(); | |
272 | anaphoton->SwitchOffFiducialCut(); | |
de8a210f | 273 | if(kSimulation){ |
1e3689fa | 274 | anaphoton->SwitchOnFiducialCut(); |
3f25d966 | 275 | AliFiducialCut * fidCut1stYear = anaphoton->GetFiducialCut(); |
7e7694bb | 276 | fidCut1stYear->DoCTSFiducialCut(kFALSE) ; |
277 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; | |
278 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; | |
279 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
280 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
de8a210f | 281 | } |
1e3689fa | 282 | |
2244659d | 283 | if(!inputDataType.Contains("delta")) { |
1e3689fa | 284 | anaphoton->SetOutputAODName(Form("Photons%s",calorimeter.Data())); |
285 | anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
4df35693 | 286 | } |
287 | else anaphoton->SetInputAODName(Form("Photons%s",calorimeter.Data())); | |
288 | anaphoton->AddToHistogramsName("AnaPhotonCorr_"); | |
de8a210f | 289 | //Set Histograms bins and ranges |
69652c63 | 290 | anaphoton->SetHistoPtRangeAndNBins(0, 20, 200) ; |
4df35693 | 291 | if(kPrintSettings) anaphoton->Print(""); |
7e7694bb | 292 | |
4df35693 | 293 | // ----------------------------------- |
294 | // --- Pi0 Invariant Mass Analysis --- | |
295 | // ----------------------------------- | |
1e3689fa | 296 | |
90eb3a19 | 297 | AliAnaPi0 *anapi0 = new AliAnaPi0(); |
74b57e64 | 298 | anapi0->SetDebug(-1);//10 for lots of messages |
4df35693 | 299 | anapi0->SetInputAODName(Form("Photons%s",calorimeter.Data())); |
90eb3a19 | 300 | anapi0->SetCalorimeter(calorimeter); |
5ae09196 | 301 | anapi0->SwitchOnMultipleCutAnalysis(); |
0cdb88b8 | 302 | if(kSimulation){ |
1e3689fa | 303 | anapi0->SwitchOnFiducialCut(); |
4f155d15 | 304 | AliFiducialCut * fidCut1stYear = anapi0->GetFiducialCut(); |
305 | fidCut1stYear->DoCTSFiducialCut(kFALSE) ; | |
306 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; | |
decca433 | 307 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; |
308 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
309 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
2244659d | 310 | } |
af7b3903 | 311 | |
afabc52f | 312 | //settings for pp collision |
7e7694bb | 313 | anapi0->SwitchOnOwnMix(); |
2244659d | 314 | anapi0->SwitchOnEventSelection() ; |
afabc52f | 315 | anapi0->SetNCentrBin(1); |
af7b3903 | 316 | //anapi0->SetMultiplicity(80, 120); |
2244659d | 317 | anapi0->SetMultiBin(1); |
0ae57829 | 318 | if(kUseKinematics)anapi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
319 | else anapi0->SwitchOffDataMC() ; | |
6921fa00 | 320 | if(calorimeter=="PHOS") anapi0->SetNumberOfModules(3); //PHOS first year |
321 | else anapi0->SetNumberOfModules(4); //EMCAL first year | |
69652c63 | 322 | anapi0->SetHistoPtRangeAndNBins(0, 20, 40) ; |
0cdb88b8 | 323 | //anapi0->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
324 | //anapi0->SetHistoEtaRangeAndNBins(-0.8, 0.8, 200) ; | |
af7b3903 | 325 | anapi0->SetHistoMassRangeAndNBins(0., 0.9, 300) ; |
326 | anapi0->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ; | |
327 | anapi0->SetHistoTrackMultiplicityRangeAndNBins(0, 200, 20); | |
328 | ||
4a55403a | 329 | if(kPrintSettings) anapi0->Print(""); |
32301b07 | 330 | |
331 | //--------------------------- | |
332 | //Pi0, event by event | |
333 | //--------------------------- | |
7e7694bb | 334 | |
32301b07 | 335 | AliAnaPi0EbE *anapi0ebe = new AliAnaPi0EbE(); |
2244659d | 336 | anapi0ebe->SwitchOffEventSelection() ; |
69652c63 | 337 | //anapi0ebe->SetMultiplicity(80, 120); |
2244659d | 338 | anapi0ebe->SetMultiBin(1); |
32301b07 | 339 | anapi0ebe->SetDebug(-1);//10 for lots of messages |
340 | anapi0ebe->SetAnalysisType(AliAnaPi0EbE::kIMCalo); | |
341 | anapi0ebe->SetMinPt(0); | |
342 | anapi0ebe->SetCalorimeter(calorimeter); | |
343 | anapi0ebe->SetInputAODName(Form("Photons%s",calorimeter.Data())); | |
2244659d | 344 | if(!inputDataType.Contains("delta")) { |
4f155d15 | 345 | anapi0ebe->SetOutputAODName(Form("Pi0s%s",calorimeter.Data())); |
346 | anapi0ebe->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
32301b07 | 347 | } |
348 | else anapi0ebe->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
4f155d15 | 349 | |
32301b07 | 350 | if(kUseKinematics) anapi0ebe->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
351 | else anapi0ebe->SwitchOffDataMC() ; | |
4f155d15 | 352 | |
decca433 | 353 | AliNeutralMesonSelection *nms = anapi0ebe->GetNeutralMesonSelection(); |
57b97dc6 | 354 | nms->SetInvMassCutRange(0.08, 0.18) ; |
decca433 | 355 | nms->KeepNeutralMesonSelectionHistos(kTRUE); |
356 | //Set Histrograms bins and ranges | |
57b97dc6 | 357 | if(calorimeter=="EMCAL" ){ |
358 | nms->SetHistoERangeAndNBins(0, 15, 150) ; | |
69652c63 | 359 | anapi0ebe->SetHistoPtRangeAndNBins(0, 30, 60) ; |
57b97dc6 | 360 | } |
361 | else{ | |
362 | nms->SetHistoERangeAndNBins(0, 30, 200) ; | |
363 | anapi0ebe->SetHistoPtRangeAndNBins(0, 30, 100) ; | |
364 | } | |
decca433 | 365 | // nms->SetHistoPtRangeAndNBins(0, 50, 100) ; |
366 | // nms->SetHistoAngleRangeAndNBins(0, 0.3, 100) ; | |
367 | // nsm->SetHistoIMRangeAndNBins(0, 0.4, 100) ; | |
32301b07 | 368 | //Set Histrograms bins and ranges |
32301b07 | 369 | // anapi0->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
370 | // anapi0->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
371 | if(kPrintSettings) anapi0ebe->Print(""); | |
372 | ||
373 | //------------------------------------- | |
374 | //*** analysis the omega->pi0+gamma *** | |
375 | //------------------------------------ | |
376 | AliAnaOmegaToPi0Gamma *anaomegaToPi0Gamma = new AliAnaOmegaToPi0Gamma(); | |
377 | anaomegaToPi0Gamma->SetDebug(-1);//10 for lots of messages | |
378 | anaomegaToPi0Gamma->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
379 | anaomegaToPi0Gamma->SetInputAODPhotonName(Form("Photons%s",calorimeter.Data())); | |
380 | anaomegaToPi0Gamma->SetNPID(1); | |
381 | anaomegaToPi0Gamma->SetNVtxZ(1); | |
382 | anaomegaToPi0Gamma->SetNEventsMixed(4); | |
383 | if(calorimeter=="PHOS") | |
7e7694bb | 384 | anaomegaToPi0Gamma->SetPi0MassPeakWidthCut(0.008); // PHOS |
32301b07 | 385 | else if(calorimeter=="EMCAL") |
7e7694bb | 386 | anaomegaToPi0Gamma->SetPi0MassPeakWidthCut(0.012); // EMCAL |
32301b07 | 387 | anaomegaToPi0Gamma->SetHistoPtRangeAndNBins(0, 20, 100) ; |
388 | anaomegaToPi0Gamma->SetHistoMassRangeAndNBins(0, 1, 100) ; | |
389 | anaomegaToPi0Gamma->SetPi0OverOmegaPtCut(0.8); | |
390 | anaomegaToPi0Gamma->SetGammaOverOmegaPtCut(0.2); | |
391 | if(kUseKinematics) anaomegaToPi0Gamma->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
392 | else anaomegaToPi0Gamma->SwitchOffDataMC() ;//Access MC stack and fill more histograms | |
393 | anaomegaToPi0Gamma->AddToHistogramsName(Form("AnaOmegaToPi0Gamma%s_",calorimeter.Data())); | |
394 | if(kPrintSettings) anaomegaToPi0Gamma->Print(""); | |
395 | ||
396 | ||
d7c10d78 | 397 | // //--------------------------------------------------------------------- |
398 | // // Electron/btag | |
399 | // //--------------------------------------------------------------------- | |
400 | // if(calorimeter=="EMCAL"){ | |
401 | // | |
402 | // AliAnaBtag *anabtag = new AliAnaBtag(); | |
403 | // anabtag->SetDebug(-1); //10 for lots of messages | |
404 | // if(kUseKinematics){ | |
405 | // anabtag->SwitchOnDataMC(); | |
406 | // anabtag->SetMinPt(1.); | |
407 | // } | |
408 | // anabtag->SetOutputAODName("ElectronsEMCAL"); | |
409 | // anabtag->SetOutputAODClassName("AliAODPWG4Particle"); | |
410 | // //anabtag->SetHistoPtRangeAndNBins(0, 100, 100) ; | |
411 | // //anabtag->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
412 | // //anabtag->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
413 | // if(kPrintSettings)anabtag->Print(""); | |
414 | // } | |
a2de71cc | 415 | |
32301b07 | 416 | //================================== |
90eb3a19 | 417 | // ### Isolation analysis ### |
32301b07 | 418 | //================================= |
419 | //Photon | |
90eb3a19 | 420 | AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation(); |
421 | anaisol->SetDebug(-1); | |
4007d0a2 | 422 | anaisol->SetMinPt(0); |
de8a210f | 423 | anaisol->SetInputAODName(Form("Photons%s",calorimeter.Data())); |
91f45193 | 424 | anaisol->SetAODObjArrayName("ICPhoton"); |
90eb3a19 | 425 | anaisol->SetCalorimeter(calorimeter); |
4a55403a | 426 | if(kUseKinematics) anaisol->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
427 | else anaisol->SwitchOffDataMC() ; | |
90eb3a19 | 428 | //Select clusters with no pair, if both clusters with pi0 mass |
429 | anaisol->SwitchOffInvariantMass(); | |
90eb3a19 | 430 | //Do isolation cut |
7787a778 | 431 | AliIsolationCut * ic = anaisol->GetIsolationCut(); |
432 | ic->SetConeSize(0.4); | |
2244659d | 433 | ic->SetPtThreshold(0.7); |
434 | ic->SetPtFraction(0.1); | |
435 | ic->SetSumPtThreshold(1.0) ; | |
0c1383b5 | 436 | ic->SetParticleTypeInCone(AliIsolationCut::kOnlyCharged); |
2244659d | 437 | ic->SetICMethod(AliIsolationCut::kSumPtFracIC); |
7787a778 | 438 | if(kPrintSettings) ic->Print(""); |
1e3689fa | 439 | |
90eb3a19 | 440 | //Do or not do isolation with previously produced AODs. |
441 | //No effect if use of SwitchOnSeveralIsolation() | |
442 | anaisol->SwitchOffReIsolation(); | |
443 | //Multiple IC | |
444 | anaisol->SwitchOffSeveralIsolation() ; | |
de8a210f | 445 | //Set Histograms bins and ranges |
4df35693 | 446 | anaisol->SetHistoPtRangeAndNBins(0, 50, 200) ; |
de8a210f | 447 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
448 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
449 | anaisol->AddToHistogramsName("AnaIsolPhoton_"); | |
4a55403a | 450 | if(kPrintSettings) anaisol->Print(""); |
90eb3a19 | 451 | |
32301b07 | 452 | //Pi0 |
453 | AliAnaParticleIsolation *anaisolpi0 = new AliAnaParticleIsolation(); | |
454 | anaisolpi0->SetDebug(-1); | |
455 | anaisolpi0->SetMinPt(0); | |
456 | anaisolpi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
457 | anaisolpi0->AddToHistogramsName("AnaIsolPi0_"); | |
91f45193 | 458 | anaisolpi0->SetAODObjArrayName("ICPi0"); |
32301b07 | 459 | anaisolpi0->SetCalorimeter(calorimeter); |
460 | if(kUseKinematics) anaisolpi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
461 | else anaisolpi0->SwitchOffDataMC() ; | |
462 | //Select clusters with no pair, if both clusters with pi0 mass | |
463 | anaisolpi0->SwitchOffInvariantMass(); | |
32301b07 | 464 | //Do isolation cut |
465 | AliIsolationCut * ic2 = anaisolpi0->GetIsolationCut(); | |
466 | ic2->SetConeSize(0.4); | |
2244659d | 467 | ic2->SetPtThreshold(0.7); |
468 | ic2->SetPtFraction(0.1); | |
469 | ic2->SetSumPtThreshold(1.0) ; | |
470 | ic2->SetICMethod(AliIsolationCut::kSumPtFracIC); | |
471 | ic2->SetParticleTypeInCone(AliIsolationCut::kOnlyCharged); | |
17708df9 | 472 | if(kPrintSettings) ic2->Print(""); |
32301b07 | 473 | //Do or not do isolation with previously produced AODs. |
474 | //No effect if use of SwitchOnSeveralIsolation() | |
475 | anaisolpi0->SwitchOffReIsolation(); | |
476 | //Multiple IC | |
477 | anaisolpi0->SwitchOffSeveralIsolation() ; | |
478 | //Set Histograms bins and ranges | |
479 | anaisolpi0->SetHistoPtRangeAndNBins(0, 50, 200) ; | |
480 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
481 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
17708df9 | 482 | if(kPrintSettings) anaisolpi0->Print(""); |
32301b07 | 483 | |
484 | //=========================== | |
485 | //Correlation analysis | |
486 | //=========================== | |
487 | ||
a3aebfff | 488 | // ### Correlation with Jet Finder AOD output |
489 | AliAnaParticleJetFinderCorrelation *anacorrjet = new AliAnaParticleJetFinderCorrelation(); | |
de8a210f | 490 | anacorrjet->SetInputAODName(Form("Photons%s",calorimeter.Data())); |
ff45398a | 491 | anacorrjet->SwitchOffFiducialCut(); |
a3aebfff | 492 | anacorrjet->SetDebug(-1); |
493 | anacorrjet->SetConeSize(1); | |
494 | anacorrjet->SelectIsolated(kTRUE); // do correlation with isolated photons | |
495 | anacorrjet->SetPtThresholdInCone(0.2); | |
496 | anacorrjet->SetDeltaPhiCutRange(0.5,5.5);//Mostly Open Cuts | |
497 | anacorrjet->SetRatioCutRange(0.01,3); //Mostly Open Cuts | |
498 | anacorrjet->UseJetRefTracks(kFALSE); //Not working now | |
de8a210f | 499 | //Set Histograms bins and ranges |
4df35693 | 500 | anacorrjet->SetHistoPtRangeAndNBins(0, 50, 200) ; |
afabc52f | 501 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
502 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
4a55403a | 503 | if(kPrintSettings) anacorrjet->Print(""); |
90eb3a19 | 504 | |
505 | // ### Correlation with hadrons | |
a3aebfff | 506 | AliAnaParticleHadronCorrelation *anacorrhadron = new AliAnaParticleHadronCorrelation(); |
de8a210f | 507 | anacorrhadron->SetInputAODName(Form("Photons%s",calorimeter.Data())); |
de8a210f | 508 | anacorrhadron->AddToHistogramsName("AnaHadronCorrPhoton_"); |
91f45193 | 509 | anacorrhadron->SetAODObjArrayName("PhotonHadronCorr"); |
a3aebfff | 510 | anacorrhadron->SetDebug(-1); |
12524a23 | 511 | anacorrhadron->SwitchOffCaloPID(); |
2244659d | 512 | if(kSimulation){ |
513 | anacorrhadron->SwitchOnFiducialCut(); | |
514 | AliFiducialCut * fidCut1stYear = anacorrhadron->GetFiducialCut(); | |
515 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; | |
516 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; | |
517 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
518 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
519 | fidCut1stYear->DoCTSFiducialCut(kTRUE) ; | |
520 | fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.); | |
521 | } | |
522 | anacorrhadron->SwitchOnDecayCorr(); | |
523 | anacorrhadron->SetMultiBin(1); | |
2244659d | 524 | anacorrhadron->SwitchOffNeutralCorr(); |
525 | anacorrhadron->SwitchOffEventSelection(); | |
de8a210f | 526 | anacorrhadron->SetPtCutRange(0.1,100); |
a3aebfff | 527 | anacorrhadron->SetDeltaPhiCutRange(1.5,4.5); |
2d3dce11 | 528 | anacorrhadron->SwitchOnSeveralUECalculation(); |
afabc52f | 529 | anacorrhadron->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); |
2d3dce11 | 530 | anacorrhadron->SelectIsolated(kFALSE); // do correlation with isolated photons |
de8a210f | 531 | if(kUseKinematics) anacorrhadron->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
532 | else anacorrhadron->SwitchOffDataMC() ; | |
533 | //if(calorimeter=="PHOS"){ | |
afabc52f | 534 | //Correlate with particles in EMCAL |
535 | //anacorrhadron->SwitchOnCaloPID(); | |
536 | //anacorrhadron->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
de8a210f | 537 | //} |
538 | //Set Histograms bins and ranges | |
4df35693 | 539 | anacorrhadron->SetHistoPtRangeAndNBins(0, 50, 200) ; |
afabc52f | 540 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
541 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
4a55403a | 542 | if(kPrintSettings) anacorrhadron->Print(""); |
90eb3a19 | 543 | |
afabc52f | 544 | // ### Correlation with hadrons |
545 | AliAnaParticleHadronCorrelation *anacorrisohadron = new AliAnaParticleHadronCorrelation(); | |
546 | anacorrisohadron->SetInputAODName(Form("Photons%s",calorimeter.Data())); | |
afabc52f | 547 | anacorrisohadron->AddToHistogramsName("AnaHadronCorrIsoPhoton_"); |
91f45193 | 548 | anacorrisohadron->SetAODObjArrayName("IsoPhotonHadronCorr"); |
afabc52f | 549 | anacorrisohadron->SetDebug(-1); |
550 | anacorrisohadron->SwitchOffCaloPID(); | |
69652c63 | 551 | if(kSimulation){ |
2244659d | 552 | anacorrisohadron->SwitchOnFiducialCut(); |
553 | AliFiducialCut * fidCut1stYear = anacorrisohadron->GetFiducialCut(); | |
554 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; | |
555 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; | |
556 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
557 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
558 | fidCut1stYear->DoCTSFiducialCut(kTRUE) ; | |
559 | fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.); | |
560 | } | |
561 | anacorrisohadron->SwitchOnDecayCorr(); | |
562 | anacorrisohadron->SetMultiBin(1); | |
2244659d | 563 | anacorrisohadron->SwitchOffNeutralCorr(); |
564 | anacorrisohadron->SwitchOffEventSelection(); | |
afabc52f | 565 | anacorrisohadron->SetPtCutRange(0.1,100); |
566 | anacorrisohadron->SetDeltaPhiCutRange(1.5,4.5); | |
567 | anacorrisohadron->SwitchOnSeveralUECalculation(); | |
568 | anacorrisohadron->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
569 | anacorrisohadron->SelectIsolated(kTRUE); // do correlation with isolated photons | |
570 | if(kUseKinematics) anacorrisohadron->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
571 | else anacorrisohadron->SwitchOffDataMC() ; | |
572 | //if(calorimeter=="PHOS"){ | |
573 | //Correlate with particles in EMCAL | |
574 | //anacorrhadron->SwitchOnCaloPID(); | |
575 | //anacorrhadron->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
576 | //} | |
577 | //Set Histograms bins and ranges | |
4df35693 | 578 | anacorrisohadron->SetHistoPtRangeAndNBins(0, 50, 200) ; |
afabc52f | 579 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
580 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
581 | if(kPrintSettings) anacorrisohadron->Print(""); | |
582 | ||
afabc52f | 583 | |
584 | // ### Pi0 Correlation with hadrons, not isolated | |
585 | AliAnaParticleHadronCorrelation *anacorrhadronpi0 = new AliAnaParticleHadronCorrelation(); | |
586 | anacorrhadronpi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
afabc52f | 587 | anacorrhadronpi0->AddToHistogramsName("AnaHadronCorrPi0_"); |
91f45193 | 588 | anacorrhadronpi0->SetAODObjArrayName("Pi0HadronCorr"); |
afabc52f | 589 | anacorrhadronpi0->SetDebug(-1); |
590 | anacorrhadronpi0->SwitchOffCaloPID(); | |
2244659d | 591 | if(kSimulation){ |
592 | anacorrhadronpi0->SwitchOnFiducialCut(); | |
593 | AliFiducialCut * fidCut1stYear = anacorrhadronpi0->GetFiducialCut(); | |
594 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; | |
595 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; | |
596 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
597 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
598 | fidCut1stYear->DoCTSFiducialCut(kTRUE) ; | |
599 | fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.); | |
600 | } | |
601 | anacorrhadronpi0->SwitchOnDecayCorr(); | |
602 | anacorrhadronpi0->SetMultiBin(1); | |
2244659d | 603 | anacorrhadronpi0->SwitchOffNeutralCorr(); |
604 | anacorrhadronpi0->SwitchOffEventSelection(); | |
afabc52f | 605 | anacorrhadronpi0->SetPtCutRange(0.1,100); |
606 | anacorrhadronpi0->SetDeltaPhiCutRange(1.5,4.5); | |
607 | anacorrhadronpi0->SelectIsolated(kFALSE); // do correlation with non isolated pi0 | |
608 | anacorrhadronpi0->SwitchOnSeveralUECalculation(); | |
609 | anacorrhadronpi0->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
610 | if(kUseKinematics) anacorrhadronpi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
611 | else anacorrhadronpi0->SwitchOffDataMC() ; | |
612 | //if(calorimeter=="PHOS"){ | |
613 | // //Correlate with particles in EMCAL | |
614 | // anacorrhadronpi0->SwitchOnCaloPID(); | |
615 | // anacorrhadronpi0->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
616 | //} | |
617 | //Set Histograms bins and ranges | |
4df35693 | 618 | anacorrhadronpi0->SetHistoPtRangeAndNBins(0, 50, 200) ; |
afabc52f | 619 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
620 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
621 | if(kPrintSettings) anacorrhadronpi0->Print(""); | |
622 | ||
623 | // ### Pi0 Correlation with hadrons, isolated | |
624 | AliAnaParticleHadronCorrelation *anacorrhadronisopi0 = new AliAnaParticleHadronCorrelation(); | |
625 | anacorrhadronisopi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
afabc52f | 626 | anacorrhadronisopi0->AddToHistogramsName("AnaHadronCorrIsoPi0_"); |
91f45193 | 627 | anacorrhadronisopi0->SetAODObjArrayName("IsoPi0HadronCorr"); |
afabc52f | 628 | anacorrhadronisopi0->SetDebug(-1); |
629 | anacorrhadronisopi0->SwitchOffCaloPID(); | |
69652c63 | 630 | if(kSimulation){ |
2244659d | 631 | anacorrhadronisopi0->SwitchOnFiducialCut(); |
632 | AliFiducialCut * fidCut1stYear = anacorrhadronisopi0->GetFiducialCut(); | |
633 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; | |
634 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; | |
635 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
636 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
637 | fidCut1stYear->DoCTSFiducialCut(kTRUE) ; | |
638 | fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.); | |
639 | } | |
640 | anacorrhadronisopi0->SwitchOnDecayCorr(); | |
641 | anacorrhadronisopi0->SetMultiBin(1); | |
2244659d | 642 | anacorrhadronisopi0->SwitchOffNeutralCorr(); |
643 | anacorrhadronisopi0->SwitchOffEventSelection(); | |
afabc52f | 644 | anacorrhadronisopi0->SetPtCutRange(0.1,100); |
645 | anacorrhadronisopi0->SetDeltaPhiCutRange(1.5,4.5); | |
646 | anacorrhadronisopi0->SelectIsolated(kTRUE); // do correlation with isolated pi0 | |
647 | anacorrhadronisopi0->SwitchOnSeveralUECalculation(); | |
648 | anacorrhadronisopi0->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
649 | if(kUseKinematics) anacorrhadronisopi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
650 | else anacorrhadronisopi0->SwitchOffDataMC() ; | |
651 | //if(calorimeter=="PHOS"){ | |
652 | // //Correlate with particles in EMCAL | |
653 | // anacorrhadronpi0->SwitchOnCaloPID(); | |
654 | // anacorrhadronpi0->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
655 | //} | |
656 | //Set Histograms bins and ranges | |
4df35693 | 657 | anacorrhadronisopi0->SetHistoPtRangeAndNBins(0, 50, 200) ; |
afabc52f | 658 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
659 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
660 | if(kPrintSettings) anacorrhadronisopi0->Print(""); | |
1e3689fa | 661 | |
1e3689fa | 662 | |
90eb3a19 | 663 | // #### Configure Maker #### |
a3aebfff | 664 | AliAnaPartCorrMaker * maker = new AliAnaPartCorrMaker(); |
fa991e42 | 665 | maker->SetReader(reader);//pointer to reader |
666 | maker->SetCaloUtils(cu); //pointer to calorimeter utils | |
69652c63 | 667 | |
668 | ||
1e3689fa | 669 | Int_t n = 0;//Analysis number, order is important |
670 | // Particle selection analysis | |
671 | maker->AddAnalysis(anaphoton,n++); | |
69652c63 | 672 | //maker->AddAnalysis(anapi0,n++); |
f676c850 | 673 | maker->AddAnalysis(anapi0ebe,n++); |
69652c63 | 674 | // maker->AddAnalysis(anaomegaToPi0Gamma,n++); |
d7c10d78 | 675 | //if(calorimeter=="EMCAL")maker->AddAnalysis(anabtag,n++); |
1e3689fa | 676 | // Isolation analysis |
f676c850 | 677 | maker->AddAnalysis(anaisol,n++); |
678 | maker->AddAnalysis(anaisolpi0,n++); | |
1e3689fa | 679 | // Correlation analysis |
69652c63 | 680 | // maker->AddAnalysis(anacorrjet,n++); |
f676c850 | 681 | maker->AddAnalysis(anacorrhadron,n++); |
682 | maker->AddAnalysis(anacorrhadronpi0,n++); | |
683 | maker->AddAnalysis(anacorrisohadron,n++); | |
684 | maker->AddAnalysis(anacorrhadronisopi0,n); | |
af7b3903 | 685 | maker->SetAnaDebug(0) ; |
90eb3a19 | 686 | maker->SwitchOnHistogramsMaker() ; |
2244659d | 687 | if(inputDataType.Contains("delta")) maker->SwitchOffAODsMaker() ; |
69652c63 | 688 | else maker->SwitchOnAODsMaker() ; |
1e86c71e | 689 | |
4a55403a | 690 | if(kPrintSettings) maker->Print(""); |
69652c63 | 691 | |
90eb3a19 | 692 | printf("======================== \n"); |
a3aebfff | 693 | printf(" End Configuration of PartCorr analysis with detector %s \n",calorimeter.Data()); |
90eb3a19 | 694 | printf("======================== \n"); |
695 | ||
afabc52f | 696 | // Create task |
697 | //=========================================================================== | |
ad1ac1b7 | 698 | AliAnalysisTaskParticleCorrelation * task = new AliAnalysisTaskParticleCorrelation (Form("PartCorr%s",calorimeter.Data())); |
a3aebfff | 699 | task->SetConfigFileName(""); //Don't configure the analysis via configuration file. |
700 | //task->SetDebugLevel(-1); | |
0cdb88b8 | 701 | task->SetAnalysisMaker(maker); |
2244659d | 702 | if(inputDataType=="ESD" && !kSimulation) task->SelectCollisionCandidates(); //AliPhysicsSelection has to be attached before. |
a3aebfff | 703 | mgr->AddTask(task); |
704 | ||
0c1383b5 | 705 | //Create containers |
fbc534a2 | 706 | char name[128]; |
707 | sprintf(name,"PartCorr_%s",calorimeter.Data()); | |
d0b67781 | 708 | cout<<"Name of task "<<name<<endl; |
709 | //AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(Form(name),TList::Class(), | |
afabc52f | 710 | // AliAnalysisManager::kOutputContainer, Form("PartCorr_%s.root",calorimeter.Data())); |
a3aebfff | 711 | |
69652c63 | 712 | TString outputfile = AliAnalysisManager::GetCommonFileName(); |
713 | ||
d0b67781 | 714 | // AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(Form("PartCorr_%s",calorimeter.Data()), TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:PartCorr_%s",outputfile.Data(),calorimeter.Data())); |
0c1383b5 | 715 | AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(calorimeter.Data(), TList::Class(), |
7e7694bb | 716 | AliAnalysisManager::kOutputContainer, |
717 | Form("%s:PartCorr",outputfile.Data())); | |
0c1383b5 | 718 | |
719 | AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("%sCuts",calorimeter.Data()), TList::Class(), | |
7e7694bb | 720 | AliAnalysisManager::kParamContainer, |
721 | Form("%s:PartCorrCuts",outputfile.Data())); | |
69652c63 | 722 | |
a3aebfff | 723 | // Create ONLY the output containers for the data produced by the task. |
724 | // Get and connect other common input/output containers via the manager as below | |
725 | //============================================================================== | |
726 | mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer()); | |
727 | // AOD output slot will be used in a different way in future | |
2244659d | 728 | if(!inputDataType.Contains("delta") && outputAOD) mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer()); |
a3aebfff | 729 | mgr->ConnectOutput (task, 1, cout_pc); |
0c1383b5 | 730 | mgr->ConnectOutput (task, 2, cout_cuts); |
69652c63 | 731 | |
a3aebfff | 732 | return task; |
90eb3a19 | 733 | } |