]>
Commit | Line | Data |
---|---|---|
745913ae | 1 | AliAnalysisTaskParticleCorrelationM *AddTaskCaloTrackCorrM(TString data, TString calorimeter, Bool_t kPrintSettings = kFALSE) |
8e3bc7b6 | 2 | { |
745913ae | 3 | // Creates a CaloTrackCorr task, configures it and adds it to the analysis manager. |
8e3bc7b6 | 4 | |
5 | // Get the pointer to the existing analysis manager via the static access method. | |
6 | //============================================================================== | |
7 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
8 | if (!mgr) { | |
745913ae | 9 | ::Error("AddTaskCaloTrackCorr", "No analysis manager to connect to."); |
8e3bc7b6 | 10 | return NULL; |
11 | } | |
8e3bc7b6 | 12 | Bool_t kUseKinematics = kFALSE; |
2244659d | 13 | kUseKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE; |
14 | ||
8e3bc7b6 | 15 | cout<<"********* ACCESS KINE? "<<kUseKinematics<<endl; |
16 | ||
17 | // Configure analysis | |
18 | //=========================================================================== | |
19 | ||
2244659d | 20 | //Reader |
21 | AliCaloTrackReader * reader = 0x0; | |
8e3bc7b6 | 22 | if(data.Contains("AOD")) reader = new AliCaloTrackAODReader(); |
23 | else if(data=="ESD") reader = new AliCaloTrackESDReader(); | |
2244659d | 24 | else if(data=="MC" || (kUseKinematics && data == "ESD")) reader = new AliCaloTrackMCReader(); |
8e3bc7b6 | 25 | reader->SetDebug(-1);//10 for lots of messages |
26 | reader->SwitchOnCTS(); | |
2244659d | 27 | |
8e3bc7b6 | 28 | if(calorimeter == "EMCAL") { |
29 | reader->SwitchOnEMCALCells(); | |
2244659d | 30 | reader->SwitchOnEMCAL(); |
8e3bc7b6 | 31 | } |
32 | if(calorimeter == "PHOS") { | |
33 | reader->SwitchOnPHOSCells(); | |
34 | reader->SwitchOnPHOS(); | |
35 | } | |
36 | ||
5c8fd15c | 37 | reader->SwitchOnSuspiciousClustersRemoval(); //EMCAL |
38 | ||
8e3bc7b6 | 39 | // for case data="deltaAOD", no need to fill the EMCAL/PHOS cluster lists |
40 | if(data.Contains("delta")){ | |
41 | reader->SwitchOffEMCAL(); | |
42 | reader->SwitchOffPHOS(); | |
43 | reader->SwitchOffEMCALCells(); | |
44 | reader->SwitchOffPHOSCells(); | |
45 | } | |
2244659d | 46 | |
8e3bc7b6 | 47 | if(kUseKinematics){ |
2244659d | 48 | if(data == "ESD"){ |
8e3bc7b6 | 49 | reader->SwitchOnStack(); |
50 | reader->SwitchOffAODMCParticles(); | |
51 | } | |
2244659d | 52 | else if(data == "AOD"){ |
8e3bc7b6 | 53 | reader->SwitchOffStack(); |
54 | reader->SwitchOnAODMCParticles(); | |
55 | } | |
56 | } | |
57 | ||
0b13c1f9 | 58 | reader->SetZvertexCut(10.); |
59 | ||
8e3bc7b6 | 60 | //Min particle pT |
2244659d | 61 | reader->SetEMCALPtMin(0.5); |
62 | reader->SetPHOSPtMin(0.5); | |
63 | reader->SetCTSPtMin(0.1); | |
64 | reader->SwitchOffWriteDeltaAOD() ; | |
8e3bc7b6 | 65 | if(kPrintSettings) reader->Print(""); |
66 | ||
8e3bc7b6 | 67 | // ##### Analysis algorithm settings #### |
2244659d | 68 | AliCaloPID * pid = new AliCaloPID(); |
69 | pid->SetDispersionCut(1.5); | |
70 | pid->SetTOFCut(5.e-9); | |
71 | pid->SetDebug(-1); | |
72 | if(kPrintSettings) pid->Print(""); | |
73 | //Fiducial cut | |
74 | // AliFiducialCut * fidCut1stYear = new AliFiducialCut(); | |
75 | // fidCut1stYear->DoCTSFiducialCut(kTRUE) ; | |
76 | // fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.); | |
77 | // fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; | |
78 | // fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; | |
79 | // fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
80 | // fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,300.); | |
8e3bc7b6 | 81 | // ------------------------------------------------- |
2244659d | 82 | // --- Isolation Cut --- |
8e3bc7b6 | 83 | // ------------------------------------------------- |
2244659d | 84 | AliIsolationCut * ic = new AliIsolationCut(); |
85 | ic->SetConeSize(0.4); | |
86 | //ic->SetPtThreshold(0.7); | |
87 | ic->SetPtFraction(0.1); | |
88 | ic->SetPtThreshold(0.7) ; | |
89 | ic->SetSumPtThreshold(1.0) ; | |
90 | //choose different method for IC: | |
91 | //kPtThresIC, kSumPtIC, kPtFracIC, kSumPtFracIC | |
92 | // ic->SetICMethod(AliIsolationCut::kPtThresIC); | |
93 | ic->SetICMethod(AliIsolationCut::kSumPtFracIC); | |
94 | //particle in cone: kNeutralAndCharged=0, kOnlyNeutral=1, kOnlyCharged=2 | |
95 | ic->SetParticleTypeInCone(AliIsolationCut::kOnlyCharged); | |
96 | if(kPrintSettings) ic->Print(""); | |
8e3bc7b6 | 97 | |
2244659d | 98 | //analysis with calorimeter triggers |
99 | if(calorimeter=="PHOS" || calorimeter=="EMCAL") { | |
100 | AliCalorimeterUtils * cu = new AliCalorimeterUtils(); | |
101 | cu->SwitchOnBadChannelsRemoval(); | |
102 | ||
103 | cu->SetNumberOfCellsFromEMCALBorder(1) ; //nEMCAL); | |
104 | cu->SetNumberOfCellsFromPHOSBorder(2) ; //nPHOS); | |
745913ae | 105 | |
2244659d | 106 | // ----------------------------------- |
107 | // --- Photon and Pi0 Analysis --- | |
108 | // ----------------------------------- | |
109 | ||
110 | AliAnaPhoton *anaphoton = new AliAnaPhoton(); | |
111 | anaphoton->SetDebug(-1); //10 for lots of messages | |
112 | anaphoton->SetMinPt(1.0); | |
113 | anaphoton->SetCaloPID(pid); | |
114 | anaphoton->SetCalorimeter(calorimeter); | |
115 | if(kUseKinematics) anaphoton->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
116 | else anaphoton->SwitchOffDataMC() ; | |
117 | anaphoton->SwitchOffCaloPID(); | |
118 | anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL | |
8e3bc7b6 | 119 | anaphoton->SwitchOnFiducialCut(); |
2244659d | 120 | AliFiducialCut * fidCut1stYear = anaphoton->GetFiducialCut(); |
121 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; | |
122 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; | |
123 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
124 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
125 | anaphoton->SwitchOnTrackMatchRejection(); | |
126 | //settings for different multiplicity analysis | |
127 | anaphoton->SwitchOffEventSelection() ; | |
2244659d | 128 | anaphoton->SetMultiplicity(80, 120); |
129 | ||
130 | if(calorimeter == "EMCAL"){ | |
131 | anaphoton->SetNCellCut(1); | |
5c8fd15c | 132 | anaphoton->SetMinPt(0.3); |
133 | //if(!kUseKinematics) anaphoton->SetTimeCut(525, 725); | |
134 | anaphoton->SetMinDistanceToBadChannel(1, 2, 3); | |
2244659d | 135 | } |
136 | else{ | |
5c8fd15c | 137 | anaphoton->SetMinPt(0.3); |
2244659d | 138 | anaphoton->SetMinDistanceToBadChannel(2, 4, 5); |
139 | anaphoton->SetNCellCut(2); | |
140 | } | |
141 | if(!data.Contains("delta")) { | |
142 | anaphoton->SetOutputAODName(Form("Triggers%s",calorimeter.Data())); | |
143 | anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
144 | } | |
145 | else anaphoton->SetOutputAODName(Form("Triggers%s",calorimeter.Data())); | |
146 | anaphoton->AddToHistogramsName("AnaPhoton_"); | |
147 | //Set Histograms bins and ranges | |
745913ae | 148 | anaphoton->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
149 | // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
150 | // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
2244659d | 151 | |
152 | if(kPrintSettings) anaphoton->Print(""); | |
153 | AliAnaPi0 *anapi0 = new AliAnaPi0(); | |
154 | anapi0->SetDebug(-1);//10 for lots of messages | |
155 | anapi0->SetInputAODName(Form("Triggers%s",calorimeter.Data())); | |
156 | anapi0->AddToHistogramsName("AnaPi0_"); | |
157 | anapi0->SetCaloPID(pid); | |
158 | anapi0->SetCalorimeter(calorimeter); | |
8e3bc7b6 | 159 | anapi0->SwitchOnFiducialCut(); |
160 | AliFiducialCut * fidCut1stYear = anapi0->GetFiducialCut(); | |
8e3bc7b6 | 161 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; |
162 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; | |
163 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
164 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
2244659d | 165 | anapi0->SetNPID(1); |
166 | //settings for different multiplicity analysis | |
167 | anapi0->SwitchOnEventSelection() ; | |
168 | anapi0->SetNCentrBin(1); | |
2244659d | 169 | anapi0->SetMultiplicity(80, 120); |
170 | anapi0->SetMultiBin(1); | |
171 | anapi0->SwitchOffDataMC() ;//Access MC stack and fill more histograms | |
172 | if(calorimeter=="PHOS") anapi0->SetNumberOfModules(3); //PHOS first year | |
173 | else if(calorimeter=="EMCAL") anapi0->SetNumberOfModules(4); //EMCAL first year | |
745913ae | 174 | anapi0->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
175 | //anapi0->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
176 | //anapi0->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.8, 0.8, 200) ; | |
177 | anapi0->GetHistogramRanges()->SetHistoMassRangeAndNBins(0., 1.0, 100) ; | |
178 | anapi0->GetHistogramRanges()->SetHistoAsymmetryRangeAndNBins(0., 1. , 10) ; | |
2244659d | 179 | if(kPrintSettings) anapi0->Print(""); |
180 | ||
181 | // ------------------------------------------------- | |
182 | // --- Pi0 EbE Analysis --- | |
183 | // ------------------------------------------------- | |
184 | ||
185 | AliNeutralMesonSelection *nms = new AliNeutralMesonSelection(); | |
186 | nms->SetInvMassCutRange(0.05, 0.16) ; | |
187 | nms->SwitchOffAngleSelection() ; | |
188 | nms->KeepNeutralMesonSelectionHistos(kTRUE); | |
189 | //Set Histrograms bins and ranges | |
190 | nms->SetHistoERangeAndNBins(0, 50, 100) ; | |
191 | nms->SetHistoPtRangeAndNBins(0, 50, 100) ; | |
745913ae | 192 | // nms->GetHistogramRanges()->SetHistoAngleRangeAndNBins(0, 0.3, 100) ; |
193 | // nsm->GetHistogramRanges()->SetHistoIMRangeAndNBins(0, 0.4, 100) ; | |
2244659d | 194 | |
195 | AliAnaPi0EbE *anapi0ebe = new AliAnaPi0EbE(); | |
196 | anapi0ebe->SetDebug(-1);//10 for lots of messages | |
197 | anapi0ebe->SetAnalysisType(AliAnaPi0EbE::kIMCalo); | |
198 | anapi0ebe->SetMinPt(0.5); | |
199 | anapi0ebe->SetCalorimeter(calorimeter); | |
200 | anapi0ebe->SetInputAODName(Form("Triggers%s",calorimeter.Data())); | |
201 | if(!data.Contains("delta")) { | |
202 | anapi0ebe->SetOutputAODName(Form("Pi0s%s",calorimeter.Data())); | |
203 | anapi0ebe->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
204 | } | |
205 | else anapi0ebe->SetOutputAODName(Form("Pi0s%s",calorimeter.Data())); | |
206 | ||
207 | if(kUseKinematics) anapi0ebe->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
208 | else anapi0ebe->SwitchOffDataMC() ; | |
209 | anapi0ebe->SwitchOffEventSelection() ; | |
2244659d | 210 | anapi0ebe->SetMultiplicity(80, 120); |
211 | anapi0ebe->SetMultiBin(1); | |
212 | anapi0ebe->SetNeutralMesonSelection(nms); | |
213 | //Set Histrograms bins and ranges | |
745913ae | 214 | anapi0ebe->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
215 | // anapi0->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
216 | // anapi0->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
2244659d | 217 | if(kPrintSettings) anapi0ebe->Print(""); |
218 | ||
219 | // ### Pi0 Correlation with hadrons, not isolated | |
220 | AliAnaParticleHadronCorrelation *anacorrhadronpi0 = new AliAnaParticleHadronCorrelation(); | |
221 | anacorrhadronpi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
222 | anacorrhadronpi0->AddToHistogramsName("AnaHadronCorrPi0_"); | |
223 | anacorrhadronpi0->SetDebug(-1); | |
224 | anacorrhadronpi0->SwitchOffCaloPID(); | |
225 | anacorrhadronpi0->SwitchOnFiducialCut(); | |
226 | AliFiducialCut * fidCut1stYear = anacorrhadronpi0->GetFiducialCut(); | |
227 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; | |
228 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; | |
229 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
230 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
231 | fidCut1stYear->DoCTSFiducialCut(kTRUE) ; | |
232 | fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.); | |
233 | anacorrhadronpi0->SwitchOnDecayCorr(); | |
234 | anacorrhadronpi0->SetPtCutRange(0.5,50); | |
235 | anacorrhadronpi0->SetDeltaPhiCutRange(1.5,4.5); | |
236 | anacorrhadronpi0->SelectIsolated(kFALSE); // do correlation with non isolated pi0 | |
237 | anacorrhadronpi0->SetMultiplicity(80, 100); | |
238 | anacorrhadronpi0->SetMultiBin(1); | |
2244659d | 239 | anacorrhadronpi0->SwitchOffNeutralCorr(); |
240 | anacorrhadronpi0->SwitchOffEventSelection(); | |
241 | anacorrhadronpi0->SwitchOnSeveralUECalculation(); | |
242 | anacorrhadronpi0->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
243 | if(kUseKinematics) anacorrhadronpi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
244 | else anacorrhadronpi0->SwitchOffDataMC() ; | |
245 | //if(calorimeter=="PHOS"){ | |
246 | // //Correlate with particles in EMCAL | |
247 | // anacorrhadronpi0->SwitchOnCaloPID(); | |
248 | // anacorrhadronpi0->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
249 | //} | |
250 | //Set Histograms bins and ranges | |
745913ae | 251 | anacorrhadronpi0->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
252 | // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
253 | // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
2244659d | 254 | if(kPrintSettings) anacorrhadronpi0->Print(""); |
255 | ||
256 | AliAnaParticleIsolation *anaisolpi0 = new AliAnaParticleIsolation(); | |
257 | anaisolpi0->SetDebug(-1); | |
258 | anaisolpi0->SetMinPt(2.); | |
2244659d | 259 | anaisolpi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); |
260 | anaisolpi0->AddToHistogramsName("AnaIsolPi0_"); | |
261 | anaisolpi0->SetCalorimeter(calorimeter); | |
262 | if(kUseKinematics) anaisolpi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
263 | else anaisolpi0->SwitchOffDataMC() ; | |
264 | //Select clusters with no pair, if both clusters with pi0 mass | |
265 | anaisolpi0->SwitchOffInvariantMass(); | |
266 | //anaisol->SetNeutralMesonSelection(nms); | |
267 | //Do isolation cut | |
268 | anaisolpi0->SetIsolationCut(ic); | |
269 | //Do or not do isolation with previously produced AODs. | |
270 | //No effect if use of SwitchOnSeveralIsolation() | |
271 | anaisolpi0->SwitchOffReIsolation(); | |
272 | //Multiple IC | |
273 | anaisolpi0->SwitchOffSeveralIsolation() ; | |
274 | //Set Histograms bins and ranges | |
745913ae | 275 | anaisolpi0->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
276 | // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
277 | // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
2244659d | 278 | if(kPrintSettings) anaisol->Print(""); |
279 | ||
280 | // ### Pi0 Correlation with hadrons, isolated | |
281 | AliAnaParticleHadronCorrelation *anacorrhadronisopi0 = new AliAnaParticleHadronCorrelation(); | |
282 | anacorrhadronisopi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
283 | anacorrhadronisopi0->AddToHistogramsName("AnaHadronCorrIsoPi0_"); | |
284 | anacorrhadronisopi0->SetDebug(-1); | |
285 | anacorrhadronisopi0->SwitchOffCaloPID(); | |
286 | anacorrhadronisopi0->SwitchOnFiducialCut(); | |
287 | AliFiducialCut * fidCut1stYear = anacorrhadronisopi0->GetFiducialCut(); | |
288 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; | |
289 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; | |
290 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
291 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
292 | fidCut1stYear->DoCTSFiducialCut(kTRUE) ; | |
293 | fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.); | |
294 | anacorrhadronisopi0->SwitchOnDecayCorr(); | |
295 | anacorrhadronisopi0->SetPtCutRange(0.5,50); | |
296 | anacorrhadronisopi0->SetDeltaPhiCutRange(1.5,4.5); | |
297 | anacorrhadronisopi0->SelectIsolated(kTRUE); // do correlation with isolated pi0 | |
298 | anacorrhadronisopi0->SetMultiplicity(80, 100); | |
299 | anacorrhadronisopi0->SetMultiBin(1); | |
2244659d | 300 | anacorrhadronisopi0->SwitchOffNeutralCorr(); |
301 | anacorrhadronisopi0->SwitchOffEventSelection(); | |
302 | anacorrhadronisopi0->SwitchOnSeveralUECalculation(); | |
303 | anacorrhadronisopi0->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
304 | if(kUseKinematics) anacorrhadronisopi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
305 | else anacorrhadronisopi0->SwitchOffDataMC() ; | |
306 | //if(calorimeter=="PHOS"){ | |
307 | // //Correlate with particles in EMCAL | |
308 | // anacorrhadronpi0->SwitchOnCaloPID(); | |
309 | // anacorrhadronpi0->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
310 | //} | |
311 | //Set Histograms bins and ranges | |
745913ae | 312 | anacorrhadronisopi0->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
313 | // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
314 | // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
2244659d | 315 | if(kPrintSettings) anacorrhadronisopi0->Print(""); |
316 | ||
317 | } //analysis in calorimeter | |
318 | else { | |
319 | //---charge particle trigger--------------------- | |
320 | //------------------------------------------------ | |
321 | ||
322 | AliAnaChargedParticles *anacharge = new AliAnaChargedParticles(); | |
323 | anacharge->SetDebug(-1); //10 for lots of messages | |
324 | anacharge->SetMinPt(1.0); | |
325 | // anacharge->SetCaloPID(pid); | |
2244659d | 326 | if(kUseKinematics) anacharge->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
327 | else anacharge->SwitchOffDataMC() ; | |
328 | anacharge->SwitchOffCaloPID(); | |
329 | anacharge->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL | |
330 | anacharge->SwitchOnFiducialCut(); | |
331 | AliFiducialCut * fidCut1stYear = anacharge->GetFiducialCut(); | |
332 | fidCut1stYear->DoCTSFiducialCut(kTRUE) ; | |
333 | fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.); | |
334 | if(!data.Contains("delta")) { | |
335 | anacharge->SetOutputAODName(Form("Triggers%s",calorimeter.Data())); | |
336 | anacharge->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
337 | } | |
338 | else anacharge->SetOutputAODName(Form("Triggers%s",calorimeter.Data())); | |
339 | anacharge->AddToHistogramsName("AnaCharge_"); | |
340 | //Set Histograms bins and ranges | |
745913ae | 341 | anacharge->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
342 | // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
343 | // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
2244659d | 344 | |
345 | if(kPrintSettings) anacharge->Print(""); | |
8e3bc7b6 | 346 | } |
8e3bc7b6 | 347 | |
2244659d | 348 | // ------------------------------------------------- |
349 | // --- Correlation Analysis with non-isolated triggers --- | |
350 | // ------------------------------------------------- | |
351 | // ### Correlation with hadrons | |
352 | AliAnaParticleHadronCorrelation *anacorrhadron = new AliAnaParticleHadronCorrelation(); | |
353 | anacorrhadron->SetInputAODName(Form("Triggers%s",calorimeter.Data())); | |
354 | anacorrhadron->AddToHistogramsName("AnaHadronCorrTrig_"); | |
355 | anacorrhadron->SetDebug(-1); | |
356 | anacorrhadron->SwitchOnCaloPID(); | |
357 | anacorrhadron->SwitchOnFiducialCut(); | |
358 | AliFiducialCut * fidCut1stYear = anacorrhadron->GetFiducialCut(); | |
359 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; | |
360 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; | |
361 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
362 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
363 | fidCut1stYear->DoCTSFiducialCut(kTRUE) ; | |
364 | fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.); | |
365 | anacorrhadron->SetPtCutRange(0.5,50); | |
366 | anacorrhadron->SetDeltaPhiCutRange(1.5,4.5); | |
367 | anacorrhadron->SetMultiplicity(80, 120); | |
368 | anacorrhadron->SetMultiBin(1); | |
2244659d | 369 | anacorrhadron->SwitchOffNeutralCorr(); |
370 | anacorrhadron->SwitchOffEventSelection(); | |
371 | anacorrhadron->SwitchOnSeveralUECalculation(); | |
372 | anacorrhadron->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
373 | anacorrhadron->SelectIsolated(kFALSE); // do correlation with isolated photons | |
374 | if(kUseKinematics) anacorrhadron->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
375 | else anacorrhadron->SwitchOffDataMC() ; | |
376 | //if(calorimeter=="PHOS"){ | |
377 | //Correlate with particles in EMCAL | |
378 | //anacorrhadron->SwitchOnCaloPID(); | |
379 | //anacorrhadron->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
380 | //} | |
381 | //Set Histograms bins and ranges | |
745913ae | 382 | anacorrhadron->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
383 | // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
384 | // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
2244659d | 385 | if(kPrintSettings) anacorrhadron->Print(""); |
386 | ||
387 | ||
8e3bc7b6 | 388 | |
8e3bc7b6 | 389 | // ### Isolation analysis ### |
8e3bc7b6 | 390 | AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation(); |
391 | anaisol->SetDebug(-1); | |
2244659d | 392 | anaisol->SetMinPt(2.0); |
2244659d | 393 | anaisol->SetInputAODName(Form("Triggers%s",calorimeter.Data())); |
394 | anaisol->AddToHistogramsName("AnaIsolTrig_"); | |
8e3bc7b6 | 395 | anaisol->SetCalorimeter(calorimeter); |
396 | if(kUseKinematics) anaisol->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
397 | else anaisol->SwitchOffDataMC() ; | |
398 | //Select clusters with no pair, if both clusters with pi0 mass | |
399 | anaisol->SwitchOffInvariantMass(); | |
2244659d | 400 | //anaisol->SetNeutralMesonSelection(nms); |
8e3bc7b6 | 401 | //Do isolation cut |
2244659d | 402 | anaisol->SetIsolationCut(ic); |
8e3bc7b6 | 403 | //Do or not do isolation with previously produced AODs. |
404 | //No effect if use of SwitchOnSeveralIsolation() | |
405 | anaisol->SwitchOffReIsolation(); | |
406 | //Multiple IC | |
407 | anaisol->SwitchOffSeveralIsolation() ; | |
408 | //Set Histograms bins and ranges | |
745913ae | 409 | anaisol->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
410 | // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
411 | // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
8e3bc7b6 | 412 | |
2244659d | 413 | if(kPrintSettings) anaisol->Print(""); |
8e3bc7b6 | 414 | |
2244659d | 415 | // ------------------------------------------------- |
416 | // --- Correlation Analysis with isolated triggers --- | |
417 | // ------------------------------------------------- | |
8e3bc7b6 | 418 | // ### Correlation with hadrons |
419 | AliAnaParticleHadronCorrelation *anacorrisohadron = new AliAnaParticleHadronCorrelation(); | |
2244659d | 420 | anacorrisohadron->SetInputAODName(Form("Triggers%s",calorimeter.Data())); |
421 | anacorrisohadron->AddToHistogramsName("AnaHadronCorrIsoTrig_"); | |
8e3bc7b6 | 422 | anacorrisohadron->SetDebug(-1); |
423 | anacorrisohadron->SwitchOffCaloPID(); | |
2244659d | 424 | anacorrisohadron->SwitchOnFiducialCut(); |
425 | AliFiducialCut * fidCut1stYear = anacorrisohadron->GetFiducialCut(); | |
426 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; | |
427 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; | |
428 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
429 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
430 | fidCut1stYear->DoCTSFiducialCut(kTRUE) ; | |
431 | fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.); | |
432 | anacorrisohadron->SetPtCutRange(0.5,50); | |
8e3bc7b6 | 433 | anacorrisohadron->SetDeltaPhiCutRange(1.5,4.5); |
2244659d | 434 | anacorrisohadron->SetMultiplicity(80, 100); |
435 | anacorrisohadron->SetMultiBin(1); | |
2244659d | 436 | anacorrisohadron->SwitchOffNeutralCorr(); |
437 | anacorrisohadron->SwitchOffEventSelection(); | |
8e3bc7b6 | 438 | anacorrisohadron->SwitchOnSeveralUECalculation(); |
439 | anacorrisohadron->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
440 | anacorrisohadron->SelectIsolated(kTRUE); // do correlation with isolated photons | |
441 | if(kUseKinematics) anacorrisohadron->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
442 | else anacorrisohadron->SwitchOffDataMC() ; | |
443 | //if(calorimeter=="PHOS"){ | |
444 | //Correlate with particles in EMCAL | |
445 | //anacorrhadron->SwitchOnCaloPID(); | |
446 | //anacorrhadron->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
447 | //} | |
448 | //Set Histograms bins and ranges | |
745913ae | 449 | anacorrisohadron->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
450 | // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
451 | // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
8e3bc7b6 | 452 | if(kPrintSettings) anacorrisohadron->Print(""); |
453 | ||
8e3bc7b6 | 454 | // #### Configure Maker #### |
745913ae | 455 | AliAnaCaloTrackCorrMaker * maker = new AliAnaCaloTrackCorrMaker(); |
8e3bc7b6 | 456 | maker->SetReader(reader);//pointer to reader |
8e3bc7b6 | 457 | Int_t n = 0;//Analysis number, order is important |
8e3bc7b6 | 458 | // Particle selection analysis |
2244659d | 459 | if(calorimeter=="PHOS" || calorimeter=="EMCAL") { |
460 | maker->SetCaloUtils(cu); //pointer to calorimeter utils | |
461 | maker->AddAnalysis(anaphoton,n++); | |
462 | maker->AddAnalysis(anapi0,n++); | |
463 | maker->AddAnalysis(anapi0ebe,n++); | |
464 | maker->AddAnalysis(anacorrhadronpi0,n++); | |
465 | maker->AddAnalysis(anaisolpi0,n++); | |
466 | maker->AddAnalysis(anacorrhadronisopi0,n++); | |
467 | } | |
468 | if(calorimeter=="CTS") | |
469 | maker->AddAnalysis(anacharge,n++); | |
8e3bc7b6 | 470 | // Correlation analysis |
8e3bc7b6 | 471 | maker->AddAnalysis(anacorrhadron,n++); |
2244659d | 472 | // Isolation analysis |
473 | maker->AddAnalysis(anaisol,n++); | |
474 | // Correlation analysis with isolated triggers | |
475 | maker->AddAnalysis(anacorrisohadron,n); | |
8e3bc7b6 | 476 | maker->SetAnaDebug(-1) ; |
477 | maker->SwitchOnHistogramsMaker() ; | |
478 | if(data.Contains("delta")) maker->SwitchOffAODsMaker() ; | |
479 | else maker->SwitchOnAODsMaker() ; | |
480 | ||
481 | if(kPrintSettings) maker->Print(""); | |
482 | ||
483 | printf("======================== \n"); | |
745913ae | 484 | printf(" End Configuration of CaloTrackCorr analysis with detector %s \n",calorimeter.Data()); |
8e3bc7b6 | 485 | printf("======================== \n"); |
486 | ||
487 | // Create task | |
488 | //=========================================================================== | |
745913ae | 489 | // AliAnalysisTaskParticleCorrelationM * task = new AliAnalysisTaskParticleCorrelationM(Form("CaloTrackCorr%s",calorimeter.Data())); |
490 | AliAnalysisTaskParticleCorrelationM * task = new AliAnalysisTaskParticleCorrelationM("CaloTrackCorr"); | |
8e3bc7b6 | 491 | task->SetConfigFileName(""); //Don't configure the analysis via configuration file. |
492 | //task->SetDebugLevel(-1); | |
8e3bc7b6 | 493 | task->SetAnalysisMaker(maker); |
494 | //if(!kSimulation)task->SelectCollisionCandidates(); //AliPhysicsSelection has to be attached before. | |
495 | mgr->AddTask(task); | |
496 | ||
2244659d | 497 | // char name[128]; |
745913ae | 498 | // sprintf(name,"CaloTrackCorr_%s",calorimeter.Data()); |
2244659d | 499 | // cout<<"Name of task "<<name<<endl; |
8e3bc7b6 | 500 | //AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(Form(name),TList::Class(), |
745913ae | 501 | // AliAnalysisManager::kOutputContainer, Form("CaloTrackCorr_%s.root",calorimeter.Data())); |
8e3bc7b6 | 502 | |
503 | TString outputfile = AliAnalysisManager::GetCommonFileName(); | |
2244659d | 504 | outputfile.ReplaceAll(".root","") ; |
505 | outputfile.Append("M.root") ; | |
745913ae | 506 | // AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(Form("CaloTrackCorr_%s",calorimeter.Data()), TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:CaloTrackCorr_%s",outputfile.Data(),calorimeter.Data())); |
2244659d | 507 | AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(calorimeter.Data(), TList::Class(), |
508 | AliAnalysisManager::kOutputContainer, | |
745913ae | 509 | Form("%s:CaloTrackCorr",outputfile.Data())); |
2244659d | 510 | |
511 | AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("%sCuts",calorimeter.Data()), TList::Class(), | |
512 | AliAnalysisManager::kParamContainer, | |
745913ae | 513 | Form("%s:CaloTrackCorrCuts",outputfile.Data())); |
8e3bc7b6 | 514 | // Create ONLY the output containers for the data produced by the task. |
515 | // Get and connect other common input/output containers via the manager as below | |
516 | //============================================================================== | |
517 | mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer()); | |
518 | // AOD output slot will be used in a different way in future | |
2244659d | 519 | //if(!data.Contains("delta")) mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer()); |
520 | // mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer()); | |
8e3bc7b6 | 521 | mgr->ConnectOutput (task, 1, cout_pc); |
2244659d | 522 | mgr->ConnectOutput (task, 2, cout_cuts); |
523 | ||
8e3bc7b6 | 524 | return task; |
525 | } | |
526 | ||
527 |