AliPhysics  ec7afe5 (ec7afe5)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AddTaskCaloTrackCorrM.C
Go to the documentation of this file.
1 
16 {
17  // Get the pointer to the existing analysis manager via the static access method.
18  //==============================================================================
19  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
20  if (!mgr) {
21  ::Error("AddTaskCaloTrackCorr", "No analysis manager to connect to.");
22  return NULL;
23  }
24  Bool_t kUseKinematics = kFALSE;
25  kUseKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
26 
27  cout<<"********* ACCESS KINE? "<<kUseKinematics<<endl;
28 
29  // Configure analysis
30  //===========================================================================
31 
32  //Reader
33  AliCaloTrackReader * reader = 0x0;
34  if(data.Contains("AOD")) reader = new AliCaloTrackAODReader();
35  else if(data=="ESD") reader = new AliCaloTrackESDReader();
36  else if(data=="MC" || (kUseKinematics && data == "ESD")) reader = new AliCaloTrackMCReader();
37  reader->SetDebug(-1);//10 for lots of messages
38  reader->SwitchOnCTS();
39 
40  if(calorimeter == "EMCAL") {
41  reader->SwitchOnEMCALCells();
42  reader->SwitchOnEMCAL();
43  }
44  if(calorimeter == "PHOS") {
45  reader->SwitchOnPHOSCells();
46  reader->SwitchOnPHOS();
47  }
48 
49  reader->SwitchOnSuspiciousClustersRemoval(); //EMCAL
50 
51  // for case data="deltaAOD", no need to fill the EMCAL/PHOS cluster lists
52  if(data.Contains("delta")){
53  reader->SwitchOffEMCAL();
54  reader->SwitchOffPHOS();
55  reader->SwitchOffEMCALCells();
56  reader->SwitchOffPHOSCells();
57  }
58 
59  if(kUseKinematics){
60  if(data == "ESD"){
61  reader->SwitchOnStack();
62  reader->SwitchOffAODMCParticles();
63  }
64  else if(data == "AOD"){
65  reader->SwitchOffStack();
66  reader->SwitchOnAODMCParticles();
67  }
68  }
69 
70  reader->SetZvertexCut(10.);
71 
72  //Min particle pT
73  reader->SetEMCALPtMin(0.5);
74  reader->SetPHOSPtMin(0.5);
75  reader->SetCTSPtMin(0.1);
76  reader->SwitchOffWriteDeltaAOD() ;
77  if(kPrintSettings) reader->Print("");
78 
79  // ##### Analysis algorithm settings ####
80  AliCaloPID * pid = new AliCaloPID();
81  pid->SetDispersionCut(1.5);
82  pid->SetTOFCut(5.e-9);
83  pid->SetDebug(-1);
84  if(kPrintSettings) pid->Print("");
85  //Fiducial cut
86 // AliFiducialCut * fidCut1stYear = new AliFiducialCut();
87 // fidCut1stYear->DoCTSFiducialCut(kTRUE) ;
88 // fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.);
89 // fidCut1stYear->DoEMCALFiducialCut(kTRUE) ;
90 // fidCut1stYear->DoPHOSFiducialCut(kTRUE) ;
91 // fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.);
92 // fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,300.);
93  // -------------------------------------------------
94  // --- Isolation Cut ---
95  // -------------------------------------------------
96  AliIsolationCut * ic = new AliIsolationCut();
97  ic->SetConeSize(0.4);
98  //ic->SetPtThreshold(0.7);
99  ic->SetPtFraction(0.1);
100  ic->SetPtThreshold(0.7) ;
101  ic->SetSumPtThreshold(1.0) ;
102  //choose different method for IC:
103  //kPtThresIC, kSumPtIC, kPtFracIC, kSumPtFracIC
104  // ic->SetICMethod(AliIsolationCut::kPtThresIC);
106  //particle in cone: kNeutralAndCharged=0, kOnlyNeutral=1, kOnlyCharged=2
108  if(kPrintSettings) ic->Print("");
109 
110  //analysis with calorimeter triggers
111  if(calorimeter=="PHOS" || calorimeter=="EMCAL") {
114 
115  cu->SetNumberOfCellsFromEMCALBorder(1) ; //nEMCAL);
116  cu->SetNumberOfCellsFromPHOSBorder(2) ; //nPHOS);
117 
118  // -----------------------------------
119  // --- Photon and Pi0 Analysis ---
120  // -----------------------------------
121 
122  AliAnaPhoton *anaphoton = new AliAnaPhoton();
123  anaphoton->SetDebug(-1); //10 for lots of messages
124  anaphoton->SetMinPt(1.0);
125  anaphoton->SetCaloPID(pid);
126  anaphoton->SetCalorimeter(calorimeter);
127  if(kUseKinematics) anaphoton->SwitchOnDataMC() ;//Access MC stack and fill more histograms
128  else anaphoton->SwitchOffDataMC() ;
129  anaphoton->SwitchOffCaloPID();
130  anaphoton->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
131  anaphoton->SwitchOnFiducialCut();
132  AliFiducialCut * fidCut1stYear = anaphoton->GetFiducialCut();
133  fidCut1stYear->DoEMCALFiducialCut(kTRUE) ;
134  fidCut1stYear->DoPHOSFiducialCut(kTRUE) ;
135  fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.);
136  fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.);
137  anaphoton->SwitchOnTrackMatchRejection();
138  //settings for different multiplicity analysis
139  anaphoton->SwitchOffEventSelection() ;
140  anaphoton->SetMultiplicity(80, 120);
141 
142  if(calorimeter == "EMCAL"){
143  anaphoton->SetNCellCut(1);
144  anaphoton->SetMinPt(0.3);
145  //if(!kUseKinematics) anaphoton->SetTimeCut(525, 725);
146  anaphoton->SetMinDistanceToBadChannel(1, 2, 3);
147  }
148  else{
149  anaphoton->SetMinPt(0.3);
150  anaphoton->SetMinDistanceToBadChannel(2, 4, 5);
151  anaphoton->SetNCellCut(2);
152  }
153  if(!data.Contains("delta")) {
154  anaphoton->SetOutputAODName(Form("Triggers%s",calorimeter.Data()));
155  anaphoton->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
156  }
157  else anaphoton->SetOutputAODName(Form("Triggers%s",calorimeter.Data()));
158  anaphoton->AddToHistogramsName("AnaPhoton_");
159  //Set Histograms bins and ranges
160  anaphoton->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ;
161  // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
162  // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
163 
164  if(kPrintSettings) anaphoton->Print("");
165  AliAnaPi0 *anapi0 = new AliAnaPi0();
166  anapi0->SetDebug(-1);//10 for lots of messages
167  anapi0->SetInputAODName(Form("Triggers%s",calorimeter.Data()));
168  anapi0->AddToHistogramsName("AnaPi0_");
169  anapi0->SetCaloPID(pid);
170  anapi0->SetCalorimeter(calorimeter);
171  anapi0->SwitchOnFiducialCut();
172  AliFiducialCut * fidCut1stYear = anapi0->GetFiducialCut();
173  fidCut1stYear->DoEMCALFiducialCut(kTRUE) ;
174  fidCut1stYear->DoPHOSFiducialCut(kTRUE) ;
175  fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.);
176  fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.);
177  anapi0->SetNPID(1);
178  //settings for different multiplicity analysis
179  anapi0->SwitchOnEventSelection() ;
180  anapi0->SetNCentrBin(1);
181  anapi0->SetMultiplicity(80, 120);
182  anapi0->SetMultiBin(1);
183  anapi0->SwitchOffDataMC() ;//Access MC stack and fill more histograms
184 
185  anapi0->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ;
186  //anapi0->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
187  //anapi0->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.8, 0.8, 200) ;
188  anapi0->GetHistogramRanges()->SetHistoMassRangeAndNBins(0., 1.0, 100) ;
189  anapi0->GetHistogramRanges()->SetHistoAsymmetryRangeAndNBins(0., 1. , 10) ;
190  if(kPrintSettings) anapi0->Print("");
191 
192  // -------------------------------------------------
193  // --- Pi0 EbE Analysis ---
194  // -------------------------------------------------
195 
197  nms->SetInvMassCutRange(0.05, 0.16) ;
198  nms->SwitchOffAngleSelection() ;
200  //Set Histrograms bins and ranges
201  nms->SetHistoERangeAndNBins(0, 50, 100) ;
202  nms->SetHistoPtRangeAndNBins(0, 50, 100) ;
203  // nms->GetHistogramRanges()->SetHistoAngleRangeAndNBins(0, 0.3, 100) ;
204  // nsm->GetHistogramRanges()->SetHistoIMRangeAndNBins(0, 0.4, 100) ;
205 
206  AliAnaPi0EbE *anapi0ebe = new AliAnaPi0EbE();
207  anapi0ebe->SetDebug(-1);//10 for lots of messages
209  anapi0ebe->SetMinPt(0.5);
210  anapi0ebe->SetCalorimeter(calorimeter);
211  anapi0ebe->SetInputAODName(Form("Triggers%s",calorimeter.Data()));
212  if(!data.Contains("delta")) {
213  anapi0ebe->SetOutputAODName(Form("Pi0s%s",calorimeter.Data()));
214  anapi0ebe->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
215  }
216  else anapi0ebe->SetOutputAODName(Form("Pi0s%s",calorimeter.Data()));
217 
218  if(kUseKinematics) anapi0ebe->SwitchOnDataMC() ;//Access MC stack and fill more histograms
219  else anapi0ebe->SwitchOffDataMC() ;
220  anapi0ebe->SwitchOffEventSelection() ;
221  anapi0ebe->SetMultiplicity(80, 120);
222  anapi0ebe->SetMultiBin(1);
223  anapi0ebe->SetNeutralMesonSelection(nms);
224  //Set Histrograms bins and ranges
225  anapi0ebe->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ;
226  // anapi0->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
227  // anapi0->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
228  if(kPrintSettings) anapi0ebe->Print("");
229 
230  // ### Pi0 Correlation with hadrons, not isolated
232  anacorrhadronpi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data()));
233  anacorrhadronpi0->AddToHistogramsName("AnaHadronCorrPi0_");
234  anacorrhadronpi0->SetDebug(-1);
235  anacorrhadronpi0->SwitchOffCaloPID();
236  anacorrhadronpi0->SwitchOnFiducialCut();
237  AliFiducialCut * fidCut1stYear = anacorrhadronpi0->GetFiducialCut();
238  fidCut1stYear->DoEMCALFiducialCut(kTRUE) ;
239  fidCut1stYear->DoPHOSFiducialCut(kTRUE) ;
240  fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.);
241  fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.);
242  fidCut1stYear->DoCTSFiducialCut(kTRUE) ;
243  fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.);
244  anacorrhadronpi0->SwitchOnDecayCorr();
245  anacorrhadronpi0->SetPtCutRange(0.5,50);
246  anacorrhadronpi0->SetDeltaPhiCutRange(1.5,4.5);
247  anacorrhadronpi0->SelectIsolated(kFALSE); // do correlation with non isolated pi0
248  anacorrhadronpi0->SetMultiplicity(80, 100);
249  anacorrhadronpi0->SetMultiBin(1);
250  anacorrhadronpi0->SwitchOffNeutralCorr();
251  anacorrhadronpi0->SwitchOffEventSelection();
252  anacorrhadronpi0->SwitchOnSeveralUECalculation();
253  anacorrhadronpi0->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3);
254  if(kUseKinematics) anacorrhadronpi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms
255  else anacorrhadronpi0->SwitchOffDataMC() ;
256  //if(calorimeter=="PHOS"){
257  // //Correlate with particles in EMCAL
258  // anacorrhadronpi0->SwitchOnCaloPID();
259  // anacorrhadronpi0->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL
260  //}
261  //Set Histograms bins and ranges
262  anacorrhadronpi0->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ;
263  // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
264  // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
265  if(kPrintSettings) anacorrhadronpi0->Print("");
266 
268  anaisolpi0->SetDebug(-1);
269  anaisolpi0->SetMinPt(2.);
270  anaisolpi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data()));
271  anaisolpi0->AddToHistogramsName("AnaIsolPi0_");
272  anaisolpi0->SetCalorimeter(calorimeter);
273  if(kUseKinematics) anaisolpi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms
274  else anaisolpi0->SwitchOffDataMC() ;
275  //Select clusters with no pair, if both clusters with pi0 mass
276  anaisolpi0->SwitchOffInvariantMass();
277  //anaisol->SetNeutralMesonSelection(nms);
278  //Do isolation cut
279  anaisolpi0->SetIsolationCut(ic);
280  //Do or not do isolation with previously produced AODs.
281  //No effect if use of SwitchOnSeveralIsolation()
282  anaisolpi0->SwitchOffReIsolation();
283  //Multiple IC
284  anaisolpi0->SwitchOffSeveralIsolation() ;
285  //Set Histograms bins and ranges
286  anaisolpi0->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ;
287  // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
288  // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
289  if(kPrintSettings) anaisol->Print("");
290 
291  // ### Pi0 Correlation with hadrons, isolated
293  anacorrhadronisopi0->SetInputAODName(Form("Pi0s%s",calorimeter.Data()));
294  anacorrhadronisopi0->AddToHistogramsName("AnaHadronCorrIsoPi0_");
295  anacorrhadronisopi0->SetDebug(-1);
296  anacorrhadronisopi0->SwitchOffCaloPID();
297  anacorrhadronisopi0->SwitchOnFiducialCut();
298  AliFiducialCut * fidCut1stYear = anacorrhadronisopi0->GetFiducialCut();
299  fidCut1stYear->DoEMCALFiducialCut(kTRUE) ;
300  fidCut1stYear->DoPHOSFiducialCut(kTRUE) ;
301  fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.);
302  fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.);
303  fidCut1stYear->DoCTSFiducialCut(kTRUE) ;
304  fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.);
305  anacorrhadronisopi0->SwitchOnDecayCorr();
306  anacorrhadronisopi0->SetPtCutRange(0.5,50);
307  anacorrhadronisopi0->SetDeltaPhiCutRange(1.5,4.5);
308  anacorrhadronisopi0->SelectIsolated(kTRUE); // do correlation with isolated pi0
309  anacorrhadronisopi0->SetMultiplicity(80, 100);
310  anacorrhadronisopi0->SetMultiBin(1);
311  anacorrhadronisopi0->SwitchOffNeutralCorr();
312  anacorrhadronisopi0->SwitchOffEventSelection();
313  anacorrhadronisopi0->SwitchOnSeveralUECalculation();
314  anacorrhadronisopi0->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3);
315  if(kUseKinematics) anacorrhadronisopi0->SwitchOnDataMC() ;//Access MC stack and fill more histograms
316  else anacorrhadronisopi0->SwitchOffDataMC() ;
317  //if(calorimeter=="PHOS"){
318  // //Correlate with particles in EMCAL
319  // anacorrhadronpi0->SwitchOnCaloPID();
320  // anacorrhadronpi0->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL
321  //}
322  //Set Histograms bins and ranges
323  anacorrhadronisopi0->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ;
324  // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
325  // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
326  if(kPrintSettings) anacorrhadronisopi0->Print("");
327 
328  } //analysis in calorimeter
329  else {
330  //---charge particle trigger---------------------
331  //------------------------------------------------
332 
334  anacharge->SetDebug(-1); //10 for lots of messages
335  anacharge->SetMinPt(1.0);
336  // anacharge->SetCaloPID(pid);
337  if(kUseKinematics) anacharge->SwitchOnDataMC() ;//Access MC stack and fill more histograms
338  else anacharge->SwitchOffDataMC() ;
339  anacharge->SwitchOffCaloPID();
340  anacharge->SwitchOffCaloPIDRecalculation(); //recommended for EMCAL
341  anacharge->SwitchOnFiducialCut();
342  AliFiducialCut * fidCut1stYear = anacharge->GetFiducialCut();
343  fidCut1stYear->DoCTSFiducialCut(kTRUE) ;
344  fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.);
345  if(!data.Contains("delta")) {
346  anacharge->SetOutputAODName(Form("Triggers%s",calorimeter.Data()));
347  anacharge->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
348  }
349  else anacharge->SetOutputAODName(Form("Triggers%s",calorimeter.Data()));
350  anacharge->AddToHistogramsName("AnaCharge_");
351  //Set Histograms bins and ranges
352  anacharge->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ;
353  // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
354  // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
355 
356  if(kPrintSettings) anacharge->Print("");
357  }
358 
359  // -------------------------------------------------
360  // --- Correlation Analysis with non-isolated triggers ---
361  // -------------------------------------------------
362  // ### Correlation with hadrons
364  anacorrhadron->SetInputAODName(Form("Triggers%s",calorimeter.Data()));
365  anacorrhadron->AddToHistogramsName("AnaHadronCorrTrig_");
366  anacorrhadron->SetDebug(-1);
367  anacorrhadron->SwitchOnCaloPID();
368  anacorrhadron->SwitchOnFiducialCut();
369  AliFiducialCut * fidCut1stYear = anacorrhadron->GetFiducialCut();
370  fidCut1stYear->DoEMCALFiducialCut(kTRUE) ;
371  fidCut1stYear->DoPHOSFiducialCut(kTRUE) ;
372  fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.);
373  fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.);
374  fidCut1stYear->DoCTSFiducialCut(kTRUE) ;
375  fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.);
376  anacorrhadron->SetPtCutRange(0.5,50);
377  anacorrhadron->SetDeltaPhiCutRange(1.5,4.5);
378  anacorrhadron->SetMultiplicity(80, 120);
379  anacorrhadron->SetMultiBin(1);
380  anacorrhadron->SwitchOffNeutralCorr();
381  anacorrhadron->SwitchOffEventSelection();
382  anacorrhadron->SwitchOnSeveralUECalculation();
383  anacorrhadron->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3);
384  anacorrhadron->SelectIsolated(kFALSE); // do correlation with isolated photons
385  if(kUseKinematics) anacorrhadron->SwitchOnDataMC() ;//Access MC stack and fill more histograms
386  else anacorrhadron->SwitchOffDataMC() ;
387  //if(calorimeter=="PHOS"){
388  //Correlate with particles in EMCAL
389  //anacorrhadron->SwitchOnCaloPID();
390  //anacorrhadron->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL
391  //}
392  //Set Histograms bins and ranges
393  anacorrhadron->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ;
394  // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
395  // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
396  if(kPrintSettings) anacorrhadron->Print("");
397 
398 
399 
400  // ### Isolation analysis ###
402  anaisol->SetDebug(-1);
403  anaisol->SetMinPt(2.0);
404  anaisol->SetInputAODName(Form("Triggers%s",calorimeter.Data()));
405  anaisol->AddToHistogramsName("AnaIsolTrig_");
406  anaisol->SetCalorimeter(calorimeter);
407  if(kUseKinematics) anaisol->SwitchOnDataMC() ;//Access MC stack and fill more histograms
408  else anaisol->SwitchOffDataMC() ;
409  //Select clusters with no pair, if both clusters with pi0 mass
410  anaisol->SwitchOffInvariantMass();
411  //anaisol->SetNeutralMesonSelection(nms);
412  //Do isolation cut
413  anaisol->SetIsolationCut(ic);
414  //Do or not do isolation with previously produced AODs.
415  //No effect if use of SwitchOnSeveralIsolation()
416  anaisol->SwitchOffReIsolation();
417  //Multiple IC
418  anaisol->SwitchOffSeveralIsolation() ;
419  //Set Histograms bins and ranges
420  anaisol->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ;
421  // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
422  // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
423 
424  if(kPrintSettings) anaisol->Print("");
425 
426  // -------------------------------------------------
427  // --- Correlation Analysis with isolated triggers ---
428  // -------------------------------------------------
429  // ### Correlation with hadrons
431  anacorrisohadron->SetInputAODName(Form("Triggers%s",calorimeter.Data()));
432  anacorrisohadron->AddToHistogramsName("AnaHadronCorrIsoTrig_");
433  anacorrisohadron->SetDebug(-1);
434  anacorrisohadron->SwitchOffCaloPID();
435  anacorrisohadron->SwitchOnFiducialCut();
436  AliFiducialCut * fidCut1stYear = anacorrisohadron->GetFiducialCut();
437  fidCut1stYear->DoEMCALFiducialCut(kTRUE) ;
438  fidCut1stYear->DoPHOSFiducialCut(kTRUE) ;
439  fidCut1stYear->SetSimpleEMCALFiducialCut(0.7,80.,120.);
440  fidCut1stYear->SetSimplePHOSFiducialCut(0.12,260.,320.);
441  fidCut1stYear->DoCTSFiducialCut(kTRUE) ;
442  fidCut1stYear->SetSimpleCTSFiducialCut(0.8,0.,360.);
443  anacorrisohadron->SetPtCutRange(0.5,50);
444  anacorrisohadron->SetDeltaPhiCutRange(1.5,4.5);
445  anacorrisohadron->SetMultiplicity(80, 100);
446  anacorrisohadron->SetMultiBin(1);
447  anacorrisohadron->SwitchOffNeutralCorr();
448  anacorrisohadron->SwitchOffEventSelection();
449  anacorrisohadron->SwitchOnSeveralUECalculation();
450  anacorrisohadron->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3);
451  anacorrisohadron->SelectIsolated(kTRUE); // do correlation with isolated photons
452  if(kUseKinematics) anacorrisohadron->SwitchOnDataMC() ;//Access MC stack and fill more histograms
453  else anacorrisohadron->SwitchOffDataMC() ;
454  //if(calorimeter=="PHOS"){
455  //Correlate with particles in EMCAL
456  //anacorrhadron->SwitchOnCaloPID();
457  //anacorrhadron->SwitchOnCaloPIDRecalculation(); //recommended for EMCAL
458  //}
459  //Set Histograms bins and ranges
460  anacorrisohadron->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 50, 100) ;
461  // ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 100) ;
462  // ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-0.7, 0.7, 100) ;
463  if(kPrintSettings) anacorrisohadron->Print("");
464 
465  // #### Configure Maker ####
467  maker->SetReader(reader);//pointer to reader
468  Int_t n = 0;//Analysis number, order is important
469  // Particle selection analysis
470  if(calorimeter=="PHOS" || calorimeter=="EMCAL") {
471  maker->SetCaloUtils(cu); //pointer to calorimeter utils
472  maker->AddAnalysis(anaphoton,n++);
473  maker->AddAnalysis(anapi0,n++);
474  maker->AddAnalysis(anapi0ebe,n++);
475  maker->AddAnalysis(anacorrhadronpi0,n++);
476  maker->AddAnalysis(anaisolpi0,n++);
477  maker->AddAnalysis(anacorrhadronisopi0,n++);
478  }
479  if(calorimeter=="CTS")
480  maker->AddAnalysis(anacharge,n++);
481  // Correlation analysis
482  maker->AddAnalysis(anacorrhadron,n++);
483  // Isolation analysis
484  maker->AddAnalysis(anaisol,n++);
485  // Correlation analysis with isolated triggers
486  maker->AddAnalysis(anacorrisohadron,n);
487  maker->SetAnaDebug(-1) ;
488  maker->SwitchOnHistogramsMaker() ;
489  if(data.Contains("delta")) maker->SwitchOffAODsMaker() ;
490  else maker->SwitchOnAODsMaker() ;
491 
492  if(kPrintSettings) maker->Print("");
493 
494  printf("======================== \n");
495  printf(" End Configuration of CaloTrackCorr analysis with detector %s \n",calorimeter.Data());
496  printf("======================== \n");
497 
498  // Create task
499  //===========================================================================
500  // AliAnalysisTaskCaloTrackCorrelationM * task = new AliAnalysisTaskCaloTrackCorrelationM(Form("CaloTrackCorr%s",calorimeter.Data()));
502  task->SetConfigFileName(""); //Don't configure the analysis via configuration file.
503  //task->SetDebugLevel(-1);
504  task->SetAnalysisMaker(maker);
505  //if(!kSimulation)task->SelectCollisionCandidates(); //AliPhysicsSelection has to be attached before.
506  mgr->AddTask(task);
507 
508 // char name[128];
509 // sprintf(name,"CaloTrackCorr_%s",calorimeter.Data());
510 // cout<<"Name of task "<<name<<endl;
511  //AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(Form(name),TList::Class(),
512  // AliAnalysisManager::kOutputContainer, Form("CaloTrackCorr_%s.root",calorimeter.Data()));
513 
514  TString outputfile = AliAnalysisManager::GetCommonFileName();
515  outputfile.ReplaceAll(".root","") ;
516  outputfile.Append("M.root") ;
517  // AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(Form("CaloTrackCorr_%s",calorimeter.Data()), TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:CaloTrackCorr_%s",outputfile.Data(),calorimeter.Data()));
518  AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(calorimeter.Data(), TList::Class(),
519  AliAnalysisManager::kOutputContainer,
520  Form("%s:CaloTrackCorr",outputfile.Data()));
521 
522  AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("%sCuts",calorimeter.Data()), TList::Class(),
523  AliAnalysisManager::kParamContainer,
524  Form("%s:CaloTrackCorrCuts",outputfile.Data()));
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
530  //if(!data.Contains("delta")) mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer());
531  // mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer());
532  mgr->ConnectOutput (task, 1, cout_pc);
533  mgr->ConnectOutput (task, 2, cout_cuts);
534 
535  return task;
536 }
537 
538 
void SetPtThreshold(Float_t pt)
virtual void SetDebug(Int_t d)
void SetNumberOfCellsFromPHOSBorder(Int_t n)
void SetTOFCut(Float_t tcut)
Definition: AliCaloPID.h:197
void SetSimpleCTSFiducialCut(Float_t abseta, Float_t phimin, Float_t phimax)
virtual void SetNeutralMesonSelection(AliNeutralMesonSelection *const nms)
void SetHistoMassRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void AddToHistogramsName(TString add)
void SwitchOnTrackMatchRejection()
Definition: AliAnaPhoton.h:129
Class with utils to perform Isolation Cuts.
void SetPHOSPtMin(Float_t pt)
virtual void SetCaloPID(AliCaloPID *pid)
void SetConeSize(Float_t r)
void SetPtFraction(Float_t pt)
void SetHistoPtRangeAndNBins(Float_t min, Float_t max, Int_t n)
Selected photon clusters invariant mass analysis.
Definition: AliAnaPi0.h:39
virtual void SetCalorimeter(TString &calo)
Set the calorimeter for the analysis. A string.
virtual void SetInputAODName(TString name)
void SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3)
Definition: AliAnaPhoton.h:112
void AddAnalysis(TObject *ana, Int_t n)
Add analysis depending on AliAnaCaloTrackCorrBaseClass to list.
void SetInvMassCutRange(Double_t invmassmin, Double_t invmassmax)
void KeepNeutralMesonSelectionHistos(Bool_t keep)
void SetSimpleEMCALFiducialCut(Float_t abseta, Float_t phimin, Float_t phimax)
virtual void SetOutputAODClassName(TString name)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetSumPtThreshold(Float_t s)
void SetAnalysisType(anaTypes ana)
Definition: AliAnaPi0EbE.h:92
void SetNumberOfCellsFromEMCALBorder(Int_t n)
void SetNCellCut(Int_t n)
Definition: AliAnaPhoton.h:120
Select cluster pairs or single merged clusters with pi0 or eta invariant mass.
Definition: AliAnaPi0EbE.h:30
void SetSimplePHOSFiducialCut(Float_t abseta, Float_t phimin, Float_t phimax)
2 calorimeter clusters invariant mass selection
Definition: AliAnaPi0EbE.h:86
const TString calorimeter
Definition: anaM.C:36
Class for event, clusters and tracks filtering and preparation for the AOD analysis.
void SetCTSPtMin(Float_t pt)
virtual void SetOutputAODName(TString name)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetICMethod(Int_t i)
Correlate trigger particles (photon, pi0, tracks) and charged tracks: Azimuthal correlations, xE distributions.
void DoCTSFiducialCut(Bool_t b)
void DoEMCALFiducialCut(Bool_t b)
void SetDeltaPhiCutRange(Double_t phimin, Double_t phimax)
void SetUeDeltaPhiCutRange(Double_t uephimin, Double_t uephimax)
Main class conecting the CaloTrackCorrelations package and Analysis Mixing Frame. ...
virtual AliFiducialCut * GetFiducialCut()
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
int Int_t
Definition: External.C:63
virtual AliHistogramRanges * GetHistogramRanges()
Filter EMCal/PHOS clusters for photon analysis.
Definition: AliAnaPhoton.h:33
Class for filtering generated MC particles and prepare them as input for the analysis.
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
virtual void SetHistoERangeAndNBins(Float_t min, Float_t max, Int_t n)
Base class for event, clusters and tracks filtering and preparation for the analysis.
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Definition: AliAnaPi0.cxx:2428
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
virtual void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
virtual void SetZvertexCut(Float_t zcut=10.)
AliAnalysisTaskCaloTrackCorrelationM * AddTaskCaloTrackCorrM(TString data, TString calorimeter, Bool_t kPrintSettings=kFALSE)
virtual void SetNCentrBin(Int_t n=1)
Number of bins in reaction plain.
Class for event, clusters and tracks filtering and preparation for the ESD analysis.
void SetReader(AliCaloTrackReader *re)
Track selection for correlation analysis.
void SetEMCALPtMin(Float_t pt)
Select clusters/tracks with low particle environment in their vecinity, isolated within a cone...
void SetHistoAsymmetryRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void SetPtCutRange(Double_t mi, Double_t ma)
Class that contains methods to select candidate cluster pairs to neutral meson.
void DoPHOSFiducialCut(Bool_t b)
Class for PID selection with calorimeters.
Definition: AliCaloPID.h:53
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
bool Bool_t
Definition: External.C:53
void SetDebug(Int_t deb)
Definition: AliCaloPID.h:126
Class with utils specific to calorimeter clusters/cells.
virtual void SetIsolationCut(AliIsolationCut *ic)
void SetParticleTypeInCone(Int_t i)
Store the acceptance cuts for clusters and tracks or particle objects.
void SetCaloUtils(AliCalorimeterUtils *cu)
void SetAnalysisMaker(AliAnaCaloTrackCorrMaker *const maker)
Steering class of package CaloTrackCorrelartions.
Bool_t kUseKinematics
Use the MC information.