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