]>
Commit | Line | Data |
---|---|---|
0e06e5b0 | 1 | AliAnalysisTaskCaloTrackCorrelationM *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 | |
4afd944b | 172 | |
745913ae | 173 | anapi0->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
174 | //anapi0->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
175 | //anapi0->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.8, 0.8, 200) ; | |
176 | anapi0->GetHistogramRanges()->SetHistoMassRangeAndNBins(0., 1.0, 100) ; | |
177 | anapi0->GetHistogramRanges()->SetHistoAsymmetryRangeAndNBins(0., 1. , 10) ; | |
2244659d | 178 | if(kPrintSettings) anapi0->Print(""); |
179 | ||
180 | // ------------------------------------------------- | |
181 | // --- Pi0 EbE Analysis --- | |
182 | // ------------------------------------------------- | |
183 | ||
184 | AliNeutralMesonSelection *nms = new AliNeutralMesonSelection(); | |
185 | nms->SetInvMassCutRange(0.05, 0.16) ; | |
186 | nms->SwitchOffAngleSelection() ; | |
187 | nms->KeepNeutralMesonSelectionHistos(kTRUE); | |
188 | //Set Histrograms bins and ranges | |
189 | nms->SetHistoERangeAndNBins(0, 50, 100) ; | |
190 | nms->SetHistoPtRangeAndNBins(0, 50, 100) ; | |
745913ae | 191 | // nms->GetHistogramRanges()->SetHistoAngleRangeAndNBins(0, 0.3, 100) ; |
192 | // nsm->GetHistogramRanges()->SetHistoIMRangeAndNBins(0, 0.4, 100) ; | |
2244659d | 193 | |
194 | AliAnaPi0EbE *anapi0ebe = new AliAnaPi0EbE(); | |
195 | anapi0ebe->SetDebug(-1);//10 for lots of messages | |
196 | anapi0ebe->SetAnalysisType(AliAnaPi0EbE::kIMCalo); | |
197 | anapi0ebe->SetMinPt(0.5); | |
198 | anapi0ebe->SetCalorimeter(calorimeter); | |
199 | anapi0ebe->SetInputAODName(Form("Triggers%s",calorimeter.Data())); | |
200 | if(!data.Contains("delta")) { | |
201 | anapi0ebe->SetOutputAODName(Form("Pi0s%s",calorimeter.Data())); | |
202 | anapi0ebe->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
203 | } | |
204 | else anapi0ebe->SetOutputAODName(Form("Pi0s%s",calorimeter.Data())); | |
205 | ||
206 | if(kUseKinematics) anapi0ebe->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
207 | else anapi0ebe->SwitchOffDataMC() ; | |
208 | anapi0ebe->SwitchOffEventSelection() ; | |
2244659d | 209 | anapi0ebe->SetMultiplicity(80, 120); |
210 | anapi0ebe->SetMultiBin(1); | |
211 | anapi0ebe->SetNeutralMesonSelection(nms); | |
212 | //Set Histrograms bins and ranges | |
745913ae | 213 | anapi0ebe->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
214 | // anapi0->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
215 | // anapi0->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
2244659d | 216 | if(kPrintSettings) anapi0ebe->Print(""); |
217 | ||
218 | // ### Pi0 Correlation with hadrons, not isolated | |
219 | AliAnaParticleHadronCorrelation *anacorrhadronpi0 = new AliAnaParticleHadronCorrelation(); | |
220 | anacorrhadronpi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
221 | anacorrhadronpi0->AddToHistogramsName("AnaHadronCorrPi0_"); | |
222 | anacorrhadronpi0->SetDebug(-1); | |
223 | anacorrhadronpi0->SwitchOffCaloPID(); | |
224 | anacorrhadronpi0->SwitchOnFiducialCut(); | |
225 | AliFiducialCut * fidCut1stYear = anacorrhadronpi0->GetFiducialCut(); | |
226 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; | |
227 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; | |
228 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
229 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
230 | fidCut1stYear->DoCTSFiducialCut(kTRUE) ; | |
231 | fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.); | |
232 | anacorrhadronpi0->SwitchOnDecayCorr(); | |
233 | anacorrhadronpi0->SetPtCutRange(0.5,50); | |
234 | anacorrhadronpi0->SetDeltaPhiCutRange(1.5,4.5); | |
235 | anacorrhadronpi0->SelectIsolated(kFALSE); // do correlation with non isolated pi0 | |
236 | anacorrhadronpi0->SetMultiplicity(80, 100); | |
237 | anacorrhadronpi0->SetMultiBin(1); | |
2244659d | 238 | anacorrhadronpi0->SwitchOffNeutralCorr(); |
239 | anacorrhadronpi0->SwitchOffEventSelection(); | |
240 | anacorrhadronpi0->SwitchOnSeveralUECalculation(); | |
241 | anacorrhadronpi0->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
242 | if(kUseKinematics) anacorrhadronpi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
243 | else anacorrhadronpi0->SwitchOffDataMC() ; | |
244 | //if(calorimeter=="PHOS"){ | |
245 | // //Correlate with particles in EMCAL | |
246 | // anacorrhadronpi0->SwitchOnCaloPID(); | |
247 | // anacorrhadronpi0->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
248 | //} | |
249 | //Set Histograms bins and ranges | |
745913ae | 250 | anacorrhadronpi0->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
251 | // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
252 | // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
2244659d | 253 | if(kPrintSettings) anacorrhadronpi0->Print(""); |
254 | ||
255 | AliAnaParticleIsolation *anaisolpi0 = new AliAnaParticleIsolation(); | |
256 | anaisolpi0->SetDebug(-1); | |
257 | anaisolpi0->SetMinPt(2.); | |
2244659d | 258 | anaisolpi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); |
259 | anaisolpi0->AddToHistogramsName("AnaIsolPi0_"); | |
260 | anaisolpi0->SetCalorimeter(calorimeter); | |
261 | if(kUseKinematics) anaisolpi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
262 | else anaisolpi0->SwitchOffDataMC() ; | |
263 | //Select clusters with no pair, if both clusters with pi0 mass | |
264 | anaisolpi0->SwitchOffInvariantMass(); | |
265 | //anaisol->SetNeutralMesonSelection(nms); | |
266 | //Do isolation cut | |
267 | anaisolpi0->SetIsolationCut(ic); | |
268 | //Do or not do isolation with previously produced AODs. | |
269 | //No effect if use of SwitchOnSeveralIsolation() | |
270 | anaisolpi0->SwitchOffReIsolation(); | |
271 | //Multiple IC | |
272 | anaisolpi0->SwitchOffSeveralIsolation() ; | |
273 | //Set Histograms bins and ranges | |
745913ae | 274 | anaisolpi0->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
275 | // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
276 | // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
2244659d | 277 | if(kPrintSettings) anaisol->Print(""); |
278 | ||
279 | // ### Pi0 Correlation with hadrons, isolated | |
280 | AliAnaParticleHadronCorrelation *anacorrhadronisopi0 = new AliAnaParticleHadronCorrelation(); | |
281 | anacorrhadronisopi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
282 | anacorrhadronisopi0->AddToHistogramsName("AnaHadronCorrIsoPi0_"); | |
283 | anacorrhadronisopi0->SetDebug(-1); | |
284 | anacorrhadronisopi0->SwitchOffCaloPID(); | |
285 | anacorrhadronisopi0->SwitchOnFiducialCut(); | |
286 | AliFiducialCut * fidCut1stYear = anacorrhadronisopi0->GetFiducialCut(); | |
287 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; | |
288 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; | |
289 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
290 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
291 | fidCut1stYear->DoCTSFiducialCut(kTRUE) ; | |
292 | fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.); | |
293 | anacorrhadronisopi0->SwitchOnDecayCorr(); | |
294 | anacorrhadronisopi0->SetPtCutRange(0.5,50); | |
295 | anacorrhadronisopi0->SetDeltaPhiCutRange(1.5,4.5); | |
296 | anacorrhadronisopi0->SelectIsolated(kTRUE); // do correlation with isolated pi0 | |
297 | anacorrhadronisopi0->SetMultiplicity(80, 100); | |
298 | anacorrhadronisopi0->SetMultiBin(1); | |
2244659d | 299 | anacorrhadronisopi0->SwitchOffNeutralCorr(); |
300 | anacorrhadronisopi0->SwitchOffEventSelection(); | |
301 | anacorrhadronisopi0->SwitchOnSeveralUECalculation(); | |
302 | anacorrhadronisopi0->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
303 | if(kUseKinematics) anacorrhadronisopi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
304 | else anacorrhadronisopi0->SwitchOffDataMC() ; | |
305 | //if(calorimeter=="PHOS"){ | |
306 | // //Correlate with particles in EMCAL | |
307 | // anacorrhadronpi0->SwitchOnCaloPID(); | |
308 | // anacorrhadronpi0->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
309 | //} | |
310 | //Set Histograms bins and ranges | |
745913ae | 311 | anacorrhadronisopi0->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
312 | // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
313 | // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
2244659d | 314 | if(kPrintSettings) anacorrhadronisopi0->Print(""); |
315 | ||
316 | } //analysis in calorimeter | |
317 | else { | |
318 | //---charge particle trigger--------------------- | |
319 | //------------------------------------------------ | |
320 | ||
321 | AliAnaChargedParticles *anacharge = new AliAnaChargedParticles(); | |
322 | anacharge->SetDebug(-1); //10 for lots of messages | |
323 | anacharge->SetMinPt(1.0); | |
324 | // anacharge->SetCaloPID(pid); | |
2244659d | 325 | if(kUseKinematics) anacharge->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
326 | else anacharge->SwitchOffDataMC() ; | |
327 | anacharge->SwitchOffCaloPID(); | |
328 | anacharge->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL | |
329 | anacharge->SwitchOnFiducialCut(); | |
330 | AliFiducialCut * fidCut1stYear = anacharge->GetFiducialCut(); | |
331 | fidCut1stYear->DoCTSFiducialCut(kTRUE) ; | |
332 | fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.); | |
333 | if(!data.Contains("delta")) { | |
334 | anacharge->SetOutputAODName(Form("Triggers%s",calorimeter.Data())); | |
335 | anacharge->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
336 | } | |
337 | else anacharge->SetOutputAODName(Form("Triggers%s",calorimeter.Data())); | |
338 | anacharge->AddToHistogramsName("AnaCharge_"); | |
339 | //Set Histograms bins and ranges | |
745913ae | 340 | anacharge->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
341 | // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
342 | // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
2244659d | 343 | |
344 | if(kPrintSettings) anacharge->Print(""); | |
8e3bc7b6 | 345 | } |
8e3bc7b6 | 346 | |
2244659d | 347 | // ------------------------------------------------- |
348 | // --- Correlation Analysis with non-isolated triggers --- | |
349 | // ------------------------------------------------- | |
350 | // ### Correlation with hadrons | |
351 | AliAnaParticleHadronCorrelation *anacorrhadron = new AliAnaParticleHadronCorrelation(); | |
352 | anacorrhadron->SetInputAODName(Form("Triggers%s",calorimeter.Data())); | |
353 | anacorrhadron->AddToHistogramsName("AnaHadronCorrTrig_"); | |
354 | anacorrhadron->SetDebug(-1); | |
355 | anacorrhadron->SwitchOnCaloPID(); | |
356 | anacorrhadron->SwitchOnFiducialCut(); | |
357 | AliFiducialCut * fidCut1stYear = anacorrhadron->GetFiducialCut(); | |
358 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; | |
359 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; | |
360 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
361 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
362 | fidCut1stYear->DoCTSFiducialCut(kTRUE) ; | |
363 | fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.); | |
364 | anacorrhadron->SetPtCutRange(0.5,50); | |
365 | anacorrhadron->SetDeltaPhiCutRange(1.5,4.5); | |
366 | anacorrhadron->SetMultiplicity(80, 120); | |
367 | anacorrhadron->SetMultiBin(1); | |
2244659d | 368 | anacorrhadron->SwitchOffNeutralCorr(); |
369 | anacorrhadron->SwitchOffEventSelection(); | |
370 | anacorrhadron->SwitchOnSeveralUECalculation(); | |
371 | anacorrhadron->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
372 | anacorrhadron->SelectIsolated(kFALSE); // do correlation with isolated photons | |
373 | if(kUseKinematics) anacorrhadron->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
374 | else anacorrhadron->SwitchOffDataMC() ; | |
375 | //if(calorimeter=="PHOS"){ | |
376 | //Correlate with particles in EMCAL | |
377 | //anacorrhadron->SwitchOnCaloPID(); | |
378 | //anacorrhadron->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
379 | //} | |
380 | //Set Histograms bins and ranges | |
745913ae | 381 | anacorrhadron->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
382 | // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
383 | // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
2244659d | 384 | if(kPrintSettings) anacorrhadron->Print(""); |
385 | ||
386 | ||
8e3bc7b6 | 387 | |
8e3bc7b6 | 388 | // ### Isolation analysis ### |
8e3bc7b6 | 389 | AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation(); |
390 | anaisol->SetDebug(-1); | |
2244659d | 391 | anaisol->SetMinPt(2.0); |
2244659d | 392 | anaisol->SetInputAODName(Form("Triggers%s",calorimeter.Data())); |
393 | anaisol->AddToHistogramsName("AnaIsolTrig_"); | |
8e3bc7b6 | 394 | anaisol->SetCalorimeter(calorimeter); |
395 | if(kUseKinematics) anaisol->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
396 | else anaisol->SwitchOffDataMC() ; | |
397 | //Select clusters with no pair, if both clusters with pi0 mass | |
398 | anaisol->SwitchOffInvariantMass(); | |
2244659d | 399 | //anaisol->SetNeutralMesonSelection(nms); |
8e3bc7b6 | 400 | //Do isolation cut |
2244659d | 401 | anaisol->SetIsolationCut(ic); |
8e3bc7b6 | 402 | //Do or not do isolation with previously produced AODs. |
403 | //No effect if use of SwitchOnSeveralIsolation() | |
404 | anaisol->SwitchOffReIsolation(); | |
405 | //Multiple IC | |
406 | anaisol->SwitchOffSeveralIsolation() ; | |
407 | //Set Histograms bins and ranges | |
745913ae | 408 | anaisol->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
409 | // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
410 | // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
8e3bc7b6 | 411 | |
2244659d | 412 | if(kPrintSettings) anaisol->Print(""); |
8e3bc7b6 | 413 | |
2244659d | 414 | // ------------------------------------------------- |
415 | // --- Correlation Analysis with isolated triggers --- | |
416 | // ------------------------------------------------- | |
8e3bc7b6 | 417 | // ### Correlation with hadrons |
418 | AliAnaParticleHadronCorrelation *anacorrisohadron = new AliAnaParticleHadronCorrelation(); | |
2244659d | 419 | anacorrisohadron->SetInputAODName(Form("Triggers%s",calorimeter.Data())); |
420 | anacorrisohadron->AddToHistogramsName("AnaHadronCorrIsoTrig_"); | |
8e3bc7b6 | 421 | anacorrisohadron->SetDebug(-1); |
422 | anacorrisohadron->SwitchOffCaloPID(); | |
2244659d | 423 | anacorrisohadron->SwitchOnFiducialCut(); |
424 | AliFiducialCut * fidCut1stYear = anacorrisohadron->GetFiducialCut(); | |
425 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; | |
426 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; | |
427 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
428 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
429 | fidCut1stYear->DoCTSFiducialCut(kTRUE) ; | |
430 | fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.); | |
431 | anacorrisohadron->SetPtCutRange(0.5,50); | |
8e3bc7b6 | 432 | anacorrisohadron->SetDeltaPhiCutRange(1.5,4.5); |
2244659d | 433 | anacorrisohadron->SetMultiplicity(80, 100); |
434 | anacorrisohadron->SetMultiBin(1); | |
2244659d | 435 | anacorrisohadron->SwitchOffNeutralCorr(); |
436 | anacorrisohadron->SwitchOffEventSelection(); | |
8e3bc7b6 | 437 | anacorrisohadron->SwitchOnSeveralUECalculation(); |
438 | anacorrisohadron->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
439 | anacorrisohadron->SelectIsolated(kTRUE); // do correlation with isolated photons | |
440 | if(kUseKinematics) anacorrisohadron->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
441 | else anacorrisohadron->SwitchOffDataMC() ; | |
442 | //if(calorimeter=="PHOS"){ | |
443 | //Correlate with particles in EMCAL | |
444 | //anacorrhadron->SwitchOnCaloPID(); | |
445 | //anacorrhadron->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
446 | //} | |
447 | //Set Histograms bins and ranges | |
745913ae | 448 | anacorrisohadron->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ; |
449 | // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
450 | // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
8e3bc7b6 | 451 | if(kPrintSettings) anacorrisohadron->Print(""); |
452 | ||
8e3bc7b6 | 453 | // #### Configure Maker #### |
745913ae | 454 | AliAnaCaloTrackCorrMaker * maker = new AliAnaCaloTrackCorrMaker(); |
8e3bc7b6 | 455 | maker->SetReader(reader);//pointer to reader |
8e3bc7b6 | 456 | Int_t n = 0;//Analysis number, order is important |
8e3bc7b6 | 457 | // Particle selection analysis |
2244659d | 458 | if(calorimeter=="PHOS" || calorimeter=="EMCAL") { |
459 | maker->SetCaloUtils(cu); //pointer to calorimeter utils | |
460 | maker->AddAnalysis(anaphoton,n++); | |
461 | maker->AddAnalysis(anapi0,n++); | |
462 | maker->AddAnalysis(anapi0ebe,n++); | |
463 | maker->AddAnalysis(anacorrhadronpi0,n++); | |
464 | maker->AddAnalysis(anaisolpi0,n++); | |
465 | maker->AddAnalysis(anacorrhadronisopi0,n++); | |
466 | } | |
467 | if(calorimeter=="CTS") | |
468 | maker->AddAnalysis(anacharge,n++); | |
8e3bc7b6 | 469 | // Correlation analysis |
8e3bc7b6 | 470 | maker->AddAnalysis(anacorrhadron,n++); |
2244659d | 471 | // Isolation analysis |
472 | maker->AddAnalysis(anaisol,n++); | |
473 | // Correlation analysis with isolated triggers | |
474 | maker->AddAnalysis(anacorrisohadron,n); | |
8e3bc7b6 | 475 | maker->SetAnaDebug(-1) ; |
476 | maker->SwitchOnHistogramsMaker() ; | |
477 | if(data.Contains("delta")) maker->SwitchOffAODsMaker() ; | |
478 | else maker->SwitchOnAODsMaker() ; | |
479 | ||
480 | if(kPrintSettings) maker->Print(""); | |
481 | ||
482 | printf("======================== \n"); | |
745913ae | 483 | printf(" End Configuration of CaloTrackCorr analysis with detector %s \n",calorimeter.Data()); |
8e3bc7b6 | 484 | printf("======================== \n"); |
485 | ||
486 | // Create task | |
487 | //=========================================================================== | |
0e06e5b0 | 488 | // AliAnalysisTaskCaloTrackCorrelationM * task = new AliAnalysisTaskCaloTrackCorrelationM(Form("CaloTrackCorr%s",calorimeter.Data())); |
489 | AliAnalysisTaskCaloTrackCorrelationM * task = new AliAnalysisTaskCaloTrackCorrelationM("CaloTrackCorr"); | |
8e3bc7b6 | 490 | task->SetConfigFileName(""); //Don't configure the analysis via configuration file. |
491 | //task->SetDebugLevel(-1); | |
8e3bc7b6 | 492 | task->SetAnalysisMaker(maker); |
493 | //if(!kSimulation)task->SelectCollisionCandidates(); //AliPhysicsSelection has to be attached before. | |
494 | mgr->AddTask(task); | |
495 | ||
2244659d | 496 | // char name[128]; |
745913ae | 497 | // sprintf(name,"CaloTrackCorr_%s",calorimeter.Data()); |
2244659d | 498 | // cout<<"Name of task "<<name<<endl; |
8e3bc7b6 | 499 | //AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(Form(name),TList::Class(), |
745913ae | 500 | // AliAnalysisManager::kOutputContainer, Form("CaloTrackCorr_%s.root",calorimeter.Data())); |
8e3bc7b6 | 501 | |
502 | TString outputfile = AliAnalysisManager::GetCommonFileName(); | |
2244659d | 503 | outputfile.ReplaceAll(".root","") ; |
504 | outputfile.Append("M.root") ; | |
745913ae | 505 | // AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(Form("CaloTrackCorr_%s",calorimeter.Data()), TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:CaloTrackCorr_%s",outputfile.Data(),calorimeter.Data())); |
2244659d | 506 | AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(calorimeter.Data(), TList::Class(), |
507 | AliAnalysisManager::kOutputContainer, | |
745913ae | 508 | Form("%s:CaloTrackCorr",outputfile.Data())); |
2244659d | 509 | |
510 | AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("%sCuts",calorimeter.Data()), TList::Class(), | |
511 | AliAnalysisManager::kParamContainer, | |
745913ae | 512 | Form("%s:CaloTrackCorrCuts",outputfile.Data())); |
8e3bc7b6 | 513 | // Create ONLY the output containers for the data produced by the task. |
514 | // Get and connect other common input/output containers via the manager as below | |
515 | //============================================================================== | |
516 | mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer()); | |
517 | // AOD output slot will be used in a different way in future | |
2244659d | 518 | //if(!data.Contains("delta")) mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer()); |
519 | // mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer()); | |
8e3bc7b6 | 520 | mgr->ConnectOutput (task, 1, cout_pc); |
2244659d | 521 | mgr->ConnectOutput (task, 2, cout_cuts); |
522 | ||
8e3bc7b6 | 523 | return task; |
524 | } | |
525 | ||
526 |