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