]>
Commit | Line | Data |
---|---|---|
f37fa8d2 | 1 | AliAnalysisTaskParticleCorrelation *AddTaskPartCorr(TString data, TString calorimeter, Bool_t kPrintSettings = kFALSE,Bool_t kSimulation = kFALSE, Bool_t outputAOD=kFALSE, Bool_t oldAOD=kFALSE) |
90eb3a19 | 2 | { |
3 | // Creates a PartCorr task, configures it and adds it to the analysis manager. | |
4 | ||
5 | // Get the pointer to the existing analysis manager via the static access method. | |
6 | //============================================================================== | |
7 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
8 | if (!mgr) { | |
9 | ::Error("AddTaskPartCorr", "No analysis manager to connect to."); | |
10 | return NULL; | |
11 | } | |
12 | ||
13 | // Check the analysis type using the event handlers connected to the analysis manager. | |
14 | //============================================================================== | |
15 | if (!mgr->GetInputEventHandler()) { | |
16 | ::Error("AddTaskPartCorr", "This task requires an input event handler"); | |
17 | return NULL; | |
18 | } | |
1e3689fa | 19 | TString inputDataType = "AOD"; |
20 | if(!data.Contains("delta")) | |
21 | inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
22 | //cout<<"DATA TYPE :: "<<inputDataType<<endl; | |
23 | // inputDataType: data managed by the input handler | |
24 | // data: can be same as one managed by input handler, or the output AOD created by the filter. By default use AOD | |
25 | ||
26 | Bool_t kUseKinematics = kFALSE; | |
27 | if(kSimulation) { | |
28 | kUseKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE; | |
29 | if (!kUseKinematics && data=="AOD" && inputDataType != "ESD") kUseKinematics = kTRUE; //AOD primary should be available ... | |
30 | } | |
31 | ||
32 | cout<<"********* ACCESS KINE? "<<kUseKinematics<<endl; | |
33 | ||
34 | // Configure analysis | |
35 | //=========================================================================== | |
36 | ||
37 | // *** Reader *** | |
38 | AliCaloTrackReader * reader = ; | |
39 | if(data.Contains("AOD")) reader = new AliCaloTrackAODReader(); | |
40 | else if(data=="ESD") reader = new AliCaloTrackESDReader(); | |
41 | else if(data=="MC" && inputDataType == "ESD") reader = new AliCaloTrackMCReader(); | |
42 | reader->SetDebug(-1);//10 for lots of messages | |
43 | reader->SwitchOnCTS(); | |
44 | //reader->SetDeltaAODFileName(""); | |
45 | //if(!kSimulation) reader->SetFiredTriggerClassName("CINT1B-ABCE-NOPF-ALL"); | |
911e17cd | 46 | if(calorimeter == "EMCAL") { |
afabc52f | 47 | reader->SwitchOnEMCALCells(); |
48 | reader->SwitchOnEMCAL(); | |
911e17cd | 49 | } |
50 | if(calorimeter == "PHOS") { | |
afabc52f | 51 | reader->SwitchOnPHOSCells(); |
52 | reader->SwitchOnPHOS(); | |
911e17cd | 53 | } |
1e3689fa | 54 | |
1e86c71e | 55 | // for case data="deltaAOD", no need to fill the EMCAL/PHOS cluster lists |
56 | if(data.Contains("delta")){ | |
1e3689fa | 57 | reader->SwitchOffEMCAL(); |
58 | reader->SwitchOffPHOS(); | |
59 | reader->SwitchOffEMCALCells(); | |
60 | reader->SwitchOffPHOSCells(); | |
1e86c71e | 61 | } |
1e3689fa | 62 | |
4a55403a | 63 | if(kUseKinematics){ |
afabc52f | 64 | if(inputDataType == "ESD"){ |
65 | reader->SwitchOnStack(); | |
66 | reader->SwitchOffAODMCParticles(); | |
67 | } | |
68 | else if(inputDataType == "AOD"){ | |
69 | reader->SwitchOffStack(); | |
70 | reader->SwitchOnAODMCParticles(); | |
71 | } | |
4a55403a | 72 | } |
afabc52f | 73 | |
90eb3a19 | 74 | //Min particle pT |
de8a210f | 75 | reader->SetEMCALPtMin(0.1); |
76 | reader->SetPHOSPtMin(0.); | |
77 | reader->SetCTSPtMin(0.); | |
17708df9 | 78 | if(outputAOD) reader->SwitchOnWriteDeltaAOD() ; |
f37fa8d2 | 79 | if(oldAOD) reader->SwitchOnOldAODs(); |
4a55403a | 80 | if(kPrintSettings) reader->Print(""); |
afabc52f | 81 | |
fa991e42 | 82 | // *** Calorimeters Utils *** |
83 | AliCalorimeterUtils *cu = new AliCalorimeterUtils; | |
84 | // Remove clusters close to borders, at least max energy cell is 1 cell away | |
85 | cu->SetNumberOfCellsFromEMCALBorder(1); | |
1e3689fa | 86 | cu->SetNumberOfCellsFromPHOSBorder(2); |
1e3689fa | 87 | |
fa991e42 | 88 | // Remove EMCAL hottest channels for first LHC10 periods |
89 | cu->SwitchOnBadChannelsRemoval(); | |
90 | // SM0 | |
353067af | 91 | cu->SetEMCALChannelStatus(0,3,13); cu->SetEMCALChannelStatus(0,44,1); cu->SetEMCALChannelStatus(0,3,13); |
fa991e42 | 92 | cu->SetEMCALChannelStatus(0,20,7); cu->SetEMCALChannelStatus(0,38,2); |
93 | // SM1 | |
353067af | 94 | cu->SetEMCALChannelStatus(1,4,7); cu->SetEMCALChannelStatus(1,4,13); cu->SetEMCALChannelStatus(1,9,20); |
95 | cu->SetEMCALChannelStatus(1,14,15); cu->SetEMCALChannelStatus(1,23,16); cu->SetEMCALChannelStatus(1,32,23); | |
96 | cu->SetEMCALChannelStatus(1,37,5); cu->SetEMCALChannelStatus(1,40,1); cu->SetEMCALChannelStatus(1,40,2); | |
97 | cu->SetEMCALChannelStatus(1,40,5); cu->SetEMCALChannelStatus(1,41,0); cu->SetEMCALChannelStatus(1,41,1); | |
98 | cu->SetEMCALChannelStatus(1,41,2); cu->SetEMCALChannelStatus(1,41,4); | |
fa991e42 | 99 | // SM2 |
100 | cu->SetEMCALChannelStatus(2,14,15); cu->SetEMCALChannelStatus(2,18,16); cu->SetEMCALChannelStatus(2,18,17); | |
101 | cu->SetEMCALChannelStatus(2,18,18); cu->SetEMCALChannelStatus(2,18,20); cu->SetEMCALChannelStatus(2,18,21); | |
102 | cu->SetEMCALChannelStatus(2,18,23); cu->SetEMCALChannelStatus(2,19,16); cu->SetEMCALChannelStatus(2,19,17); | |
103 | cu->SetEMCALChannelStatus(2,19,19); cu->SetEMCALChannelStatus(2,19,20); cu->SetEMCALChannelStatus(2,19,21); | |
104 | cu->SetEMCALChannelStatus(2,19,22); | |
105 | //SM3 | |
106 | cu->SetEMCALChannelStatus(3,4,7); | |
1e3689fa | 107 | |
108 | ||
fa991e42 | 109 | //Recalibration |
110 | //cu->SwitchOnRecalibration(); | |
111 | //TFile * f = new TFile("RecalibrationFactors.root","read"); | |
112 | //cu->SetEMCALChannelRecalibrationFactors(0,(TH2F*)f->Get("EMCALRecalFactors_SM0")); | |
113 | //cu->SetEMCALChannelRecalibrationFactors(1,(TH2F*)f->Get("EMCALRecalFactors_SM1")); | |
114 | //cu->SetEMCALChannelRecalibrationFactors(2,(TH2F*)f->Get("EMCALRecalFactors_SM2")); | |
115 | //cu->SetEMCALChannelRecalibrationFactors(3,(TH2F*)f->Get("EMCALRecalFactors_SM3")); | |
116 | //f->Close(); | |
1e3689fa | 117 | |
fa991e42 | 118 | cu->SetDebug(-1); |
119 | if(kPrintSettings) cu->Print(""); | |
1e3689fa | 120 | |
121 | ||
a3aebfff | 122 | // ##### Analysis algorithm settings #### |
afabc52f | 123 | |
4df35693 | 124 | // ------------------------------------------------- |
32301b07 | 125 | // --- Photon/Pi0/Omega/Electron Analysis --- |
4df35693 | 126 | // ------------------------------------------------- |
127 | ||
128 | AliAnaPhoton *anaphoton = new AliAnaPhoton(); | |
129 | anaphoton->SetDebug(-1); //10 for lots of messages | |
57eb7f00 | 130 | if(calorimeter == "PHOS"){ |
57b97dc6 | 131 | anaphoton->SetNCellCut(0);// At least 2 cells |
132 | anaphoton->SetMinPt(0.); | |
1e3689fa | 133 | anaphoton->SetMinDistanceToBadChannel(2, 4, 5); |
57eb7f00 | 134 | } |
135 | else {//EMCAL | |
1e3689fa | 136 | //anaphoton->SetNCellCut(0);// At least 2 cells |
137 | anaphoton->SetMinPt(0.1); // no effect minium EMCAL cut. | |
0ae57829 | 138 | if(!kUseKinematics) anaphoton->SetTimeCut(400,900);// Time window of [400-900] ns |
1e3689fa | 139 | anaphoton->SetMinDistanceToBadChannel(6, 12, 18); |
57eb7f00 | 140 | } |
4df35693 | 141 | anaphoton->SetCalorimeter(calorimeter); |
142 | if(kUseKinematics) anaphoton->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
143 | else anaphoton->SwitchOffDataMC() ; | |
144 | anaphoton->SwitchOffCaloPID(); | |
145 | anaphoton->SwitchOffFiducialCut(); | |
de8a210f | 146 | if(kSimulation){ |
1e3689fa | 147 | anaphoton->SwitchOnFiducialCut(); |
3f25d966 | 148 | AliFiducialCut * fidCut1stYear = anaphoton->GetFiducialCut(); |
7e7694bb | 149 | fidCut1stYear->DoCTSFiducialCut(kFALSE) ; |
150 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; | |
151 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; | |
152 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
153 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
de8a210f | 154 | } |
1e3689fa | 155 | |
4df35693 | 156 | if(!data.Contains("delta")) { |
1e3689fa | 157 | anaphoton->SetOutputAODName(Form("Photons%s",calorimeter.Data())); |
158 | anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
4df35693 | 159 | } |
160 | else anaphoton->SetInputAODName(Form("Photons%s",calorimeter.Data())); | |
161 | anaphoton->AddToHistogramsName("AnaPhotonCorr_"); | |
de8a210f | 162 | //Set Histograms bins and ranges |
4df35693 | 163 | anaphoton->SetHistoPtRangeAndNBins(0, 50, 200) ; |
de8a210f | 164 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
165 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
4df35693 | 166 | if(kPrintSettings) anaphoton->Print(""); |
7e7694bb | 167 | |
4df35693 | 168 | // ----------------------------------- |
169 | // --- Pi0 Invariant Mass Analysis --- | |
170 | // ----------------------------------- | |
1e3689fa | 171 | |
90eb3a19 | 172 | AliAnaPi0 *anapi0 = new AliAnaPi0(); |
74b57e64 | 173 | anapi0->SetDebug(-1);//10 for lots of messages |
4df35693 | 174 | anapi0->SetInputAODName(Form("Photons%s",calorimeter.Data())); |
90eb3a19 | 175 | anapi0->SetCalorimeter(calorimeter); |
5ae09196 | 176 | anapi0->SwitchOnMultipleCutAnalysis(); |
0cdb88b8 | 177 | if(kSimulation){ |
1e3689fa | 178 | anapi0->SwitchOnFiducialCut(); |
4f155d15 | 179 | AliFiducialCut * fidCut1stYear = anapi0->GetFiducialCut(); |
180 | fidCut1stYear->DoCTSFiducialCut(kFALSE) ; | |
181 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; | |
decca433 | 182 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; |
183 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
184 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
0cdb88b8 | 185 | } |
decca433 | 186 | |
2d3dce11 | 187 | anapi0->SetNPID(1); //Available from tag AliRoot::v4-18-15-AN |
afabc52f | 188 | //settings for pp collision |
7e7694bb | 189 | anapi0->SwitchOnOwnMix(); |
afabc52f | 190 | anapi0->SetNCentrBin(1); |
191 | anapi0->SetNZvertBin(1); | |
192 | anapi0->SetNRPBin(1); | |
193 | anapi0->SetNMaxEvMix(10); | |
0ae57829 | 194 | if(kUseKinematics)anapi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
195 | else anapi0->SwitchOffDataMC() ; | |
6921fa00 | 196 | if(calorimeter=="PHOS") anapi0->SetNumberOfModules(3); //PHOS first year |
197 | else anapi0->SetNumberOfModules(4); //EMCAL first year | |
4df35693 | 198 | anapi0->SetHistoPtRangeAndNBins(0, 50, 200) ; |
0cdb88b8 | 199 | //anapi0->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
200 | //anapi0->SetHistoEtaRangeAndNBins(-0.8, 0.8, 200) ; | |
4df35693 | 201 | anapi0->SetHistoMassRangeAndNBins(0., 0.6, 200) ; |
0cdb88b8 | 202 | anapi0->SetHistoAsymmetryRangeAndNBins(0., 1. , 10) ; |
4a55403a | 203 | if(kPrintSettings) anapi0->Print(""); |
32301b07 | 204 | |
205 | //--------------------------- | |
206 | //Pi0, event by event | |
207 | //--------------------------- | |
7e7694bb | 208 | |
32301b07 | 209 | AliAnaPi0EbE *anapi0ebe = new AliAnaPi0EbE(); |
210 | anapi0ebe->SetDebug(-1);//10 for lots of messages | |
211 | anapi0ebe->SetAnalysisType(AliAnaPi0EbE::kIMCalo); | |
212 | anapi0ebe->SetMinPt(0); | |
213 | anapi0ebe->SetCalorimeter(calorimeter); | |
214 | anapi0ebe->SetInputAODName(Form("Photons%s",calorimeter.Data())); | |
215 | if(!data.Contains("delta")) { | |
4f155d15 | 216 | anapi0ebe->SetOutputAODName(Form("Pi0s%s",calorimeter.Data())); |
217 | anapi0ebe->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
32301b07 | 218 | } |
219 | else anapi0ebe->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
4f155d15 | 220 | |
32301b07 | 221 | if(kUseKinematics) anapi0ebe->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
222 | else anapi0ebe->SwitchOffDataMC() ; | |
4f155d15 | 223 | |
decca433 | 224 | AliNeutralMesonSelection *nms = anapi0ebe->GetNeutralMesonSelection(); |
57b97dc6 | 225 | nms->SetInvMassCutRange(0.08, 0.18) ; |
decca433 | 226 | nms->KeepNeutralMesonSelectionHistos(kTRUE); |
227 | //Set Histrograms bins and ranges | |
57b97dc6 | 228 | if(calorimeter=="EMCAL" ){ |
229 | nms->SetHistoERangeAndNBins(0, 15, 150) ; | |
230 | anapi0ebe->SetHistoPtRangeAndNBins(0, 15, 75) ; | |
231 | } | |
232 | else{ | |
233 | nms->SetHistoERangeAndNBins(0, 30, 200) ; | |
234 | anapi0ebe->SetHistoPtRangeAndNBins(0, 30, 100) ; | |
235 | } | |
decca433 | 236 | // nms->SetHistoPtRangeAndNBins(0, 50, 100) ; |
237 | // nms->SetHistoAngleRangeAndNBins(0, 0.3, 100) ; | |
238 | // nsm->SetHistoIMRangeAndNBins(0, 0.4, 100) ; | |
32301b07 | 239 | //Set Histrograms bins and ranges |
32301b07 | 240 | // anapi0->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
241 | // anapi0->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
242 | if(kPrintSettings) anapi0ebe->Print(""); | |
243 | ||
244 | //------------------------------------- | |
245 | //*** analysis the omega->pi0+gamma *** | |
246 | //------------------------------------ | |
247 | AliAnaOmegaToPi0Gamma *anaomegaToPi0Gamma = new AliAnaOmegaToPi0Gamma(); | |
248 | anaomegaToPi0Gamma->SetDebug(-1);//10 for lots of messages | |
249 | anaomegaToPi0Gamma->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
250 | anaomegaToPi0Gamma->SetInputAODPhotonName(Form("Photons%s",calorimeter.Data())); | |
251 | anaomegaToPi0Gamma->SetNPID(1); | |
252 | anaomegaToPi0Gamma->SetNVtxZ(1); | |
253 | anaomegaToPi0Gamma->SetNEventsMixed(4); | |
254 | if(calorimeter=="PHOS") | |
7e7694bb | 255 | anaomegaToPi0Gamma->SetPi0MassPeakWidthCut(0.008); // PHOS |
32301b07 | 256 | else if(calorimeter=="EMCAL") |
7e7694bb | 257 | anaomegaToPi0Gamma->SetPi0MassPeakWidthCut(0.012); // EMCAL |
32301b07 | 258 | anaomegaToPi0Gamma->SetHistoPtRangeAndNBins(0, 20, 100) ; |
259 | anaomegaToPi0Gamma->SetHistoMassRangeAndNBins(0, 1, 100) ; | |
260 | anaomegaToPi0Gamma->SetPi0OverOmegaPtCut(0.8); | |
261 | anaomegaToPi0Gamma->SetGammaOverOmegaPtCut(0.2); | |
262 | if(kUseKinematics) anaomegaToPi0Gamma->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
263 | else anaomegaToPi0Gamma->SwitchOffDataMC() ;//Access MC stack and fill more histograms | |
264 | anaomegaToPi0Gamma->AddToHistogramsName(Form("AnaOmegaToPi0Gamma%s_",calorimeter.Data())); | |
265 | if(kPrintSettings) anaomegaToPi0Gamma->Print(""); | |
266 | ||
267 | ||
268 | //--------------------------------------------------------------------- | |
269 | // Electron/btag | |
270 | //--------------------------------------------------------------------- | |
271 | if(calorimeter=="EMCAL"){ | |
7e7694bb | 272 | |
a2de71cc | 273 | AliAnaBtag *anabtag = new AliAnaBtag(); |
274 | anabtag->SetDebug(-1); //10 for lots of messages | |
7e7694bb | 275 | if(kUseKinematics){ |
a2de71cc | 276 | anabtag->SwitchOnDataMC(); |
277 | anabtag->SetMinPt(1.); | |
7e7694bb | 278 | } |
a2de71cc | 279 | anabtag->SetOutputAODName("ElectronsEMCAL"); |
280 | anabtag->SetOutputAODClassName("AliAODPWG4Particle"); | |
281 | //anabtag->SetHistoPtRangeAndNBins(0, 100, 100) ; | |
282 | //anabtag->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
283 | //anabtag->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
284 | if(kPrintSettings)anabtag->Print(""); | |
32301b07 | 285 | } |
a2de71cc | 286 | |
32301b07 | 287 | //================================== |
90eb3a19 | 288 | // ### Isolation analysis ### |
32301b07 | 289 | //================================= |
290 | //Photon | |
90eb3a19 | 291 | AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation(); |
292 | anaisol->SetDebug(-1); | |
4007d0a2 | 293 | anaisol->SetMinPt(0); |
de8a210f | 294 | anaisol->SetInputAODName(Form("Photons%s",calorimeter.Data())); |
91f45193 | 295 | anaisol->SetAODObjArrayName("ICPhoton"); |
90eb3a19 | 296 | anaisol->SetCalorimeter(calorimeter); |
4a55403a | 297 | if(kUseKinematics) anaisol->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
298 | else anaisol->SwitchOffDataMC() ; | |
90eb3a19 | 299 | //Select clusters with no pair, if both clusters with pi0 mass |
300 | anaisol->SwitchOffInvariantMass(); | |
90eb3a19 | 301 | //Do isolation cut |
7787a778 | 302 | AliIsolationCut * ic = anaisol->GetIsolationCut(); |
303 | ic->SetConeSize(0.4); | |
304 | ic->SetPtThreshold(0.2); | |
0c1383b5 | 305 | ic->SetParticleTypeInCone(AliIsolationCut::kOnlyCharged); |
7787a778 | 306 | ic->SetICMethod(AliIsolationCut::kPtThresIC); |
307 | if(kPrintSettings) ic->Print(""); | |
1e3689fa | 308 | |
90eb3a19 | 309 | //Do or not do isolation with previously produced AODs. |
310 | //No effect if use of SwitchOnSeveralIsolation() | |
311 | anaisol->SwitchOffReIsolation(); | |
312 | //Multiple IC | |
313 | anaisol->SwitchOffSeveralIsolation() ; | |
de8a210f | 314 | //Set Histograms bins and ranges |
4df35693 | 315 | anaisol->SetHistoPtRangeAndNBins(0, 50, 200) ; |
de8a210f | 316 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
317 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
318 | anaisol->AddToHistogramsName("AnaIsolPhoton_"); | |
4a55403a | 319 | if(kPrintSettings) anaisol->Print(""); |
90eb3a19 | 320 | |
32301b07 | 321 | //Pi0 |
322 | AliAnaParticleIsolation *anaisolpi0 = new AliAnaParticleIsolation(); | |
323 | anaisolpi0->SetDebug(-1); | |
324 | anaisolpi0->SetMinPt(0); | |
325 | anaisolpi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
326 | anaisolpi0->AddToHistogramsName("AnaIsolPi0_"); | |
91f45193 | 327 | anaisolpi0->SetAODObjArrayName("ICPi0"); |
32301b07 | 328 | anaisolpi0->SetCalorimeter(calorimeter); |
329 | if(kUseKinematics) anaisolpi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
330 | else anaisolpi0->SwitchOffDataMC() ; | |
331 | //Select clusters with no pair, if both clusters with pi0 mass | |
332 | anaisolpi0->SwitchOffInvariantMass(); | |
32301b07 | 333 | //Do isolation cut |
334 | AliIsolationCut * ic2 = anaisolpi0->GetIsolationCut(); | |
335 | ic2->SetConeSize(0.4); | |
336 | ic2->SetPtThreshold(0.2); | |
337 | ic2->SetICMethod(AliIsolationCut::kPtThresIC); | |
17708df9 | 338 | if(kPrintSettings) ic2->Print(""); |
32301b07 | 339 | //Do or not do isolation with previously produced AODs. |
340 | //No effect if use of SwitchOnSeveralIsolation() | |
341 | anaisolpi0->SwitchOffReIsolation(); | |
342 | //Multiple IC | |
343 | anaisolpi0->SwitchOffSeveralIsolation() ; | |
344 | //Set Histograms bins and ranges | |
345 | anaisolpi0->SetHistoPtRangeAndNBins(0, 50, 200) ; | |
346 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
347 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
17708df9 | 348 | if(kPrintSettings) anaisolpi0->Print(""); |
32301b07 | 349 | |
350 | //=========================== | |
351 | //Correlation analysis | |
352 | //=========================== | |
353 | ||
a3aebfff | 354 | // ### Correlation with Jet Finder AOD output |
355 | AliAnaParticleJetFinderCorrelation *anacorrjet = new AliAnaParticleJetFinderCorrelation(); | |
de8a210f | 356 | anacorrjet->SetInputAODName(Form("Photons%s",calorimeter.Data())); |
ff45398a | 357 | anacorrjet->SwitchOffFiducialCut(); |
a3aebfff | 358 | anacorrjet->SetDebug(-1); |
359 | anacorrjet->SetConeSize(1); | |
360 | anacorrjet->SelectIsolated(kTRUE); // do correlation with isolated photons | |
361 | anacorrjet->SetPtThresholdInCone(0.2); | |
362 | anacorrjet->SetDeltaPhiCutRange(0.5,5.5);//Mostly Open Cuts | |
363 | anacorrjet->SetRatioCutRange(0.01,3); //Mostly Open Cuts | |
364 | anacorrjet->UseJetRefTracks(kFALSE); //Not working now | |
de8a210f | 365 | //Set Histograms bins and ranges |
4df35693 | 366 | anacorrjet->SetHistoPtRangeAndNBins(0, 50, 200) ; |
afabc52f | 367 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
368 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
4a55403a | 369 | if(kPrintSettings) anacorrjet->Print(""); |
90eb3a19 | 370 | |
371 | // ### Correlation with hadrons | |
a3aebfff | 372 | AliAnaParticleHadronCorrelation *anacorrhadron = new AliAnaParticleHadronCorrelation(); |
de8a210f | 373 | anacorrhadron->SetInputAODName(Form("Photons%s",calorimeter.Data())); |
de8a210f | 374 | anacorrhadron->AddToHistogramsName("AnaHadronCorrPhoton_"); |
91f45193 | 375 | anacorrhadron->SetAODObjArrayName("PhotonHadronCorr"); |
a3aebfff | 376 | anacorrhadron->SetDebug(-1); |
12524a23 | 377 | anacorrhadron->SwitchOffCaloPID(); |
ff45398a | 378 | anacorrhadron->SwitchOffFiducialCut(); |
de8a210f | 379 | anacorrhadron->SetPtCutRange(0.1,100); |
a3aebfff | 380 | anacorrhadron->SetDeltaPhiCutRange(1.5,4.5); |
2d3dce11 | 381 | anacorrhadron->SwitchOnSeveralUECalculation(); |
afabc52f | 382 | anacorrhadron->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); |
2d3dce11 | 383 | anacorrhadron->SelectIsolated(kFALSE); // do correlation with isolated photons |
de8a210f | 384 | if(kUseKinematics) anacorrhadron->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
385 | else anacorrhadron->SwitchOffDataMC() ; | |
386 | //if(calorimeter=="PHOS"){ | |
afabc52f | 387 | //Correlate with particles in EMCAL |
388 | //anacorrhadron->SwitchOnCaloPID(); | |
389 | //anacorrhadron->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
de8a210f | 390 | //} |
391 | //Set Histograms bins and ranges | |
4df35693 | 392 | anacorrhadron->SetHistoPtRangeAndNBins(0, 50, 200) ; |
afabc52f | 393 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
394 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
4a55403a | 395 | if(kPrintSettings) anacorrhadron->Print(""); |
90eb3a19 | 396 | |
afabc52f | 397 | // ### Correlation with hadrons |
398 | AliAnaParticleHadronCorrelation *anacorrisohadron = new AliAnaParticleHadronCorrelation(); | |
399 | anacorrisohadron->SetInputAODName(Form("Photons%s",calorimeter.Data())); | |
afabc52f | 400 | anacorrisohadron->AddToHistogramsName("AnaHadronCorrIsoPhoton_"); |
91f45193 | 401 | anacorrisohadron->SetAODObjArrayName("IsoPhotonHadronCorr"); |
afabc52f | 402 | anacorrisohadron->SetDebug(-1); |
403 | anacorrisohadron->SwitchOffCaloPID(); | |
404 | anacorrisohadron->SwitchOffFiducialCut(); | |
405 | anacorrisohadron->SetPtCutRange(0.1,100); | |
406 | anacorrisohadron->SetDeltaPhiCutRange(1.5,4.5); | |
407 | anacorrisohadron->SwitchOnSeveralUECalculation(); | |
408 | anacorrisohadron->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
409 | anacorrisohadron->SelectIsolated(kTRUE); // do correlation with isolated photons | |
410 | if(kUseKinematics) anacorrisohadron->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
411 | else anacorrisohadron->SwitchOffDataMC() ; | |
412 | //if(calorimeter=="PHOS"){ | |
413 | //Correlate with particles in EMCAL | |
414 | //anacorrhadron->SwitchOnCaloPID(); | |
415 | //anacorrhadron->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
416 | //} | |
417 | //Set Histograms bins and ranges | |
4df35693 | 418 | anacorrisohadron->SetHistoPtRangeAndNBins(0, 50, 200) ; |
afabc52f | 419 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
420 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
421 | if(kPrintSettings) anacorrisohadron->Print(""); | |
422 | ||
afabc52f | 423 | |
424 | // ### Pi0 Correlation with hadrons, not isolated | |
425 | AliAnaParticleHadronCorrelation *anacorrhadronpi0 = new AliAnaParticleHadronCorrelation(); | |
426 | anacorrhadronpi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
afabc52f | 427 | anacorrhadronpi0->AddToHistogramsName("AnaHadronCorrPi0_"); |
91f45193 | 428 | anacorrhadronpi0->SetAODObjArrayName("Pi0HadronCorr"); |
afabc52f | 429 | anacorrhadronpi0->SetDebug(-1); |
430 | anacorrhadronpi0->SwitchOffCaloPID(); | |
431 | anacorrhadronpi0->SwitchOffFiducialCut(); | |
432 | anacorrhadronpi0->SetPtCutRange(0.1,100); | |
433 | anacorrhadronpi0->SetDeltaPhiCutRange(1.5,4.5); | |
434 | anacorrhadronpi0->SelectIsolated(kFALSE); // do correlation with non isolated pi0 | |
435 | anacorrhadronpi0->SwitchOnSeveralUECalculation(); | |
436 | anacorrhadronpi0->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
437 | if(kUseKinematics) anacorrhadronpi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
438 | else anacorrhadronpi0->SwitchOffDataMC() ; | |
439 | //if(calorimeter=="PHOS"){ | |
440 | // //Correlate with particles in EMCAL | |
441 | // anacorrhadronpi0->SwitchOnCaloPID(); | |
442 | // anacorrhadronpi0->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
443 | //} | |
444 | //Set Histograms bins and ranges | |
4df35693 | 445 | anacorrhadronpi0->SetHistoPtRangeAndNBins(0, 50, 200) ; |
afabc52f | 446 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
447 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
448 | if(kPrintSettings) anacorrhadronpi0->Print(""); | |
449 | ||
450 | // ### Pi0 Correlation with hadrons, isolated | |
451 | AliAnaParticleHadronCorrelation *anacorrhadronisopi0 = new AliAnaParticleHadronCorrelation(); | |
452 | anacorrhadronisopi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
afabc52f | 453 | anacorrhadronisopi0->AddToHistogramsName("AnaHadronCorrIsoPi0_"); |
91f45193 | 454 | anacorrhadronisopi0->SetAODObjArrayName("IsoPi0HadronCorr"); |
afabc52f | 455 | anacorrhadronisopi0->SetDebug(-1); |
456 | anacorrhadronisopi0->SwitchOffCaloPID(); | |
457 | anacorrhadronisopi0->SwitchOffFiducialCut(); | |
458 | anacorrhadronisopi0->SetPtCutRange(0.1,100); | |
459 | anacorrhadronisopi0->SetDeltaPhiCutRange(1.5,4.5); | |
460 | anacorrhadronisopi0->SelectIsolated(kTRUE); // do correlation with isolated pi0 | |
461 | anacorrhadronisopi0->SwitchOnSeveralUECalculation(); | |
462 | anacorrhadronisopi0->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
463 | if(kUseKinematics) anacorrhadronisopi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
464 | else anacorrhadronisopi0->SwitchOffDataMC() ; | |
465 | //if(calorimeter=="PHOS"){ | |
466 | // //Correlate with particles in EMCAL | |
467 | // anacorrhadronpi0->SwitchOnCaloPID(); | |
468 | // anacorrhadronpi0->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
469 | //} | |
470 | //Set Histograms bins and ranges | |
4df35693 | 471 | anacorrhadronisopi0->SetHistoPtRangeAndNBins(0, 50, 200) ; |
afabc52f | 472 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
473 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
474 | if(kPrintSettings) anacorrhadronisopi0->Print(""); | |
1e3689fa | 475 | |
1e3689fa | 476 | |
90eb3a19 | 477 | // #### Configure Maker #### |
a3aebfff | 478 | AliAnaPartCorrMaker * maker = new AliAnaPartCorrMaker(); |
fa991e42 | 479 | maker->SetReader(reader);//pointer to reader |
480 | maker->SetCaloUtils(cu); //pointer to calorimeter utils | |
1e3689fa | 481 | Int_t n = 0;//Analysis number, order is important |
482 | // Particle selection analysis | |
483 | maker->AddAnalysis(anaphoton,n++); | |
484 | maker->AddAnalysis(anapi0,n++); | |
485 | maker->AddAnalysis(anapi0ebe,n++); | |
32301b07 | 486 | maker->AddAnalysis(anaomegaToPi0Gamma,n++); |
a2de71cc | 487 | if(calorimeter=="EMCAL")maker->AddAnalysis(anabtag,n++); |
1e3689fa | 488 | // Isolation analysis |
489 | maker->AddAnalysis(anaisol,n++); | |
1e3689fa | 490 | maker->AddAnalysis(anaisolpi0,n++); |
491 | // Correlation analysis | |
492 | maker->AddAnalysis(anacorrjet,n++); | |
493 | maker->AddAnalysis(anacorrhadron,n++); | |
494 | maker->AddAnalysis(anacorrhadronpi0,n++); | |
17708df9 | 495 | maker->AddAnalysis(anacorrisohadron,n++); |
1e3689fa | 496 | maker->AddAnalysis(anacorrhadronisopi0,n); |
02e972d8 | 497 | maker->SetAnaDebug(-1) ; |
90eb3a19 | 498 | maker->SwitchOnHistogramsMaker() ; |
1e86c71e | 499 | if(data.Contains("delta")) maker->SwitchOffAODsMaker() ; |
500 | else maker->SwitchOnAODsMaker() ; | |
501 | ||
4a55403a | 502 | if(kPrintSettings) maker->Print(""); |
a3aebfff | 503 | |
90eb3a19 | 504 | printf("======================== \n"); |
a3aebfff | 505 | printf(" End Configuration of PartCorr analysis with detector %s \n",calorimeter.Data()); |
90eb3a19 | 506 | printf("======================== \n"); |
507 | ||
afabc52f | 508 | // Create task |
509 | //=========================================================================== | |
ad1ac1b7 | 510 | AliAnalysisTaskParticleCorrelation * task = new AliAnalysisTaskParticleCorrelation (Form("PartCorr%s",calorimeter.Data())); |
a3aebfff | 511 | task->SetConfigFileName(""); //Don't configure the analysis via configuration file. |
512 | //task->SetDebugLevel(-1); | |
3f7a860b | 513 | task->SelectCollisionCandidates(); |
0cdb88b8 | 514 | task->SetAnalysisMaker(maker); |
1e86c71e | 515 | //if(!kSimulation)task->SelectCollisionCandidates(); //AliPhysicsSelection has to be attached before. |
a3aebfff | 516 | mgr->AddTask(task); |
517 | ||
0c1383b5 | 518 | //Create containers |
fbc534a2 | 519 | char name[128]; |
520 | sprintf(name,"PartCorr_%s",calorimeter.Data()); | |
d0b67781 | 521 | cout<<"Name of task "<<name<<endl; |
522 | //AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(Form(name),TList::Class(), | |
afabc52f | 523 | // AliAnalysisManager::kOutputContainer, Form("PartCorr_%s.root",calorimeter.Data())); |
a3aebfff | 524 | |
d0b67781 | 525 | TString outputfile = AliAnalysisManager::GetCommonFileName(); |
526 | // AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(Form("PartCorr_%s",calorimeter.Data()), TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:PartCorr_%s",outputfile.Data(),calorimeter.Data())); | |
0c1383b5 | 527 | AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(calorimeter.Data(), TList::Class(), |
7e7694bb | 528 | AliAnalysisManager::kOutputContainer, |
529 | Form("%s:PartCorr",outputfile.Data())); | |
0c1383b5 | 530 | |
531 | AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("%sCuts",calorimeter.Data()), TList::Class(), | |
7e7694bb | 532 | AliAnalysisManager::kParamContainer, |
533 | Form("%s:PartCorrCuts",outputfile.Data())); | |
0c1383b5 | 534 | |
a3aebfff | 535 | // Create ONLY the output containers for the data produced by the task. |
536 | // Get and connect other common input/output containers via the manager as below | |
537 | //============================================================================== | |
538 | mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer()); | |
539 | // AOD output slot will be used in a different way in future | |
f37fa8d2 | 540 | if(!data.Contains("delta") && outputAOD) mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer()); |
a3aebfff | 541 | mgr->ConnectOutput (task, 1, cout_pc); |
0c1383b5 | 542 | mgr->ConnectOutput (task, 2, cout_cuts); |
7e7694bb | 543 | |
a3aebfff | 544 | return task; |
90eb3a19 | 545 | } |
a3aebfff | 546 | |
547 |