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