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