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