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