AliPhysics  8dc8609 (8dc8609)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AddTaskCaloTrackCorr.C
Go to the documentation of this file.
1 
10 // Set includes for compilation
11 
12 #if !defined(__CINT__) || defined(__MAKECINT__)
13 
14 #include <TString.h>
15 #include <TROOT.h>
16 #include <TSystem.h>
17 
18 #include "AliAnalysisManager.h"
19 #include "AliInputEventHandler.h"
20 #include "AliLog.h"
21 
24 #include "AliCaloTrackMCReader.h"
25 #include "AliCaloTrackESDReader.h"
26 #include "AliCaloTrackAODReader.h"
27 #include "AliCalorimeterUtils.h"
28 #include "AliHistogramRanges.h"
29 #include "AliAnaPhoton.h"
30 #include "AliAnaPi0.h"
33 #include "AliAnaChargedParticles.h"
34 #include "AliAnaCalorimeterQA.h"
35 #include "AliAnaGeneratorKine.h"
37 #include "AliAnaClusterPileUp.h"
38 #include "AliAnaElectron.h"
39 #include "AliAnaRandomTrigger.h"
41 #include "AliAnaPi0EbE.h"
42 
43 #include "AliVTrack.h"
44 #include "AliESDtrackCuts.h"
45 #include "CreateTrackCutsPWGJE.C"
46 
48 
49 #endif // CINT
50 
53 Bool_t kSimulation = kFALSE;
54 //Bool_t kUseKinematics = kFALSE; ///< Use the MC information
55 Bool_t kOutputAOD = kFALSE;
57 Bool_t kExotic = kTRUE;
59 Int_t kYears = 2011;
61 TString kTrig = "EMC7" ;
63 TString kData = "";
65 TString kCalorimeter = "EMCAL";
66 Bool_t kTM = kTRUE;
67 Bool_t kRecalTM = kTRUE;
68 Int_t kMinCen = -1;
69 Int_t kMaxCen = -1;
70 TString kName = "";
71 Int_t kDebug = -1;
72 Bool_t kQA = kFALSE;
73 Bool_t kHadronAN = kFALSE;
74 Bool_t kCalibE = kTRUE;
75 Bool_t kCalibT = kTRUE;
76 Bool_t kBadMap = kTRUE;
77 Bool_t kTender = kFALSE;
78 Bool_t kMix = kFALSE;
80 
81 
86 {
87  // Set common bins for all analysis and MC histograms filling
88 
89  histoRanges->SetHistoPtRangeAndNBins(0, 100, 200) ; // Energy and pt histograms
90 
91  if(kCalorimeter=="EMCAL")
92  {
93  if ( kYears == 2010 )
94  {
95  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 122*TMath::DegToRad(), 78) ;
96  histoRanges->SetHistoXRangeAndNBins(-230,90,120); // QA
97  histoRanges->SetHistoYRangeAndNBins(370,450,40); // QA
98  }
99  else if ( kYears < 2014 )
100  {
101  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
102  histoRanges->SetHistoXRangeAndNBins(-460,90,200); // QA
103  histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
104  }
105  else // Run2
106  {
107  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 329*TMath::DegToRad(), 250) ;
108  histoRanges->SetHistoXRangeAndNBins(-460,460,230); // QA
109  histoRanges->SetHistoYRangeAndNBins(-450,450,225); // QA
110  }
111 
112  histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
113  }
114  else
115  {
116  histoRanges->SetHistoPhiRangeAndNBins(250*TMath::DegToRad(), 320*TMath::DegToRad(), 70) ;
117  histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
118  }
119 
120  histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 4.9, 500);
121 
122  // Invariant mass histoRangeslysis
123  histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
124  histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
125 
126  // check if time calibration is on
127  histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000);
128  histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
129 
130  // track-cluster residuals
131  histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.15,0.15,300);
132  histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.15,0.15,300);
133  histoRanges->SetHistodRRangeAndNBins(0.,0.15,150);//QA
134 
135  // QA, electron, charged
136  histoRanges->SetHistoPOverERangeAndNBins(0,2.,200);
137  histoRanges->SetHistodEdxRangeAndNBins(0.,200.,200);
138 
139  // QA
140  histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
141  histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
142  histoRanges->SetHistoZRangeAndNBins(-350,350,175);
143  histoRanges->SetHistoRRangeAndNBins(430,460,30);
144  histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
145  histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
146 
147  // QA, correlation
148  if(kCollisions=="PbPb")
149  {
150  histoRanges->SetHistoNClusterCellRangeAndNBins(0,100,100);
151  histoRanges->SetHistoNClustersRangeAndNBins(0,500,50);
152  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,2000,200);
153  }
154  else
155  {
156  histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
157  histoRanges->SetHistoNClustersRangeAndNBins(0,50,50);
158  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,200,200);
159  }
160 
161  // xE, zT
162  histoRanges->SetHistoRatioRangeAndNBins(0.,2.,200);
163  histoRanges->SetHistoHBPRangeAndNBins (0.,10.,200);
164 
165  // Isolation
166  histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 250);
167  histoRanges->SetHistoPtSumRangeAndNBins (0, 100, 250);
168 
169 }
170 
176 {
177  if(kTrig=="EMC7")
178  {
179  printf("CaloTrackCorr trigger EMC7\n");
180  return AliVEvent::kEMC7;
181  }
182  else if (kTrig=="INT7")
183  {
184  printf("CaloTrackCorr trigger INT7\n");
185  return AliVEvent::kINT7;
186  }
187  else if(kTrig=="EMC1")
188  {
189  printf("CaloTrackCorr trigger EMC1\n");
190  return AliVEvent::kEMC1;
191  }
192  else if(kTrig=="MB")
193  {
194  printf("CaloTrackCorr trigger MB\n");
195  return AliVEvent::kMB;
196  }
197  else if(kTrig=="PHOS")
198  {
199  printf("CaloTrackCorr trigger PHOS\n");
200  return AliVEvent::kPHI7;
201  }
202  else if(kTrig=="PHOSPb")
203  {
204  printf("CaloTrackCorr trigger PHOSPb\n");
205  return AliVEvent::kPHOSPb;
206  }
207  else if(kTrig=="AnyINT")
208  {
209  printf("CaloTrackCorr trigger AnyINT\n");
210  return AliVEvent::kAnyINT;
211  }
212  else if(kTrig=="INT")
213  {
214  printf("CaloTrackCorr trigger AnyINT\n");
215  return AliVEvent::kAny;
216  }
217  else if(kTrig=="EMCEGA")
218  {
219  printf("CaloTrackCorr trigger EMC Gamma\n");
220  return AliVEvent::kEMCEGA;
221  }
222  else if(kTrig=="EMCEJE")
223  {
224  printf("CaloTrackCorr trigger EMC Jet\n");
225  return AliVEvent::kEMCEJE;
226  }
227  else if(kTrig=="Central")
228  {
229  printf("CaloTrackCorr trigger Central\n");
230  return (AliVEvent::kCentral | AliVEvent::kMB);
231  }
232  else if(kTrig=="CentralEGA")
233  {
234  printf("CaloTrackCorr trigger Central+EMCEGA\n");
235  return (AliVEvent::kCentral | AliVEvent::kEMCEGA);
236  }
237  else if(kTrig=="SemiCentral")
238  {
239  printf("CaloTrackCorr trigger SemiCentral\n");
240  return (AliVEvent::kSemiCentral | AliVEvent::kMB);
241  }
242  else if(kTrig=="SemiOrCentral")
243  {
244  printf("CaloTrackCorr trigger SemiCentral Or Central\n");
245  return (AliVEvent::kSemiCentral | AliVEvent::kCentral | AliVEvent::kMB);
246  }
247 
248  return AliVEvent::kAny ;
249 }
250 
255 {
256  if(kSimulation) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.
257  else ana->SwitchOffDataMC() ;
258 
259  //Set here generator name, default pythia
260  //ana->GetMCAnalysisUtils()->SetMCGenerator("");
261 }
262 
267 {
268  AliCaloTrackReader * reader = 0;
269  if (kInputDataType == "ESD"&& kData=="MC" )
270  reader = new AliCaloTrackMCReader();
271  else if(kInputDataType=="AOD" || kData.Contains("AOD"))
272  reader = new AliCaloTrackAODReader();
273  else if(kInputDataType=="ESD")
274  reader = new AliCaloTrackESDReader();
275  else
276  printf("AliCaloTrackReader::ConfigureReader() - Data combination not known kData=%s, kInputDataType=%s\n",kData.Data(),kInputDataType.Data());
277 
278  reader->SetDebug(kDebug);//10 for lots of messages
279 
280  /*
281  if(kSimulation)
282  {
283  // Event rejection cuts for jet-jet simulations
284  reader->SetPtHardAndJetPtComparison(kTRUE);
285  reader->SetPtHardAndJetPtFactor(4);
286 
287  reader->SetPtHardAndClusterPtComparison(kTRUE);
288  reader->SetPtHardAndClusterPtFactor(1.5);
289  }
290  */
291 
292  //Delta AOD?
293  //reader->SetDeltaAODFileName("");
294  if(kOutputAOD) reader->SwitchOnWriteDeltaAOD() ;
295 
296  //------------------------
297  // Detector input filling
298  //------------------------
299 
300  //Min cluster/track E
301  reader->SetEMCALEMin(0.3);
302  reader->SetEMCALEMax(1000);
303  reader->SetPHOSEMin(0.3);
304  reader->SetPHOSEMax(1000);
305  reader->SetCTSPtMin(0.2);
306  reader->SetCTSPtMax(1000);
307 
308  // Time cuts
309  if(kSimulation)
310  {
311  reader->SwitchOffUseTrackTimeCut();
313  reader->SwitchOffUseEMCALTimeCut();
314  reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
315  }
316  else
317  {
318  if(kCalibT)
319  {
320  printf("Set time cut parameters for run %d\n",kRunNumber);
321  reader->SwitchOnUseEMCALTimeCut();
323 
324  //Absolute window
325  reader->SetEMCALTimeCut(-25,20);
326 
327  //Parametrization
328  if (kRunNumber >= 151636 && kRunNumber <= 155384 )
329  {
330  printf("Set time parameters for LHC11c");
333  }
334  else if(kRunNumber >= 156447 && kRunNumber <= 159635 )
335  {
336  printf("Set time parameters for LHC11d");
339  }
340  else
341  {
343  }
344  }
345  else
346  {
348  reader->SwitchOffUseEMCALTimeCut();
349  reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
350  }
351  }
352 
353  reader->SwitchOnFiducialCut();
354  reader->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ;
355 
356  // Tracks
357  reader->SwitchOnCTS();
359 
362 
363  reader->SwitchOffUseTrackTimeCut();
364  reader->SetTrackTimeCut(0,50);
365 
366  reader->SwitchOffUseTrackDCACut();
367  //reader->SetTrackDCACut(0,0.0105);
368  //reader->SetTrackDCACut(1,0.035);
369  //reader->SetTrackDCACut(2,1.1);
370 
371  if(kInputDataType=="ESD")
372  {
373  gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/macros/CreateTrackCutsPWGJE.C");
374  //AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10041004);
375  //reader->SetTrackCuts(esdTrackCuts);
376  //reader->SwitchOnConstrainTrackToVertex();
377 
378  if(kYears>2010)
379  {
380  //Hybrids 2011
381  AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001008);
382  reader->SetTrackCuts(esdTrackCuts);
383  AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10011008);
384  reader->SetTrackComplementaryCuts(esdTrackCuts2);
385  }
386  else
387  {
388  //Hybrids 2010
389  AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001006);
390  reader->SetTrackCuts(esdTrackCuts);
391  AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10041006);
392  reader->SetTrackComplementaryCuts(esdTrackCuts2);
393  }
394  }
395  else if(kInputDataType=="AOD")
396  {
397  //reader->SetTrackFilterMask(128); // Filter bit, not mask, use if off hybrid
398  reader->SwitchOnAODHybridTrackSelection(); // Check that the AODs have Hybrids!!!!
399  reader->SetTrackStatus(AliVTrack::kITSrefit);
400  //reader->SwitchOnTrackHitSPDSelection(); // Check that the track has at least a hit on the SPD, not much sense to use for hybrid or TPC only tracks
401  }
402 
403  // Calorimeter
404 
405  reader->SetEMCALClusterListName(kClusterArray);
406  if(kClusterArray == "" && !kTender)
407  {
408  printf("**************** Standard EMCAL clusters branch analysis **************** \n");
410  // Check in ConfigureCaloUtils that the recalibration and bad map are ON
411  }
412  else
413  {
414  printf("**************** Input for analysis is Clusterizer %s **************** \n", kClusterArray.Data());
416  }
417 
419 
420  //if(kCalorimeter == "EMCAL") {
421  reader->SwitchOnEMCALCells();
422  reader->SwitchOnEMCAL();
423  //}
424  //if(kCalorimeter == "PHOS") {
425  reader->SwitchOnPHOSCells();
426  reader->SwitchOnPHOS();
427  //}
428 
429  // for case data="deltaAOD", no need to fill the EMCAL/PHOS cluster lists
430  if(kData.Contains("delta"))
431  {
432  reader->SwitchOffEMCAL();
433  reader->SwitchOffPHOS();
434  reader->SwitchOffEMCALCells();
435  reader->SwitchOffPHOSCells();
436  }
437 
438  //-----------------
439  // Event selection
440  //-----------------
441 
442  //reader->RejectFastClusterEvents() ;
443 
444  // Event triggered selection settings
446  reader->SwitchOnBadTriggerEventsRemoval(); // only if SwitchOnTriggerPatchMatching();
447  reader->SwitchOnUnMatchedTriggerEventsRemoval(); // only if SwitchOnBadTriggerEventsRemoval();
448  //reader->SwitchOffTriggerClusterTimeRecal() ;
449 
450  reader->SetTriggerPatchTimeWindow(8,9); // L0
451  if (kRunNumber < 146861) reader->SetEventTriggerL0Threshold(3.);
452  else if(kRunNumber < 154000) reader->SetEventTriggerL0Threshold(4.);
453  else if(kRunNumber < 165000) reader->SetEventTriggerL0Threshold(5.5);
454 
455  //redefine for other periods, triggers
456 
457  //if(!kUseKinematics) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma
458 
459  // For mixing with AliAnaParticleHadronCorrelation switch it off
460  if(kMix)
461  {
462  reader->SwitchOffEventTriggerAtSE();
464  reader->SetEventTriggerMask(mask); // Only for mixing and SwitchOffEventTriggerAtSE();
465  //reader->SetMixEventTriggerMask(AliVEvent::kMB); // Careful, not all productions work with kMB, try kINT7, kINT1, kAnyINT
466  reader->SetMixEventTriggerMask(AliVEvent::kAnyINT); // Careful, not all productions work with kMB, try kINT7, kINT1, kAnyINT
467 
468  printf("---Trigger selection done in AliCaloTrackReader!!!\n");
469  }
470  else
471  reader->SwitchOnEventTriggerAtSE();
472 
473  reader->SetZvertexCut(10.); // Open cut
474  reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
475 
476  if(kEventSelection)
477  {
478  reader->SwitchOnPileUpEventRejection(); // remove pileup by default
479  reader->SwitchOnV0ANDSelection() ; // and besides v0 AND
480  }
481  else
482  {
483  reader->SwitchOffPileUpEventRejection();// remove pileup by default
484  reader->SwitchOffV0ANDSelection() ; // and besides v0 AND
485  }
486 
487  if(kCollisions=="PbPb")
488  {
489  // Centrality
490  reader->SetCentralityClass("V0M");
491  reader->SetCentralityOpt(100); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
492  reader->SetCentralityBin(kMinCen,kMaxCen); // Accept all events, if not select range
493 
494  // Event plane (only used in Maker and mixing for AliAnaPi0/AliAnaHadronCorrelation for the moment)
495  reader->SetEventPlaneMethod("V0");
496  }
497 
498  if(kPrintAnaInfo) reader->Print("");
499 
500  return reader;
501 }
502 
507 {
508 
510  cu->SetDebug(kDebug);
511 
512  // Remove clusters close to borders, at least max energy cell is 1 cell away
515 
516  // Search of local maxima in cluster
517  if(kCollisions=="pp")
518  {
519  cu->SetLocalMaximaCutE(0.1);
520  cu->SetLocalMaximaCutEDiff(0.03);
521  if(kName.Contains("150"))
522  {
523  printf("Reclusterize with 150 threshold, set PbPb settings\n");
524  cu->SetLocalMaximaCutE(0.2);
525  cu->SetLocalMaximaCutEDiff(0.03);
526  }
527  }
528  else
529  {
530  cu->SetLocalMaximaCutE(0.2);
531  cu->SetLocalMaximaCutEDiff(0.03);
532  }
533 
534  cu->SwitchOffClusterPlot();
535 
536  if(kRecalTM) cu->SwitchOnRecalculateClusterTrackMatching(); // Done in clusterization
538 
540 
541  //EMCAL settings
542 
543  if(!kSimulation)
545 
546  AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
547 
548  if(!kSimulation)
549  {
550  cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
551  if(kClusterArray == "" && !kTender) cu->SwitchOnRunDepCorrection();
552  }
553 
554  gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/EMCAL/macros/ConfigureEMCALRecoUtils.C");
556  kSimulation,
557  kExotic,
558  kTRUE,//kNonLinearity,
559  kCalibE,
560  kBadMap,
561  kCalibT);
562  //recou->SetExoticCellDiffTimeCut(50.);
563 
564 
565  if( kNonLinearity )
566  {
567  printf("ConfigureCaloUtils() - Apply non linearity to EMCAL\n");
569  }
570 
571  printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
572  printf("ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
573 
574 
575  if(kCalorimeter=="PHOS")
576  {
577  if (kYears < 2014) cu->SetNumberOfSuperModulesUsed(3);
578  else cu->SetNumberOfSuperModulesUsed(4);
579  }
580  else
581  {
582  if (kYears == 2010) cu->SetNumberOfSuperModulesUsed(4); //EMCAL first year
583  else if (kYears < 2014) cu->SetNumberOfSuperModulesUsed(10);
584  else cu->SetNumberOfSuperModulesUsed(20);
585  }
586 
587  // PHOS
589 
590  if(kPrintAnaInfo) cu->Print("");
591 
592  return cu;
593 }
594 
600 {
601  AliAnaPhoton *ana = new AliAnaPhoton();
602  ana->SetDebug(kDebug); //10 for lots of messages
603 
604  // cluster selection cuts
605 
606  ana->SwitchOffFiducialCut();
607 
608  ana->SetCalorimeter(kCalorimeter);
609 
610  if(kCalorimeter == "PHOS")
611  {
612  ana->SetNCellCut(2);// At least 3 cells
613  ana->SetMinPt(0.3);
614  ana->SetMinDistanceToBadChannel(2, 4, 5);
615  ana->SetTimeCut(-1e10,1e10); // open cut
616  }
617  else
618  {//EMCAL
619  ana->SetNCellCut(1);// At least 2 cells
620  ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
621  ana->SetMaxEnergy(1000);
622  ana->SetTimeCut(-1e10,1e10); // open cut, usual time window of [425-825] ns if time recalibration is off
623  // restrict to less than 100 ns when time calibration is on
624  ana->SetMinDistanceToBadChannel(2, 4, 6);
625 
626  // NLM cut, used in all, exclude clusters with more than 2 maxima
627  // Not needed if M02 cut is already strong or clusterizer V2
628  ana->SetNLMCut(1, 2) ;
629  }
630 
631  if(kTM)
632  {
634  ana->SwitchOffTMHistoFill() ;
635  }
636  else
637  {
639  ana->SwitchOnTMHistoFill() ;
640  }
641 
642  //PID cuts (shower shape)
643  ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
644  AliCaloPID* caloPID = ana->GetCaloPID();
645  //Not used in bayesian
646 
647  //EMCAL
648  caloPID->SetEMCALLambda0CutMax(0.27);
649  caloPID->SetEMCALLambda0CutMin(0.10);
650 
651  caloPID->SetEMCALDEtaCut(0.025);
652  caloPID->SetEMCALDPhiCut(0.030);
653 
654  //PHOS
655  caloPID->SetPHOSDispersionCut(2.5);
656  caloPID->SetPHOSRCut(2.);
657  if(kInputDataType=="AOD") caloPID->SetPHOSRCut(2000.); // Open cut since dX, dZ not stored
658 
659  ana->SwitchOffFillShowerShapeHistograms(); // Filled before photon shower shape selection
661  //if(!kSimulation) ana->SwitchOnFillEMCALBCHistograms();
662 
663  // Input / output delta AOD settings
664 
665  if(!kData.Contains("delta"))
666  {
667  ana->SetOutputAODName(Form("Photon%s",kName.Data()));
668  ana->SetOutputAODClassName("AliCaloTrackParticleCorrelation");
669  //ana->SetOutputAODClassName("AliCaloTrackParticle"); // use if no correlation done
670  }
671  else ana->SetInputAODName(Form("Photon%s",kName.Data()));
672 
673  //Set Histograms name tag, bins and ranges
674 
675  ana->AddToHistogramsName(Form("AnaPhoton_TM%d_",kTM));
676  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
677 
678  // Number of particle type MC histograms
679  ana->FillNOriginHistograms(20);
680  ana->FillNPrimaryHistograms(20);
681 
682  ana->SwitchOnRealCaloAcceptance(); // primary particle acceptance histograms
683  ConfigureMC(ana);
684 
685  if(kPrintAnaInfo) ana->Print("");
686 
687  return ana;
688 }
689 
696 {
698  ana->SetDebug(kDebug); //10 for lots of messages
699 
700  // cluster selection cuts
701 
702  ana->SwitchOffFiducialCut();
703  ana->SetNCellCut(1);// At least 2 cells
704  ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
705  ana->SetMaxEnergy(1000);
706  ana->SetM02(1, 2) ;
708 
709  ana->AddToHistogramsName("EMCTriggerClusters_");
710  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
711 
712  if(kPrintAnaInfo) ana->Print("");
713 
714  return ana;
715 }
716 
723 {
725  ana->SetDebug(kDebug); //10 for lots of messages
726 
727  // cluster selection cuts
728 
729  ana->SwitchOffFiducialCut();
730  ana->SetNCellCut(1);// At least 2 cells
731  ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
732  ana->SetMaxEnergy(1000);
733 
734  ana->AddToHistogramsName("ClusterPileUp_");
735  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
736 
737  if(kPrintAnaInfo) ana->Print("");
738 
739  return ana;
740 }
741 
747 {
749  ana->SetDebug(kDebug); //10 for lots of messages
750 
751  ana->FillAODWithElectrons();
752  //ana->FillAODWithHadrons();
753  //ana->FillAODWithAny();
754 
755  if(kCalorimeter == "PHOS")
756  {
757  ana->SetNCellCut(2);// At least 2 cells
758  ana->SetMinPt(0.3);
759  ana->SetMinDistanceToBadChannel(2, 4, 5);
760  }
761  else
762  {//EMCAL
763  ana->SetNCellCut(1);// At least 2 cells
764  ana->SetMinPt(0.5); // no effect minium EMCAL cut.
765  ana->SetMaxPt(100);
766  //ana->SetTimeCut(400,900);// Time window of [400-900] ns
767  ana->SetMinDistanceToBadChannel(2, 4, 6);
768  }
769 
770  //Electron selection cuts with tracks
771  ana->SetEOverP(0.85, 1.2);
772 
773  // TO DO, find a more suitable way to set this
774  if (kRunNumber < 146861) ana->SetdEdxCut(72, 90);
775  else if(kRunNumber < 154000) ana->SetdEdxCut(54, 70);
776  else ana->SetdEdxCut(74, 90);
777 
778  if(kSimulation) ana->SetdEdxCut(80, 100);
779 
780  ana->SetCalorimeter(kCalorimeter);
781 
782  ana->SwitchOnCaloPID();
783 
784  AliCaloPID* caloPID = ana->GetCaloPID();
785 
786  caloPID->SetEMCALLambda0CutMax(0.27);
787  caloPID->SetEMCALLambda0CutMin(0.10);
788 
791  ana->SwitchOffFiducialCut();
792 
793  if(!kData.Contains("delta"))
794  {
795  ana->SetOutputAODName(Form("Electron%s",kName.Data()));
796  ana->SetOutputAODClassName("AliCaloTrackParticleCorrelation");
797  }
798  else ana->SetInputAODName(Form("Electron%s",kName.Data()));
799 
800  //Set Histograms name tag, bins and ranges
801 
802  ana->AddToHistogramsName(Form("AnaElectron_TM%d_",kTM));
803  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
804 
805  ConfigureMC(ana);
806 
807  if(kPrintAnaInfo) ana->Print("");
808 
809  return ana ;
810 }
811 
816 {
818  ana->SetDebug(kDebug); //10 for lots of messages
819 
820  if(detector=="") detector = kCalorimeter;
821  ana->SetTriggerDetector(detector);
822 
823  // selection cuts
824  ana->SetMinPt(4.);
825  ana->SetMaxPt(51.);
826 
827  if (detector=="EMCAL")
828  {
829  ana->SetEtaCut(-0.71,0.71);
830  ana->SetPhiCut(100*TMath::DegToRad(), 160*TMath::DegToRad());
831  }
832  else if(detector=="PHOS")
833  {
834  ana->SetEtaCut(-0.13,0.13);
835  ana->SetPhiCut(260*TMath::DegToRad(), 320*TMath::DegToRad());
836  }
837  else if(detector=="CTS")
838  {
839  ana->SetEtaCut(-0.9,0.9);
840  ana->SetPhiCut(0, TMath::TwoPi());
841  }
842 
843  // AOD branch
844  if(!kData.Contains("delta"))
845  {
846  ana->SetOutputAODName(Form("RandomTrigger%s%s",detector.Data(),kName.Data()));
847  ana->SetOutputAODClassName("AliCaloTrackParticleCorrelation");
848  }
849  else
850  ana->SetInputAODName(Form("RandomTrigger%s%s",detector.Data(),kName.Data()));
851 
852  printf("Set RandomTrigger%s%s\n",detector.Data(),kName.Data());
853 
854  //Set Histograms name tag, bins and ranges
855 
856  ana->AddToHistogramsName(Form("AnaRandomTrigger%s_",detector.Data()));
857 
858  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
859 
860  if(detector=="CTS")
861  {
862  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
863  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
864  }
865 
866  if(kPrintAnaInfo) ana->Print("");
867 
868  return ana;
869 }
870 
875 {
877  ana->SetDebug(kDebug); //10 for lots of messages
878 
879  // selection cuts
880 
881  ana->SetMinEnergy(6);
882  ana->SetMaxEnergy(200.);
883  ana->SetMinNCells(6); // check same as in calopid
884 
885  ana->SetCalorimeter(kCalorimeter);
887 
889  ana->SetNWeightForShowerShape(0);
890  //ana->SetWeightForShowerShape(0, 4.6);
891 
894  if(!useSS && !useAsy) ana->SwitchOnFillEbinHistograms();
895 
896  if(!kTM)
897  {
900  }
901  else
902  {
905  }
906 
907  //printf("Set correction slope for SS weight \n");
908  //ana->SetWCorrectionParameter(0.07);
909  //ana->SetNECellCutForShowerShape(0);
910  //ana->SetECellCutForShowerShape(0, 0.07);
911  //ana->SetECellCutForShowerShape(1, 0.1);
912  //ana->SetECellCutForShowerShape(2, 0.2);
913 
914  if(kSimulation)
915  {
917  ana->SwitchOffFillMCOverlapHistograms() ; // Off when possible
918  if(!useSS && !useAsy) ana->SwitchOnFillMCOverlapHistograms() ;
919  }
920 
921  AliCaloPID* caloPID = ana->GetCaloPID();
922  caloPID->SetEMCALDEtaCut(0.025);
923  caloPID->SetEMCALDPhiCut(0.030);
924  caloPID->SetClusterSplittingM02Cut(0,100000); // use parametrized cut, not fixed
925 
926  caloPID->SetPi0MassRange(0.11, 0.18);
927  caloPID->SetEtaMassRange(0.40, 0.60);
928  caloPID->SetPhotonMassRange(0.00, 0.08);
929 
930  caloPID->SetSplitWidthSigma(3.); // cut at 3 sigma of the mean pi0 peak.
931 
932  caloPID->SetClusterSplittingMinNCells(6);
933 
934  if(kCollisions=="PbPb" || kName.Contains("150"))
935  {
936  caloPID->SetClusterSplittingMinNCells(4);
937  ana->SetMinNCells(4);
938  caloPID->SetPi0MassShiftHighECell(0.005);
939  if(kCollisions=="PbPb") ana->SwitchOnFillHighMultHistograms();
940  }
941 
942  ana->AddToHistogramsName("AnaInClusterIM_");
943 
944  if(useAsy)
945  {
946  caloPID->SwitchOnSplitAsymmetryCut() ;
947  }
948  else
949  {
950  printf("InClusterIM: Do not apply Asy cut on merged pi0 in cluster analysis \n");
951  caloPID->SwitchOffSplitAsymmetryCut() ;
952  ana->AddToHistogramsName("AnaInClusterIM_OpenAsy_");
953  }
954 
955  if(!useSS)
956  {
957  printf("InClusterIM: Do not apply SS cut on merged pi0 in cluster analysis \n");
958  caloPID->SwitchOffSplitShowerShapeCut() ;
959  ana->AddToHistogramsName("AnaInClusterIM_OpenSS_");
960  }
961  else caloPID->SwitchOnSplitShowerShapeCut() ;
962 
963  if(!useAsy && !useSS)
964  {
965  printf("InClusterIM: Do not apply SS and Asy cut on merged pi0 in cluster analysis \n");
966  ana->AddToHistogramsName("AnaInClusterIM_OpenSS_OpenAsy_");
967  }
968 
969  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
970 
971  ConfigureMC(ana);
972 
973  if(kPrintAnaInfo) ana->Print("");
974 
975  return ana;
976 }
977 
982 {
983 
985  ana->SetDebug(kDebug); //10 for lots of messages
986 
987  // selection cuts
988 
989  ana->SetMinPt(0.5);
990  ana->SwitchOnFiducialCut();
991  ana->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ; //more restrictive cut in reader and after in isolation
992 
995 
996  // Input / output delta AOD settings
997 
998  if(!kData.Contains("delta"))
999  {
1000  ana->SetOutputAODName(Form("Hadron%s",kName.Data()));
1001  ana->SetOutputAODClassName("AliCaloTrackParticleCorrelation");
1002  //ana->SetOutputAODClassName("AliCaloTrackParticle"); // use if no correlation done
1003  }
1004  else
1005  ana->SetInputAODName(Form("Hadron%s",kName.Data()));
1006  printf("Set Hadron%s\n",kName.Data());
1007 
1008  //Set Histograms name tag, bins and ranges
1009 
1010  ana->AddToHistogramsName("AnaHadrons_");
1011  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1012 
1013  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
1014  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
1015 
1016  ConfigureMC(ana);
1017 
1018  if(kPrintAnaInfo) ana->Print("");
1019 
1020  return ana;
1021 }
1022 
1027 {
1028  AliAnaPi0 *ana = new AliAnaPi0();
1029 
1030  ana->SetDebug(kDebug);//10 for lots of messages
1031 
1032  // Input delta AOD settings
1033  ana->SetInputAODName(Form("Photon%s",kName.Data()));
1034 
1035  // Calorimeter settings
1036  ana->SetCalorimeter(kCalorimeter);
1037 
1038  // Acceptance plots
1039  // ana->SwitchOnFiducialCut(); // Needed to fill acceptance plots with predefined calorimeter acceptances
1040  // ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.7, 100, 180) ;
1041  // ana->GetFiducialCut()->DoEMCALFiducialCut(kTRUE);
1042 
1043  ana->SwitchOffFiducialCut();
1045 
1046  // settings for pp collision mixing
1047  ana->SwitchOnOwnMix(); //Off when mixing done with general mixing frame
1048 
1049  // Cuts
1050  if(kCalorimeter=="EMCAL") ana->SetPairTimeCut(40);
1051 
1052  ana->SetNAsymCuts(1); // no asymmetry cut, previous studies showed small effect.
1053  // In EMCAL assymetry cut prevents combination of assymetric decays which is the main source of pi0 at high E.
1054 
1055  if (kCollisions=="pp" )
1056  {
1057  ana->SetNCentrBin(1);
1058  ana->SetNZvertBin(10);
1059  ana->SetNRPBin(1);
1060  ana->SetNMaxEvMix(100);
1061  }
1062  else if(kCollisions=="PbPb")
1063  {
1064  ana->SetNCentrBin(5);
1065  ana->SetNZvertBin(3);
1066  ana->SetNRPBin(1);
1067  ana->SetNMaxEvMix(5);
1068  }
1069 
1070  ana->SwitchOffSMCombinations();
1072 
1073  // Set Histograms name tag, bins and ranges
1074 
1075  ana->AddToHistogramsName(Form("AnaPi0_TM%d_",kTM));
1076  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1077 
1078  ConfigureMC(ana);
1079 
1080  if(kPrintAnaInfo) ana->Print("");
1081 
1082  return ana;
1083 }
1084 
1091  Int_t analysis, Bool_t useSS = kTRUE, Bool_t useAsy = kTRUE)
1092 {
1093  AliAnaPi0EbE *ana = new AliAnaPi0EbE();
1094  ana->SetDebug(kDebug);//10 for lots of messages
1095 
1096  ana->SetAnalysisType( (AliAnaPi0EbE::anaTypes) analysis );
1097  TString opt = "";
1098  if(analysis == AliAnaPi0EbE::kIMCaloTracks) opt = "Conv";
1099  if(analysis == AliAnaPi0EbE::kSSCalo) opt = "SS";
1100 
1101  if(analysis == AliAnaPi0EbE::kIMCalo && kCalorimeter=="EMCAL" && !kSimulation) ana->SetPairTimeCut(100);
1102  if(analysis == AliAnaPi0EbE::kIMCaloTracks) ana->SetInputAODGammaConvName("PhotonsCTS");
1103 
1104  // Common settings for all 3 type of analysis
1105 
1107 
1108  ana->SetCalorimeter(kCalorimeter);
1109 
1110  //Set Histograms name tag, bins and ranges
1111  ana->AddToHistogramsName(Form("Ana%s%sEbE_TM%d_",particle.Data(),opt.Data(),kTM));
1112 
1113  // Specific settings for different type of analysis
1114 
1117 
1118  if(kTM)
1119  {
1120  //printf("--->>>REMOVE MATCHED Pi0\n");
1122  ana->SwitchOffTMHistoFill() ;
1123  }
1124  else
1125  {
1126  //printf("---->>>ACCEPT MATCHED Pi0\n");
1128  ana->SwitchOnTMHistoFill() ;
1129  }
1130 
1131  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1132 
1133  //ana->SwitchOnFillEMCALBCHistograms();
1134 
1135  if(kPrintAnaInfo) ana->Print("");
1136 
1137  ConfigureMC(ana);
1138 
1139  if(!kInputDataType.Contains("delta"))
1140  {
1141  ana->SetOutputAODName(Form("%s%s%s",particle.Data(), opt.Data(), kName.Data()));
1142  ana->SetOutputAODClassName("AliCaloTrackParticleCorrelation");
1143 
1144  }
1145  else
1146  ana->SetInputAODName(Form("%s%s%s",particle.Data(),opt.Data(),kName.Data()));
1147 
1148  if(analysis!=AliAnaPi0EbE::kSSCalo)
1149  {
1150  // Input / output delta AOD settings
1151 
1152  ana->SetInputAODName(Form("Photon%s",kName.Data()));
1153 
1155  nms->SetParticle(particle);
1156 
1157  // Tighten a bit mass cut with respect to default window
1158  if(particle=="Pi0") nms->SetInvMassCutRange(0.120,0.150);
1159  if(particle=="Eta") nms->SetInvMassCutRange(0.520,0.580);
1160 
1161  //if(!particle.Contains("SideBand")) nms->SwitchOnAngleSelection();
1162  //else nms->SwitchOnAngleSelection();
1163 
1164  nms->SwitchOffAngleSelection();
1165  if(particle.Contains("Pi0SideBand")) // For pi0, do not consider left band
1166  nms->SetSideBandCutRanges(-1,0,0.180,0.220);
1167 
1168  nms->KeepNeutralMesonSelectionHistos(kTRUE);
1169  //nms->SetAngleMaxParam(2,0.2);
1170  nms->SetHistoERangeAndNBins(0, 20, 80) ;
1171  //nms->SetHistoIMRangeAndNBins(0, 1, 400);
1172  }
1173  else
1174  { // cluster splitting settings
1175  ana->SetMinEnergy(6);
1176  ana->SetMaxEnergy(200.);
1177 
1178  ana->SetNLMMinEnergy(0, 10);
1179  ana->SetNLMMinEnergy(1, 6);
1180  ana->SetNLMMinEnergy(2, 6);
1181 
1182  ana->SetMinDistanceToBadChannel(2, 4, 6); // only use the first one
1184 
1185  ana->SetTimeCut(-1e10,1e10); // Open time cut
1186 
1187  // NLM cut, used in all, exclude clusters with more than 2 maxima
1188  ana->SetNLMCut(1, 2) ;
1189 
1190  AliCaloPID* caloPID = ana->GetCaloPID();
1191 
1192  caloPID->SetSplitWidthSigma(3.); // cut at 3 sigma of the mean pi0 peak.
1193 
1194  if(!useSS)
1195  {
1196  printf("Do not apply SS cut on merged pi0 analysis \n");
1197  caloPID->SwitchOffSplitShowerShapeCut() ;
1198  ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenSS_TM%d_",particle.Data(),opt.Data(),kTM));
1199  ana->SetOutputAODName(Form("%s%s%s_OpenSS",particle.Data(), opt.Data(), kName.Data()));
1200  caloPID->SetClusterSplittingM02Cut(0.1,10000);
1201  }
1202  else
1203  {
1204  caloPID->SetClusterSplittingM02Cut(0.3,5); // Do the selection in the analysis class and not in the PID method to fill SS histograms
1205  caloPID->SwitchOnSplitShowerShapeCut() ;
1206  }
1207 
1208  if(useAsy) caloPID->SwitchOnSplitAsymmetryCut() ;
1209  else
1210  {
1211  caloPID->SwitchOffSplitAsymmetryCut() ;
1212  if(!useSS)
1213  {
1214  ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenSS_OpenAsy_TM%d_",particle.Data(),opt.Data(),kTM));
1215  ana->SetOutputAODName(Form("%s%s%s_OpenSS_OpenAsy",particle.Data(), opt.Data(), kName.Data()));
1216  }
1217  else
1218  {
1219  ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenAsy_TM%d_",particle.Data(),opt.Data(),kTM));
1220  ana->SetOutputAODName(Form("%s%s%s_OpenAsy",particle.Data(), opt.Data(), kName.Data()));
1221  }
1222  }
1223 
1224  //For Pi0 only if SwitchOnSimpleSplitMassCut()
1225  caloPID->SetPi0MassRange(0.10, 0.18);
1226  caloPID->SetEtaMassRange(0.40, 0.60);
1227  caloPID->SetPhotonMassRange(0.00, 0.08);
1228 
1229  caloPID->SetClusterSplittingMinNCells(6);
1230 
1231  //caloPID->SetSplitEnergyFractionMinimum(0, 0.95);
1232  //caloPID->SetSplitEnergyFractionMinimum(1, 0.95);
1233  //caloPID->SetSplitEnergyFractionMinimum(2, 0.8);
1234 
1235  if(kCollisions=="PbPb" || kName.Contains("150"))
1236  {
1237  caloPID->SetClusterSplittingMinNCells(4);
1238  caloPID->SetPi0MassShiftHighECell(0.005);
1239  }
1240  }
1241 
1242  return ana;
1243 
1244 }
1245 
1250  Int_t partInCone = AliIsolationCut::kOnlyCharged,
1252  Float_t cone = 0.3,
1253  Float_t pth = 0.3,
1254  Bool_t multi = kFALSE)
1255 {
1257  //ana->SetDebug(kDebug);
1258  ana->SetDebug(kDebug);
1259 
1260  ana->SwitchOnFiducialCut();
1261  //Avoid borders of EMCal
1262  if(kCalorimeter=="EMCAL")
1263  ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.6, 86, 174) ;
1264 
1265  // Same Eta as EMCal, cut in phi if EMCAL was triggering
1266  if(particle=="Hadron" || particle.Contains("CTS"))
1267  {
1268  // if(kTrig.Contains("EMC"))
1269  // ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 260, 360) ;
1270  // else
1271  ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 0, 360) ;
1272  }
1273 
1274  ana->SetMinPt(5);
1275 
1276  // Input / output delta AOD settings
1277 
1278  ana->SetInputAODName(Form("%s%s",particle.Data(),kName.Data()));
1279  ana->SetAODObjArrayName(Form("IC%s_%s",particle.Data(),kName.Data()));
1280 
1281  ana->SetCalorimeter(kCalorimeter);
1282 
1283  if(!kTM) ana->SwitchOnTMHistoFill();
1284  else ana->SwitchOffTMHistoFill();
1285 
1286  ana->SwitchOffSSHistoFill();
1288 
1289  //Do settings for main isolation cut class
1290  AliIsolationCut * ic = ana->GetIsolationCut();
1291  ic->SetDebug(kDebug);
1292 
1293  if(cone >0 && pth > 0)
1294  {
1295  ic->SetPtThreshold(pth);
1296  ic->SetConeSize(cone);
1297  }
1298  else
1299  {
1300  if(kCollisions=="pp")
1301  {
1302  ic->SetPtThreshold(0.5);
1303  ic->SetConeSize(0.4);
1304  }
1305  if(kCollisions=="PbPb")
1306  {
1307  ic->SetPtThreshold(3.);
1308  //ic->SetPtThreshold(1.);
1309  ic->SetConeSize(0.3);
1310  }
1311  }
1312 
1313  ic->SetPtFraction(0.1);
1314  ic->SetSumPtThreshold(1.0) ;
1315  ic->SetParticleTypeInCone(partInCone);
1316  ic->SetICMethod(thresType);
1317 
1318  //Do or not do isolation with previously produced AODs.
1319  //No effect if use of SwitchOnSeveralIsolation()
1320  ana->SwitchOffReIsolation();
1321 
1322  //Multiple IC
1323  if(multi)
1324  {
1325  ic->SetConeSize(1.); // Take all for first iteration
1326  ic->SetPtThreshold(100);// Take all for first iteration
1327  ana->SwitchOnSeveralIsolation() ;
1328  ana->SetAODObjArrayName(Form("MultiIC%sTM%d",particle.Data(),kTM));
1329 
1330  ana->SetNCones(4);
1331  ana->SetNPtThresFrac(4);
1332  ana->SetConeSizes(0,0.3); ana->SetConeSizes(1,0.4);
1333  ana->SetConeSizes(2,0.5); ana->SetConeSizes(3,0.6);
1334  ana->SetPtThresholds(0, 0.5); ana->SetPtThresholds(1, 1); ana->SetPtThresholds(2, 2);
1335  ana->SetPtFractions (0, 0.05) ; ana->SetPtFractions (1, 0.1); ana->SetPtFractions (2, 0.2) ; ana->SetPtFractions (3, 0.3) ;
1336  ana->SetSumPtThresholds(0, 1) ; ana->SetSumPtThresholds(1, 3) ; ana->SetSumPtThresholds(2, 5); ana->SetSumPtThresholds(3, 7) ;
1337 
1338  ana->SwitchOffTMHistoFill();
1339  ana->SwitchOffSSHistoFill();
1340  }
1341  else
1342  ana->SwitchOffSeveralIsolation() ;
1343 
1344  AliCaloPID* caloPID = ana->GetCaloPID();
1345  caloPID->SetEMCALDEtaCut(0.025);
1346  caloPID->SetEMCALDPhiCut(0.030);
1347 
1348  //Set Histograms name tag, bins and ranges
1349 
1350  if(!multi)ana->AddToHistogramsName(Form("AnaIsol%s_TM%d_",particle.Data(),kTM));
1351  else ana->AddToHistogramsName(Form("AnaMultiIsol%s_TM%d_",particle.Data(),kTM));
1352 
1353  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1354 
1355  if(particle=="Hadron" || particle.Contains("CTS"))
1356  {
1357  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
1358  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
1359  }
1360 
1361  ana->SwitchOnRealCaloAcceptance(); // primary particle acceptance histograms
1362  ConfigureMC(ana);
1363 
1364  if(kPrintAnaInfo) ic ->Print("");
1365  if(kPrintAnaInfo) ana->Print("");
1366 
1367  return ana;
1368 }
1369 
1374  Bool_t bIsolated,
1375  Int_t partInCone = AliIsolationCut::kOnlyCharged,
1377  Float_t cone = 0.3,
1378  Float_t pth = 0.3)
1379 {
1381  ana->SetDebug(kDebug);
1382 
1383  ana->SwitchOnAbsoluteLeading(); // Select trigger leading particle of all the selected tracks
1384  ana->SwitchOffNearSideLeading(); // Select trigger leading particle of all the particles at +-90 degrees, default
1385 
1386  //ana->SwitchOnLeadHadronSelection();
1387  //ana->SetLeadHadronPhiCut(TMath::DegToRad()*100., TMath::DegToRad()*260.);
1388  //ana->SetLeadHadronPtCut(0.5, 100);
1389 
1390  ana->SetTriggerPtRange(5,100);
1391  ana->SetAssociatedPtRange(0.2,100);
1392  //ana->SetDeltaPhiCutRange( TMath::Pi()/2,3*TMath::Pi()/2 ); //[90 deg, 270 deg]
1393  ana->SetDeltaPhiCutRange (TMath::DegToRad()*120.,TMath::DegToRad()*240.);
1394  ana->SetUeDeltaPhiCutRange(TMath::DegToRad()*60. ,TMath::DegToRad()*120.);
1396 
1397  ana->SetNAssocPtBins(9);
1398  ana->SetAssocPtBinLimit(0, 0.2) ;
1399  ana->SetAssocPtBinLimit(1, 0.5) ;
1400  ana->SetAssocPtBinLimit(2, 1) ;
1401  ana->SetAssocPtBinLimit(3, 2) ;
1402  ana->SetAssocPtBinLimit(4, 3) ;
1403  ana->SetAssocPtBinLimit(5, 4) ;
1404  ana->SetAssocPtBinLimit(6, 6) ;
1405  ana->SetAssocPtBinLimit(7, 10) ;
1406  ana->SetAssocPtBinLimit(8, 30) ;
1407  ana->SetAssocPtBinLimit(9, 200) ;
1408  //ana->SwitchOnFillPtImbalancePerPtABinHistograms();
1409 
1410  ana->SelectIsolated(bIsolated); // do correlation with isolated photons
1411 
1412  if(bIsolated)
1413  {
1414  //Do settings for main isolation cut class
1415  AliIsolationCut * ic = ana->GetIsolationCut();
1416  ic->SetDebug(kDebug);
1417 
1418  if(cone >0 && pth > 0)
1419  {
1420  ic->SetPtThreshold(pth);
1421  ic->SetConeSize(cone);
1422  }
1423  else
1424  {
1425  if(kCollisions=="pp")
1426  {
1427  ic->SetPtThreshold(0.5);
1428  ic->SetConeSize(0.4);
1429  }
1430  if(kCollisions=="PbPb")
1431  {
1432  ic->SetPtThreshold(3.);
1433  //ic->SetPtThreshold(1.);
1434  ic->SetConeSize(0.3);
1435  }
1436  }
1437 
1438  ic->SetPtFraction(0.1);
1439  ic->SetSumPtThreshold(1.0) ;
1440  ic->SetParticleTypeInCone(partInCone);
1441  ic->SetICMethod(thresType);
1442 
1443  }
1444 
1445  // Mixing with own pool
1446  if(kMix)
1447  {
1448  ana->SwitchOnOwnMix();
1450  }
1451  else
1452  ana->SwitchOffOwnMix();
1453 
1454  ana->SetNZvertBin(20);
1455  ana->SwitchOffCorrelationVzBin() ;
1457 
1458  if(kCollisions=="pp")
1459  {
1460  ana->SetNMaxEvMix(100);
1461  ana->SwitchOnTrackMultBins();
1462  ana->SetNTrackMultBin(10); // same as SetNCentrBin(10);
1463  ana->SetNRPBin(1);
1464  }
1465  else
1466  {
1467  ana->SetNMaxEvMix(10);
1468  ana->SwitchOffTrackMultBins(); // centrality bins
1469  ana->SetNCentrBin(3);
1470  ana->SetNRPBin(3);
1471  if(kName.Contains("60_90"))
1472  {
1473  printf("*** Set mixing for peripheral\n");
1474  ana->SetNMaxEvMix(50);
1475  ana->SetNCentrBin(2);
1476  }
1477  }
1478 
1479  ana->SwitchOnFiducialCut();
1480 
1481  //Avoid borders of EMCal, same as for isolation
1482  if(kCalorimeter=="EMCAL")
1483  ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.6, 86, 174) ;
1484 
1485  // Same Eta as EMCal, cut in phi if EMCAL was triggering
1486  if(particle=="Hadron" || particle.Contains("CTS"))
1487  {
1488  //if(kTrig.Contains("EMC"))
1489  // ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 260, 360) ;
1490  //else
1491  ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 0, 360) ;
1492  }
1493 
1494  // Input / output delta AOD settings
1495 
1496  ana->SetInputAODName(Form("%s%s",particle.Data(),kName.Data()));
1497  ana->SetAODObjArrayName(Form("%sHadronCorrIso%d_%s",particle.Data(),bIsolated,kName.Data()));
1498 
1499  // Fill extra plots on tagged decay photons
1500  // If trigger is pi0/eta found with invariant mass, get the decays
1501  // If trigger is photon, check if it was tagged as decay previously
1502  if(particle!="Hadron" )
1503  {
1504  if(particle.Contains("Pi0") || particle.Contains("Eta"))
1505  {
1508  }
1509  else
1510  {
1512  ana->SwitchOnDecayTriggerDecayCorr(); // Make sure pi0 decay tagging runs before this task
1513  }
1514  }
1515  else
1516  {
1519  }
1520 
1521  if(particle=="Photon")
1522  {
1523  printf("**** SET M02 limits *** \n");
1524  ana->SetM02Cut(0.1,0.27);
1525  }
1526 
1527  // if triggering on PHOS and EMCAL is on
1528  //if(kCalorimeter=="PHOS") ana->SwitchOnNeutralCorr();
1529  ana->SwitchOffNeutralCorr(); // Do only correlation with TPC
1530 
1532 
1534 
1535  // Underlying event
1537  ana->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3);
1538 
1539  //Set Histograms name tag, bins and ranges
1540 
1541  ana->AddToHistogramsName(Form("Ana%sHadronCorr_Iso%d_TM%d_",particle.Data(),bIsolated,kTM));
1542  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1543 
1544  if(particle=="Hadron" || particle.Contains("CTS"))
1545  {
1546  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
1547  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
1548  }
1549 
1550  ConfigureMC(ana);
1551 
1552  if(kPrintAnaInfo) ana->Print("");
1553 
1554  return ana;
1555 }
1556 
1561 {
1563  ana->SetDebug(kDebug); //10 for lots of messages
1564  ana->SetCalorimeter(kCalorimeter);
1565 
1566  ana->SetTimeCut(-1e10,1e10); // Open time cut
1567 
1568  // Study inter detector correlation (PHOS, EMCAL, Tracks, V0)
1569  if(kCalorimeter=="PHOS" && kTrig=="PHOS")
1570  ana->SwitchOnCorrelation(); // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
1571  if(kCalorimeter=="EMCAL" && kClusterArray=="")
1572  ana->SwitchOnCorrelation(); // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
1573  else
1574  ana->SwitchOffCorrelation();
1575 
1576  // Study exotic clusters PHOS and EMCAL
1577  if(kClusterArray=="") ana->SwitchOnStudyBadClusters() ;
1578  else ana->SwitchOffStudyBadClusters() ;
1579 
1580 
1581  ana->SwitchOffFiducialCut();
1585  if(!kExotic)ana->SwitchOnStudyBadClusters();
1586  else ana->SwitchOffStudyBadClusters();
1589 
1590  ana->AddToHistogramsName("QA_"); //Begining of histograms name
1591  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1592 
1593  ConfigureMC(ana);
1594 
1595  if(kPrintAnaInfo) ana->Print("");
1596 
1597  return ana;
1598 }
1599 
1605 {
1607  ana->SetDebug(kDebug); //10 for lots of messages
1608 
1609  // Trigger detector, acceptance and pT cut
1610  TString trigDet = "EMCAL";
1611  ana->SetTriggerDetector(trigDet);
1612  ana->SetMinPt(10); // Trigger photon, pi0 minimum pT
1614 
1615  // Particles associated to trigger or isolation cone acceptance and pT cut
1616  TString calo = "EMCAL";
1617  ana->SetCalorimeter(calo);
1618  ana->SetMinChargedPt(0.2);
1619  ana->SetMinNeutralPt(0.3);
1620  ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.65, 81, 179);
1621  ana->GetFiducialCut()->SetSimpleCTSFiducialCut(0.9, 0, 360);
1622 
1623  // Isolation paramters
1624  AliIsolationCut * ic = ana->GetIsolationCut();
1625  ic->SetDebug(kDebug);
1626  ic->SetPtThreshold(0.5);
1627  ic->SetConeSize(0.5);
1628  ic->SetSumPtThreshold(1.0) ;
1629  ic->SetICMethod(AliIsolationCut::kPtThresIC); // kSumPtIC
1630 
1631  ana->AddToHistogramsName("AnaGenKine_");
1632  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1633 
1634  if(kPrintAnaInfo) ana->Print("");
1635 
1636  return ana;
1637 }
1638 
1644  const TString calorimeter = "EMCAL",
1645  const Bool_t simulation = kFALSE,
1646  const Bool_t eventsel = kFALSE,
1647  const Bool_t exotic = kTRUE,
1648  const Bool_t nonlin = kFALSE,
1649  TString outputfile = "",
1650  const Int_t year = 2010,
1651  const TString col = "pp",
1652  const TString trigger = "MB",
1653  const TString clustersArray = "V1",
1654  const Bool_t mix = kTRUE,
1655  const Bool_t recaltm = kTRUE,
1656  const Bool_t tm = kTRUE,
1657  const Int_t minCen = -1,
1658  const Int_t maxCen = -1,
1659  const Bool_t qaan = kFALSE,
1660  const Bool_t hadronan = kFALSE,
1661  const Bool_t calibE = kTRUE,
1662  const Bool_t badmap = kTRUE,
1663  const Bool_t calibT = kTRUE,
1664  const Bool_t tender = kFALSE,
1665  const Bool_t outputAOD = kFALSE,
1666  const Bool_t printSettings = kFALSE,
1667  const Double_t scaleFactor = -1,
1668  const Int_t runNumber = -1
1669  )
1670 {
1671  // Creates a CaloTrackCorr task, configures it and adds it to the analysis manager.
1672 
1673  kPrintAnaInfo = printSettings;
1674  kSimulation = simulation;
1675  kYears = year;
1676  kCollisions = col;
1677  kExotic = exotic;
1678  kNonLinearity = nonlin;
1679  kTrig = trigger;
1680  kClusterArray = clustersArray;
1681  kData = data;
1682  kCalorimeter = calorimeter;
1683  kOutputAOD = outputAOD;
1684  kTM = tm;
1685  kRecalTM = recaltm;
1686  kMinCen = minCen;
1687  kMaxCen = maxCen;
1688  kEventSelection= eventsel;
1689  kQA = qaan;
1690  kHadronAN = hadronan;
1691  kCalibE = calibE;
1692  kCalibT = calibT;
1693  kBadMap = badmap;
1694  kTender = tender;
1695  kMix = mix;
1696  kRunNumber = runNumber;
1697 
1698  // Get the pointer to the existing analysis manager via the static access method.
1699 
1700  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
1701  if (!mgr)
1702  {
1703  ::Error("AddTask", "No analysis manager to connect to.");
1704  return NULL;
1705  }
1706 
1707  // Check the analysis type using the event handlers connected to the analysis manager.
1708 
1709  if (!mgr->GetInputEventHandler())
1710  {
1711  ::Error("AddTask", "This task requires an input event handler");
1712  return NULL;
1713  }
1714 
1715  // Make sure the B field is enabled for track selection, some cuts need it
1716  ((AliInputEventHandler*)mgr->GetInputEventHandler())->SetNeedField(kTRUE);
1717 
1718  kInputDataType = "AOD";
1719  if(!kData.Contains("delta"))
1720  kInputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
1721 
1722 // if(kSimulation)
1723 // {
1724 // kUseKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
1725 // if (!kUseKinematics && data=="AOD" && kInputDataType != "ESD") kUseKinematics = kTRUE; //AOD primary should be available ...
1726 // }
1727 //
1728 // cout<<"********* ACCESS KINE? "<<kUseKinematics<<endl;
1729 
1730  // Name for containers
1731 
1732  kName = Form("%s_Trig%s_Cl%s_TM%d",kCalorimeter.Data(), kTrig.Data(),kClusterArray.Data(),kTM);
1733 
1734  if(kCollisions=="PbPb" && kMaxCen>=0) kName+=Form("Cen%d_%d",kMinCen,kMaxCen);
1735 
1736  printf("<<<< NAME: %s >>>>>\n",kName.Data());
1737 
1738  // #### Configure analysis ####
1739 
1741 
1742  maker->SetScaleFactor(scaleFactor); // for MC, negative (not scaled) by default
1743 
1744  // General frame setting and configuration
1745  maker->SetReader (ConfigureReader() );
1746  maker->SetCaloUtils(ConfigureCaloUtils());
1747 
1748  // Analysis tasks setting and configuration
1749  Int_t n = 0;//Analysis number, order is important
1750 
1751  // Isolation settings
1752  Int_t partInCone = AliIsolationCut::kNeutralAndCharged; // kOnlyCharged;
1753  Int_t thresType = AliIsolationCut::kPtThresIC;// AliIsolationCut::kSumPtFracIC ;
1754  Float_t cone = -1;
1755  Float_t pth = -1;
1756 
1757  // Photon analysis
1758 
1759  maker->AddAnalysis(ConfigurePhotonAnalysis(), n++); // Photon cluster selection
1760 
1761  maker->AddAnalysis(ConfigurePi0Analysis(), n++); // Invariant mass of photon clusters
1762 
1763  // Invariant mass analysis Put here to tag selected photons as decay
1764  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0", AliAnaPi0EbE::kIMCalo), n++); // Pi0 event by event selection, invariant mass and photon tagging from decay
1765  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Eta", AliAnaPi0EbE::kIMCalo), n++); // Eta event by event selection, invariant mass and photon tagging from decay
1766 
1767  // Photon analysis
1768  maker->AddAnalysis(ConfigureIsolationAnalysis("Photon", partInCone,thresType,cone, pth), n++); // Photon isolation
1769  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Photon",kFALSE), n++); // Gamma hadron correlation
1770  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Photon",kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated gamma hadron correlation
1771  //maker->AddAnalysis(ConfigureIsolationAnalysis("Photon", partInCone,thresType,kTRUE), n++); // Photon multi isolation, leave it the last
1772 
1773 
1774  // Split cluster analysis
1775  if(kCalorimeter == "EMCAL")
1776  {
1777  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0", AliAnaPi0EbE::kSSCalo), n++); // Pi0 event by event selection, cluster splitting
1778  maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0SS", partInCone,thresType,cone, pth), n++); // Pi0 isolation, cluster splits
1779  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0SS" ,kFALSE), n++); // Pi0 hadron correlation
1780  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0SS" ,kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated pi0 hadron correlation
1781  //maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0SS", partInCone,thresType,kTRUE), n++); // Pi0 multi isolation, split cluster
1782  maker->AddAnalysis(ConfigureInClusterIMAnalysis(kTRUE , kTRUE ), n++);
1783  }
1784 
1785  // Invariant mass analysis
1786  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0SideBand", AliAnaPi0EbE::kIMCalo), n++); // Pi0 event by event selection, and photon tagging from decay
1787  maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0", partInCone,thresType,cone, pth), n++); // Pi0 isolation, invariant mass
1788  maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0SideBand", partInCone,thresType,cone, pth), n++); // Pi0 isolation, side band
1789  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0" ,kFALSE), n++); // Pi0 hadron correlation
1790  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0" ,kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated pi0 hadron correlation
1791  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0SideBand" ,kFALSE), n++); // Pi0 hadron correlation
1792  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0SideBand" ,kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated pi0 hadron correlation
1793  //maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0", partInCone,thresType,kTRUE), n++); // Pi0 multi isolation, invariant mass, leave it the last
1794 
1795  if(kHadronAN)
1796  {
1797  maker->AddAnalysis(ConfigureChargedAnalysis(), n++); // track selection
1798  maker->AddAnalysis(ConfigureIsolationAnalysis("Hadron",AliIsolationCut::kOnlyCharged,thresType,cone, pth), n++); // track isolation
1799  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Hadron",kFALSE), n++); // track-track correlation
1800  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Hadron",kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated track-track correlation
1801  //maker->AddAnalysis(ConfigureIsolationAnalysis("Hadron",partInCone,thresType,kTRUE), n++);// Hadron multi isolation
1802  }
1803 
1804  // Analysis with ghost triggers, only for Min Bias like events
1805  if( kTrig.Contains("INT") || kTrig.Contains("Central") || kTrig.Contains("MB") )
1806  {
1807  maker->AddAnalysis(ConfigureRandomTriggerAnalysis(), n++);
1808  maker->AddAnalysis(ConfigureIsolationAnalysis(Form("RandomTrigger%s",kCalorimeter.Data()), partInCone,thresType,cone, pth), n++); // Ghost trigger isolation
1809  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis(Form("RandomTrigger%s",kCalorimeter.Data()),kFALSE), n++); // Ghost trigger hadron correlation
1810  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis(Form("RandomTrigger%s",kCalorimeter.Data()),kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated ghost hadron correlation
1811  //maker->AddAnalysis(ConfigureIsolationAnalysis(Form("RandomTrigger%s",kCalorimeter.Data()), partInCone,thresType,kTRUE), n++); // Ghost multi isolation
1812 
1813  if(kHadronAN)
1814  {
1815  maker->AddAnalysis(ConfigureRandomTriggerAnalysis("CTS"), n++); // track selection
1816  maker->AddAnalysis(ConfigureIsolationAnalysis("RandomTriggerCTS",AliIsolationCut::kOnlyCharged,thresType,cone, pth), n++); // track isolation
1817  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("RandomTriggerCTS",kFALSE), n++); // track-track correlation
1818  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("RandomTriggerCTS",kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated track-track correlation
1819  //maker->AddAnalysis(ConfigureIsolationAnalysis("RandomTriggerCTS",AliIsolationCut::kOnlyCharged,thresType,kTRUE), n++); // Ghost multi isolation
1820  }
1821  }
1822 
1823  if(kQA) maker->AddAnalysis(ConfigureQAAnalysis(),n++);
1824 
1825  maker->SetAnaDebug(kDebug) ;
1826  maker->SwitchOnHistogramsMaker() ;
1827  if(kData.Contains("delta")) maker->SwitchOffAODsMaker() ;
1828  else maker->SwitchOnAODsMaker() ;
1829 
1830  if(kPrintAnaInfo) maker->Print("");
1831 
1832  if(kSimulation) maker->SwitchOffDataControlHistograms();
1833 
1834  if(simulation)
1835  {
1836  // Calculate the cross section weights, apply them to all histograms
1837  // and fill xsec and trial histo. Sumw2 must be activated.
1838  //maker->GetReader()->GetWeightUtils()->SwitchOnMCCrossSectionCalculation();
1839  //maker->SwitchOnSumw2Histograms();
1840 
1841  // For recent productions where the cross sections and trials are not stored in separate file
1842  //maker->GetReader()->GetWeightUtils()->SwitchOnMCCrossSectionFromEventHeader() ;
1843 
1844  // Just fill cross section and trials histograms.
1845  maker->GetReader()->GetWeightUtils()->SwitchOnMCCrossSectionHistoFill();
1846 
1847  // Add control histogram with pT hard to control aplication of weights
1848  maker->SwitchOnPtHardHistogram();
1849  }
1850 
1851 
1852  printf("<< End Configuration of %d analysis for calorimeter %s >>\n",n, kCalorimeter.Data());
1853 
1854  // Create task
1855 
1856  AliAnalysisTaskCaloTrackCorrelation * task = new AliAnalysisTaskCaloTrackCorrelation (Form("CaloTrackCorr%s",kName.Data()));
1857  //task->SetConfigFileName(""); //Don't configure the analysis via configuration file.
1858  task->SetDebugLevel(kDebug);
1859  //task->SetBranches("ESD:AliESDRun.,AliESDHeader");
1860  task->SetAnalysisMaker(maker);
1861  mgr->AddTask(task);
1862 
1863  //Create containers
1864 
1865  if(outputfile.Length()==0) outputfile = AliAnalysisManager::GetCommonFileName();
1866 
1867  AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(kName, TList::Class(),
1868  AliAnalysisManager::kOutputContainer,
1869  Form("%s",outputfile.Data()));
1870 
1871  AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Param_%s",kName.Data()), TList::Class(),
1872  AliAnalysisManager::kParamContainer,
1873  "AnalysisParameters.root");
1874 
1875  // Create ONLY the output containers for the data produced by the task.
1876  // Get and connect other common input/output containers via the manager as below
1877  //==============================================================================
1878  mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
1879  // AOD output slot will be used in a different way in future
1880  if(!kData.Contains("delta") && outputAOD) mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer());
1881  mgr->ConnectOutput (task, 1, cout_pc);
1882  mgr->ConnectOutput (task, 2, cout_cuts);
1883 
1884  if(!kMix)
1885  {
1886  UInt_t mask = SetTriggerMaskFromName();
1887  task->SelectCollisionCandidates(mask);
1888  }
1889 
1890  return task;
1891 }
1892 
1893 
void SetEOverP(Double_t min, Double_t max)
void SetSumPtThresholds(Int_t i, Float_t pt)
void SetPtThreshold(Float_t pt)
void SetHistoTrackMultiplicityRangeAndNBins(Int_t min, Int_t max, Int_t n)
virtual void SetDebug(Int_t d)
void SetNumberOfCellsFromPHOSBorder(Int_t n)
void SetPhiCut(Float_t min, Float_t max)
Bool_t kPrintAnaInfo
Global variables to be accessed by the different methods.
void SetTimeCut(Double_t min, Double_t max)
void ana(Int_t mode=mGRID)
Definition: ana.C:162
void SetSimpleCTSFiducialCut(Float_t abseta, Float_t phimin, Float_t phimax)
double Double_t
Definition: External.C:58
Configuration of AliEMCALRecoUtils.
Bool_t kCalibT
Calibrate time of clusters.
void SetHistoMassRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void AddToHistogramsName(TString add)
void SwitchOnFillAllTrackMatchingHistogram()
TString kClusterArray
Name of branch with clusters, default none, standard branch.
void SetSplitWidthSigma(Float_t s)
Definition: AliCaloPID.h:283
virtual void SwitchOnFiducialCut()
void SwitchOnTrackMatchRejection()
Definition: AliAnaPhoton.h:131
void SetHistoXRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetClusterSplittingM02Cut(Float_t min=0, Float_t max=100)
Definition: AliCaloPID.h:264
void SwitchOnLoadOwnEMCALGeometryMatrices()
void SwitchOnSplitShowerShapeCut()
Definition: AliCaloPID.h:260
Bool_t kOutputAOD
Create output AOD with generated particle AOD objects.
void SwitchOnTMHistoFill()
Definition: AliAnaPhoton.h:93
void SetAssociatedPtRange(Float_t min, Float_t max)
AliAnaParticleIsolation * ConfigureIsolationAnalysis(TString particle="Photon", Int_t partInCone=AliIsolationCut::kOnlyCharged, Int_t thresType=AliIsolationCut::kSumPtFracIC, Float_t cone=0.3, Float_t pth=0.3, Bool_t multi=kFALSE)
void SetTriggerPatchTimeWindow(Int_t min, Int_t max)
Class with utils to perform Isolation Cuts.
virtual void SwitchOnAODHybridTrackSelection()
virtual void SetCentralityBin(Int_t min, Int_t max)
AliAnaElectron * ConfigureElectronAnalysis()
AliEMCALRecoUtils * GetEMCALRecoUtils() const
void SetConeSize(Float_t r)
Bool_t kNonLinearity
Correct cluster non linearity.
void SetEMCALParametrizedMinTimeCut(Int_t i, Float_t par)
void SetPtFraction(Float_t pt)
void SetTimeCut(Double_t min, Double_t max)
Definition: AliAnaPi0EbE.h:142
void FillNPrimaryHistograms(Int_t n)
Definition: AliAnaPhoton.h:142
AliAnaInsideClusterInvariantMass * ConfigureInClusterIMAnalysis(Bool_t useSS=kTRUE, Bool_t useAsy=kFALSE)
void SwitchOffClusterELinearityCorrection()
void SetCTSPtMax(Float_t pt)
void SwitchOffSplitShowerShapeCut()
Definition: AliCaloPID.h:261
void SetClusterSplittingMinNCells(Int_t c)
Definition: AliCaloPID.h:267
void SetHistoPtRangeAndNBins(Float_t min, Float_t max, Int_t n)
Selected photon clusters invariant mass analysis.
Definition: AliAnaPi0.h:39
void SetDebug(Int_t d)
void SetMinChargedPt(Float_t pt)
AliAnaParticleHadronCorrelation * ConfigureHadronCorrelationAnalysis(TString particle, Bool_t bIsolated, Int_t partInCone=AliIsolationCut::kOnlyCharged, Int_t thresType=AliIsolationCut::kSumPtFracIC, Float_t cone=0.3, Float_t pth=0.3)
virtual void SetCalorimeter(TString &calo)
Set the calorimeter for the analysis. A string.
virtual void SetInputAODName(TString name)
virtual void SetTrackComplementaryCuts(AliESDtrackCuts *)
virtual AliIsolationCut * GetIsolationCut()
void SetEMCALEMin(Float_t en)
void SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3)
Definition: AliAnaPhoton.h:114
AliAnaPi0EbE * ConfigurePi0EbEAnalysis(TString particle, Int_t analysis, Bool_t useSS=kTRUE, Bool_t useAsy=kTRUE)
void SetInvMassCutRange(Double_t invmassmin, Double_t invmassmax)
void KeepNeutralMesonSelectionHistos(Bool_t keep)
void SwitchOnSelectedClusterHistoFill()
Definition: AliAnaPi0EbE.h:111
void SwitchOffTMHistoFill()
Definition: AliAnaPhoton.h:94
void SetSimpleEMCALFiducialCut(Float_t abseta, Float_t phimin, Float_t phimax)
Bool_t kSimulation
Declare the analysis simulation.
virtual void SetOutputAODClassName(TString name)
void SwitchOffFillShowerShapeHistograms()
Definition: AliAnaPhoton.h:74
virtual AliNeutralMesonSelection * GetNeutralMesonSelection()
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 SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3)
Definition: AliAnaPi0EbE.h:133
void SwitchOffMultipleCutAnalysis()
Definition: AliAnaPi0.h:111
Class for the Calorimeter QA analysis.
void SetHistodRRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetLocalMaximaCutEDiff(Float_t c)
Get trigger particles/partons/jets and correlations at generator level.
void SwitchOffSplitAsymmetryCut()
Definition: AliCaloPID.h:257
void SetAnalysisType(anaTypes ana)
Definition: AliAnaPi0EbE.h:92
void SwitchOffFillWeightHistograms()
void SetNumberOfCellsFromEMCALBorder(Int_t n)
void SwitchOffTMHistoFill()
Definition: AliAnaPi0EbE.h:109
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 SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3)
void SetPtFractions(Int_t i, Float_t pt)
2 calorimeter clusters invariant mass selection
Definition: AliAnaPi0EbE.h:86
Selection of electron clusters in calorimeter.
const TString calorimeter
Definition: anaM.C:36
Bool_t IsRecalibrationOn() const
void SetHistoTrackResidualEtaRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Class for event, clusters and tracks filtering and preparation for the AOD analysis.
Bool_t kTM
Remove matched clusters to tracks.
void SetCTSPtMin(Float_t pt)
TString kData
Declare data MC or deltaAOD.
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetPHOSRCut(Float_t rcut)
Definition: AliCaloPID.h:213
void SetEMCALDPhiCut(Float_t dcut)
Definition: AliCaloPID.h:221
virtual void SetOutputAODName(TString name)
void SwitchOffRecalculateClusterTrackMatching()
void SetEventTriggerMask(UInt_t evtTrig=AliVEvent::kAny)
void SetICMethod(Int_t i)
Bool_t kEventSelection
Remove bad events.
void SetEMCALParametrizedMaxTimeCut(Int_t i, Float_t par)
void SwitchOffVertexBCEventSelection()
void SetTriggerDetector(TString &det)
Set the detrimeter for the analysis.
Correlate trigger particles (photon, pi0, tracks) and charged tracks: Azimuthal correlations, xE distributions.
virtual void SetNTrackMultBin(Int_t n=1)
Number of bins in centrality.
Base class for CaloTrackCorr analysis algorithms.
void SwitchOffTrackMatchRejection()
Definition: AliAnaPhoton.h:132
TString kCalorimeter
Use main analysis detector EMCal or PHOS or CTS.
void SetDeltaPhiCutRange(Double_t phimin, Double_t phimax)
void SetUeDeltaPhiCutRange(Double_t uephimin, Double_t uephimax)
1 calorimeter cluster and 1 photon conversion pair invariant mass selection
Definition: AliAnaPi0EbE.h:88
void SetHistoPtInConeRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void SetDebug(Int_t d)
void SetHistoPOverERangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual AliFiducialCut * GetFiducialCut()
virtual AliFiducialCut * GetFiducialCut()
AliAnaChargedParticles * ConfigureChargedAnalysis()
virtual void SetCentralityOpt(Int_t opt)
void SetHistoPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Bool_t kHadronAN
Execute the hadron selection and correlation analysis.
int Int_t
Definition: External.C:63
void SetSideBandCutRanges(Double_t lmin, Double_t lmax, Double_t rmin, Double_t rmax)
virtual AliHistogramRanges * GetHistogramRanges()
unsigned int UInt_t
Definition: External.C:33
void SwitchOnSplitAsymmetryCut()
Definition: AliCaloPID.h:256
void SetHistoPtSumRangeAndNBins(Float_t min, Float_t max, Int_t n)
float Float_t
Definition: External.C:68
void SetTrackStatus(ULong_t bit)
void SetPi0MassShiftHighECell(Float_t s)
Definition: AliCaloPID.h:285
Bool_t IsBadChannelsRemovalSwitchedOn() const
AliCaloTrackReader * ConfigureReader()
Filter EMCal/PHOS clusters for photon analysis.
Definition: AliAnaPhoton.h:33
void SetHistoTrackResidualPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetConeSizes(Int_t i, Float_t r)
Bool_t kExotic
Remove exotic clusters.
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
TString kName
Name of the analysis, used in created AOD branches and histo container.
Class for filtering generated MC particles and prepare them as input for the analysis.
Fill histograms for cluster spectra dependence on pile-up.
void SetEtaCut(Float_t min, Float_t max)
void SetM02Cut(Float_t min=0, Float_t max=10)
void SwitchOnSplitClusterDistToBad()
Definition: AliAnaPi0EbE.h:160
Int_t kMinCen
Set the minimum centrality to be analyzed.
void SwitchOnRecalculateClusterTrackMatching()
void SwitchOnUnMatchedTriggerEventsRemoval()
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 SwitchOffTrackMatchRejection()
Definition: AliAnaPi0EbE.h:149
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 SetInputAODGammaConvName(TString name)
Definition: AliAnaPi0EbE.h:98
Bool_t kCalibE
Calibrate energy of clusters.
AliAnaClusterPileUp * ConfigureClusterPileUpAnalysis()
void SetHistoNClusterCellRangeAndNBins(Int_t min, Int_t max, Int_t n)
TString kCollisions
Declare the collision type of the data.
void SetEMCALClusterListName(TString &name)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Definition: AliAnaPi0.cxx:2604
Bool_t kTender
Declare that tender was executed.
void SetMinNeutralPt(Float_t pt)
Bool_t kQA
Execute the calorimeter QA analaysis.
Bool_t kBadMap
Reject bad cells/clusters.
anaTypes
Analysis types.
Definition: AliAnaPi0EbE.h:84
void SetParticle(TString particleName)
Set some default parameters for selection of pi0 or eta.
TString kTrig
Set the trigger type to analyze in data.
Bool_t kMix
Do mixing analysis.
void FillAODWithElectrons()
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void ConfigureMC(AliAnaCaloTrackCorrBaseClass *ana)
void SetHistoYRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetTimeCut(Double_t min, Double_t max)
Definition: AliAnaPhoton.h:117
AliAnaGeneratorKine * ConfigureGenKineAnalysis()
AliAnaCalorimeterQA * ConfigureQAAnalysis()
virtual void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Class for study of EMCAL trigger behaviour.
virtual void SetZvertexCut(Float_t zcut=10.)
AliFiducialCut * GetFiducialCutForTrigger()
void SetEtaMassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:305
void SetNumberOfSuperModulesUsed(Int_t nSM)
TString kInputDataType
Declare data ESD/AOD.
void SwitchOnTMHistoFill()
Definition: AliAnaPi0EbE.h:108
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetPi0MassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:304
Class containing more common histogram axis types.
void SetEMCALLambda0CutMax(Float_t lcut)
Definition: AliCaloPID.h:202
void SwitchOnTrackMatchRejection()
Definition: AliAnaPi0EbE.h:148
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.
virtual void SetEventPlaneMethod(TString m)
void SetNAsymCuts(Int_t s)
Definition: AliAnaPi0.h:117
void SetPHOSEMin(Float_t en)
virtual void SetNRPBin(Int_t n=1)
Number of bins for vertex position.
void SetPHOSDispersionCut(Float_t dcut)
Definition: AliCaloPID.h:208
void SetHistoNClustersRangeAndNBins(Int_t min, Int_t max, Int_t n)
void ConfigureEMCALRecoUtils(AliEMCALRecoUtils *reco, Bool_t bMC=kFALSE, Bool_t bExotic=kTRUE, Bool_t bNonLin=kFALSE, Bool_t bRecalE=kTRUE, Bool_t bBad=kTRUE, Bool_t bRecalT=kTRUE, Int_t debug=-1)
virtual void SetTrackCuts(AliESDtrackCuts *)
void SetNLMCut(Int_t min, Int_t max)
Definition: AliAnaPi0EbE.h:100
Track selection for correlation analysis.
void SetM02(Float_t min, Float_t max)
virtual void SetCentralityClass(TString name)
Select clusters/tracks with low particle environment in their vecinity, isolated within a cone...
void SwitchOnBadTriggerEventsRemoval()
void SetHistoEtaRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOffFillWeightHistograms()
Definition: AliAnaPi0EbE.h:152
void SwitchOffFillShowerShapeHistograms()
void SetTrackTimeCut(Double_t a, Double_t b)
void SetEMCALTimeCut(Double_t a, Double_t b)
AliAnaPhoton * ConfigurePhotonAnalysis()
Gerenate a random trigger.
void SetTriggerDetector(TString &det)
Set the calorimeter for the analysis.
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetHistoAsymmetryRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoV0MultiplicityRangeAndNBins(Int_t min, Int_t max, Int_t n)
virtual void SetAODObjArrayName(TString name)
Main class conecting the CaloTrackCorrelations package and Analysis Frame.
AliAnaPi0 * ConfigurePi0Analysis()
void SwitchOffLoadOwnPHOSGeometryMatrices()
void SetHistoRangeAndNBins(AliHistogramRanges *histoRanges)
void SetHistoZRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoV0SignalRangeAndNBins(Int_t min, Int_t max, Int_t n)
virtual void Print(const Option_t *) const
Print some relevant parameters set for the analysis.
Class that contains methods to select candidate cluster pairs to neutral meson.
void SetHistoTimeRangeAndNBins(Float_t min, Float_t max, Int_t n)
UInt_t SetTriggerMaskFromName()
AliAnalysisTaskCaloTrackCorrelation * AddTaskCaloTrackCorr(const TString data="", const TString calorimeter="EMCAL", const Bool_t simulation=kFALSE, const Bool_t eventsel=kFALSE, const Bool_t exotic=kTRUE, const Bool_t nonlin=kFALSE, TString outputfile="", const Int_t year=2010, const TString col="pp", const TString trigger="MB", const TString clustersArray="V1", const Bool_t mix=kTRUE, const Bool_t recaltm=kTRUE, const Bool_t tm=kTRUE, const Int_t minCen=-1, const Int_t maxCen=-1, const Bool_t qaan=kFALSE, const Bool_t hadronan=kFALSE, const Bool_t calibE=kTRUE, const Bool_t badmap=kTRUE, const Bool_t calibT=kTRUE, const Bool_t tender=kFALSE, const Bool_t outputAOD=kFALSE, const Bool_t printSettings=kFALSE, const Double_t scaleFactor=-1, const Int_t runNumber=-1)
void SetHistoFinePtRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetEMCALEMax(Float_t en)
Int_t kMaxCen
Set the maximum centrality to be analyzed.
void SetEventTriggerL0Threshold(Float_t tr)
Int_t kDebug
Do the analysis with this debug level.
void SwitchOffSMCombinations()
Definition: AliAnaPi0.h:91
void SetNAssocPtBins(Int_t n)
Set number of associated charged (neutral) hadrons pT bins.
AliCalorimeterUtils * ConfigureCaloUtils()
Class for PID selection with calorimeters.
Definition: AliCaloPID.h:53
1 calorimeter cluster shower shape and split invariatn mass selection
Definition: AliAnaPi0EbE.h:87
void FillNOriginHistograms(Int_t n)
Definition: AliAnaPhoton.h:140
virtual void SetNMaxEvMix(Int_t n=20)
Number of bins in track multiplicity.
void SetNCellCut(Int_t n)
void SetNLMMinEnergy(Int_t i, Float_t min)
Definition: AliAnaPi0EbE.h:138
void SetHistoShowerShapeRangeAndNBins(Float_t min, Float_t max, Int_t n)
AliAnaEMCALTriggerClusters * ConfigureEMCALTriggerClusterAnalysis()
bool Bool_t
Definition: External.C:53
void SetPHOSEMax(Float_t en)
Int_t kRunNumber
Declare the run number.
AliAnaRandomTrigger * ConfigureRandomTriggerAnalysis(TString detector="")
void SetHistodEdxRangeAndNBins(Float_t min, Float_t max, Int_t n)
Class with utils specific to calorimeter clusters/cells.
Select clusters with large shower shape, split them and tag them as pi0/eta via invariant mass...
void SetMixEventTriggerMask(UInt_t evtTrig=AliVEvent::kAnyINT)
void SetHistoHBPRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetEMCALLambda0CutMin(Float_t lcut)
Definition: AliCaloPID.h:205
void SetHistoRRangeAndNBins(Float_t min, Float_t max, Int_t n)
Bool_t kRecalTM
Recalculate track-cluster matching.
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetParticleTypeInCone(Int_t i)
void SetHistoVertexDistRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoDiffTimeRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetEMCALDEtaCut(Float_t dcut)
Definition: AliCaloPID.h:218
void SetPhotonMassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:306
void SwitchOffUseParametrizedTimeCut()
void SetLocalMaximaCutE(Float_t cut)
void SetPtThresholds(Int_t i, Float_t pt)
void SetdEdxCut(Double_t min, Double_t max)
Int_t kYears
Declare the year of the data.
void SetHistoRatioRangeAndNBins(Float_t min, Float_t max, Int_t n)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetNLMCut(Int_t min, Int_t max)
Definition: AliAnaPhoton.h:125
void SetAssocPtBinLimit(Int_t ibin, Float_t pt)
Set the list of pT limits for the of associated charged (neutral) hadrons.
Steering class of package CaloTrackCorrelartions.
void SetTriggerPtRange(Float_t min, Float_t max)