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