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