]>
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 | } | |
1e3689fa | 19 | TString inputDataType = "AOD"; |
20 | if(!data.Contains("delta")) | |
21 | inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
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 | |
25 | ||
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 | ||
32 | cout<<"********* ACCESS KINE? "<<kUseKinematics<<endl; | |
33 | ||
34 | // Configure analysis | |
35 | //=========================================================================== | |
36 | ||
37 | // *** Reader *** | |
38 | AliCaloTrackReader * reader = ; | |
39 | if(data.Contains("AOD")) reader = new AliCaloTrackAODReader(); | |
40 | else if(data=="ESD") reader = new AliCaloTrackESDReader(); | |
41 | else if(data=="MC" && inputDataType == "ESD") reader = new AliCaloTrackMCReader(); | |
42 | reader->SetDebug(-1);//10 for lots of messages | |
43 | reader->SwitchOnCTS(); | |
44 | //reader->SetDeltaAODFileName(""); | |
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 | } |
1e3689fa | 54 | |
1e86c71e | 55 | // for case data="deltaAOD", no need to fill the EMCAL/PHOS cluster lists |
56 | if(data.Contains("delta")){ | |
1e3689fa | 57 | reader->SwitchOffEMCAL(); |
58 | reader->SwitchOffPHOS(); | |
59 | reader->SwitchOffEMCALCells(); | |
60 | reader->SwitchOffPHOSCells(); | |
1e86c71e | 61 | } |
1e3689fa | 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 | |
fa991e42 | 80 | // *** Calorimeters Utils *** |
81 | AliCalorimeterUtils *cu = new AliCalorimeterUtils; | |
82 | // Remove clusters close to borders, at least max energy cell is 1 cell away | |
83 | cu->SetNumberOfCellsFromEMCALBorder(1); | |
1e3689fa | 84 | cu->SetNumberOfCellsFromPHOSBorder(2); |
fa991e42 | 85 | cu->SwitchOnNoFiducialBorderInEMCALEta0(); |
1e3689fa | 86 | |
fa991e42 | 87 | // Remove EMCAL hottest channels for first LHC10 periods |
88 | cu->SwitchOnBadChannelsRemoval(); | |
89 | // SM0 | |
90 | // cu->SetEMCALChannelStatus(0,3,13); cu->SetEMCALChannelStatus(0,44,1); cu->SetEMCALChannelStatus(0,3,13); | |
91 | cu->SetEMCALChannelStatus(0,20,7); cu->SetEMCALChannelStatus(0,38,2); | |
92 | // SM1 | |
93 | // cu->SetEMCALChannelStatus(1,4,7); cu->SetEMCALChannelStatus(1,4,13); cu->SetEMCALChannelStatus(1,9,20); | |
94 | // cu->SetEMCALChannelStatus(1,14,15); cu->SetEMCALChannelStatus(1,23,16); cu->SetEMCALChannelStatus(1,32,23); | |
95 | // cu->SetEMCALChannelStatus(1,37,5); cu->SetEMCALChannelStatus(1,40,1); cu->SetEMCALChannelStatus(1,40,2); | |
96 | // cu->SetEMCALChannelStatus(1,40,5); cu->SetEMCALChannelStatus(1,41,0); cu->SetEMCALChannelStatus(1,41,1); | |
97 | // cu->SetEMCALChannelStatus(1,41,2); cu->SetEMCALChannelStatus(1,41,4); | |
98 | // SM2 | |
99 | cu->SetEMCALChannelStatus(2,14,15); cu->SetEMCALChannelStatus(2,18,16); cu->SetEMCALChannelStatus(2,18,17); | |
100 | cu->SetEMCALChannelStatus(2,18,18); cu->SetEMCALChannelStatus(2,18,20); cu->SetEMCALChannelStatus(2,18,21); | |
101 | cu->SetEMCALChannelStatus(2,18,23); cu->SetEMCALChannelStatus(2,19,16); cu->SetEMCALChannelStatus(2,19,17); | |
102 | cu->SetEMCALChannelStatus(2,19,19); cu->SetEMCALChannelStatus(2,19,20); cu->SetEMCALChannelStatus(2,19,21); | |
103 | cu->SetEMCALChannelStatus(2,19,22); | |
104 | //SM3 | |
105 | cu->SetEMCALChannelStatus(3,4,7); | |
1e3689fa | 106 | |
107 | ||
fa991e42 | 108 | //Recalibration |
109 | //cu->SwitchOnRecalibration(); | |
110 | //TFile * f = new TFile("RecalibrationFactors.root","read"); | |
111 | //cu->SetEMCALChannelRecalibrationFactors(0,(TH2F*)f->Get("EMCALRecalFactors_SM0")); | |
112 | //cu->SetEMCALChannelRecalibrationFactors(1,(TH2F*)f->Get("EMCALRecalFactors_SM1")); | |
113 | //cu->SetEMCALChannelRecalibrationFactors(2,(TH2F*)f->Get("EMCALRecalFactors_SM2")); | |
114 | //cu->SetEMCALChannelRecalibrationFactors(3,(TH2F*)f->Get("EMCALRecalFactors_SM3")); | |
115 | //f->Close(); | |
1e3689fa | 116 | |
fa991e42 | 117 | cu->SetDebug(-1); |
118 | if(kPrintSettings) cu->Print(""); | |
1e3689fa | 119 | |
120 | ||
a3aebfff | 121 | // ##### Analysis algorithm settings #### |
afabc52f | 122 | |
1e3689fa | 123 | |
0cdb88b8 | 124 | AliFiducialCut * fidCut1stYear = new AliFiducialCut(); |
125 | fidCut1stYear->DoCTSFiducialCut(kFALSE) ; | |
126 | if(kSimulation){ | |
4007d0a2 | 127 | fidCut1stYear->DoEMCALFiducialCut(kTRUE) ; |
128 | fidCut1stYear->DoPHOSFiducialCut(kTRUE) ; | |
129 | fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.); | |
130 | fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.); | |
0cdb88b8 | 131 | } |
132 | else{ | |
4007d0a2 | 133 | fidCut1stYear->DoEMCALFiducialCut(kFALSE) ; |
134 | fidCut1stYear->DoPHOSFiducialCut(kFALSE) ; | |
0cdb88b8 | 135 | } |
4007d0a2 | 136 | |
afabc52f | 137 | |
4df35693 | 138 | // ------------------------------------------------- |
139 | // --- Photon Isolation and Correlation Analysis --- | |
140 | // ------------------------------------------------- | |
141 | ||
142 | AliAnaPhoton *anaphoton = new AliAnaPhoton(); | |
143 | anaphoton->SetDebug(-1); //10 for lots of messages | |
57eb7f00 | 144 | if(calorimeter == "PHOS"){ |
1e3689fa | 145 | anaphoton->SetNCellCut(1);// At least 2 cells |
146 | anaphoton->SetMinPt(0.2); | |
147 | anaphoton->SetMinDistanceToBadChannel(2, 4, 5); | |
57eb7f00 | 148 | } |
149 | else {//EMCAL | |
1e3689fa | 150 | //anaphoton->SetNCellCut(0);// At least 2 cells |
151 | anaphoton->SetMinPt(0.1); // no effect minium EMCAL cut. | |
152 | anaphoton->SetTimeCut(525,725);// Time window of [550-750] ns | |
153 | anaphoton->SetMinDistanceToBadChannel(6, 12, 18); | |
57eb7f00 | 154 | } |
4df35693 | 155 | anaphoton->SetCalorimeter(calorimeter); |
156 | if(kUseKinematics) anaphoton->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
157 | else anaphoton->SwitchOffDataMC() ; | |
158 | anaphoton->SwitchOffCaloPID(); | |
159 | anaphoton->SwitchOffFiducialCut(); | |
de8a210f | 160 | if(kSimulation){ |
1e3689fa | 161 | anaphoton->SwitchOnFiducialCut(); |
162 | anaphoton->SetFiducialCut(fidCut1stYear); | |
de8a210f | 163 | } |
1e3689fa | 164 | |
4df35693 | 165 | if(!data.Contains("delta")) { |
1e3689fa | 166 | anaphoton->SetOutputAODName(Form("Photons%s",calorimeter.Data())); |
167 | anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
4df35693 | 168 | } |
169 | else anaphoton->SetInputAODName(Form("Photons%s",calorimeter.Data())); | |
170 | anaphoton->AddToHistogramsName("AnaPhotonCorr_"); | |
de8a210f | 171 | //Set Histograms bins and ranges |
4df35693 | 172 | anaphoton->SetHistoPtRangeAndNBins(0, 50, 200) ; |
de8a210f | 173 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
174 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
4df35693 | 175 | if(kPrintSettings) anaphoton->Print(""); |
1e3689fa | 176 | |
4df35693 | 177 | // ----------------------------------- |
178 | // --- Pi0 Invariant Mass Analysis --- | |
179 | // ----------------------------------- | |
1e3689fa | 180 | |
90eb3a19 | 181 | AliAnaPi0 *anapi0 = new AliAnaPi0(); |
74b57e64 | 182 | anapi0->SetDebug(-1);//10 for lots of messages |
4df35693 | 183 | anapi0->SetInputAODName(Form("Photons%s",calorimeter.Data())); |
90eb3a19 | 184 | anapi0->SetCalorimeter(calorimeter); |
0cdb88b8 | 185 | if(kSimulation){ |
1e3689fa | 186 | anapi0->SwitchOnFiducialCut(); |
187 | anapi0->SetFiducialCut(fidCut1stYear); | |
0cdb88b8 | 188 | } |
2d3dce11 | 189 | anapi0->SetNPID(1); //Available from tag AliRoot::v4-18-15-AN |
afabc52f | 190 | //settings for pp collision |
191 | anapi0->SetNCentrBin(1); | |
192 | anapi0->SetNZvertBin(1); | |
193 | anapi0->SetNRPBin(1); | |
194 | anapi0->SetNMaxEvMix(10); | |
90eb3a19 | 195 | anapi0->SwitchOffDataMC() ;//Access MC stack and fill more histograms |
6921fa00 | 196 | if(calorimeter=="PHOS") anapi0->SetNumberOfModules(3); //PHOS first year |
197 | else anapi0->SetNumberOfModules(4); //EMCAL first year | |
4df35693 | 198 | anapi0->SetHistoPtRangeAndNBins(0, 50, 200) ; |
0cdb88b8 | 199 | //anapi0->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
200 | //anapi0->SetHistoEtaRangeAndNBins(-0.8, 0.8, 200) ; | |
4df35693 | 201 | anapi0->SetHistoMassRangeAndNBins(0., 0.6, 200) ; |
0cdb88b8 | 202 | anapi0->SetHistoAsymmetryRangeAndNBins(0., 1. , 10) ; |
4a55403a | 203 | if(kPrintSettings) anapi0->Print(""); |
1e3689fa | 204 | |
90eb3a19 | 205 | // ### Isolation analysis ### |
206 | ||
90eb3a19 | 207 | AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation(); |
208 | anaisol->SetDebug(-1); | |
4007d0a2 | 209 | anaisol->SetMinPt(0); |
de8a210f | 210 | anaisol->SetInputAODName(Form("Photons%s",calorimeter.Data())); |
90eb3a19 | 211 | anaisol->SetCalorimeter(calorimeter); |
4a55403a | 212 | if(kUseKinematics) anaisol->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
213 | else anaisol->SwitchOffDataMC() ; | |
90eb3a19 | 214 | //Select clusters with no pair, if both clusters with pi0 mass |
215 | anaisol->SwitchOffInvariantMass(); | |
216 | //anaisol->SetNeutralMesonSelection(nms); | |
217 | //Do isolation cut | |
7787a778 | 218 | AliIsolationCut * ic = anaisol->GetIsolationCut(); |
219 | ic->SetConeSize(0.4); | |
220 | ic->SetPtThreshold(0.2); | |
0c1383b5 | 221 | ic->SetParticleTypeInCone(AliIsolationCut::kOnlyCharged); |
7787a778 | 222 | ic->SetICMethod(AliIsolationCut::kPtThresIC); |
223 | if(kPrintSettings) ic->Print(""); | |
1e3689fa | 224 | |
90eb3a19 | 225 | //Do or not do isolation with previously produced AODs. |
226 | //No effect if use of SwitchOnSeveralIsolation() | |
227 | anaisol->SwitchOffReIsolation(); | |
228 | //Multiple IC | |
229 | anaisol->SwitchOffSeveralIsolation() ; | |
de8a210f | 230 | //Set Histograms bins and ranges |
4df35693 | 231 | anaisol->SetHistoPtRangeAndNBins(0, 50, 200) ; |
de8a210f | 232 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
233 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
234 | anaisol->AddToHistogramsName("AnaIsolPhoton_"); | |
4a55403a | 235 | if(kPrintSettings) anaisol->Print(""); |
90eb3a19 | 236 | |
a3aebfff | 237 | // ### Correlation with Jet Finder AOD output |
238 | AliAnaParticleJetFinderCorrelation *anacorrjet = new AliAnaParticleJetFinderCorrelation(); | |
de8a210f | 239 | anacorrjet->SetInputAODName(Form("Photons%s",calorimeter.Data())); |
ff45398a | 240 | anacorrjet->SwitchOffFiducialCut(); |
a3aebfff | 241 | anacorrjet->SetDebug(-1); |
242 | anacorrjet->SetConeSize(1); | |
243 | anacorrjet->SelectIsolated(kTRUE); // do correlation with isolated photons | |
244 | anacorrjet->SetPtThresholdInCone(0.2); | |
245 | anacorrjet->SetDeltaPhiCutRange(0.5,5.5);//Mostly Open Cuts | |
246 | anacorrjet->SetRatioCutRange(0.01,3); //Mostly Open Cuts | |
247 | anacorrjet->UseJetRefTracks(kFALSE); //Not working now | |
de8a210f | 248 | //Set Histograms bins and ranges |
4df35693 | 249 | anacorrjet->SetHistoPtRangeAndNBins(0, 50, 200) ; |
afabc52f | 250 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
251 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
4a55403a | 252 | if(kPrintSettings) anacorrjet->Print(""); |
90eb3a19 | 253 | |
254 | // ### Correlation with hadrons | |
a3aebfff | 255 | AliAnaParticleHadronCorrelation *anacorrhadron = new AliAnaParticleHadronCorrelation(); |
de8a210f | 256 | anacorrhadron->SetInputAODName(Form("Photons%s",calorimeter.Data())); |
de8a210f | 257 | anacorrhadron->AddToHistogramsName("AnaHadronCorrPhoton_"); |
a3aebfff | 258 | anacorrhadron->SetDebug(-1); |
12524a23 | 259 | anacorrhadron->SwitchOffCaloPID(); |
ff45398a | 260 | anacorrhadron->SwitchOffFiducialCut(); |
de8a210f | 261 | anacorrhadron->SetPtCutRange(0.1,100); |
a3aebfff | 262 | anacorrhadron->SetDeltaPhiCutRange(1.5,4.5); |
2d3dce11 | 263 | anacorrhadron->SwitchOnSeveralUECalculation(); |
afabc52f | 264 | anacorrhadron->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); |
2d3dce11 | 265 | anacorrhadron->SelectIsolated(kFALSE); // do correlation with isolated photons |
de8a210f | 266 | if(kUseKinematics) anacorrhadron->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
267 | else anacorrhadron->SwitchOffDataMC() ; | |
268 | //if(calorimeter=="PHOS"){ | |
afabc52f | 269 | //Correlate with particles in EMCAL |
270 | //anacorrhadron->SwitchOnCaloPID(); | |
271 | //anacorrhadron->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
de8a210f | 272 | //} |
273 | //Set Histograms bins and ranges | |
4df35693 | 274 | anacorrhadron->SetHistoPtRangeAndNBins(0, 50, 200) ; |
afabc52f | 275 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
276 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
4a55403a | 277 | if(kPrintSettings) anacorrhadron->Print(""); |
90eb3a19 | 278 | |
afabc52f | 279 | // ### Correlation with hadrons |
280 | AliAnaParticleHadronCorrelation *anacorrisohadron = new AliAnaParticleHadronCorrelation(); | |
281 | anacorrisohadron->SetInputAODName(Form("Photons%s",calorimeter.Data())); | |
afabc52f | 282 | anacorrisohadron->AddToHistogramsName("AnaHadronCorrIsoPhoton_"); |
283 | anacorrisohadron->SetDebug(-1); | |
284 | anacorrisohadron->SwitchOffCaloPID(); | |
285 | anacorrisohadron->SwitchOffFiducialCut(); | |
286 | anacorrisohadron->SetPtCutRange(0.1,100); | |
287 | anacorrisohadron->SetDeltaPhiCutRange(1.5,4.5); | |
288 | anacorrisohadron->SwitchOnSeveralUECalculation(); | |
289 | anacorrisohadron->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
290 | anacorrisohadron->SelectIsolated(kTRUE); // do correlation with isolated photons | |
291 | if(kUseKinematics) anacorrisohadron->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
292 | else anacorrisohadron->SwitchOffDataMC() ; | |
293 | //if(calorimeter=="PHOS"){ | |
294 | //Correlate with particles in EMCAL | |
295 | //anacorrhadron->SwitchOnCaloPID(); | |
296 | //anacorrhadron->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
297 | //} | |
298 | //Set Histograms bins and ranges | |
4df35693 | 299 | anacorrisohadron->SetHistoPtRangeAndNBins(0, 50, 200) ; |
afabc52f | 300 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
301 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
302 | if(kPrintSettings) anacorrisohadron->Print(""); | |
303 | ||
2f1cfd22 | 304 | // ------------------------------------------------- |
305 | // --- Pi0 Isolation and Correlation Analysis --- | |
306 | // ------------------------------------------------- | |
307 | ||
de8a210f | 308 | AliNeutralMesonSelection *nms = new AliNeutralMesonSelection(); |
309 | nms->SetInvMassCutRange(0.05, 0.2) ; | |
310 | nms->KeepNeutralMesonSelectionHistos(kTRUE); | |
311 | //Set Histrograms bins and ranges | |
4df35693 | 312 | nms->SetHistoERangeAndNBins(0, 50, 200) ; |
de8a210f | 313 | // nms->SetHistoPtRangeAndNBins(0, 50, 100) ; |
314 | // nms->SetHistoAngleRangeAndNBins(0, 0.3, 100) ; | |
315 | // nsm->SetHistoIMRangeAndNBins(0, 0.4, 100) ; | |
afabc52f | 316 | |
de8a210f | 317 | AliAnaPi0EbE *anapi0ebe = new AliAnaPi0EbE(); |
318 | anapi0ebe->SetDebug(-1);//10 for lots of messages | |
319 | anapi0ebe->SetAnalysisType(AliAnaPi0EbE::kIMCalo); | |
4007d0a2 | 320 | anapi0ebe->SetMinPt(0); |
de8a210f | 321 | anapi0ebe->SetCalorimeter(calorimeter); |
322 | anapi0ebe->SetInputAODName(Form("Photons%s",calorimeter.Data())); | |
1e86c71e | 323 | if(!data.Contains("delta")) { |
1e3689fa | 324 | anapi0ebe->SetOutputAODName(Form("Pi0s%s",calorimeter.Data())); |
325 | anapi0ebe->SetOutputAODClassName("AliAODPWG4ParticleCorrelation"); | |
1e86c71e | 326 | } |
327 | else anapi0ebe->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
1e3689fa | 328 | |
de8a210f | 329 | if(kUseKinematics) anapi0ebe->SwitchOnDataMC() ;//Access MC stack and fill more histograms |
330 | else anapi0ebe->SwitchOffDataMC() ; | |
331 | anapi0ebe->SetNeutralMesonSelection(nms); | |
332 | //Set Histrograms bins and ranges | |
4df35693 | 333 | anapi0ebe->SetHistoPtRangeAndNBins(0, 50, 200) ; |
de8a210f | 334 | // anapi0->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
335 | // anapi0->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
336 | if(kPrintSettings) anapi0ebe->Print(""); | |
afabc52f | 337 | |
338 | AliAnaParticleIsolation *anaisolpi0 = new AliAnaParticleIsolation(); | |
339 | anaisolpi0->SetDebug(-1); | |
4007d0a2 | 340 | anaisolpi0->SetMinPt(0); |
afabc52f | 341 | anaisolpi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); |
342 | anaisolpi0->AddToHistogramsName("AnaIsolPi0_"); | |
343 | anaisolpi0->SetCalorimeter(calorimeter); | |
344 | if(kUseKinematics) anaisolpi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
345 | else anaisolpi0->SwitchOffDataMC() ; | |
346 | //Select clusters with no pair, if both clusters with pi0 mass | |
347 | anaisolpi0->SwitchOffInvariantMass(); | |
348 | //anaisol->SetNeutralMesonSelection(nms); | |
349 | //Do isolation cut | |
7787a778 | 350 | AliIsolationCut * ic2 = anaisolpi0->GetIsolationCut(); |
351 | ic2->SetConeSize(0.4); | |
352 | ic2->SetPtThreshold(0.2); | |
353 | ic2->SetICMethod(AliIsolationCut::kPtThresIC); | |
354 | if(kPrintSettings) ic->Print(""); | |
afabc52f | 355 | //Do or not do isolation with previously produced AODs. |
356 | //No effect if use of SwitchOnSeveralIsolation() | |
357 | anaisolpi0->SwitchOffReIsolation(); | |
358 | //Multiple IC | |
359 | anaisolpi0->SwitchOffSeveralIsolation() ; | |
360 | //Set Histograms bins and ranges | |
4df35693 | 361 | anaisolpi0->SetHistoPtRangeAndNBins(0, 50, 200) ; |
afabc52f | 362 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
363 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
364 | if(kPrintSettings) anaisol->Print(""); | |
365 | ||
366 | ||
367 | // ### Pi0 Correlation with hadrons, not isolated | |
368 | AliAnaParticleHadronCorrelation *anacorrhadronpi0 = new AliAnaParticleHadronCorrelation(); | |
369 | anacorrhadronpi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
afabc52f | 370 | anacorrhadronpi0->AddToHistogramsName("AnaHadronCorrPi0_"); |
371 | anacorrhadronpi0->SetDebug(-1); | |
372 | anacorrhadronpi0->SwitchOffCaloPID(); | |
373 | anacorrhadronpi0->SwitchOffFiducialCut(); | |
374 | anacorrhadronpi0->SetPtCutRange(0.1,100); | |
375 | anacorrhadronpi0->SetDeltaPhiCutRange(1.5,4.5); | |
376 | anacorrhadronpi0->SelectIsolated(kFALSE); // do correlation with non isolated pi0 | |
377 | anacorrhadronpi0->SwitchOnSeveralUECalculation(); | |
378 | anacorrhadronpi0->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
379 | if(kUseKinematics) anacorrhadronpi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
380 | else anacorrhadronpi0->SwitchOffDataMC() ; | |
381 | //if(calorimeter=="PHOS"){ | |
382 | // //Correlate with particles in EMCAL | |
383 | // anacorrhadronpi0->SwitchOnCaloPID(); | |
384 | // anacorrhadronpi0->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
385 | //} | |
386 | //Set Histograms bins and ranges | |
4df35693 | 387 | anacorrhadronpi0->SetHistoPtRangeAndNBins(0, 50, 200) ; |
afabc52f | 388 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
389 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
390 | if(kPrintSettings) anacorrhadronpi0->Print(""); | |
391 | ||
392 | // ### Pi0 Correlation with hadrons, isolated | |
393 | AliAnaParticleHadronCorrelation *anacorrhadronisopi0 = new AliAnaParticleHadronCorrelation(); | |
394 | anacorrhadronisopi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
afabc52f | 395 | anacorrhadronisopi0->AddToHistogramsName("AnaHadronCorrIsoPi0_"); |
396 | anacorrhadronisopi0->SetDebug(-1); | |
397 | anacorrhadronisopi0->SwitchOffCaloPID(); | |
398 | anacorrhadronisopi0->SwitchOffFiducialCut(); | |
399 | anacorrhadronisopi0->SetPtCutRange(0.1,100); | |
400 | anacorrhadronisopi0->SetDeltaPhiCutRange(1.5,4.5); | |
401 | anacorrhadronisopi0->SelectIsolated(kTRUE); // do correlation with isolated pi0 | |
402 | anacorrhadronisopi0->SwitchOnSeveralUECalculation(); | |
403 | anacorrhadronisopi0->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3); | |
404 | if(kUseKinematics) anacorrhadronisopi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
405 | else anacorrhadronisopi0->SwitchOffDataMC() ; | |
406 | //if(calorimeter=="PHOS"){ | |
407 | // //Correlate with particles in EMCAL | |
408 | // anacorrhadronpi0->SwitchOnCaloPID(); | |
409 | // anacorrhadronpi0->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL | |
410 | //} | |
411 | //Set Histograms bins and ranges | |
4df35693 | 412 | anacorrhadronisopi0->SetHistoPtRangeAndNBins(0, 50, 200) ; |
afabc52f | 413 | // ana->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ; |
414 | // ana->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ; | |
415 | if(kPrintSettings) anacorrhadronisopi0->Print(""); | |
1e3689fa | 416 | |
417 | //*** analysis the omega->pi0+gamma *** | |
4007d0a2 | 418 | AliAnaOmegaToPi0Gamma *anaomegaToPi0Gamma = new AliAnaOmegaToPi0Gamma(); |
419 | anaomegaToPi0Gamma->SetDebug(-1);//10 for lots of messages | |
420 | anaomegaToPi0Gamma->SetInputAODName(Form("Pi0s%s",calorimeter.Data())); | |
421 | anaomegaToPi0Gamma->SetInputAODPhotonName(Form("Photons%s",calorimeter.Data())); | |
f6862ceb | 422 | anaomegaToPi0Gamma->SetNPID(1); |
423 | anaomegaToPi0Gamma->SetNVtxZ(1); | |
4007d0a2 | 424 | anaomegaToPi0Gamma->SetNEventsMixed(4); |
4a745797 | 425 | if(calorimeter=="PHOS") |
f6862ceb | 426 | anaomegaToPi0Gamma->SetPi0MassPeakWidthCut(0.008); // PHOS |
4a745797 | 427 | else if(calorimeter=="EMCAL") |
f6862ceb | 428 | anaomegaToPi0Gamma->SetPi0MassPeakWidthCut(0.012); // EMCAL |
4df35693 | 429 | anaomegaToPi0Gamma->SetHistoPtRangeAndNBins(0, 20, 100) ; |
430 | anaomegaToPi0Gamma->SetHistoMassRangeAndNBins(0, 1, 100) ; | |
4007d0a2 | 431 | anaomegaToPi0Gamma->SetPi0OverOmegaPtCut(0.8); |
432 | anaomegaToPi0Gamma->SetGammaOverOmegaPtCut(0.2); | |
433 | if(kUseKinematics) anaomegaToPi0Gamma->SwitchOnDataMC() ;//Access MC stack and fill more histograms | |
434 | else anaomegaToPi0Gamma->SwitchOffDataMC() ;//Access MC stack and fill more histograms | |
435 | anaomegaToPi0Gamma->AddToHistogramsName(Form("AnaOmegaToPi0Gamma%s_",calorimeter.Data())); | |
1e3689fa | 436 | if(kPrintSettings) anaomegaToPi0Gamma->Print(""); |
437 | ||
90eb3a19 | 438 | // #### Configure Maker #### |
a3aebfff | 439 | AliAnaPartCorrMaker * maker = new AliAnaPartCorrMaker(); |
fa991e42 | 440 | maker->SetReader(reader);//pointer to reader |
441 | maker->SetCaloUtils(cu); //pointer to calorimeter utils | |
1e3689fa | 442 | Int_t n = 0;//Analysis number, order is important |
443 | // Particle selection analysis | |
444 | maker->AddAnalysis(anaphoton,n++); | |
445 | maker->AddAnalysis(anapi0,n++); | |
446 | maker->AddAnalysis(anapi0ebe,n++); | |
447 | maker->AddAnalysis(anaomegaToPi0Gamma,n++); | |
448 | // Isolation analysis | |
449 | maker->AddAnalysis(anaisol,n++); | |
450 | maker->AddAnalysis(anacorrisohadron,n++); | |
451 | maker->AddAnalysis(anaisolpi0,n++); | |
452 | // Correlation analysis | |
453 | maker->AddAnalysis(anacorrjet,n++); | |
454 | maker->AddAnalysis(anacorrhadron,n++); | |
455 | maker->AddAnalysis(anacorrhadronpi0,n++); | |
456 | maker->AddAnalysis(anacorrhadronisopi0,n); | |
02e972d8 | 457 | maker->SetAnaDebug(-1) ; |
90eb3a19 | 458 | maker->SwitchOnHistogramsMaker() ; |
1e86c71e | 459 | if(data.Contains("delta")) maker->SwitchOffAODsMaker() ; |
460 | else maker->SwitchOnAODsMaker() ; | |
461 | ||
4a55403a | 462 | if(kPrintSettings) maker->Print(""); |
a3aebfff | 463 | |
90eb3a19 | 464 | printf("======================== \n"); |
a3aebfff | 465 | printf(" End Configuration of PartCorr analysis with detector %s \n",calorimeter.Data()); |
90eb3a19 | 466 | printf("======================== \n"); |
467 | ||
afabc52f | 468 | // Create task |
469 | //=========================================================================== | |
ad1ac1b7 | 470 | AliAnalysisTaskParticleCorrelation * task = new AliAnalysisTaskParticleCorrelation (Form("PartCorr%s",calorimeter.Data())); |
a3aebfff | 471 | task->SetConfigFileName(""); //Don't configure the analysis via configuration file. |
472 | //task->SetDebugLevel(-1); | |
3f7a860b | 473 | task->SelectCollisionCandidates(); |
0cdb88b8 | 474 | task->SetAnalysisMaker(maker); |
1e86c71e | 475 | //if(!kSimulation)task->SelectCollisionCandidates(); //AliPhysicsSelection has to be attached before. |
a3aebfff | 476 | mgr->AddTask(task); |
477 | ||
0c1383b5 | 478 | //Create containers |
fbc534a2 | 479 | char name[128]; |
480 | sprintf(name,"PartCorr_%s",calorimeter.Data()); | |
d0b67781 | 481 | cout<<"Name of task "<<name<<endl; |
482 | //AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(Form(name),TList::Class(), | |
afabc52f | 483 | // AliAnalysisManager::kOutputContainer, Form("PartCorr_%s.root",calorimeter.Data())); |
a3aebfff | 484 | |
d0b67781 | 485 | TString outputfile = AliAnalysisManager::GetCommonFileName(); |
486 | // AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(Form("PartCorr_%s",calorimeter.Data()), TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:PartCorr_%s",outputfile.Data(),calorimeter.Data())); | |
0c1383b5 | 487 | AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(calorimeter.Data(), TList::Class(), |
488 | AliAnalysisManager::kOutputContainer, | |
489 | Form("%s:PartCorr",outputfile.Data())); | |
490 | ||
491 | AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("%sCuts",calorimeter.Data()), TList::Class(), | |
492 | AliAnalysisManager::kParamContainer, | |
493 | Form("%s:PartCorrCuts",outputfile.Data())); | |
494 | ||
a3aebfff | 495 | // Create ONLY the output containers for the data produced by the task. |
496 | // Get and connect other common input/output containers via the manager as below | |
497 | //============================================================================== | |
498 | mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer()); | |
499 | // AOD output slot will be used in a different way in future | |
1e86c71e | 500 | if(!data.Contains("delta")) mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer()); |
a3aebfff | 501 | mgr->ConnectOutput (task, 1, cout_pc); |
0c1383b5 | 502 | mgr->ConnectOutput (task, 2, cout_cuts); |
503 | ||
a3aebfff | 504 | return task; |
90eb3a19 | 505 | } |
a3aebfff | 506 | |
507 |