AliPhysics  ff07904 (ff07904)
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 
264 {
265  AliCaloTrackReader * reader = 0;
266  if (kInputDataType == "ESD"&& kData=="MC" )
267  reader = new AliCaloTrackMCReader();
268  else if(kInputDataType=="AOD" || kData.Contains("AOD"))
269  reader = new AliCaloTrackAODReader();
270  else if(kInputDataType=="ESD")
271  reader = new AliCaloTrackESDReader();
272  else
273  printf("AliCaloTrackReader::ConfigureReader() - Data combination not known kData=%s, kInputDataType=%s\n",kData.Data(),kInputDataType.Data());
274 
275  reader->SetDebug(kDebug);//10 for lots of messages
276 
277  /*
278  if(kSimulation)
279  {
280  // Event rejection cuts for jet-jet simulations
281  reader->SetPtHardAndJetPtComparison(kTRUE);
282  reader->SetPtHardAndJetPtFactor(4);
283 
284  reader->SetPtHardAndClusterPtComparison(kTRUE);
285  reader->SetPtHardAndClusterPtFactor(1.5);
286  }
287  */
288 
289  //Delta AOD?
290  //reader->SetDeltaAODFileName("");
291  if(kOutputAOD) reader->SwitchOnWriteDeltaAOD() ;
292 
293  //------------------------
294  // Detector input filling
295  //------------------------
296 
297  //Min cluster/track E
298  reader->SetEMCALEMin(0.3);
299  reader->SetEMCALEMax(1000);
300  reader->SetPHOSEMin(0.3);
301  reader->SetPHOSEMax(1000);
302  reader->SetCTSPtMin(0.2);
303  reader->SetCTSPtMax(1000);
304 
305  // Time cuts
306  if(kSimulation)
307  {
308  reader->SwitchOffUseTrackTimeCut();
310  reader->SwitchOffUseEMCALTimeCut();
311  reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
312  }
313  else
314  {
315  if(kCalibT)
316  {
317  printf("Set time cut parameters for run %d\n",kRunNumber);
318  reader->SwitchOnUseEMCALTimeCut();
320 
321  //Absolute window
322  reader->SetEMCALTimeCut(-25,20);
323 
324  //Parametrization
325  if (kRunNumber >= 151636 && kRunNumber <= 155384 )
326  {
327  printf("Set time parameters for LHC11c");
330  }
331  else if(kRunNumber >= 156447 && kRunNumber <= 159635 )
332  {
333  printf("Set time parameters for LHC11d");
336  }
337  else
338  {
340  }
341  }
342  else
343  {
345  reader->SwitchOffUseEMCALTimeCut();
346  reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
347  }
348  }
349 
350  reader->SwitchOnFiducialCut();
351  reader->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ;
352 
353  // Tracks
354  reader->SwitchOnCTS();
356 
359 
360  reader->SwitchOffUseTrackTimeCut();
361  reader->SetTrackTimeCut(0,50);
362 
363  reader->SwitchOffUseTrackDCACut();
364  //reader->SetTrackDCACut(0,0.0105);
365  //reader->SetTrackDCACut(1,0.035);
366  //reader->SetTrackDCACut(2,1.1);
367 
368  if(kInputDataType=="ESD")
369  {
370  gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/macros/CreateTrackCutsPWGJE.C");
371  //AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10041004);
372  //reader->SetTrackCuts(esdTrackCuts);
373  //reader->SwitchOnConstrainTrackToVertex();
374 
375  if(kYears>2010)
376  {
377  //Hybrids 2011
378  AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001008);
379  reader->SetTrackCuts(esdTrackCuts);
380  AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10011008);
381  reader->SetTrackComplementaryCuts(esdTrackCuts2);
382  }
383  else
384  {
385  //Hybrids 2010
386  AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001006);
387  reader->SetTrackCuts(esdTrackCuts);
388  AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10041006);
389  reader->SetTrackComplementaryCuts(esdTrackCuts2);
390  }
391  }
392  else if(kInputDataType=="AOD")
393  {
394  //reader->SetTrackFilterMask(128); // Filter bit, not mask, use if off hybrid
395  reader->SwitchOnAODHybridTrackSelection(); // Check that the AODs have Hybrids!!!!
396  reader->SetTrackStatus(AliVTrack::kITSrefit);
397  //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
398  }
399 
400  // Calorimeter
401 
402  reader->SetEMCALClusterListName(kClusterArray);
403  if(kClusterArray == "" && !kTender)
404  {
405  printf("**************** Standard EMCAL clusters branch analysis **************** \n");
407  // Check in ConfigureCaloUtils that the recalibration and bad map are ON
408  }
409  else
410  {
411  printf("**************** Input for analysis is Clusterizer %s **************** \n", kClusterArray.Data());
413  }
414 
416 
417  //if(kCalorimeter == "EMCAL") {
418  reader->SwitchOnEMCALCells();
419  reader->SwitchOnEMCAL();
420  //}
421  //if(kCalorimeter == "PHOS") {
422  reader->SwitchOnPHOSCells();
423  reader->SwitchOnPHOS();
424  //}
425 
426  // for case data="deltaAOD", no need to fill the EMCAL/PHOS cluster lists
427  if(kData.Contains("delta"))
428  {
429  reader->SwitchOffEMCAL();
430  reader->SwitchOffPHOS();
431  reader->SwitchOffEMCALCells();
432  reader->SwitchOffPHOSCells();
433  }
434 
435  //-----------------
436  // Event selection
437  //-----------------
438 
439  //reader->RejectFastClusterEvents() ;
440 
441  // Event triggered selection settings
443  reader->SwitchOnBadTriggerEventsRemoval(); // only if SwitchOnTriggerPatchMatching();
444  reader->SwitchOnUnMatchedTriggerEventsRemoval(); // only if SwitchOnBadTriggerEventsRemoval();
445  //reader->SwitchOffTriggerClusterTimeRecal() ;
446 
447  reader->SetTriggerPatchTimeWindow(8,9); // L0
448  if (kRunNumber < 146861) reader->SetEventTriggerL0Threshold(3.);
449  else if(kRunNumber < 154000) reader->SetEventTriggerL0Threshold(4.);
450  else if(kRunNumber < 165000) reader->SetEventTriggerL0Threshold(5.5);
451 
452  //redefine for other periods, triggers
453 
454  //if(!kUseKinematics) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma
455 
456  // For mixing with AliAnaParticleHadronCorrelation switch it off
457  if(kMix)
458  {
459  reader->SwitchOffEventTriggerAtSE();
461  reader->SetEventTriggerMask(mask); // Only for mixing and SwitchOffEventTriggerAtSE();
462  //reader->SetMixEventTriggerMask(AliVEvent::kMB); // Careful, not all productions work with kMB, try kINT7, kINT1, kAnyINT
463  reader->SetMixEventTriggerMask(AliVEvent::kAnyINT); // Careful, not all productions work with kMB, try kINT7, kINT1, kAnyINT
464 
465  printf("---Trigger selection done in AliCaloTrackReader!!!\n");
466  }
467  else
468  reader->SwitchOnEventTriggerAtSE();
469 
470  reader->SetZvertexCut(10.); // Open cut
471  reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
472 
473  if(kEventSelection)
474  {
475  reader->SwitchOnPileUpEventRejection(); // remove pileup by default
476  reader->SwitchOnV0ANDSelection() ; // and besides v0 AND
477  }
478  else
479  {
480  reader->SwitchOffPileUpEventRejection();// remove pileup by default
481  reader->SwitchOffV0ANDSelection() ; // and besides v0 AND
482  }
483 
484  if(kCollisions=="PbPb")
485  {
486  // Centrality
487  reader->SetCentralityClass("V0M");
488  reader->SetCentralityOpt(100); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
489  reader->SetCentralityBin(kMinCen,kMaxCen); // Accept all events, if not select range
490 
491  // Event plane (only used in Maker and mixing for AliAnaPi0/AliAnaHadronCorrelation for the moment)
492  reader->SetEventPlaneMethod("V0");
493  }
494 
495  if(kPrintAnaInfo) reader->Print("");
496 
497  return reader;
498 }
499 
504 {
505 
507  cu->SetDebug(kDebug);
508 
509  // Remove clusters close to borders, at least max energy cell is 1 cell away
512 
513  // Search of local maxima in cluster
514  if(kCollisions=="pp")
515  {
516  cu->SetLocalMaximaCutE(0.1);
517  cu->SetLocalMaximaCutEDiff(0.03);
518  if(kName.Contains("150"))
519  {
520  printf("Reclusterize with 150 threshold, set PbPb settings\n");
521  cu->SetLocalMaximaCutE(0.2);
522  cu->SetLocalMaximaCutEDiff(0.03);
523  }
524  }
525  else
526  {
527  cu->SetLocalMaximaCutE(0.2);
528  cu->SetLocalMaximaCutEDiff(0.03);
529  }
530 
531  cu->SwitchOffClusterPlot();
532 
533  if(kRecalTM) cu->SwitchOnRecalculateClusterTrackMatching(); // Done in clusterization
535 
537 
538  //EMCAL settings
539 
540  if(!kSimulation)
542 
543  AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
544 
545  if(!kSimulation)
546  {
547  cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
548  if(kClusterArray == "" && !kTender) cu->SwitchOnRunDepCorrection();
549  }
550 
551  gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/EMCAL/macros/ConfigureEMCALRecoUtils.C");
553  kSimulation,
554  kExotic,
555  kTRUE,//kNonLinearity,
556  kCalibE,
557  kBadMap,
558  kCalibT);
559  //recou->SetExoticCellDiffTimeCut(50.);
560 
561 
562  if( kNonLinearity )
563  {
564  printf("ConfigureCaloUtils() - Apply non linearity to EMCAL\n");
566  }
567 
568  printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
569  printf("ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
570 
571 
572  if(kCalorimeter=="PHOS")
573  {
574  if (kYears < 2014) cu->SetNumberOfSuperModulesUsed(3);
575  else cu->SetNumberOfSuperModulesUsed(4);
576  }
577  else
578  {
579  if (kYears == 2010) cu->SetNumberOfSuperModulesUsed(4); //EMCAL first year
580  else if (kYears < 2014) cu->SetNumberOfSuperModulesUsed(10);
581  else cu->SetNumberOfSuperModulesUsed(20);
582  }
583 
584  // PHOS
586 
587  if(kPrintAnaInfo) cu->Print("");
588 
589  return cu;
590 }
591 
597 {
598  AliAnaPhoton *ana = new AliAnaPhoton();
599  ana->SetDebug(kDebug); //10 for lots of messages
600 
601  // cluster selection cuts
602 
603  ana->SwitchOffFiducialCut();
604 
605  ana->SetCalorimeter(kCalorimeter);
606 
607  if(kCalorimeter == "PHOS")
608  {
609  ana->SetNCellCut(2);// At least 3 cells
610  ana->SetMinPt(0.3);
611  ana->SetMinDistanceToBadChannel(2, 4, 5);
612  ana->SetTimeCut(-1e10,1e10); // open cut
613  }
614  else
615  {//EMCAL
616  ana->SetNCellCut(1);// At least 2 cells
617  ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
618  ana->SetMaxEnergy(1000);
619  ana->SetTimeCut(-1e10,1e10); // open cut, usual time window of [425-825] ns if time recalibration is off
620  // restrict to less than 100 ns when time calibration is on
621  ana->SetMinDistanceToBadChannel(2, 4, 6);
622 
623  // NLM cut, used in all, exclude clusters with more than 2 maxima
624  // Not needed if M02 cut is already strong or clusterizer V2
625  ana->SetNLMCut(1, 2) ;
626  }
627 
628  if(kTM)
629  {
631  ana->SwitchOffTMHistoFill() ;
632  }
633  else
634  {
636  ana->SwitchOnTMHistoFill() ;
637  }
638 
639  //PID cuts (shower shape)
640  ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
641  AliCaloPID* caloPID = ana->GetCaloPID();
642  //Not used in bayesian
643 
644  //EMCAL
645  caloPID->SetEMCALLambda0CutMax(0.27);
646  caloPID->SetEMCALLambda0CutMin(0.10);
647 
648  caloPID->SetEMCALDEtaCut(0.025);
649  caloPID->SetEMCALDPhiCut(0.030);
650 
651  //PHOS
652  caloPID->SetPHOSDispersionCut(2.5);
653  caloPID->SetPHOSRCut(2.);
654  if(kInputDataType=="AOD") caloPID->SetPHOSRCut(2000.); // Open cut since dX, dZ not stored
655 
656  ana->SwitchOffFillShowerShapeHistograms(); // Filled before photon shower shape selection
658  //if(!kSimulation) ana->SwitchOnFillEMCALBCHistograms();
659 
660  // Input / output delta AOD settings
661 
662  if(!kData.Contains("delta"))
663  {
664  ana->SetOutputAODName(Form("Photon%s",kName.Data()));
665  ana->SetOutputAODClassName("AliCaloTrackParticleCorrelation");
666  //ana->SetOutputAODClassName("AliCaloTrackParticle"); // use if no correlation done
667  }
668  else ana->SetInputAODName(Form("Photon%s",kName.Data()));
669 
670  //Set Histograms name tag, bins and ranges
671 
672  ana->AddToHistogramsName(Form("AnaPhoton_TM%d_",kTM));
673  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
674 
675  // Number of particle type MC histograms
676  ana->FillNOriginHistograms(20);
677  ana->FillNPrimaryHistograms(20);
678 
679  ana->SwitchOnRealCaloAcceptance(); // primary particle acceptance histograms
680  ConfigureMC(ana);
681 
682  if(kPrintAnaInfo) ana->Print("");
683 
684  return ana;
685 }
686 
693 {
695  ana->SetDebug(kDebug); //10 for lots of messages
696 
697  // cluster selection cuts
698 
699  ana->SwitchOffFiducialCut();
700  ana->SetNCellCut(1);// At least 2 cells
701  ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
702  ana->SetMaxEnergy(1000);
703  ana->SetM02(1, 2) ;
705 
706  ana->AddToHistogramsName("EMCTriggerClusters_");
707  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
708 
709  if(kPrintAnaInfo) ana->Print("");
710 
711  return ana;
712 }
713 
720 {
722  ana->SetDebug(kDebug); //10 for lots of messages
723 
724  // cluster selection cuts
725 
726  ana->SwitchOffFiducialCut();
727  ana->SetNCellCut(1);// At least 2 cells
728  ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
729  ana->SetMaxEnergy(1000);
730 
731  ana->AddToHistogramsName("ClusterPileUp_");
732  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
733 
734  if(kPrintAnaInfo) ana->Print("");
735 
736  return ana;
737 }
738 
744 {
746  ana->SetDebug(kDebug); //10 for lots of messages
747 
748  ana->FillAODWithElectrons();
749  //ana->FillAODWithHadrons();
750  //ana->FillAODWithAny();
751 
752  if(kCalorimeter == "PHOS")
753  {
754  ana->SetNCellCut(2);// At least 2 cells
755  ana->SetMinPt(0.3);
756  ana->SetMinDistanceToBadChannel(2, 4, 5);
757  }
758  else
759  {//EMCAL
760  ana->SetNCellCut(1);// At least 2 cells
761  ana->SetMinPt(0.5); // no effect minium EMCAL cut.
762  ana->SetMaxPt(100);
763  //ana->SetTimeCut(400,900);// Time window of [400-900] ns
764  ana->SetMinDistanceToBadChannel(2, 4, 6);
765  }
766 
767  //Electron selection cuts with tracks
768  ana->SetEOverP(0.85, 1.2);
769 
770  // TO DO, find a more suitable way to set this
771  if (kRunNumber < 146861) ana->SetdEdxCut(72, 90);
772  else if(kRunNumber < 154000) ana->SetdEdxCut(54, 70);
773  else ana->SetdEdxCut(74, 90);
774 
775  if(kSimulation) ana->SetdEdxCut(80, 100);
776 
777  ana->SetCalorimeter(kCalorimeter);
778 
779  ana->SwitchOnCaloPID();
780 
781  AliCaloPID* caloPID = ana->GetCaloPID();
782 
783  caloPID->SetEMCALLambda0CutMax(0.27);
784  caloPID->SetEMCALLambda0CutMin(0.10);
785 
788  ana->SwitchOffFiducialCut();
789 
790  if(!kData.Contains("delta"))
791  {
792  ana->SetOutputAODName(Form("Electron%s",kName.Data()));
793  ana->SetOutputAODClassName("AliCaloTrackParticleCorrelation");
794  }
795  else ana->SetInputAODName(Form("Electron%s",kName.Data()));
796 
797  //Set Histograms name tag, bins and ranges
798 
799  ana->AddToHistogramsName(Form("AnaElectron_TM%d_",kTM));
800  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
801 
802  ConfigureMC(ana);
803 
804  if(kPrintAnaInfo) ana->Print("");
805 
806  return ana ;
807 }
808 
813 {
815  ana->SetDebug(kDebug); //10 for lots of messages
816 
817  if(detector=="") detector = kCalorimeter;
818  ana->SetTriggerDetector(detector);
819 
820  // selection cuts
821  ana->SetMinPt(4.);
822  ana->SetMaxPt(51.);
823 
824  if (detector=="EMCAL")
825  {
826  ana->SetEtaCut(-0.71,0.71);
827  ana->SetPhiCut(100*TMath::DegToRad(), 160*TMath::DegToRad());
828  }
829  else if(detector=="PHOS")
830  {
831  ana->SetEtaCut(-0.13,0.13);
832  ana->SetPhiCut(260*TMath::DegToRad(), 320*TMath::DegToRad());
833  }
834  else if(detector=="CTS")
835  {
836  ana->SetEtaCut(-0.9,0.9);
837  ana->SetPhiCut(0, TMath::TwoPi());
838  }
839 
840  // AOD branch
841  if(!kData.Contains("delta"))
842  {
843  ana->SetOutputAODName(Form("RandomTrigger%s%s",detector.Data(),kName.Data()));
844  ana->SetOutputAODClassName("AliCaloTrackParticleCorrelation");
845  }
846  else
847  ana->SetInputAODName(Form("RandomTrigger%s%s",detector.Data(),kName.Data()));
848 
849  printf("Set RandomTrigger%s%s\n",detector.Data(),kName.Data());
850 
851  //Set Histograms name tag, bins and ranges
852 
853  ana->AddToHistogramsName(Form("AnaRandomTrigger%s_",detector.Data()));
854 
855  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
856 
857  if(detector=="CTS")
858  {
859  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
860  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
861  }
862 
863  if(kPrintAnaInfo) ana->Print("");
864 
865  return ana;
866 }
867 
872 {
874  ana->SetDebug(kDebug); //10 for lots of messages
875 
876  // selection cuts
877 
878  ana->SetMinEnergy(6);
879  ana->SetMaxEnergy(200.);
880  ana->SetMinNCells(6); // check same as in calopid
881 
882  ana->SetCalorimeter(kCalorimeter);
884 
886  ana->SetNWeightForShowerShape(0);
887  //ana->SetWeightForShowerShape(0, 4.6);
888 
891  if(!useSS && !useAsy) ana->SwitchOnFillEbinHistograms();
892 
893  if(!kTM)
894  {
897  }
898  else
899  {
902  }
903 
904  //printf("Set correction slope for SS weight \n");
905  //ana->SetWCorrectionParameter(0.07);
906  //ana->SetNECellCutForShowerShape(0);
907  //ana->SetECellCutForShowerShape(0, 0.07);
908  //ana->SetECellCutForShowerShape(1, 0.1);
909  //ana->SetECellCutForShowerShape(2, 0.2);
910 
911  if(kSimulation)
912  {
914  ana->SwitchOffFillMCOverlapHistograms() ; // Off when possible
915  if(!useSS && !useAsy) ana->SwitchOnFillMCOverlapHistograms() ;
916  }
917 
918  AliCaloPID* caloPID = ana->GetCaloPID();
919  caloPID->SetEMCALDEtaCut(0.025);
920  caloPID->SetEMCALDPhiCut(0.030);
921  caloPID->SetClusterSplittingM02Cut(0,100000); // use parametrized cut, not fixed
922 
923  caloPID->SetPi0MassRange(0.11, 0.18);
924  caloPID->SetEtaMassRange(0.40, 0.60);
925  caloPID->SetPhotonMassRange(0.00, 0.08);
926 
927  caloPID->SetSplitWidthSigma(3.); // cut at 3 sigma of the mean pi0 peak.
928 
929  caloPID->SetClusterSplittingMinNCells(6);
930 
931  if(kCollisions=="PbPb" || kName.Contains("150"))
932  {
933  caloPID->SetClusterSplittingMinNCells(4);
934  ana->SetMinNCells(4);
935  caloPID->SetPi0MassShiftHighECell(0.005);
936  if(kCollisions=="PbPb") ana->SwitchOnFillHighMultHistograms();
937  }
938 
939  ana->AddToHistogramsName("AnaInClusterIM_");
940 
941  if(useAsy)
942  {
943  caloPID->SwitchOnSplitAsymmetryCut() ;
944  }
945  else
946  {
947  printf("InClusterIM: Do not apply Asy cut on merged pi0 in cluster analysis \n");
948  caloPID->SwitchOffSplitAsymmetryCut() ;
949  ana->AddToHistogramsName("AnaInClusterIM_OpenAsy_");
950  }
951 
952  if(!useSS)
953  {
954  printf("InClusterIM: Do not apply SS cut on merged pi0 in cluster analysis \n");
955  caloPID->SwitchOffSplitShowerShapeCut() ;
956  ana->AddToHistogramsName("AnaInClusterIM_OpenSS_");
957  }
958  else caloPID->SwitchOnSplitShowerShapeCut() ;
959 
960  if(!useAsy && !useSS)
961  {
962  printf("InClusterIM: Do not apply SS and Asy cut on merged pi0 in cluster analysis \n");
963  ana->AddToHistogramsName("AnaInClusterIM_OpenSS_OpenAsy_");
964  }
965 
966  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
967 
968  ConfigureMC(ana);
969 
970  if(kPrintAnaInfo) ana->Print("");
971 
972  return ana;
973 }
974 
979 {
980 
982  ana->SetDebug(kDebug); //10 for lots of messages
983 
984  // selection cuts
985 
986  ana->SetMinPt(0.5);
987  ana->SwitchOnFiducialCut();
988  ana->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ; //more restrictive cut in reader and after in isolation
989 
992 
993  // Input / output delta AOD settings
994 
995  if(!kData.Contains("delta"))
996  {
997  ana->SetOutputAODName(Form("Hadron%s",kName.Data()));
998  ana->SetOutputAODClassName("AliCaloTrackParticleCorrelation");
999  //ana->SetOutputAODClassName("AliCaloTrackParticle"); // use if no correlation done
1000  }
1001  else
1002  ana->SetInputAODName(Form("Hadron%s",kName.Data()));
1003  printf("Set Hadron%s\n",kName.Data());
1004 
1005  //Set Histograms name tag, bins and ranges
1006 
1007  ana->AddToHistogramsName("AnaHadrons_");
1008  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1009 
1010  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
1011  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
1012 
1013  ConfigureMC(ana);
1014 
1015  if(kPrintAnaInfo) ana->Print("");
1016 
1017  return ana;
1018 }
1019 
1024 {
1025  AliAnaPi0 *ana = new AliAnaPi0();
1026 
1027  ana->SetDebug(kDebug);//10 for lots of messages
1028 
1029  // Input delta AOD settings
1030  ana->SetInputAODName(Form("Photon%s",kName.Data()));
1031 
1032  // Calorimeter settings
1033  ana->SetCalorimeter(kCalorimeter);
1034 
1035  // Acceptance plots
1036  // ana->SwitchOnFiducialCut(); // Needed to fill acceptance plots with predefined calorimeter acceptances
1037  // ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.7, 100, 180) ;
1038  // ana->GetFiducialCut()->DoEMCALFiducialCut(kTRUE);
1039 
1040  ana->SwitchOffFiducialCut();
1042 
1043  // settings for pp collision mixing
1044  ana->SwitchOnOwnMix(); //Off when mixing done with general mixing frame
1045 
1046  // Cuts
1047  if(kCalorimeter=="EMCAL") ana->SetPairTimeCut(40);
1048 
1049  ana->SetNAsymCuts(1); // no asymmetry cut, previous studies showed small effect.
1050  // In EMCAL assymetry cut prevents combination of assymetric decays which is the main source of pi0 at high E.
1051 
1052  if (kCollisions=="pp" )
1053  {
1054  ana->SetNCentrBin(1);
1055  ana->SetNZvertBin(10);
1056  ana->SetNRPBin(1);
1057  ana->SetNMaxEvMix(100);
1058  }
1059  else if(kCollisions=="PbPb")
1060  {
1061  ana->SetNCentrBin(5);
1062  ana->SetNZvertBin(3);
1063  ana->SetNRPBin(1);
1064  ana->SetNMaxEvMix(5);
1065  }
1066 
1067  ana->SwitchOffSMCombinations();
1069 
1070  // Set Histograms name tag, bins and ranges
1071 
1072  ana->AddToHistogramsName(Form("AnaPi0_TM%d_",kTM));
1073  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1074 
1075  ConfigureMC(ana);
1076 
1077  if(kPrintAnaInfo) ana->Print("");
1078 
1079  return ana;
1080 }
1081 
1088  Int_t analysis, Bool_t useSS = kTRUE, Bool_t useAsy = kTRUE)
1089 {
1090  AliAnaPi0EbE *ana = new AliAnaPi0EbE();
1091  ana->SetDebug(kDebug);//10 for lots of messages
1092 
1093  ana->SetAnalysisType( (AliAnaPi0EbE::anaTypes) analysis );
1094  TString opt = "";
1095  if(analysis == AliAnaPi0EbE::kIMCaloTracks) opt = "Conv";
1096  if(analysis == AliAnaPi0EbE::kSSCalo) opt = "SS";
1097 
1098  if(analysis == AliAnaPi0EbE::kIMCalo && kCalorimeter=="EMCAL" && !kSimulation) ana->SetPairTimeCut(100);
1099  if(analysis == AliAnaPi0EbE::kIMCaloTracks) ana->SetInputAODGammaConvName("PhotonsCTS");
1100 
1101  // Common settings for all 3 type of analysis
1102 
1104 
1105  ana->SetCalorimeter(kCalorimeter);
1106 
1107  //Set Histograms name tag, bins and ranges
1108  ana->AddToHistogramsName(Form("Ana%s%sEbE_TM%d_",particle.Data(),opt.Data(),kTM));
1109 
1110  // Specific settings for different type of analysis
1111 
1114 
1115  if(kTM)
1116  {
1117  //printf("--->>>REMOVE MATCHED Pi0\n");
1119  ana->SwitchOffTMHistoFill() ;
1120  }
1121  else
1122  {
1123  //printf("---->>>ACCEPT MATCHED Pi0\n");
1125  ana->SwitchOnTMHistoFill() ;
1126  }
1127 
1128  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1129 
1130  //ana->SwitchOnFillEMCALBCHistograms();
1131 
1132  if(kPrintAnaInfo) ana->Print("");
1133 
1134  ConfigureMC(ana);
1135 
1136  if(!kInputDataType.Contains("delta"))
1137  {
1138  ana->SetOutputAODName(Form("%s%s%s",particle.Data(), opt.Data(), kName.Data()));
1139  ana->SetOutputAODClassName("AliCaloTrackParticleCorrelation");
1140 
1141  }
1142  else
1143  ana->SetInputAODName(Form("%s%s%s",particle.Data(),opt.Data(),kName.Data()));
1144 
1145  if(analysis!=AliAnaPi0EbE::kSSCalo)
1146  {
1147  // Input / output delta AOD settings
1148 
1149  ana->SetInputAODName(Form("Photon%s",kName.Data()));
1150 
1152  nms->SetParticle(particle);
1153 
1154  // Tighten a bit mass cut with respect to default window
1155  if(particle=="Pi0") nms->SetInvMassCutRange(0.120,0.150);
1156  if(particle=="Eta") nms->SetInvMassCutRange(0.520,0.580);
1157 
1158  //if(!particle.Contains("SideBand")) nms->SwitchOnAngleSelection();
1159  //else nms->SwitchOnAngleSelection();
1160 
1161  nms->SwitchOffAngleSelection();
1162  if(particle.Contains("Pi0SideBand")) // For pi0, do not consider left band
1163  nms->SetSideBandCutRanges(-1,0,0.180,0.220);
1164 
1165  nms->KeepNeutralMesonSelectionHistos(kTRUE);
1166  //nms->SetAngleMaxParam(2,0.2);
1167  nms->SetHistoERangeAndNBins(0, 20, 80) ;
1168  //nms->SetHistoIMRangeAndNBins(0, 1, 400);
1169  }
1170  else
1171  { // cluster splitting settings
1172  ana->SetMinEnergy(6);
1173  ana->SetMaxEnergy(200.);
1174 
1175  ana->SetNLMMinEnergy(0, 10);
1176  ana->SetNLMMinEnergy(1, 6);
1177  ana->SetNLMMinEnergy(2, 6);
1178 
1179  ana->SetMinDistanceToBadChannel(2, 4, 6); // only use the first one
1181 
1182  ana->SetTimeCut(-1e10,1e10); // Open time cut
1183 
1184  // NLM cut, used in all, exclude clusters with more than 2 maxima
1185  ana->SetNLMCut(1, 2) ;
1186 
1187  AliCaloPID* caloPID = ana->GetCaloPID();
1188 
1189  caloPID->SetSplitWidthSigma(3.); // cut at 3 sigma of the mean pi0 peak.
1190 
1191  if(!useSS)
1192  {
1193  printf("Do not apply SS cut on merged pi0 analysis \n");
1194  caloPID->SwitchOffSplitShowerShapeCut() ;
1195  ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenSS_TM%d_",particle.Data(),opt.Data(),kTM));
1196  ana->SetOutputAODName(Form("%s%s%s_OpenSS",particle.Data(), opt.Data(), kName.Data()));
1197  caloPID->SetClusterSplittingM02Cut(0.1,10000);
1198  }
1199  else
1200  {
1201  caloPID->SetClusterSplittingM02Cut(0.3,5); // Do the selection in the analysis class and not in the PID method to fill SS histograms
1202  caloPID->SwitchOnSplitShowerShapeCut() ;
1203  }
1204 
1205  if(useAsy) caloPID->SwitchOnSplitAsymmetryCut() ;
1206  else
1207  {
1208  caloPID->SwitchOffSplitAsymmetryCut() ;
1209  if(!useSS)
1210  {
1211  ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenSS_OpenAsy_TM%d_",particle.Data(),opt.Data(),kTM));
1212  ana->SetOutputAODName(Form("%s%s%s_OpenSS_OpenAsy",particle.Data(), opt.Data(), kName.Data()));
1213  }
1214  else
1215  {
1216  ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenAsy_TM%d_",particle.Data(),opt.Data(),kTM));
1217  ana->SetOutputAODName(Form("%s%s%s_OpenAsy",particle.Data(), opt.Data(), kName.Data()));
1218  }
1219  }
1220 
1221  //For Pi0 only if SwitchOnSimpleSplitMassCut()
1222  caloPID->SetPi0MassRange(0.10, 0.18);
1223  caloPID->SetEtaMassRange(0.40, 0.60);
1224  caloPID->SetPhotonMassRange(0.00, 0.08);
1225 
1226  caloPID->SetClusterSplittingMinNCells(6);
1227 
1228  //caloPID->SetSplitEnergyFractionMinimum(0, 0.95);
1229  //caloPID->SetSplitEnergyFractionMinimum(1, 0.95);
1230  //caloPID->SetSplitEnergyFractionMinimum(2, 0.8);
1231 
1232  if(kCollisions=="PbPb" || kName.Contains("150"))
1233  {
1234  caloPID->SetClusterSplittingMinNCells(4);
1235  caloPID->SetPi0MassShiftHighECell(0.005);
1236  }
1237  }
1238 
1239  return ana;
1240 
1241 }
1242 
1247  Int_t partInCone = AliIsolationCut::kOnlyCharged,
1249  Float_t cone = 0.3,
1250  Float_t pth = 0.3,
1251  Bool_t multi = kFALSE)
1252 {
1254  //ana->SetDebug(kDebug);
1255  ana->SetDebug(kDebug);
1256 
1257  ana->SwitchOnFiducialCut();
1258  //Avoid borders of EMCal
1259  if(kCalorimeter=="EMCAL")
1260  ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.6, 86, 174) ;
1261 
1262  // Same Eta as EMCal, cut in phi if EMCAL was triggering
1263  if(particle=="Hadron" || particle.Contains("CTS"))
1264  {
1265  // if(kTrig.Contains("EMC"))
1266  // ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 260, 360) ;
1267  // else
1268  ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 0, 360) ;
1269  }
1270 
1271  ana->SetMinPt(5);
1272 
1273  // Input / output delta AOD settings
1274 
1275  ana->SetInputAODName(Form("%s%s",particle.Data(),kName.Data()));
1276  ana->SetAODObjArrayName(Form("IC%s_%s",particle.Data(),kName.Data()));
1277 
1278  ana->SetCalorimeter(kCalorimeter);
1279 
1280  if(!kTM) ana->SwitchOnTMHistoFill();
1281  else ana->SwitchOffTMHistoFill();
1282 
1283  ana->SwitchOffSSHistoFill();
1285 
1286  //Do settings for main isolation cut class
1287  AliIsolationCut * ic = ana->GetIsolationCut();
1288  ic->SetDebug(kDebug);
1289 
1290  if(cone >0 && pth > 0)
1291  {
1292  ic->SetPtThreshold(pth);
1293  ic->SetConeSize(cone);
1294  }
1295  else
1296  {
1297  if(kCollisions=="pp")
1298  {
1299  ic->SetPtThreshold(0.5);
1300  ic->SetConeSize(0.4);
1301  }
1302  if(kCollisions=="PbPb")
1303  {
1304  ic->SetPtThreshold(3.);
1305  //ic->SetPtThreshold(1.);
1306  ic->SetConeSize(0.3);
1307  }
1308  }
1309 
1310  ic->SetPtFraction(0.1);
1311  ic->SetSumPtThreshold(1.0) ;
1312  ic->SetParticleTypeInCone(partInCone);
1313  ic->SetICMethod(thresType);
1314 
1315  //Do or not do isolation with previously produced AODs.
1316  //No effect if use of SwitchOnSeveralIsolation()
1317  ana->SwitchOffReIsolation();
1318 
1319  //Multiple IC
1320  if(multi)
1321  {
1322  ic->SetConeSize(1.); // Take all for first iteration
1323  ic->SetPtThreshold(100);// Take all for first iteration
1324  ana->SwitchOnSeveralIsolation() ;
1325  ana->SetAODObjArrayName(Form("MultiIC%sTM%d",particle.Data(),kTM));
1326 
1327  ana->SetNCones(4);
1328  ana->SetNPtThresFrac(4);
1329  ana->SetConeSizes(0,0.3); ana->SetConeSizes(1,0.4);
1330  ana->SetConeSizes(2,0.5); ana->SetConeSizes(3,0.6);
1331  ana->SetPtThresholds(0, 0.5); ana->SetPtThresholds(1, 1); ana->SetPtThresholds(2, 2);
1332  ana->SetPtFractions (0, 0.05) ; ana->SetPtFractions (1, 0.1); ana->SetPtFractions (2, 0.2) ; ana->SetPtFractions (3, 0.3) ;
1333  ana->SetSumPtThresholds(0, 1) ; ana->SetSumPtThresholds(1, 3) ; ana->SetSumPtThresholds(2, 5); ana->SetSumPtThresholds(3, 7) ;
1334 
1335  ana->SwitchOffTMHistoFill();
1336  ana->SwitchOffSSHistoFill();
1337  }
1338  else
1339  ana->SwitchOffSeveralIsolation() ;
1340 
1341  AliCaloPID* caloPID = ana->GetCaloPID();
1342  caloPID->SetEMCALDEtaCut(0.025);
1343  caloPID->SetEMCALDPhiCut(0.030);
1344 
1345  //Set Histograms name tag, bins and ranges
1346 
1347  if(!multi)ana->AddToHistogramsName(Form("AnaIsol%s_TM%d_",particle.Data(),kTM));
1348  else ana->AddToHistogramsName(Form("AnaMultiIsol%s_TM%d_",particle.Data(),kTM));
1349 
1350  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1351 
1352  if(particle=="Hadron" || particle.Contains("CTS"))
1353  {
1354  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
1355  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
1356  }
1357 
1358  ana->SwitchOnRealCaloAcceptance(); // primary particle acceptance histograms
1359  ConfigureMC(ana);
1360 
1361  if(kPrintAnaInfo) ic ->Print("");
1362  if(kPrintAnaInfo) ana->Print("");
1363 
1364  return ana;
1365 }
1366 
1371  Bool_t bIsolated,
1372  Int_t partInCone = AliIsolationCut::kOnlyCharged,
1374  Float_t cone = 0.3,
1375  Float_t pth = 0.3)
1376 {
1378  ana->SetDebug(kDebug);
1379 
1380  ana->SwitchOnAbsoluteLeading(); // Select trigger leading particle of all the selected tracks
1381  ana->SwitchOffNearSideLeading(); // Select trigger leading particle of all the particles at +-90 degrees, default
1382 
1383  //ana->SwitchOnLeadHadronSelection();
1384  //ana->SetLeadHadronPhiCut(TMath::DegToRad()*100., TMath::DegToRad()*260.);
1385  //ana->SetLeadHadronPtCut(0.5, 100);
1386 
1387  ana->SetTriggerPtRange(5,100);
1388  ana->SetAssociatedPtRange(0.2,100);
1389  //ana->SetDeltaPhiCutRange( TMath::Pi()/2,3*TMath::Pi()/2 ); //[90 deg, 270 deg]
1390  ana->SetDeltaPhiCutRange (TMath::DegToRad()*120.,TMath::DegToRad()*240.);
1391  ana->SetUeDeltaPhiCutRange(TMath::DegToRad()*60. ,TMath::DegToRad()*120.);
1393 
1394  ana->SetNAssocPtBins(9);
1395  ana->SetAssocPtBinLimit(0, 0.2) ;
1396  ana->SetAssocPtBinLimit(1, 0.5) ;
1397  ana->SetAssocPtBinLimit(2, 1) ;
1398  ana->SetAssocPtBinLimit(3, 2) ;
1399  ana->SetAssocPtBinLimit(4, 3) ;
1400  ana->SetAssocPtBinLimit(5, 4) ;
1401  ana->SetAssocPtBinLimit(6, 6) ;
1402  ana->SetAssocPtBinLimit(7, 10) ;
1403  ana->SetAssocPtBinLimit(8, 30) ;
1404  ana->SetAssocPtBinLimit(9, 200) ;
1405  //ana->SwitchOnFillPtImbalancePerPtABinHistograms();
1406 
1407  ana->SelectIsolated(bIsolated); // do correlation with isolated photons
1408 
1409  if(bIsolated)
1410  {
1411  //Do settings for main isolation cut class
1412  AliIsolationCut * ic = ana->GetIsolationCut();
1413  ic->SetDebug(kDebug);
1414 
1415  if(cone >0 && pth > 0)
1416  {
1417  ic->SetPtThreshold(pth);
1418  ic->SetConeSize(cone);
1419  }
1420  else
1421  {
1422  if(kCollisions=="pp")
1423  {
1424  ic->SetPtThreshold(0.5);
1425  ic->SetConeSize(0.4);
1426  }
1427  if(kCollisions=="PbPb")
1428  {
1429  ic->SetPtThreshold(3.);
1430  //ic->SetPtThreshold(1.);
1431  ic->SetConeSize(0.3);
1432  }
1433  }
1434 
1435  ic->SetPtFraction(0.1);
1436  ic->SetSumPtThreshold(1.0) ;
1437  ic->SetParticleTypeInCone(partInCone);
1438  ic->SetICMethod(thresType);
1439 
1440  }
1441 
1442  // Mixing with own pool
1443  if(kMix)
1444  {
1445  ana->SwitchOnOwnMix();
1447  }
1448  else
1449  ana->SwitchOffOwnMix();
1450 
1451  ana->SetNZvertBin(20);
1452  ana->SwitchOffCorrelationVzBin() ;
1454 
1455  if(kCollisions=="pp")
1456  {
1457  ana->SetNMaxEvMix(100);
1458  ana->SwitchOnTrackMultBins();
1459  ana->SetNTrackMultBin(10); // same as SetNCentrBin(10);
1460  ana->SetNRPBin(1);
1461  }
1462  else
1463  {
1464  ana->SetNMaxEvMix(10);
1465  ana->SwitchOffTrackMultBins(); // centrality bins
1466  ana->SetNCentrBin(3);
1467  ana->SetNRPBin(3);
1468  if(kName.Contains("60_90"))
1469  {
1470  printf("*** Set mixing for peripheral\n");
1471  ana->SetNMaxEvMix(50);
1472  ana->SetNCentrBin(2);
1473  }
1474  }
1475 
1476  ana->SwitchOnFiducialCut();
1477 
1478  //Avoid borders of EMCal, same as for isolation
1479  if(kCalorimeter=="EMCAL")
1480  ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.6, 86, 174) ;
1481 
1482  // Same Eta as EMCal, cut in phi if EMCAL was triggering
1483  if(particle=="Hadron" || particle.Contains("CTS"))
1484  {
1485  //if(kTrig.Contains("EMC"))
1486  // ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 260, 360) ;
1487  //else
1488  ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 0, 360) ;
1489  }
1490 
1491  // Input / output delta AOD settings
1492 
1493  ana->SetInputAODName(Form("%s%s",particle.Data(),kName.Data()));
1494  ana->SetAODObjArrayName(Form("%sHadronCorrIso%d_%s",particle.Data(),bIsolated,kName.Data()));
1495 
1496  // Fill extra plots on tagged decay photons
1497  // If trigger is pi0/eta found with invariant mass, get the decays
1498  // If trigger is photon, check if it was tagged as decay previously
1499  if(particle!="Hadron" )
1500  {
1501  if(particle.Contains("Pi0") || particle.Contains("Eta"))
1502  {
1505  }
1506  else
1507  {
1509  ana->SwitchOnDecayTriggerDecayCorr(); // Make sure pi0 decay tagging runs before this task
1510  }
1511  }
1512  else
1513  {
1516  }
1517 
1518  if(particle=="Photon")
1519  {
1520  printf("**** SET M02 limits *** \n");
1521  ana->SetM02Cut(0.1,0.27);
1522  }
1523 
1524  // if triggering on PHOS and EMCAL is on
1525  //if(kCalorimeter=="PHOS") ana->SwitchOnNeutralCorr();
1526  ana->SwitchOffNeutralCorr(); // Do only correlation with TPC
1527 
1529 
1531 
1532  // Underlying event
1534  ana->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3);
1535 
1536  //Set Histograms name tag, bins and ranges
1537 
1538  ana->AddToHistogramsName(Form("Ana%sHadronCorr_Iso%d_TM%d_",particle.Data(),bIsolated,kTM));
1539  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1540 
1541  if(particle=="Hadron" || particle.Contains("CTS"))
1542  {
1543  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
1544  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
1545  }
1546 
1547  ConfigureMC(ana);
1548 
1549  if(kPrintAnaInfo) ana->Print("");
1550 
1551  return ana;
1552 }
1553 
1558 {
1560  ana->SetDebug(kDebug); //10 for lots of messages
1561  ana->SetCalorimeter(kCalorimeter);
1562 
1563  ana->SetTimeCut(-1e10,1e10); // Open time cut
1564 
1565  // Study inter detector correlation (PHOS, EMCAL, Tracks, V0)
1566  if(kCalorimeter=="PHOS" && kTrig=="PHOS")
1567  ana->SwitchOnCorrelation(); // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
1568  if(kCalorimeter=="EMCAL" && kClusterArray=="")
1569  ana->SwitchOnCorrelation(); // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
1570  else
1571  ana->SwitchOffCorrelation();
1572 
1573  // Study exotic clusters PHOS and EMCAL
1574  if(kClusterArray=="") ana->SwitchOnStudyBadClusters() ;
1575  else ana->SwitchOffStudyBadClusters() ;
1576 
1577 
1578  ana->SwitchOffFiducialCut();
1582  if(!kExotic)ana->SwitchOnStudyBadClusters();
1583  else ana->SwitchOffStudyBadClusters();
1586 
1587  ana->AddToHistogramsName("QA_"); //Begining of histograms name
1588  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1589 
1590  ConfigureMC(ana);
1591 
1592  if(kPrintAnaInfo) ana->Print("");
1593 
1594  return ana;
1595 }
1596 
1602 {
1604  ana->SetDebug(kDebug); //10 for lots of messages
1605 
1606  // Trigger detector, acceptance and pT cut
1607  TString trigDet = "EMCAL";
1608  ana->SetTriggerDetector(trigDet);
1609  ana->SetMinPt(10); // Trigger photon, pi0 minimum pT
1611 
1612  // Particles associated to trigger or isolation cone acceptance and pT cut
1613  TString calo = "EMCAL";
1614  ana->SetCalorimeter(calo);
1615  ana->SetMinChargedPt(0.2);
1616  ana->SetMinNeutralPt(0.3);
1617  ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.65, 81, 179);
1618  ana->GetFiducialCut()->SetSimpleCTSFiducialCut(0.9, 0, 360);
1619 
1620  // Isolation paramters
1621  AliIsolationCut * ic = ana->GetIsolationCut();
1622  ic->SetDebug(kDebug);
1623  ic->SetPtThreshold(0.5);
1624  ic->SetConeSize(0.5);
1625  ic->SetSumPtThreshold(1.0) ;
1626  ic->SetICMethod(AliIsolationCut::kPtThresIC); // kSumPtIC
1627 
1628  ana->AddToHistogramsName("AnaGenKine_");
1629  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1630 
1631  if(kPrintAnaInfo) ana->Print("");
1632 
1633  return ana;
1634 }
1635 
1641  const TString calorimeter = "EMCAL",
1642  const Bool_t simulation = kFALSE,
1643  const Bool_t eventsel = kFALSE,
1644  const Bool_t exotic = kTRUE,
1645  const Bool_t nonlin = kFALSE,
1646  TString outputfile = "",
1647  const Int_t year = 2010,
1648  const TString col = "pp",
1649  const TString trigger = "MB",
1650  const TString clustersArray = "V1",
1651  const Bool_t mix = kTRUE,
1652  const Bool_t recaltm = kTRUE,
1653  const Bool_t tm = kTRUE,
1654  const Int_t minCen = -1,
1655  const Int_t maxCen = -1,
1656  const Bool_t qaan = kFALSE,
1657  const Bool_t hadronan = kFALSE,
1658  const Bool_t calibE = kTRUE,
1659  const Bool_t badmap = kTRUE,
1660  const Bool_t calibT = kTRUE,
1661  const Bool_t tender = kFALSE,
1662  const Bool_t outputAOD = kFALSE,
1663  const Bool_t printSettings = kFALSE,
1664  const Double_t scaleFactor = -1,
1665  const Int_t runNumber = -1
1666  )
1667 {
1668  // Creates a CaloTrackCorr task, configures it and adds it to the analysis manager.
1669 
1670  kPrintAnaInfo = printSettings;
1671  kSimulation = simulation;
1672  kYears = year;
1673  kCollisions = col;
1674  kExotic = exotic;
1675  kNonLinearity = nonlin;
1676  kTrig = trigger;
1677  kClusterArray = clustersArray;
1678  kData = data;
1679  kCalorimeter = calorimeter;
1680  kOutputAOD = outputAOD;
1681  kTM = tm;
1682  kRecalTM = recaltm;
1683  kMinCen = minCen;
1684  kMaxCen = maxCen;
1685  kEventSelection= eventsel;
1686  kQA = qaan;
1687  kHadronAN = hadronan;
1688  kCalibE = calibE;
1689  kCalibT = calibT;
1690  kBadMap = badmap;
1691  kTender = tender;
1692  kMix = mix;
1693  kRunNumber = runNumber;
1694 
1695  // Get the pointer to the existing analysis manager via the static access method.
1696 
1697  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
1698  if (!mgr)
1699  {
1700  ::Error("AddTask", "No analysis manager to connect to.");
1701  return NULL;
1702  }
1703 
1704  // Check the analysis type using the event handlers connected to the analysis manager.
1705 
1706  if (!mgr->GetInputEventHandler())
1707  {
1708  ::Error("AddTask", "This task requires an input event handler");
1709  return NULL;
1710  }
1711 
1712  // Make sure the B field is enabled for track selection, some cuts need it
1713  ((AliInputEventHandler*)mgr->GetInputEventHandler())->SetNeedField(kTRUE);
1714 
1715  kInputDataType = "AOD";
1716  if(!kData.Contains("delta"))
1717  kInputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
1718 
1719 // if(kSimulation)
1720 // {
1721 // kUseKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
1722 // if (!kUseKinematics && data=="AOD" && kInputDataType != "ESD") kUseKinematics = kTRUE; //AOD primary should be available ...
1723 // }
1724 //
1725 // cout<<"********* ACCESS KINE? "<<kUseKinematics<<endl;
1726 
1727  // Name for containers
1728 
1729  kName = Form("%s_Trig%s_Cl%s_TM%d",kCalorimeter.Data(), kTrig.Data(),kClusterArray.Data(),kTM);
1730 
1731  if(kCollisions=="PbPb" && kMaxCen>=0) kName+=Form("Cen%d_%d",kMinCen,kMaxCen);
1732 
1733  printf("<<<< NAME: %s >>>>>\n",kName.Data());
1734 
1735  // #### Configure analysis ####
1736 
1738 
1739  maker->SetScaleFactor(scaleFactor); // for MC, negative (not scaled) by default
1740 
1741  // General frame setting and configuration
1742  maker->SetReader (ConfigureReader() );
1743  maker->SetCaloUtils(ConfigureCaloUtils());
1744 
1745  // Analysis tasks setting and configuration
1746  Int_t n = 0;//Analysis number, order is important
1747 
1748  // Isolation settings
1749  Int_t partInCone = AliIsolationCut::kNeutralAndCharged; // kOnlyCharged;
1750  Int_t thresType = AliIsolationCut::kPtThresIC;// AliIsolationCut::kSumPtFracIC ;
1751  Float_t cone = -1;
1752  Float_t pth = -1;
1753 
1754  // Photon analysis
1755 
1756  maker->AddAnalysis(ConfigurePhotonAnalysis(), n++); // Photon cluster selection
1757 
1758  maker->AddAnalysis(ConfigurePi0Analysis(), n++); // Invariant mass of photon clusters
1759 
1760  // Invariant mass analysis Put here to tag selected photons as decay
1761  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0", AliAnaPi0EbE::kIMCalo), n++); // Pi0 event by event selection, invariant mass and photon tagging from decay
1762  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Eta", AliAnaPi0EbE::kIMCalo), n++); // Eta event by event selection, invariant mass and photon tagging from decay
1763 
1764  // Photon analysis
1765  maker->AddAnalysis(ConfigureIsolationAnalysis("Photon", partInCone,thresType,cone, pth), n++); // Photon isolation
1766  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Photon",kFALSE), n++); // Gamma hadron correlation
1767  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Photon",kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated gamma hadron correlation
1768  //maker->AddAnalysis(ConfigureIsolationAnalysis("Photon", partInCone,thresType,kTRUE), n++); // Photon multi isolation, leave it the last
1769 
1770 
1771  // Split cluster analysis
1772  if(kCalorimeter == "EMCAL")
1773  {
1774  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0", AliAnaPi0EbE::kSSCalo), n++); // Pi0 event by event selection, cluster splitting
1775  maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0SS", partInCone,thresType,cone, pth), n++); // Pi0 isolation, cluster splits
1776  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0SS" ,kFALSE), n++); // Pi0 hadron correlation
1777  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0SS" ,kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated pi0 hadron correlation
1778  //maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0SS", partInCone,thresType,kTRUE), n++); // Pi0 multi isolation, split cluster
1779  maker->AddAnalysis(ConfigureInClusterIMAnalysis(kTRUE , kTRUE ), n++);
1780  }
1781 
1782  // Invariant mass analysis
1783  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0SideBand", AliAnaPi0EbE::kIMCalo), n++); // Pi0 event by event selection, and photon tagging from decay
1784  maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0", partInCone,thresType,cone, pth), n++); // Pi0 isolation, invariant mass
1785  maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0SideBand", partInCone,thresType,cone, pth), n++); // Pi0 isolation, side band
1786  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0" ,kFALSE), n++); // Pi0 hadron correlation
1787  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0" ,kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated pi0 hadron correlation
1788  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0SideBand" ,kFALSE), n++); // Pi0 hadron correlation
1789  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Pi0SideBand" ,kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated pi0 hadron correlation
1790  //maker->AddAnalysis(ConfigureIsolationAnalysis("Pi0", partInCone,thresType,kTRUE), n++); // Pi0 multi isolation, invariant mass, leave it the last
1791 
1792  if(kHadronAN)
1793  {
1794  maker->AddAnalysis(ConfigureChargedAnalysis(), n++); // track selection
1795  maker->AddAnalysis(ConfigureIsolationAnalysis("Hadron",AliIsolationCut::kOnlyCharged,thresType,cone, pth), n++); // track isolation
1796  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Hadron",kFALSE), n++); // track-track correlation
1797  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Hadron",kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated track-track correlation
1798  //maker->AddAnalysis(ConfigureIsolationAnalysis("Hadron",partInCone,thresType,kTRUE), n++);// Hadron multi isolation
1799  }
1800 
1801  // Analysis with ghost triggers, only for Min Bias like events
1802  if( kTrig.Contains("INT") || kTrig.Contains("Central") || kTrig.Contains("MB") )
1803  {
1804  maker->AddAnalysis(ConfigureRandomTriggerAnalysis(), n++);
1805  maker->AddAnalysis(ConfigureIsolationAnalysis(Form("RandomTrigger%s",kCalorimeter.Data()), partInCone,thresType,cone, pth), n++); // Ghost trigger isolation
1806  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis(Form("RandomTrigger%s",kCalorimeter.Data()),kFALSE), n++); // Ghost trigger hadron correlation
1807  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis(Form("RandomTrigger%s",kCalorimeter.Data()),kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated ghost hadron correlation
1808  //maker->AddAnalysis(ConfigureIsolationAnalysis(Form("RandomTrigger%s",kCalorimeter.Data()), partInCone,thresType,kTRUE), n++); // Ghost multi isolation
1809 
1810  if(kHadronAN)
1811  {
1812  maker->AddAnalysis(ConfigureRandomTriggerAnalysis("CTS"), n++); // track selection
1813  maker->AddAnalysis(ConfigureIsolationAnalysis("RandomTriggerCTS",AliIsolationCut::kOnlyCharged,thresType,cone, pth), n++); // track isolation
1814  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("RandomTriggerCTS",kFALSE), n++); // track-track correlation
1815  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("RandomTriggerCTS",kTRUE,partInCone,thresType, cone, pth) , n++); // Isolated track-track correlation
1816  //maker->AddAnalysis(ConfigureIsolationAnalysis("RandomTriggerCTS",AliIsolationCut::kOnlyCharged,thresType,kTRUE), n++); // Ghost multi isolation
1817  }
1818  }
1819 
1820  if(kQA) maker->AddAnalysis(ConfigureQAAnalysis(),n++);
1821 
1822  maker->SetAnaDebug(kDebug) ;
1823  maker->SwitchOnHistogramsMaker() ;
1824  if(kData.Contains("delta")) maker->SwitchOffAODsMaker() ;
1825  else maker->SwitchOnAODsMaker() ;
1826 
1827  if(kPrintAnaInfo) maker->Print("");
1828 
1829  if(kSimulation) maker->SwitchOffDataControlHistograms();
1830 
1831  if(simulation)
1832  {
1833  // Calculate the cross section weights, apply them to all histograms
1834  // and fill xsec and trial histo. Sumw2 must be activated.
1835  //maker->GetReader()->GetWeightUtils()->SwitchOnMCCrossSectionCalculation();
1836  //maker->SwitchOnSumw2Histograms();
1837 
1838  // For recent productions where the cross sections and trials are not stored in separate file
1839  //maker->GetReader()->GetWeightUtils()->SwitchOnMCCrossSectionFromEventHeader() ;
1840 
1841  // Just fill cross section and trials histograms.
1842  maker->GetReader()->GetWeightUtils()->SwitchOnMCCrossSectionHistoFill();
1843 
1844  // Add control histogram with pT hard to control aplication of weights
1845  maker->SwitchOnPtHardHistogram();
1846  }
1847 
1848 
1849  printf("<< End Configuration of %d analysis for calorimeter %s >>\n",n, kCalorimeter.Data());
1850 
1851  // Create task
1852 
1853  AliAnalysisTaskCaloTrackCorrelation * task = new AliAnalysisTaskCaloTrackCorrelation (Form("CaloTrackCorr%s",kName.Data()));
1854  //task->SetConfigFileName(""); //Don't configure the analysis via configuration file.
1855  task->SetDebugLevel(kDebug);
1856  //task->SetBranches("ESD:AliESDRun.,AliESDHeader");
1857  task->SetAnalysisMaker(maker);
1858  mgr->AddTask(task);
1859 
1860  //Create containers
1861 
1862  if(outputfile.Length()==0) outputfile = AliAnalysisManager::GetCommonFileName();
1863 
1864  AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(kName, TList::Class(),
1865  AliAnalysisManager::kOutputContainer,
1866  Form("%s",outputfile.Data()));
1867 
1868  AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Param_%s",kName.Data()), TList::Class(),
1869  AliAnalysisManager::kParamContainer,
1870  "AnalysisParameters.root");
1871 
1872  // Create ONLY the output containers for the data produced by the task.
1873  // Get and connect other common input/output containers via the manager as below
1874  //==============================================================================
1875  mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
1876  // AOD output slot will be used in a different way in future
1877  if(!kData.Contains("delta") && outputAOD) mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer());
1878  mgr->ConnectOutput (task, 1, cout_pc);
1879  mgr->ConnectOutput (task, 2, cout_cuts);
1880 
1881  if(!kMix)
1882  {
1883  UInt_t mask = SetTriggerMaskFromName();
1884  task->SelectCollisionCandidates(mask);
1885  }
1886 
1887  return task;
1888 }
1889 
1890 
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 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:134
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:96
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:145
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 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:117
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 SetTriggerDetector(TString det)
Set the calorimeter for the analysis.
void SwitchOnSelectedClusterHistoFill()
Definition: AliAnaPi0EbE.h:111
void SwitchOffTMHistoFill()
Definition: AliAnaPhoton.h:97
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 ana(anaModes mode=mLocal)
Definition: ana.C:990
void SwitchOffMultipleCutAnalysis()
Definition: AliAnaPi0.h:115
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:125
Select cluster pairs or single merged clusters with pi0 or eta invariant mass.
Definition: AliAnaPi0EbE.h:30
Bool_t IsBadChannelsRemovalSwitchedOn() const
void SetTriggerDetector(TString det)
Set the detrimeter for the analysis.
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
Bool_t IsRecalibrationOn() const
Some utilities for cluster and cell treatment.
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()
virtual void SetCalorimeter(TString calo)
Set the calorimeter for the analysis. A string.
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:135
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 SetEMCALClusterListName(TString name)
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 Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Definition: AliAnaPi0.cxx:2615
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:120
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:121
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 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:95
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:143
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:128
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)