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