]>
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 | |
57eb7f00 | 148 | if(calorimeter == "PHOS"){ |
149 | anaphoton1->SetNCellCut(1);// At least 2 cells | |
150 | anaphoton1->SetMinPt(0.2); | |
151 | } | |
152 | else {//EMCAL | |
153 | //anaphoton1->SetNCellCut(0);// At least 2 cells | |
154 | anaphoton1->SetMinPt(0.1); // no effect minium EMCAL cut. | |
155 | anaphoton1->SetTimeCut(550,750);// Time window of [550-750] ns | |
156 | } | |
157 | ||
a3aebfff | 158 | anaphoton1->SetMinDistanceToBadChannel(2, 4, 5); |
159 | anaphoton1->SetCaloPID(pid); | |
160 | anaphoton1->SetCalorimeter(calorimeter); | |
4a55403a | 161 | if(kUseKinematics) anaphoton1->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
162 | else anaphoton1->SwitchOffDataMC() ; | |
a3aebfff | 163 | anaphoton1->SwitchOffCaloPID(); |
164 | anaphoton1->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL | |
de8a210f | 165 | if(kSimulation){ |
afabc52f | 166 | anaphoton1->SwitchOnFiducialCut(); |
167 | anaphoton1->SetFiducialCut(fidCut1stYear); | |
de8a210f | 168 | } |
54224800 | 169 | //anaphoton1->SwitchOnTrackMatchRejection(); |
1e86c71e | 170 | if(!data.Contains("delta")) anaphoton1->SetOutputAODName(Form("PhotonsForIM%s",calorimeter.Data())); |
171 | else anaphoton1->SetInputAODName (Form("PhotonsForIM%s",calorimeter.Data())); | |
de8a210f | 172 | //Set Histograms bins and ranges |
afabc52f | 173 | anaphoton1->SetHistoPtRangeAndNBins(0, 50, 500) ; |
de8a210f | 174 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
175 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
afabc52f | 176 | |
4a55403a | 177 | if(kPrintSettings) anaphoton1->Print(""); |
a3aebfff | 178 | |
90eb3a19 | 179 | AliAnaPi0 *anapi0 = new AliAnaPi0(); |
74b57e64 | 180 | anapi0->SetDebug(-1);//10 for lots of messages |
ad1ac1b7 | 181 | anapi0->SetInputAODName(Form("PhotonsForIM%s",calorimeter.Data())); |
90eb3a19 | 182 | anapi0->SetCaloPID(pid); |
183 | anapi0->SetCalorimeter(calorimeter); | |
0cdb88b8 | 184 | if(kSimulation){ |
185 | anapi0->SwitchOnFiducialCut(); | |
186 | anapi0->SetFiducialCut(fidCut1stYear); | |
187 | } | |
2d3dce11 | 188 | anapi0->SetNPID(1); //Available from tag AliRoot::v4-18-15-AN |
afabc52f | 189 | //settings for pp collision |
190 | anapi0->SetNCentrBin(1); | |
191 | anapi0->SetNZvertBin(1); | |
192 | anapi0->SetNRPBin(1); | |
193 | anapi0->SetNMaxEvMix(10); | |
90eb3a19 | 194 | anapi0->SwitchOffDataMC() ;//Access MC stack and fill more histograms |
6921fa00 | 195 | if(calorimeter=="PHOS") anapi0->SetNumberOfModules(3); //PHOS first year |
196 | else anapi0->SetNumberOfModules(4); //EMCAL first year | |
5a2dbc3c | 197 | anapi0->SetHistoPtRangeAndNBins(0, 50, 500) ; |
0cdb88b8 | 198 | //anapi0->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
199 | //anapi0->SetHistoEtaRangeAndNBins(-0.8, 0.8, 200) ; | |
200 | anapi0->SetHistoMassRangeAndNBins(0., 0.6, 300) ; | |
201 | anapi0->SetHistoAsymmetryRangeAndNBins(0., 1. , 10) ; | |
4a55403a | 202 | if(kPrintSettings) anapi0->Print(""); |
90eb3a19 | 203 | |
afabc52f | 204 | |
a3aebfff | 205 | // ------------------------------------------------- |
206 | // --- Photon Isolation and Correlation Analysis --- | |
207 | // ------------------------------------------------- | |
208 | ||
209 | AliAnaPhoton *anaphoton2 = new AliAnaPhoton(); | |
210 | anaphoton2->SetDebug(-1); //10 for lots of messages | |
57eb7f00 | 211 | if(calorimeter == "PHOS"){ |
212 | anaphoton2->SetNCellCut(1);// At least 2 cells | |
213 | anaphoton2->SetMinPt(0.2); | |
214 | } | |
215 | else {//EMCAL | |
216 | //anaphoton2->SetNCellCut(0);// At least 2 cells | |
217 | anaphoton2->SetMinPt(0.1); // no effect minium EMCAL cut. | |
218 | anaphoton2->SetTimeCut(550,750);// Time window of [550-750] ns | |
219 | } | |
a3aebfff | 220 | anaphoton2->SetCaloPID(pid); |
221 | anaphoton2->SetCalorimeter(calorimeter); | |
4a55403a | 222 | if(kUseKinematics) anaphoton2->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
223 | else anaphoton2->SwitchOffDataMC() ; | |
de8a210f | 224 | anaphoton2->SwitchOffCaloPID(); |
ff45398a | 225 | anaphoton2->SwitchOffFiducialCut(); |
0cdb88b8 | 226 | if(kSimulation){ |
227 | anaphoton2->SwitchOnFiducialCut(); | |
228 | anaphoton2->SetFiducialCut(fidCut1stYear); | |
229 | } | |
1e86c71e | 230 | |
231 | if(!data.Contains("delta")) { | |
232 | anaphoton2->SetOutputAODName(Form("Photons%s",calorimeter.Data())); | |
233 | anaphoton2->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
234 | } | |
235 | else anaphoton2->SetInputAODName(Form("Photons%s",calorimeter.Data())); | |
a3aebfff | 236 | anaphoton2->AddToHistogramsName("AnaPhotonCorr_"); |
de8a210f | 237 | //Set Histograms bins and ranges |
afabc52f | 238 | anaphoton2->SetHistoPtRangeAndNBins(0, 50, 500) ; |
239 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
240 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
4a55403a | 241 | if(kPrintSettings) anaphoton2->Print(""); |
90eb3a19 | 242 | // ### Isolation analysis ### |
243 | ||
244 | AliIsolationCut * ic = new AliIsolationCut(); | |
de8a210f | 245 | ic->SetConeSize(0.4); |
246 | ic->SetPtThreshold(0.2); | |
90eb3a19 | 247 | ic->SetICMethod(AliIsolationCut::kPtThresIC); |
4a55403a | 248 | if(kPrintSettings) ic->Print(""); |
90eb3a19 | 249 | |
250 | AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation(); | |
251 | anaisol->SetDebug(-1); | |
4007d0a2 | 252 | anaisol->SetMinPt(0); |
de8a210f | 253 | anaisol->SetInputAODName(Form("Photons%s",calorimeter.Data())); |
90eb3a19 | 254 | anaisol->SetCalorimeter(calorimeter); |
4a55403a | 255 | if(kUseKinematics) anaisol->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
256 | else anaisol->SwitchOffDataMC() ; | |
90eb3a19 | 257 | //Select clusters with no pair, if both clusters with pi0 mass |
258 | anaisol->SwitchOffInvariantMass(); | |
259 | //anaisol->SetNeutralMesonSelection(nms); | |
260 | //Do isolation cut | |
261 | anaisol->SetIsolationCut(ic); | |
262 | //Do or not do isolation with previously produced AODs. | |
263 | //No effect if use of SwitchOnSeveralIsolation() | |
264 | anaisol->SwitchOffReIsolation(); | |
265 | //Multiple IC | |
266 | anaisol->SwitchOffSeveralIsolation() ; | |
de8a210f | 267 | //Set Histograms bins and ranges |
afabc52f | 268 | anaisol->SetHistoPtRangeAndNBins(0, 50, 500) ; |
de8a210f | 269 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
270 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
271 | anaisol->AddToHistogramsName("AnaIsolPhoton_"); | |
4a55403a | 272 | if(kPrintSettings) anaisol->Print(""); |
90eb3a19 | 273 | |
a3aebfff | 274 | // ### Correlation with Jet Finder AOD output |
275 | AliAnaParticleJetFinderCorrelation *anacorrjet = new AliAnaParticleJetFinderCorrelation(); | |
de8a210f | 276 | anacorrjet->SetInputAODName(Form("Photons%s",calorimeter.Data())); |
ff45398a | 277 | anacorrjet->SwitchOffFiducialCut(); |
a3aebfff | 278 | anacorrjet->SetDebug(-1); |
279 | anacorrjet->SetConeSize(1); | |
280 | anacorrjet->SelectIsolated(kTRUE); // do correlation with isolated photons | |
281 | anacorrjet->SetPtThresholdInCone(0.2); | |
282 | anacorrjet->SetDeltaPhiCutRange(0.5,5.5);//Mostly Open Cuts | |
283 | anacorrjet->SetRatioCutRange(0.01,3); //Mostly Open Cuts | |
284 | anacorrjet->UseJetRefTracks(kFALSE); //Not working now | |
de8a210f | 285 | //Set Histograms bins and ranges |
afabc52f | 286 | anacorrjet->SetHistoPtRangeAndNBins(0, 50, 500) ; |
287 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
288 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
4a55403a | 289 | if(kPrintSettings) anacorrjet->Print(""); |
90eb3a19 | 290 | |
291 | // ### Correlation with hadrons | |
a3aebfff | 292 | AliAnaParticleHadronCorrelation *anacorrhadron = new AliAnaParticleHadronCorrelation(); |
de8a210f | 293 | anacorrhadron->SetInputAODName(Form("Photons%s",calorimeter.Data())); |
1e86c71e | 294 | if(!data.Contains("delta")) { |
295 | anacorrhadron->SetOutputAODName(Form("CorrGammaHadrons%s",calorimeter.Data())); | |
296 | anacorrhadron->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
297 | } | |
298 | else anacorrhadron->SetInputAODName(Form("CorrGammaHadrons%s",calorimeter.Data())); | |
299 | ||
de8a210f | 300 | anacorrhadron->AddToHistogramsName("AnaHadronCorrPhoton_"); |
a3aebfff | 301 | anacorrhadron->SetDebug(-1); |
12524a23 | 302 | anacorrhadron->SwitchOffCaloPID(); |
ff45398a | 303 | anacorrhadron->SwitchOffFiducialCut(); |
de8a210f | 304 | anacorrhadron->SetPtCutRange(0.1,100); |
a3aebfff | 305 | anacorrhadron->SetDeltaPhiCutRange(1.5,4.5); |
2d3dce11 | 306 | anacorrhadron->SwitchOnSeveralUECalculation(); |
afabc52f | 307 | anacorrhadron->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); |
2d3dce11 | 308 | anacorrhadron->SelectIsolated(kFALSE); // do correlation with isolated photons |
de8a210f | 309 | if(kUseKinematics) anacorrhadron->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
310 | else anacorrhadron->SwitchOffDataMC() ; | |
311 | //if(calorimeter=="PHOS"){ | |
afabc52f | 312 | //Correlate with particles in EMCAL |
313 | //anacorrhadron->SwitchOnCaloPID(); | |
314 | //anacorrhadron->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
de8a210f | 315 | //} |
316 | //Set Histograms bins and ranges | |
afabc52f | 317 | anacorrhadron->SetHistoPtRangeAndNBins(0, 50, 500) ; |
318 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
319 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
4a55403a | 320 | if(kPrintSettings) anacorrhadron->Print(""); |
90eb3a19 | 321 | |
afabc52f | 322 | // ### Correlation with hadrons |
323 | AliAnaParticleHadronCorrelation *anacorrisohadron = new AliAnaParticleHadronCorrelation(); | |
324 | anacorrisohadron->SetInputAODName(Form("Photons%s",calorimeter.Data())); | |
1e86c71e | 325 | if(!data.Contains("delta")) { |
326 | anacorrisohadron->SetOutputAODName(Form("CorrIsoGammaHadrons%s",calorimeter.Data())); | |
327 | anacorrisohadron->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
328 | } | |
329 | else anacorrisohadron->SetInputAODName(Form("CorrIsoGammaHadrons%s",calorimeter.Data())); | |
330 | ||
afabc52f | 331 | anacorrisohadron->AddToHistogramsName("AnaHadronCorrIsoPhoton_"); |
332 | anacorrisohadron->SetDebug(-1); | |
333 | anacorrisohadron->SwitchOffCaloPID(); | |
334 | anacorrisohadron->SwitchOffFiducialCut(); | |
335 | anacorrisohadron->SetPtCutRange(0.1,100); | |
336 | anacorrisohadron->SetDeltaPhiCutRange(1.5,4.5); | |
337 | anacorrisohadron->SwitchOnSeveralUECalculation(); | |
338 | anacorrisohadron->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
339 | anacorrisohadron->SelectIsolated(kTRUE); // do correlation with isolated photons | |
340 | if(kUseKinematics) anacorrisohadron->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
341 | else anacorrisohadron->SwitchOffDataMC() ; | |
342 | //if(calorimeter=="PHOS"){ | |
343 | //Correlate with particles in EMCAL | |
344 | //anacorrhadron->SwitchOnCaloPID(); | |
345 | //anacorrhadron->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
346 | //} | |
347 | //Set Histograms bins and ranges | |
348 | anacorrisohadron->SetHistoPtRangeAndNBins(0, 50, 500) ; | |
349 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
350 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
351 | if(kPrintSettings) anacorrisohadron->Print(""); | |
352 | ||
2f1cfd22 | 353 | // ------------------------------------------------- |
354 | // --- Pi0 Isolation and Correlation Analysis --- | |
355 | // ------------------------------------------------- | |
356 | ||
de8a210f | 357 | AliNeutralMesonSelection *nms = new AliNeutralMesonSelection(); |
358 | nms->SetInvMassCutRange(0.05, 0.2) ; | |
359 | nms->KeepNeutralMesonSelectionHistos(kTRUE); | |
360 | //Set Histrograms bins and ranges | |
afabc52f | 361 | nms->SetHistoERangeAndNBins(0, 50, 500) ; |
de8a210f | 362 | // nms->SetHistoPtRangeAndNBins(0, 50, 100) ; |
363 | // nms->SetHistoAngleRangeAndNBins(0, 0.3, 100) ; | |
364 | // nsm->SetHistoIMRangeAndNBins(0, 0.4, 100) ; | |
afabc52f | 365 | |
de8a210f | 366 | AliAnaPi0EbE *anapi0ebe = new AliAnaPi0EbE(); |
367 | anapi0ebe->SetDebug(-1);//10 for lots of messages | |
368 | anapi0ebe->SetAnalysisType(AliAnaPi0EbE::kIMCalo); | |
4007d0a2 | 369 | anapi0ebe->SetMinPt(0); |
de8a210f | 370 | anapi0ebe->SetCalorimeter(calorimeter); |
371 | anapi0ebe->SetInputAODName(Form("Photons%s",calorimeter.Data())); | |
1e86c71e | 372 | if(!data.Contains("delta")) { |
373 | anapi0ebe->SetOutputAODName(Form("Pi0s%s",calorimeter.Data())); | |
374 | anapi0ebe->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
375 | } | |
376 | else anapi0ebe->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
377 | ||
de8a210f | 378 | if(kUseKinematics) anapi0ebe->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
379 | else anapi0ebe->SwitchOffDataMC() ; | |
380 | anapi0ebe->SetNeutralMesonSelection(nms); | |
381 | //Set Histrograms bins and ranges | |
afabc52f | 382 | anapi0ebe->SetHistoPtRangeAndNBins(0, 50, 500) ; |
de8a210f | 383 | // anapi0->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
384 | // anapi0->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
385 | if(kPrintSettings) anapi0ebe->Print(""); | |
afabc52f | 386 | |
387 | AliAnaParticleIsolation *anaisolpi0 = new AliAnaParticleIsolation(); | |
388 | anaisolpi0->SetDebug(-1); | |
4007d0a2 | 389 | anaisolpi0->SetMinPt(0); |
afabc52f | 390 | anaisolpi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); |
391 | anaisolpi0->AddToHistogramsName("AnaIsolPi0_"); | |
392 | anaisolpi0->SetCalorimeter(calorimeter); | |
393 | if(kUseKinematics) anaisolpi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
394 | else anaisolpi0->SwitchOffDataMC() ; | |
395 | //Select clusters with no pair, if both clusters with pi0 mass | |
396 | anaisolpi0->SwitchOffInvariantMass(); | |
397 | //anaisol->SetNeutralMesonSelection(nms); | |
398 | //Do isolation cut | |
399 | anaisolpi0->SetIsolationCut(ic); | |
400 | //Do or not do isolation with previously produced AODs. | |
401 | //No effect if use of SwitchOnSeveralIsolation() | |
402 | anaisolpi0->SwitchOffReIsolation(); | |
403 | //Multiple IC | |
404 | anaisolpi0->SwitchOffSeveralIsolation() ; | |
405 | //Set Histograms bins and ranges | |
406 | anaisolpi0->SetHistoPtRangeAndNBins(0, 50, 500) ; | |
407 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
408 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
409 | if(kPrintSettings) anaisol->Print(""); | |
410 | ||
411 | ||
412 | // ### Pi0 Correlation with hadrons, not isolated | |
413 | AliAnaParticleHadronCorrelation *anacorrhadronpi0 = new AliAnaParticleHadronCorrelation(); | |
414 | anacorrhadronpi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
1e86c71e | 415 | if(!data.Contains("delta")){ |
416 | anacorrhadronpi0->SetOutputAODName(Form("CorrPi0Hadrons%s",calorimeter.Data())); | |
417 | anacorrhadronpi0->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
418 | } | |
419 | else anacorrhadronpi0->SetInputAODName(Form("CorrPi0Hadrons%s",calorimeter.Data())); | |
420 | ||
afabc52f | 421 | anacorrhadronpi0->AddToHistogramsName("AnaHadronCorrPi0_"); |
422 | anacorrhadronpi0->SetDebug(-1); | |
423 | anacorrhadronpi0->SwitchOffCaloPID(); | |
424 | anacorrhadronpi0->SwitchOffFiducialCut(); | |
425 | anacorrhadronpi0->SetPtCutRange(0.1,100); | |
426 | anacorrhadronpi0->SetDeltaPhiCutRange(1.5,4.5); | |
427 | anacorrhadronpi0->SelectIsolated(kFALSE); // do correlation with non isolated pi0 | |
428 | anacorrhadronpi0->SwitchOnSeveralUECalculation(); | |
429 | anacorrhadronpi0->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
430 | if(kUseKinematics) anacorrhadronpi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
431 | else anacorrhadronpi0->SwitchOffDataMC() ; | |
432 | //if(calorimeter=="PHOS"){ | |
433 | // //Correlate with particles in EMCAL | |
434 | // anacorrhadronpi0->SwitchOnCaloPID(); | |
435 | // anacorrhadronpi0->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
436 | //} | |
437 | //Set Histograms bins and ranges | |
438 | anacorrhadronpi0->SetHistoPtRangeAndNBins(0, 50, 500) ; | |
439 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
440 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
441 | if(kPrintSettings) anacorrhadronpi0->Print(""); | |
442 | ||
443 | // ### Pi0 Correlation with hadrons, isolated | |
444 | AliAnaParticleHadronCorrelation *anacorrhadronisopi0 = new AliAnaParticleHadronCorrelation(); | |
445 | anacorrhadronisopi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
1e86c71e | 446 | if(!data.Contains("delta")) { |
447 | anacorrhadronisopi0->SetOutputAODName(Form("CorrIsoPi0Hadrons%s",calorimeter.Data())); | |
448 | anacorrhadronisopi0->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
449 | } | |
450 | else anacorrhadronisopi0->SetInputAODName(Form("CorrIsoPi0Hadrons%s",calorimeter.Data())); | |
451 | ||
afabc52f | 452 | anacorrhadronisopi0->AddToHistogramsName("AnaHadronCorrIsoPi0_"); |
453 | anacorrhadronisopi0->SetDebug(-1); | |
454 | anacorrhadronisopi0->SwitchOffCaloPID(); | |
455 | anacorrhadronisopi0->SwitchOffFiducialCut(); | |
456 | anacorrhadronisopi0->SetPtCutRange(0.1,100); | |
457 | anacorrhadronisopi0->SetDeltaPhiCutRange(1.5,4.5); | |
458 | anacorrhadronisopi0->SelectIsolated(kTRUE); // do correlation with isolated pi0 | |
459 | anacorrhadronisopi0->SwitchOnSeveralUECalculation(); | |
460 | anacorrhadronisopi0->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
461 | if(kUseKinematics) anacorrhadronisopi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
462 | else anacorrhadronisopi0->SwitchOffDataMC() ; | |
463 | //if(calorimeter=="PHOS"){ | |
464 | // //Correlate with particles in EMCAL | |
465 | // anacorrhadronpi0->SwitchOnCaloPID(); | |
466 | // anacorrhadronpi0->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
467 | //} | |
468 | //Set Histograms bins and ranges | |
469 | anacorrhadronisopi0->SetHistoPtRangeAndNBins(0, 50, 500) ; | |
470 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; | |
471 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
472 | if(kPrintSettings) anacorrhadronisopi0->Print(""); | |
4007d0a2 | 473 | |
474 | //analysis the omega->pi0+gamma | |
475 | AliAnaOmegaToPi0Gamma *anaomegaToPi0Gamma = new AliAnaOmegaToPi0Gamma(); | |
476 | anaomegaToPi0Gamma->SetDebug(-1);//10 for lots of messages | |
477 | anaomegaToPi0Gamma->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
478 | anaomegaToPi0Gamma->SetInputAODPhotonName(Form("Photons%s",calorimeter.Data())); | |
f6862ceb | 479 | anaomegaToPi0Gamma->SetNPID(1); |
480 | anaomegaToPi0Gamma->SetNVtxZ(1); | |
4007d0a2 | 481 | anaomegaToPi0Gamma->SetNEventsMixed(4); |
4a745797 | 482 | if(calorimeter=="PHOS") |
f6862ceb | 483 | anaomegaToPi0Gamma->SetPi0MassPeakWidthCut(0.008); // PHOS |
4a745797 | 484 | else if(calorimeter=="EMCAL") |
f6862ceb | 485 | anaomegaToPi0Gamma->SetPi0MassPeakWidthCut(0.012); // EMCAL |
4007d0a2 | 486 | anaomegaToPi0Gamma->SetHistoPtRangeAndNBins(0, 20, 200) ; |
487 | anaomegaToPi0Gamma->SetHistoMassRangeAndNBins(0, 1, 200) ; | |
488 | anaomegaToPi0Gamma->SetPi0OverOmegaPtCut(0.8); | |
489 | anaomegaToPi0Gamma->SetGammaOverOmegaPtCut(0.2); | |
490 | if(kUseKinematics) anaomegaToPi0Gamma->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
491 | else anaomegaToPi0Gamma->SwitchOffDataMC() ;//Access MC stack and fill more histograms | |
492 | anaomegaToPi0Gamma->AddToHistogramsName(Form("AnaOmegaToPi0Gamma%s_",calorimeter.Data())); | |
1cd71065 | 493 | if(kPrintSettings) anaomegaToPi0Gamma->Print(""); |
4007d0a2 | 494 | |
90eb3a19 | 495 | // #### Configure Maker #### |
a3aebfff | 496 | AliAnaPartCorrMaker * maker = new AliAnaPartCorrMaker(); |
90eb3a19 | 497 | maker->SetReader(reader);//pointer to reader |
2f1cfd22 | 498 | //if(!data.Contains("delta")) maker->AddAnalysis(qa,0); |
499 | maker->AddAnalysis(anaphoton1,0); | |
54224800 | 500 | maker->AddAnalysis(anapi0,1); |
501 | maker->AddAnalysis(anaphoton2,2); | |
502 | maker->AddAnalysis(anaisol,3); | |
503 | maker->AddAnalysis(anacorrjet,4); | |
504 | maker->AddAnalysis(anacorrhadron,5); | |
505 | maker->AddAnalysis(anacorrisohadron,6); | |
506 | maker->AddAnalysis(anapi0ebe,7); | |
507 | maker->AddAnalysis(anaisolpi0,8); | |
508 | maker->AddAnalysis(anacorrhadronpi0,9); | |
509 | maker->AddAnalysis(anacorrhadronisopi0,10); | |
f6862ceb | 510 | maker->AddAnalysis(anaomegaToPi0Gamma,11); |
2f1cfd22 | 511 | maker->SetAnaDebug(-1) ; |
90eb3a19 | 512 | maker->SwitchOnHistogramsMaker() ; |
1e86c71e | 513 | if(data.Contains("delta")) maker->SwitchOffAODsMaker() ; |
514 | else maker->SwitchOnAODsMaker() ; | |
515 | ||
4a55403a | 516 | if(kPrintSettings) maker->Print(""); |
a3aebfff | 517 | |
90eb3a19 | 518 | printf("======================== \n"); |
a3aebfff | 519 | printf(" End Configuration of PartCorr analysis with detector %s \n",calorimeter.Data()); |
90eb3a19 | 520 | printf("======================== \n"); |
521 | ||
afabc52f | 522 | // Create task |
523 | //=========================================================================== | |
ad1ac1b7 | 524 | AliAnalysisTaskParticleCorrelation * task = new AliAnalysisTaskParticleCorrelation (Form("PartCorr%s",calorimeter.Data())); |
a3aebfff | 525 | task->SetConfigFileName(""); //Don't configure the analysis via configuration file. |
526 | //task->SetDebugLevel(-1); | |
3f7a860b | 527 | task->SelectCollisionCandidates(); |
0cdb88b8 | 528 | task->SetAnalysisMaker(maker); |
1e86c71e | 529 | //if(!kSimulation)task->SelectCollisionCandidates(); //AliPhysicsSelection has to be attached before. |
a3aebfff | 530 | mgr->AddTask(task); |
531 | ||
fbc534a2 | 532 | char name[128]; |
533 | sprintf(name,"PartCorr_%s",calorimeter.Data()); | |
d0b67781 | 534 | cout<<"Name of task "<<name<<endl; |
535 | //AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(Form(name),TList::Class(), | |
afabc52f | 536 | // AliAnalysisManager::kOutputContainer, Form("PartCorr_%s.root",calorimeter.Data())); |
a3aebfff | 537 | |
d0b67781 | 538 | TString outputfile = AliAnalysisManager::GetCommonFileName(); |
539 | // AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(Form("PartCorr_%s",calorimeter.Data()), TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:PartCorr_%s",outputfile.Data(),calorimeter.Data())); | |
540 | AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(calorimeter.Data(), TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:PartCorr",outputfile.Data())); | |
afabc52f | 541 | |
a3aebfff | 542 | // Create ONLY the output containers for the data produced by the task. |
543 | // Get and connect other common input/output containers via the manager as below | |
544 | //============================================================================== | |
545 | mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer()); | |
546 | // AOD output slot will be used in a different way in future | |
1e86c71e | 547 | if(!data.Contains("delta")) mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer()); |
a3aebfff | 548 | mgr->ConnectOutput (task, 1, cout_pc); |
549 | ||
550 | return task; | |
90eb3a19 | 551 | } |
a3aebfff | 552 | |
553 |