AliPhysics  958ad07 (958ad07)
 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;
13 //Bool_t kUseKinematics = kFALSE; ///< Use the MC information
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  //------------------------
328  // Detector input filling
329  //------------------------
330 
331  //Min cluster/track E
332  reader->SetEMCALEMin(0.3);
333  reader->SetEMCALEMax(1000);
334  reader->SetPHOSEMin(0.3);
335  reader->SetPHOSEMax(1000);
336  reader->SetCTSPtMin(0.2);
337  reader->SetCTSPtMax(1000);
338 
339  // Time cuts
340  if(kSimulation)
341  {
342  reader->SwitchOffUseTrackTimeCut();
344  reader->SwitchOffUseEMCALTimeCut();
345  reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
346  }
347  else
348  {
349  if(kCalibT)
350  {
351  printf("Set time cut parameters for run %d\n",kRunNumber);
352  reader->SwitchOnUseEMCALTimeCut();
354 
355  //Absolute window
356  reader->SetEMCALTimeCut(-25,20);
357 
358  //Parametrization
359  if (kRunNumber >= 151636 && kRunNumber <= 155384 )
360  {
361  printf("Set time parameters for LHC11c");
364  }
365  else if(kRunNumber >= 156447 && kRunNumber <= 159635 )
366  {
367  printf("Set time parameters for LHC11d");
370  }
371  else
372  {
374  }
375  }
376  else
377  {
379  reader->SwitchOffUseEMCALTimeCut();
380  reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
381  }
382  }
383 
384  reader->SwitchOnFiducialCut();
385  reader->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ;
386 
387  // Tracks
388  reader->SwitchOnCTS();
390 
393 
394  reader->SwitchOffUseTrackTimeCut();
395  reader->SetTrackTimeCut(0,50);
396 
397  reader->SwitchOffUseTrackDCACut();
398  //reader->SetTrackDCACut(0,0.0105);
399  //reader->SetTrackDCACut(1,0.035);
400  //reader->SetTrackDCACut(2,1.1);
401 
402  if(kInputDataType=="ESD")
403  {
404  gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/macros/CreateTrackCutsPWGJE.C");
405  //AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10041004);
406  //reader->SetTrackCuts(esdTrackCuts);
407  //reader->SwitchOnConstrainTrackToVertex();
408 
409  if(kYears>2010)
410  {
411  //Hybrids 2011
412  AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001008);
413  reader->SetTrackCuts(esdTrackCuts);
414  AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10011008);
415  reader->SetTrackComplementaryCuts(esdTrackCuts2);
416  }
417  else
418  {
419  //Hybrids 2010
420  AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001006);
421  reader->SetTrackCuts(esdTrackCuts);
422  AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10041006);
423  reader->SetTrackComplementaryCuts(esdTrackCuts2);
424  }
425  }
426  else if(kInputDataType=="AOD")
427  {
428  //reader->SetTrackFilterMask(128); // Filter bit, not mask, use if off hybrid
429  reader->SwitchOnAODHybridTrackSelection(); // Check that the AODs have Hybrids!!!!
430  reader->SetTrackStatus(AliVTrack::kITSrefit);
431  //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
432  }
433 
434  // Calorimeter
435 
436  reader->SetEMCALClusterListName(kClusterArray);
437  if(kClusterArray == "" && !kTender)
438  {
439  printf("**************** Standard EMCAL clusters branch analysis **************** \n");
441  // Check in ConfigureCaloUtils that the recalibration and bad map are ON
442  }
443  else
444  {
445  printf("**************** Input for analysis is Clusterizer %s **************** \n", kClusterArray.Data());
447  }
448 
450 
451  //if(kCalorimeter == "EMCAL") {
452  reader->SwitchOnEMCALCells();
453  reader->SwitchOnEMCAL();
454  //}
455  //if(kCalorimeter == "PHOS") {
456  reader->SwitchOnPHOSCells();
457  reader->SwitchOnPHOS();
458  //}
459 
460  // for case data="deltaAOD", no need to fill the EMCAL/PHOS cluster lists
461  if(kData.Contains("delta"))
462  {
463  reader->SwitchOffEMCAL();
464  reader->SwitchOffPHOS();
465  reader->SwitchOffEMCALCells();
466  reader->SwitchOffPHOSCells();
467  }
468 
469  //-----------------
470  // Event selection
471  //-----------------
472 
473  //reader->RejectFastClusterEvents() ;
474 
475  // Event triggered selection settings
477  reader->SwitchOnBadTriggerEventsRemoval(); // only if SwitchOnTriggerPatchMatching();
478  reader->SwitchOnUnMatchedTriggerEventsRemoval(); // only if SwitchOnBadTriggerEventsRemoval();
479  //reader->SwitchOffTriggerClusterTimeRecal() ;
480 
481  reader->SetTriggerPatchTimeWindow(8,9); // L0
482  if (kRunNumber < 146861) reader->SetEventTriggerL0Threshold(3.);
483  else if(kRunNumber < 154000) reader->SetEventTriggerL0Threshold(4.);
484  else if(kRunNumber < 165000) reader->SetEventTriggerL0Threshold(5.5);
485 
486  //redefine for other periods, triggers
487 
488  //if(!kUseKinematics) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma
489 
490  // For mixing with AliAnaParticleHadronCorrelation switch it off
491  if(kMix)
492  {
493  reader->SwitchOffEventTriggerAtSE();
495  reader->SetEventTriggerMask(mask); // Only for mixing and SwitchOffEventTriggerAtSE();
496  //reader->SetMixEventTriggerMask(AliVEvent::kMB); // Careful, not all productions work with kMB, try kINT7, kINT1, kAnyINT
497  reader->SetMixEventTriggerMask(AliVEvent::kAnyINT); // Careful, not all productions work with kMB, try kINT7, kINT1, kAnyINT
498 
499  printf("---Trigger selection done in AliCaloTrackReader!!!\n");
500  }
501  else
502  reader->SwitchOnEventTriggerAtSE();
503 
504  reader->SetZvertexCut(10.); // Open cut
505  reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
506 
507  if(kEventSelection)
508  {
509  reader->SwitchOnEventPileUpRejection(); // remove pileup by default
510  reader->SwitchOnV0ANDSelection() ; // and besides v0 AND
511  }
512  else
513  {
514  reader->SwitchOffPileUpEventRejection();// remove pileup by default
515  reader->SwitchOffV0ANDSelection() ; // and besides v0 AND
516  }
517 
518  if(kCollisions=="PbPb")
519  {
520  // Centrality
521  reader->SetCentralityClass("V0M");
522  reader->SetCentralityOpt(100); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
523  reader->SetCentralityBin(kMinCen,kMaxCen); // Accept all events, if not select range
524 
525  // Event plane (only used in Maker and mixing for AliAnaPi0/AliAnaHadronCorrelation for the moment)
526  reader->SetEventPlaneMethod("V0");
527  }
528 
529  if(kPrint) reader->Print("");
530 
531  return reader;
532 }
533 
538 {
539 
541  cu->SetDebug(kDebug);
542 
543  // Remove clusters close to borders, at least max energy cell is 1 cell away
546 
547  // Search of local maxima in cluster
548  if(kCollisions=="pp")
549  {
550  cu->SetLocalMaximaCutE(0.1);
551  cu->SetLocalMaximaCutEDiff(0.03);
552  if(kName.Contains("150"))
553  {
554  printf("Reclusterize with 150 threshold, set PbPb settings\n");
555  cu->SetLocalMaximaCutE(0.2);
556  cu->SetLocalMaximaCutEDiff(0.03);
557  }
558  }
559  else
560  {
561  cu->SetLocalMaximaCutE(0.2);
562  cu->SetLocalMaximaCutEDiff(0.03);
563  }
564 
565  cu->SwitchOffClusterPlot();
566 
567  if(kRecalTM) cu->SwitchOnRecalculateClusterTrackMatching(); // Done in clusterization
569 
571 
572  //EMCAL settings
573 
574  if(!kSimulation)
576 
577  AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
578 
579  if(!kSimulation)
580  {
581  cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
582  if(kClusterArray == "" && !kTender) cu->SwitchOnRunDepCorrection();
583  }
584 
585  gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/EMCAL/macros/ConfigureEMCALRecoUtils.C");
587  kSimulation,
588  kExotic,
589  kTRUE,//kNonLinearity,
590  kCalibE,
591  kBadMap,
592  kCalibT);
593  //recou->SetExoticCellDiffTimeCut(50.);
594 
595 
596  if( kNonLinearity )
597  {
598  printf("ConfigureCaloUtils() - Apply non linearity to EMCAL\n");
600  }
601 
602  printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
603  printf("ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
604 
605 
606  if(kCalorimeter=="PHOS")
607  {
608  if (kYears < 2014) cu->SetNumberOfSuperModulesUsed(3);
609  else cu->SetNumberOfSuperModulesUsed(4);
610  }
611  else
612  {
613  if (kYears == 2010) cu->SetNumberOfSuperModulesUsed(4); //EMCAL first year
614  else if (kYears < 2014) cu->SetNumberOfSuperModulesUsed(10);
615  else cu->SetNumberOfSuperModulesUsed(20);
616  }
617 
618  // PHOS
620 
621  if(kPrint) cu->Print("");
622 
623  return cu;
624 }
625 
631 {
632  AliAnaPhoton *ana = new AliAnaPhoton();
633  ana->SetDebug(kDebug); //10 for lots of messages
634 
635  // cluster selection cuts
636 
637  ana->SwitchOffFiducialCut();
638 
639  ana->SetCalorimeter(kCalorimeter);
640 
641  if(kCalorimeter == "PHOS")
642  {
643  ana->SetNCellCut(2);// At least 3 cells
644  ana->SetMinPt(0.3);
645  ana->SetMinDistanceToBadChannel(2, 4, 5);
646  ana->SetTimeCut(-1e10,1e10); // open cut
647  }
648  else
649  {//EMCAL
650  ana->SetNCellCut(1);// At least 2 cells
651  ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
652  ana->SetMaxEnergy(1000);
653  ana->SetTimeCut(-1e10,1e10); // open cut, usual time window of [425-825] ns if time recalibration is off
654  // restrict to less than 100 ns when time calibration is on
655  ana->SetMinDistanceToBadChannel(2, 4, 6);
656 
657  // NLM cut, used in all, exclude clusters with more than 2 maxima
658  // Not needed if M02 cut is already strong or clusterizer V2
659  ana->SetNLMCut(1, 2) ;
660  }
661 
662  if(kTM)
663  {
665  ana->SwitchOffTMHistoFill() ;
666  }
667  else
668  {
670  ana->SwitchOnTMHistoFill() ;
671  }
672 
673  //PID cuts (shower shape)
674  ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
675  AliCaloPID* caloPID = ana->GetCaloPID();
676  //Not used in bayesian
677 
678  //EMCAL
679  caloPID->SetEMCALLambda0CutMax(0.27);
680  caloPID->SetEMCALLambda0CutMin(0.10);
681 
682  caloPID->SetEMCALDEtaCut(0.025);
683  caloPID->SetEMCALDPhiCut(0.030);
684 
685  //PHOS
686  caloPID->SetPHOSDispersionCut(2.5);
687  caloPID->SetPHOSRCut(2.);
688  if(kInputData=="AOD") caloPID->SetPHOSRCut(2000.); // Open cut since dX, dZ not stored
689 
690  ana->SwitchOffFillShowerShapeHistograms(); // Filled before photon shower shape selection
692  //if(!kSimulation) ana->SwitchOnFillEMCALBCHistograms();
693 
694  // Input / output delta AOD settings
695 
696  if(!kData.Contains("delta"))
697  {
698  ana->SetOutputAODName(Form("Photon%s",kName.Data()));
699  ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
700  //ana->SetOutputAODClassName("AliAODPWG4Particle"); // use if no correlation done
701  }
702  else ana->SetInputAODName(Form("Photon%s",kName.Data()));
703 
704  //Set Histograms name tag, bins and ranges
705 
706  ana->AddToHistogramsName(Form("AnaPhoton_TM%d_",kTM));
707  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
708 
709  // Number of particle type MC histograms
710  ana->FillNOriginHistograms(20);
711  ana->FillNPrimaryHistograms(20);
712 
713  ana->SwitchOnRealCaloAcceptance(); // primary particle acceptance histograms
714  ConfigureMC(ana);
715 
716  if(kPrint) ana->Print("");
717 
718  return ana;
719 }
720 
727 {
729  ana->SetDebug(kDebug); //10 for lots of messages
730 
731  // cluster selection cuts
732 
733  ana->SwitchOffFiducialCut();
734  ana->SetNCellCut(1);// At least 2 cells
735  ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
736  ana->SetMaxEnergy(1000);
737  ana->SetM02(1, 2) ;
739 
740  ana->AddToHistogramsName("EMCTriggerClusters_");
741  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
742 
743  if(kPrint) ana->Print("");
744 
745  return ana;
746 }
747 
754 {
756  ana->SetDebug(kDebug); //10 for lots of messages
757 
758  // cluster selection cuts
759 
760  ana->SwitchOffFiducialCut();
761  ana->SetNCellCut(1);// At least 2 cells
762  ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
763  ana->SetMaxEnergy(1000);
764 
765  ana->AddToHistogramsName("ClusterPileUp_");
766  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
767 
768  if(kPrint) ana->Print("");
769 
770  return ana;
771 }
772 
778 {
780  ana->SetDebug(kDebug); //10 for lots of messages
781 
782  ana->FillAODWithElectrons();
783  //ana->FillAODWithHadrons();
784  //ana->FillAODWithAny();
785 
786  if(kCalorimeter == "PHOS")
787  {
788  ana->SetNCellCut(2);// At least 2 cells
789  ana->SetMinPt(0.3);
790  ana->SetMinDistanceToBadChannel(2, 4, 5);
791  }
792  else
793  {//EMCAL
794  ana->SetNCellCut(1);// At least 2 cells
795  ana->SetMinPt(0.5); // no effect minium EMCAL cut.
796  ana->SetMaxPt(100);
797  //ana->SetTimeCut(400,900);// Time window of [400-900] ns
798  ana->SetMinDistanceToBadChannel(2, 4, 6);
799  }
800 
801  //Electron selection cuts with tracks
802  ana->SetEOverP(0.85, 1.2);
803 
804  // TO DO, find a more suitable way to set this
805  if (kRunNumber < 146861) ana->SetdEdxCut(72, 90);
806  else if(kRunNumber < 154000) ana->SetdEdxCut(54, 70);
807  else ana->SetdEdxCut(74, 90);
808 
809  if(kSimulation) ana->SetdEdxCut(80, 100);
810 
811  ana->SetCalorimeter(kCalorimeter);
812 
813  ana->SwitchOnCaloPID();
814 
815  AliCaloPID* caloPID = ana->GetCaloPID();
816 
817  caloPID->SetEMCALLambda0CutMax(0.27);
818  caloPID->SetEMCALLambda0CutMin(0.10);
819 
822  ana->SwitchOffFiducialCut();
823 
824  if(!kData.Contains("delta"))
825  {
826  ana->SetOutputAODName(Form("Electron%s",kName.Data()));
827  ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
828  }
829  else ana->SetInputAODName(Form("Electron%s",kName.Data()));
830 
831  //Set Histograms name tag, bins and ranges
832 
833  ana->AddToHistogramsName(Form("AnaElectron_TM%d_",kTM));
834  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
835 
836  ConfigureMC(ana);
837 
838  if(kPrint) ana->Print("");
839 
840  return ana ;
841 }
842 
847 {
849  ana->SetDebug(kDebug); //10 for lots of messages
850 
851  if(detector=="") detector = kCalorimeter;
852  ana->SetTriggerDetector(detector);
853 
854  // selection cuts
855  ana->SetMinPt(4.);
856  ana->SetMaxPt(51.);
857 
858  if (detector=="EMCAL")
859  {
860  ana->SetEtaCut(-0.71,0.71);
861  ana->SetPhiCut(100*TMath::DegToRad(), 160*TMath::DegToRad());
862  }
863  else if(detector=="PHOS")
864  {
865  ana->SetEtaCut(-0.13,0.13);
866  ana->SetPhiCut(260*TMath::DegToRad(), 320*TMath::DegToRad());
867  }
868  else if(detector=="CTS")
869  {
870  ana->SetEtaCut(-0.9,0.9);
871  ana->SetPhiCut(0, TMath::TwoPi());
872  }
873 
874  // AOD branch
875  if(!kData.Contains("delta"))
876  {
877  ana->SetOutputAODName(Form("RandomTrigger%s%s",detector.Data(),kName.Data()));
878  ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
879  }
880  else
881  ana->SetInputAODName(Form("RandomTrigger%s%s",detector.Data(),kName.Data()));
882 
883  printf("Set RandomTrigger%s%s\n",detector.Data(),kName.Data());
884 
885  //Set Histograms name tag, bins and ranges
886 
887  ana->AddToHistogramsName(Form("AnaRandomTrigger%s_",detector.Data()));
888 
889  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
890 
891  if(detector=="CTS")
892  {
893  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
894  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
895  }
896 
897  if(kPrint) ana->Print("");
898 
899  return ana;
900 }
901 
906 {
908  ana->SetDebug(kDebug); //10 for lots of messages
909 
910  // selection cuts
911 
912  ana->SetMinEnergy(6);
913  ana->SetMaxEnergy(200.);
914  ana->SetMinNCells(6); // check same as in calopid
915 
916  ana->SetCalorimeter(kCalorimeter);
918 
920  ana->SetNWeightForShowerShape(0);
921  //ana->SetWeightForShowerShape(0, 4.6);
922 
925  if(!useSS && !useAsy) ana->SwitchOnFillEbinHistograms();
926 
927  if(!kTM)
928  {
931  }
932  else
933  {
936  }
937 
938  //printf("Set correction slope for SS weight \n");
939  //ana->SetWCorrectionParameter(0.07);
940  //ana->SetNECellCutForShowerShape(0);
941  //ana->SetECellCutForShowerShape(0, 0.07);
942  //ana->SetECellCutForShowerShape(1, 0.1);
943  //ana->SetECellCutForShowerShape(2, 0.2);
944 
945  if(kSimulation)
946  {
948  ana->SwitchOffFillMCOverlapHistograms() ; // Off when possible
949  if(!useSS && !useAsy) ana->SwitchOnFillMCOverlapHistograms() ;
950  }
951 
952  AliCaloPID* caloPID = ana->GetCaloPID();
953  caloPID->SetEMCALDEtaCut(0.025);
954  caloPID->SetEMCALDPhiCut(0.030);
955  caloPID->SetClusterSplittingM02Cut(0,100000); // use parametrized cut, not fixed
956 
957  caloPID->SetPi0MassRange(0.11, 0.18);
958  caloPID->SetEtaMassRange(0.40, 0.60);
959  caloPID->SetPhotonMassRange(0.00, 0.08);
960 
961  caloPID->SetSplitWidthSigma(3.); // cut at 3 sigma of the mean pi0 peak.
962 
963  caloPID->SetClusterSplittingMinNCells(6);
964 
965  if(kCollisions=="PbPb" || kName.Contains("150"))
966  {
967  caloPID->SetClusterSplittingMinNCells(4);
968  ana->SetMinNCells(4);
969  caloPID->SetPi0MassShiftHighECell(0.005);
970  if(kCollisions=="PbPb") ana->SwitchOnFillHighMultHistograms();
971  }
972 
973  ana->AddToHistogramsName("AnaInClusterIM_");
974 
975  if(useAsy)
976  {
977  caloPID->SwitchOnSplitAsymmetryCut() ;
978  }
979  else
980  {
981  printf("InClusterIM: Do not apply Asy cut on merged pi0 in cluster analysis \n");
982  caloPID->SwitchOffSplitAsymmetryCut() ;
983  ana->AddToHistogramsName("AnaInClusterIM_OpenAsy_");
984  }
985 
986  if(!useSS)
987  {
988  printf("InClusterIM: Do not apply SS cut on merged pi0 in cluster analysis \n");
989  caloPID->SwitchOffSplitShowerShapeCut() ;
990  ana->AddToHistogramsName("AnaInClusterIM_OpenSS_");
991  }
992  else caloPID->SwitchOnSplitShowerShapeCut() ;
993 
994  if(!useAsy && !useSS)
995  {
996  printf("InClusterIM: Do not apply SS and Asy cut on merged pi0 in cluster analysis \n");
997  ana->AddToHistogramsName("AnaInClusterIM_OpenSS_OpenAsy_");
998  }
999 
1000  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1001 
1002  ConfigureMC(ana);
1003 
1004  if(kPrint) ana->Print("");
1005 
1006  return ana;
1007 }
1008 
1013 {
1014 
1016  ana->SetDebug(kDebug); //10 for lots of messages
1017 
1018  // selection cuts
1019 
1020  ana->SetMinPt(0.5);
1021  ana->SwitchOnFiducialCut();
1022  ana->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ; //more restrictive cut in reader and after in isolation
1023 
1026 
1027  // Input / output delta AOD settings
1028 
1029  if(!kData.Contains("delta"))
1030  {
1031  ana->SetOutputAODName(Form("Hadron%s",kName.Data()));
1032  ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
1033  //ana->SetOutputAODClassName("AliAODPWG4Particle"); // use if no correlation done
1034  }
1035  else
1036  ana->SetInputAODName(Form("Hadron%s",kName.Data()));
1037  printf("Set Hadron%s\n",kName.Data());
1038 
1039  //Set Histograms name tag, bins and ranges
1040 
1041  ana->AddToHistogramsName("AnaHadrons_");
1042  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1043 
1044  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
1045  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
1046 
1047  ConfigureMC(ana);
1048 
1049  if(kPrint) ana->Print("");
1050 
1051  return ana;
1052 }
1053 
1058 {
1059  AliAnaPi0 *ana = new AliAnaPi0();
1060 
1061  ana->SetDebug(kDebug);//10 for lots of messages
1062 
1063  // Input delta AOD settings
1064  ana->SetInputAODName(Form("Photon%s",kName.Data()));
1065 
1066  // Calorimeter settings
1067  ana->SetCalorimeter(kCalorimeter);
1068 
1069  // Acceptance plots
1070  // ana->SwitchOnFiducialCut(); // Needed to fill acceptance plots with predefined calorimeter acceptances
1071  // ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.7, 100, 180) ;
1072  // ana->GetFiducialCut()->DoEMCALFiducialCut(kTRUE);
1073 
1074  ana->SwitchOffFiducialCut();
1076 
1077  // settings for pp collision mixing
1078  ana->SwitchOnOwnMix(); //Off when mixing done with general mixing frame
1079 
1080  // Cuts
1081  if(kCalorimeter=="EMCAL") ana->SetPairTimeCut(40);
1082 
1083  ana->SetNAsymCuts(1); // no asymmetry cut, previous studies showed small effect.
1084  // In EMCAL assymetry cut prevents combination of assymetric decays which is the main source of pi0 at high E.
1085 
1086  if (kCollisions=="pp" )
1087  {
1088  ana->SetNCentrBin(1);
1089  ana->SetNZvertBin(10);
1090  ana->SetNRPBin(1);
1091  ana->SetNMaxEvMix(100);
1092  }
1093  else if(kCollisions=="PbPb")
1094  {
1095  ana->SetNCentrBin(5);
1096  ana->SetNZvertBin(3);
1097  ana->SetNRPBin(1);
1098  ana->SetNMaxEvMix(5);
1099  }
1100 
1101  ana->SwitchOffSMCombinations();
1103 
1104  // Set Histograms name tag, bins and ranges
1105 
1106  ana->AddToHistogramsName(Form("AnaPi0_TM%d_",kTM));
1107  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1108 
1109  ConfigureMC(ana);
1110 
1111  if(kPrint) ana->Print("");
1112 
1113  return ana;
1114 }
1115 
1122  Int_t analysis, Bool_t useSS = kTRUE, Bool_t useAsy = kTRUE)
1123 {
1124  AliAnaPi0EbE *ana = new AliAnaPi0EbE();
1125  ana->SetDebug(kDebug);//10 for lots of messages
1126 
1127  ana->SetAnalysisType(analysis);
1128  TString opt = "";
1129  if(analysis == AliAnaPi0EbE::kIMCaloTracks) opt = "Conv";
1130  if(analysis == AliAnaPi0EbE::kSSCalo) opt = "SS";
1131 
1132  if(analysis == AliAnaPi0EbE::kIMCalo && kCalorimeter=="EMCAL" && !kSimulation) ana->SetPairTimeCut(100);
1133  if(analysis == AliAnaPi0EbE::kIMCaloTracks) ana->SetInputAODGammaConvName("PhotonsCTS");
1134 
1135  // Common settings for all 3 type of analysis
1136 
1138 
1139  ana->SetCalorimeter(kCalorimeter);
1140 
1141  //Set Histograms name tag, bins and ranges
1142  ana->AddToHistogramsName(Form("Ana%s%sEbE_TM%d_",particle.Data(),opt.Data(),kTM));
1143 
1144  // Specific settings for different type of analysis
1145 
1148 
1149  if(kTM)
1150  {
1151  //printf("--->>>REMOVE MATCHED Pi0\n");
1153  ana->SwitchOffTMHistoFill() ;
1154  }
1155  else
1156  {
1157  //printf("---->>>ACCEPT MATCHED Pi0\n");
1159  ana->SwitchOnTMHistoFill() ;
1160  }
1161 
1162  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1163 
1164  //ana->SwitchOnFillEMCALBCHistograms();
1165 
1166  if(kPrint) ana->Print("");
1167 
1168  ConfigureMC(ana);
1169 
1170  if(!kInputDataType.Contains("delta"))
1171  {
1172  ana->SetOutputAODName(Form("%s%s%s",particle.Data(), opt.Data(), kName.Data()));
1173  ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
1174 
1175  }
1176  else
1177  ana->SetInputAODName(Form("%s%s%s",particle.Data(),opt.Data(),kName.Data()));
1178 
1179  if(analysis!=AliAnaPi0EbE::kSSCalo)
1180  {
1181  // Input / output delta AOD settings
1182 
1183  ana->SetInputAODName(Form("Photon%s",kName.Data()));
1184 
1186  nms->SetParticle(particle);
1187 
1188  // Tighten a bit mass cut with respect to default window
1189  if(particle=="Pi0") nms->SetInvMassCutRange(0.120,0.150);
1190  if(particle=="Eta") nms->SetInvMassCutRange(0.520,0.580);
1191 
1192  //if(!particle.Contains("SideBand")) nms->SwitchOnAngleSelection();
1193  //else nms->SwitchOnAngleSelection();
1194 
1195  nms->SwitchOffAngleSelection();
1196  if(particle.Contains("Pi0SideBand")) // For pi0, do not consider left band
1197  nms->SetSideBandCutRanges(-1,0,0.180,0.220);
1198 
1199  nms->KeepNeutralMesonSelectionHistos(kTRUE);
1200  //nms->SetAngleMaxParam(2,0.2);
1201  nms->SetHistoERangeAndNBins(0, 20, 80) ;
1202  //nms->SetHistoIMRangeAndNBins(0, 1, 400);
1203  }
1204  else
1205  { // cluster splitting settings
1206  ana->SetMinEnergy(6);
1207  ana->SetMaxEnergy(200.);
1208 
1209  ana->SetNLMMinEnergy(0, 10);
1210  ana->SetNLMMinEnergy(1, 6);
1211  ana->SetNLMMinEnergy(2, 6);
1212 
1213  ana->SetMinDistanceToBadChannel(2, 4, 6); // only use the first one
1215 
1216  ana->SetTimeCut(-1e10,1e10); // Open time cut
1217 
1218  // NLM cut, used in all, exclude clusters with more than 2 maxima
1219  ana->SetNLMCut(1, 2) ;
1220 
1221  AliCaloPID* caloPID = ana->GetCaloPID();
1222 
1223  caloPID->SetSplitWidthSigma(3.); // cut at 3 sigma of the mean pi0 peak.
1224 
1225  if(!useSS)
1226  {
1227  printf("Do not apply SS cut on merged pi0 analysis \n");
1228  caloPID->SwitchOffSplitShowerShapeCut() ;
1229  ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenSS_TM%d_",particle.Data(),opt.Data(),kTM));
1230  ana->SetOutputAODName(Form("%s%s%s_OpenSS",particle.Data(), opt.Data(), kName.Data()));
1231  caloPID->SetClusterSplittingM02Cut(0.1,10000);
1232  }
1233  else
1234  {
1235  caloPID->SetClusterSplittingM02Cut(0.3,5); // Do the selection in the analysis class and not in the PID method to fill SS histograms
1236  caloPID->SwitchOnSplitShowerShapeCut() ;
1237  }
1238 
1239  if(useAsy) caloPID->SwitchOnSplitAsymmetryCut() ;
1240  else
1241  {
1242  caloPID->SwitchOffSplitAsymmetryCut() ;
1243  if(!useSS)
1244  {
1245  ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenSS_OpenAsy_TM%d_",particle.Data(),opt.Data(),kTM));
1246  ana->SetOutputAODName(Form("%s%s%s_OpenSS_OpenAsy",particle.Data(), opt.Data(), kName.Data()));
1247  }
1248  else
1249  {
1250  ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenAsy_TM%d_",particle.Data(),opt.Data(),kTM));
1251  ana->SetOutputAODName(Form("%s%s%s_OpenAsy",particle.Data(), opt.Data(), kName.Data()));
1252  }
1253  }
1254 
1255  //For Pi0 only if SwitchOnSimpleSplitMassCut()
1256  caloPID->SetPi0MassRange(0.10, 0.18);
1257  caloPID->SetEtaMassRange(0.40, 0.60);
1258  caloPID->SetPhotonMassRange(0.00, 0.08);
1259 
1260  caloPID->SetClusterSplittingMinNCells(6);
1261 
1262  //caloPID->SetSplitEnergyFractionMinimum(0, 0.95);
1263  //caloPID->SetSplitEnergyFractionMinimum(1, 0.95);
1264  //caloPID->SetSplitEnergyFractionMinimum(2, 0.8);
1265 
1266  if(kCollisions=="PbPb" || kName.Contains("150"))
1267  {
1268  caloPID->SetClusterSplittingMinNCells(4);
1269  caloPID->SetPi0MassShiftHighECell(0.005);
1270  }
1271  }
1272 
1273  return ana;
1274 
1275 }
1276 
1283 {
1285  ana->SetDebug(kDebug); //10 for lots of messages
1286 
1287  // selection cuts
1288 
1289  ana->SetMinEnergy(5);
1290  ana->SetMaxEnergy(200.);
1291  ana->SetMinNCells(3);
1292  ana->SetM02Cut(l0min,l0max);
1293  ana->SetCalorimeter(kCalorimeter);
1294 
1295  //ana->AddToHistogramsName(Form("AnaInClusterIM_%1.2f_%1.2f_",l0min,l0max));
1296  ana->AddToHistogramsName("AnaInClusterIM_");
1297 
1298  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1299 
1300  AliCaloPID* caloPID = ana->GetCaloPID();
1301  caloPID->SetEMCALDEtaCut(0.025);
1302  caloPID->SetEMCALDPhiCut(0.030);
1303  caloPID->SetClusterSplittingM02Cut(0,100); // Do the selection in the analysis class and not in the PID method to fill SS histograms
1304 
1305  caloPID->SetPi0MassRange(0.10, 0.18);
1306  caloPID->SetEtaMassRange(0.40, 0.60);
1307  caloPID->SetPhotonMassRange(0.00, 0.08);
1308 
1309  ConfigureMC(ana);
1310 
1311  if(kPrint) ana->Print("");
1312 
1313  return ana;
1314 }
1315 
1320  Int_t partInCone = AliIsolationCut::kOnlyCharged,
1322  Float_t cone = 0.3,
1323  Float_t pth = 0.3,
1324  Bool_t multi = kFALSE)
1325 {
1327  //ana->SetDebug(kDebug);
1328  ana->SetDebug(kDebug);
1329 
1330  ana->SwitchOnFiducialCut();
1331  //Avoid borders of EMCal
1332  if(kCalorimeter=="EMCAL")
1333  ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.6, 86, 174) ;
1334 
1335  // Same Eta as EMCal, cut in phi if EMCAL was triggering
1336  if(particle=="Hadron" || particle.Contains("CTS"))
1337  {
1338  // if(kTrig.Contains("EMC"))
1339  // ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 260, 360) ;
1340  // else
1341  ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 0, 360) ;
1342  }
1343 
1344  ana->SetMinPt(5);
1345 
1346  // Input / output delta AOD settings
1347 
1348  ana->SetInputAODName(Form("%s%s",particle.Data(),kName.Data()));
1349  ana->SetAODObjArrayName(Form("IC%s_%s",particle.Data(),kName.Data()));
1350 
1351  ana->SetCalorimeter(kCalorimeter);
1352 
1353  if(!kTM) ana->SwitchOnTMHistoFill();
1354  else ana->SwitchOffTMHistoFill();
1355 
1356  ana->SwitchOffSSHistoFill();
1358 
1359  //Do settings for main isolation cut class
1360  AliIsolationCut * ic = ana->GetIsolationCut();
1361  ic->SetDebug(kDebug);
1362 
1363  if(cone >0 && pth > 0)
1364  {
1365  ic->SetPtThreshold(pth);
1366  ic->SetConeSize(cone);
1367  }
1368  else
1369  {
1370  if(kCollisions=="pp")
1371  {
1372  ic->SetPtThreshold(0.5);
1373  ic->SetConeSize(0.4);
1374  }
1375  if(kCollisions=="PbPb")
1376  {
1377  ic->SetPtThreshold(3.);
1378  //ic->SetPtThreshold(1.);
1379  ic->SetConeSize(0.3);
1380  }
1381  }
1382 
1383  ic->SetPtFraction(0.1);
1384  ic->SetSumPtThreshold(1.0) ;
1385  ic->SetParticleTypeInCone(partInCone);
1386  ic->SetICMethod(thresType);
1387 
1388  //Do or not do isolation with previously produced AODs.
1389  //No effect if use of SwitchOnSeveralIsolation()
1390  ana->SwitchOffReIsolation();
1391 
1392  //Multiple IC
1393  if(multi)
1394  {
1395  ic->SetConeSize(1.); // Take all for first iteration
1396  ic->SetPtThreshold(100);// Take all for first iteration
1397  ana->SwitchOnSeveralIsolation() ;
1398  ana->SetAODObjArrayName(Form("MultiIC%sTM%d",particle.Data(),kTM));
1399 
1400  ana->SetNCones(4);
1401  ana->SetNPtThresFrac(4);
1402  ana->SetConeSizes(0,0.3); ana->SetConeSizes(1,0.4);
1403  ana->SetConeSizes(2,0.5); ana->SetConeSizes(3,0.6);
1404  ana->SetPtThresholds(0, 0.5); ana->SetPtThresholds(1, 1); ana->SetPtThresholds(2, 2);
1405  ana->SetPtFractions (0, 0.05) ; ana->SetPtFractions (1, 0.1); ana->SetPtFractions (2, 0.2) ; ana->SetPtFractions (3, 0.3) ;
1406  ana->SetSumPtThresholds(0, 1) ; ana->SetSumPtThresholds(1, 3) ; ana->SetSumPtThresholds(2, 5); ana->SetSumPtThresholds(3, 7) ;
1407 
1408  ana->SwitchOffTMHistoFill();
1409  ana->SwitchOffSSHistoFill();
1410  }
1411  else
1412  ana->SwitchOffSeveralIsolation() ;
1413 
1414  AliCaloPID* caloPID = ana->GetCaloPID();
1415  caloPID->SetEMCALDEtaCut(0.025);
1416  caloPID->SetEMCALDPhiCut(0.030);
1417 
1418  //Set Histograms name tag, bins and ranges
1419 
1420  if(!multi)ana->AddToHistogramsName(Form("AnaIsol%s_TM%d_",particle.Data(),kTM));
1421  else ana->AddToHistogramsName(Form("AnaMultiIsol%s_TM%d_",particle.Data(),kTM));
1422 
1423  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1424 
1425  if(particle=="Hadron" || particle.Contains("CTS"))
1426  {
1427  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
1428  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
1429  }
1430 
1431  ana->SwitchOnRealCaloAcceptance(); // primary particle acceptance histograms
1432  ConfigureMC(ana);
1433 
1434  if(kPrint) ic ->Print("");
1435  if(kPrint) ana->Print("");
1436 
1437  return ana;
1438 }
1439 
1444  Bool_t bIsolated,
1445  Int_t partInCone = AliIsolationCut::kOnlyCharged,
1447  Float_t cone = 0.3,
1448  Float_t pth = 0.3)
1449 {
1451  ana->SetDebug(kDebug);
1452 
1453  ana->SwitchOnAbsoluteLeading(); // Select trigger leading particle of all the selected tracks
1454  ana->SwitchOffNearSideLeading(); // Select trigger leading particle of all the particles at +-90 degrees, default
1455 
1456  //ana->SwitchOnLeadHadronSelection();
1457  //ana->SetLeadHadronPhiCut(TMath::DegToRad()*100., TMath::DegToRad()*260.);
1458  //ana->SetLeadHadronPtCut(0.5, 100);
1459 
1460  ana->SetTriggerPtRange(5,100);
1461  ana->SetAssociatedPtRange(0.2,100);
1462  //ana->SetDeltaPhiCutRange( TMath::Pi()/2,3*TMath::Pi()/2 ); //[90 deg, 270 deg]
1463  ana->SetDeltaPhiCutRange (TMath::DegToRad()*120.,TMath::DegToRad()*240.);
1464  ana->SetUeDeltaPhiCutRange(TMath::DegToRad()*60. ,TMath::DegToRad()*120.);
1466 
1467  ana->SetNAssocPtBins(9);
1468  ana->SetAssocPtBinLimit(0, 0.2) ;
1469  ana->SetAssocPtBinLimit(1, 0.5) ;
1470  ana->SetAssocPtBinLimit(2, 1) ;
1471  ana->SetAssocPtBinLimit(3, 2) ;
1472  ana->SetAssocPtBinLimit(4, 3) ;
1473  ana->SetAssocPtBinLimit(5, 4) ;
1474  ana->SetAssocPtBinLimit(6, 6) ;
1475  ana->SetAssocPtBinLimit(7, 10) ;
1476  ana->SetAssocPtBinLimit(8, 30) ;
1477  ana->SetAssocPtBinLimit(9, 200) ;
1478  //ana->SwitchOnFillPtImbalancePerPtABinHistograms();
1479 
1480  ana->SelectIsolated(bIsolated); // do correlation with isolated photons
1481 
1482  if(bIsolated)
1483  {
1484  //Do settings for main isolation cut class
1485  AliIsolationCut * ic = ana->GetIsolationCut();
1486  ic->SetDebug(kDebug);
1487 
1488  if(cone >0 && pth > 0)
1489  {
1490  ic->SetPtThreshold(pth);
1491  ic->SetConeSize(cone);
1492  }
1493  else
1494  {
1495  if(kCollisions=="pp")
1496  {
1497  ic->SetPtThreshold(0.5);
1498  ic->SetConeSize(0.4);
1499  }
1500  if(kCollisions=="PbPb")
1501  {
1502  ic->SetPtThreshold(3.);
1503  //ic->SetPtThreshold(1.);
1504  ic->SetConeSize(0.3);
1505  }
1506  }
1507 
1508  ic->SetPtFraction(0.1);
1509  ic->SetSumPtThreshold(1.0) ;
1510  ic->SetParticleTypeInCone(partInCone);
1511  ic->SetICMethod(thresType);
1512 
1513  }
1514 
1515  // Mixing with own pool
1516  if(kMix)
1517  {
1518  ana->SwitchOnOwnMix();
1520  }
1521  else
1522  ana->SwitchOffOwnMix();
1523 
1524  ana->SetNZvertBin(20);
1525  ana->SwitchOffCorrelationVzBin() ;
1527 
1528  if(kCollisions=="pp")
1529  {
1530  ana->SetNMaxEvMix(100);
1531  ana->SwitchOnTrackMultBins();
1532  ana->SetNTrackMultBin(10); // same as SetNCentrBin(10);
1533  ana->SetNRPBin(1);
1534  }
1535  else
1536  {
1537  ana->SetNMaxEvMix(10);
1538  ana->SwitchOffTrackMultBins(); // centrality bins
1539  ana->SetNCentrBin(3);
1540  ana->SetNRPBin(3);
1541  if(kName.Contains("60_90"))
1542  {
1543  printf("*** Set mixing for peripheral\n");
1544  ana->SetNMaxEvMix(50);
1545  ana->SetNCentrBin(2);
1546  }
1547  }
1548 
1549  ana->SwitchOnFiducialCut();
1550 
1551  //Avoid borders of EMCal, same as for isolation
1552  if(kCalorimeter=="EMCAL")
1553  ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.6, 86, 174) ;
1554 
1555  // Same Eta as EMCal, cut in phi if EMCAL was triggering
1556  if(particle=="Hadron" || particle.Contains("CTS"))
1557  {
1558  //if(kTrig.Contains("EMC"))
1559  // ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 260, 360) ;
1560  //else
1561  ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 0, 360) ;
1562  }
1563 
1564  // Input / output delta AOD settings
1565 
1566  ana->SetInputAODName(Form("%s%s",particle.Data(),kName.Data()));
1567  ana->SetAODObjArrayName(Form("%sHadronCorrIso%d_%s",particle.Data(),bIsolated,kName.Data()));
1568 
1569  // Fill extra plots on tagged decay photons
1570  // If trigger is pi0/eta found with invariant mass, get the decays
1571  // If trigger is photon, check if it was tagged as decay previously
1572  if(particle!="Hadron" )
1573  {
1574  if(particle.Contains("Pi0") || particle.Contains("Eta"))
1575  {
1578  }
1579  else
1580  {
1582  ana->SwitchOnDecayTriggerDecayCorr(); // Make sure pi0 decay tagging runs before this task
1583  }
1584  }
1585  else
1586  {
1589  }
1590 
1591  if(particle=="Photon")
1592  {
1593  printf("**** SET M02 limits *** \n");
1594  ana->SetM02Cut(0.1,0.27);
1595  }
1596 
1597  // if triggering on PHOS and EMCAL is on
1598  //if(kCalorimeter=="PHOS") ana->SwitchOnNeutralCorr();
1599  ana->SwitchOffNeutralCorr(); // Do only correlation with TPC
1600 
1602 
1604 
1605  // Underlying event
1607  ana->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3);
1608 
1609  //Set Histograms name tag, bins and ranges
1610 
1611  ana->AddToHistogramsName(Form("Ana%sHadronCorr_Iso%d_TM%d_",particle.Data(),bIsolated,kTM));
1612  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1613 
1614  if(particle=="Hadron" || particle.Contains("CTS"))
1615  {
1616  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
1617  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
1618  }
1619 
1620  ConfigureMC(ana);
1621 
1622  if(kPrint) ana->Print("");
1623 
1624  return ana;
1625 }
1626 
1631 {
1633  ana->SetDebug(kDebug); //10 for lots of messages
1634  ana->SetCalorimeter(kCalorimeter);
1635 
1636  ana->SetTimeCut(-1e10,1e10); // Open time cut
1637 
1638  // Study inter detector correlation (PHOS, EMCAL, Tracks, V0)
1639  if(kCalorimeter=="PHOS" && kTrig=="PHOS")
1640  ana->SwitchOnCorrelation(); // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
1641  if(kCalorimeter=="EMCAL" && kClusterArray=="")
1642  ana->SwitchOnCorrelation(); // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
1643  else
1644  ana->SwitchOffCorrelation();
1645 
1646  // Study exotic clusters PHOS and EMCAL
1647  if(kClusterArray=="") ana->SwitchOnStudyBadClusters() ;
1648  else ana->SwitchOffStudyBadClusters() ;
1649 
1650 
1651  ana->SwitchOffFiducialCut();
1655  if(!kExotic)ana->SwitchOnStudyBadClusters();
1656  else ana->SwitchOffStudyBadClusters();
1659 
1660  ana->AddToHistogramsName("QA_"); //Begining of histograms name
1661  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1662 
1663  ConfigureMC(ana);
1664 
1665  if(kPrint) ana->Print("");
1666 
1667  return ana;
1668 }
1669 
1675 {
1677  ana->SetDebug(kDebug); //10 for lots of messages
1678 
1679  // Trigger detector, acceptance and pT cut
1680  ana->SetTriggerDetector("EMCAL");
1681  ana->SetMinPt(10); // Trigger photon, pi0 minimum pT
1683 
1684  // Particles associated to trigger or isolation cone acceptance and pT cut
1685  ana->SetCalorimeter("EMCAL");
1686  ana->SetMinChargedPt(0.2);
1687  ana->SetMinNeutralPt(0.3);
1688  ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.65, 81, 179);
1689  ana->GetFiducialCut()->SetSimpleCTSFiducialCut(0.9, 0, 360);
1690 
1691  // Isolation paramters
1692  AliIsolationCut * ic = ana->GetIsolationCut();
1693  ic->SetDebug(kDebug);
1694  ic->SetPtThreshold(0.5);
1695  ic->SetConeSize(0.5);
1696  ic->SetSumPtThreshold(1.0) ;
1697  ic->SetICMethod(AliIsolationCut::kPtThresIC); // kSumPtIC
1698 
1699  ana->AddToHistogramsName("AnaGenKine_");
1700  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
1701 
1702  if(kPrint) ana->Print("");
1703 
1704  return ana;
1705 }
1706 
1711 {
1712  if(kSimulation) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.
1713  else ana->SwitchOffDataMC() ;
1714 
1715  //Set here generator name, default pythia
1716  //ana->GetMCAnalysisUtils()->SetMCGenerator("");
1717 }
1718 
1723 {
1724  // Set common bins for all analysis and MC histograms filling
1725 
1726  histoRanges->SetHistoPtRangeAndNBins(0, 100, 200) ; // Energy and pt histograms
1727 
1728  if(kCalorimeter=="EMCAL")
1729  {
1730  if ( kYears == 2010 )
1731  {
1732  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 122*TMath::DegToRad(), 78) ;
1733  histoRanges->SetHistoXRangeAndNBins(-230,90,120); // QA
1734  histoRanges->SetHistoYRangeAndNBins(370,450,40); // QA
1735  }
1736  else if ( kYears < 2014 )
1737  {
1738  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
1739  histoRanges->SetHistoXRangeAndNBins(-460,90,200); // QA
1740  histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
1741  }
1742  else // Run2
1743  {
1744  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 329*TMath::DegToRad(), 250) ;
1745  histoRanges->SetHistoXRangeAndNBins(-460,460,230); // QA
1746  histoRanges->SetHistoYRangeAndNBins(-450,450,225); // QA
1747  }
1748 
1749  histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
1750  }
1751  else
1752  {
1753  histoRanges->SetHistoPhiRangeAndNBins(250*TMath::DegToRad(), 320*TMath::DegToRad(), 70) ;
1754  histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
1755  }
1756 
1757  histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 4.9, 500);
1758 
1759  // Invariant mass histoRangeslysis
1760  histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
1761  histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
1762 
1763  // check if time calibration is on
1764  histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000);
1765  histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
1766 
1767  // track-cluster residuals
1768  histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.15,0.15,300);
1769  histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.15,0.15,300);
1770  histoRanges->SetHistodRRangeAndNBins(0.,0.15,150);//QA
1771 
1772  // QA, electron, charged
1773  histoRanges->SetHistoPOverERangeAndNBins(0,2.,200);
1774  histoRanges->SetHistodEdxRangeAndNBins(0.,200.,200);
1775 
1776  // QA
1777  histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
1778  histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
1779  histoRanges->SetHistoZRangeAndNBins(-350,350,175);
1780  histoRanges->SetHistoRRangeAndNBins(430,460,30);
1781  histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
1782  histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
1783 
1784  // QA, correlation
1785  if(kCollisions=="PbPb")
1786  {
1787  histoRanges->SetHistoNClusterCellRangeAndNBins(0,100,100);
1788  histoRanges->SetHistoNClustersRangeAndNBins(0,500,50);
1789  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,2000,200);
1790  }
1791  else
1792  {
1793  histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
1794  histoRanges->SetHistoNClustersRangeAndNBins(0,50,50);
1795  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,200,200);
1796  }
1797 
1798  // xE, zT
1799  histoRanges->SetHistoRatioRangeAndNBins(0.,2.,200);
1800  histoRanges->SetHistoHBPRangeAndNBins (0.,10.,200);
1801 
1802  // Isolation
1803  histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 250);
1804  histoRanges->SetHistoPtSumRangeAndNBins (0, 100, 250);
1805 
1806 }
1807 
1813 {
1814  if(kTrig=="EMC7")
1815  {
1816  printf("CaloTrackCorr trigger EMC7\n");
1817  return AliVEvent::kEMC7;
1818  }
1819  else if (kTrig=="INT7")
1820  {
1821  printf("CaloTrackCorr trigger INT7\n");
1822  return AliVEvent::kINT7;
1823  }
1824  else if(kTrig=="EMC1")
1825  {
1826  printf("CaloTrackCorr trigger EMC1\n");
1827  return AliVEvent::kEMC1;
1828  }
1829  else if(kTrig=="MB")
1830  {
1831  printf("CaloTrackCorr trigger MB\n");
1832  return AliVEvent::kMB;
1833  }
1834  else if(kTrig=="PHOS")
1835  {
1836  printf("CaloTrackCorr trigger PHOS\n");
1837  return AliVEvent::kPHI7;
1838  }
1839  else if(kTrig=="PHOSPb")
1840  {
1841  printf("CaloTrackCorr trigger PHOSPb\n");
1842  return AliVEvent::kPHOSPb;
1843  }
1844  else if(kTrig=="AnyINT")
1845  {
1846  printf("CaloTrackCorr trigger AnyINT\n");
1847  return AliVEvent::kAnyINT;
1848  }
1849  else if(kTrig=="INT")
1850  {
1851  printf("CaloTrackCorr trigger AnyINT\n");
1852  return AliVEvent::kAny;
1853  }
1854  else if(kTrig=="EMCEGA")
1855  {
1856  printf("CaloTrackCorr trigger EMC Gamma\n");
1857  return AliVEvent::kEMCEGA;
1858  }
1859  else if(kTrig=="EMCEJE")
1860  {
1861  printf("CaloTrackCorr trigger EMC Jet\n");
1862  return AliVEvent::kEMCEJE;
1863  }
1864  else if(kTrig=="Central")
1865  {
1866  printf("CaloTrackCorr trigger Central\n");
1867  return (AliVEvent::kCentral | AliVEvent::kMB);
1868  }
1869  else if(kTrig=="CentralEGA")
1870  {
1871  printf("CaloTrackCorr trigger Central+EMCEGA\n");
1872  return (AliVEvent::kCentral | AliVEvent::kEMCEGA);
1873  }
1874  else if(kTrig=="SemiCentral")
1875  {
1876  printf("CaloTrackCorr trigger SemiCentral\n");
1877  return (AliVEvent::kSemiCentral | AliVEvent::kMB);
1878  }
1879  else if(kTrig=="SemiOrCentral")
1880  {
1881  printf("CaloTrackCorr trigger SemiCentral Or Central\n");
1882  return (AliVEvent::kSemiCentral | AliVEvent::kCentral | AliVEvent::kMB);
1883  }
1884 }
1885 
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:283
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:264
void SwitchOnLoadOwnEMCALGeometryMatrices()
void SwitchOnSplitShowerShapeCut()
Definition: AliCaloPID.h:260
Bool_t kOutputAOD
Create output AOD with generated particle AOD objects.
void SwitchOnTMHistoFill()
Definition: AliAnaPhoton.h:93
void SetAssociatedPtRange(Float_t min, Float_t max)
AliAnaParticleIsolation * ConfigureIsolationAnalysis(TString particle="Photon", Int_t partInCone=AliIsolationCut::kOnlyCharged, Int_t thresType=AliIsolationCut::kSumPtFracIC, Float_t cone=0.3, Float_t pth=0.3, Bool_t multi=kFALSE)
void SetTriggerPatchTimeWindow(Int_t min, Int_t max)
Class with utils to perform Isolation Cuts.
virtual void SwitchOnAODHybridTrackSelection()
virtual void SetCentralityBin(Int_t min, Int_t max)
AliAnaElectron * ConfigureElectronAnalysis()
AliEMCALRecoUtils * GetEMCALRecoUtils() const
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:261
void SetClusterSplittingMinNCells(Int_t c)
Definition: AliCaloPID.h:267
void SetHistoPtRangeAndNBins(Float_t min, Float_t max, Int_t n)
Selected photon clusters invariant mass analysis.
Definition: AliAnaPi0.h:39
void SetDebug(Int_t d)
void SetMinChargedPt(Float_t pt)
AliAnaParticleHadronCorrelation * ConfigureHadronCorrelationAnalysis(TString particle, Bool_t bIsolated, Int_t partInCone=AliIsolationCut::kOnlyCharged, Int_t thresType=AliIsolationCut::kSumPtFracIC, Float_t cone=0.3, Float_t pth=0.3)
virtual void SetCalorimeter(TString &calo)
Set the calorimeter for the analysis. A string.
virtual void SetInputAODName(TString name)
virtual void SetTrackComplementaryCuts(AliESDtrackCuts *)
virtual AliIsolationCut * GetIsolationCut()
void SetEMCALEMin(Float_t en)
void SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3)
Definition: AliAnaPhoton.h:114
AliAnaPi0EbE * ConfigurePi0EbEAnalysis(TString particle, Int_t analysis, Bool_t useSS=kTRUE, Bool_t useAsy=kTRUE)
void SetInvMassCutRange(Double_t invmassmin, Double_t invmassmax)
void KeepNeutralMesonSelectionHistos(Bool_t keep)
void SwitchOnSelectedClusterHistoFill()
Definition: AliAnaPi0EbE.h:111
void SwitchOffTMHistoFill()
Definition: AliAnaPhoton.h:94
void SetSimpleEMCALFiducialCut(Float_t abseta, Float_t phimin, Float_t phimax)
Bool_t kSimulation
Declare the analysis simulation.
virtual void SetOutputAODClassName(TString name)
void SwitchOffFillShowerShapeHistograms()
Definition: AliAnaPhoton.h:74
virtual AliNeutralMesonSelection * GetNeutralMesonSelection()
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetSumPtThreshold(Float_t s)
void SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3)
Definition: AliAnaPi0EbE.h:133
void SwitchOffMultipleCutAnalysis()
Definition: AliAnaPi0.h:111
Class for the Calorimeter QA analysis.
void SetHistodRRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetLocalMaximaCutEDiff(Float_t c)
Get trigger particles/partons/jets and correlations at generator level.
void SwitchOffSplitAsymmetryCut()
Definition: AliCaloPID.h:257
void SetAnalysisType(anaTypes ana)
Definition: AliAnaPi0EbE.h:92
void SwitchOffFillWeightHistograms()
void SetNumberOfCellsFromEMCALBorder(Int_t n)
void SwitchOffTMHistoFill()
Definition: AliAnaPi0EbE.h:109
void SetNCellCut(Int_t n)
Definition: AliAnaPhoton.h:122
Select cluster pairs or single merged clusters with pi0 or eta invariant mass.
Definition: AliAnaPi0EbE.h:30
void SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3)
void SetPtFractions(Int_t i, Float_t pt)
2 calorimeter clusters invariant mass selection
Definition: AliAnaPi0EbE.h:86
Selection of electron clusters in calorimeter.
const TString calorimeter
Definition: anaM.C:36
Bool_t IsRecalibrationOn() const
void SetHistoTrackResidualEtaRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Class for event, clusters and tracks filtering and preparation for the AOD analysis.
Bool_t kTM
Remove matched clusters to tracks.
void SetCTSPtMin(Float_t pt)
TString kData
Declare data MC or deltaAOD.
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetPHOSRCut(Float_t rcut)
Definition: AliCaloPID.h:213
void SetEMCALDPhiCut(Float_t dcut)
Definition: AliCaloPID.h:221
virtual void SetOutputAODName(TString name)
void SwitchOffRecalculateClusterTrackMatching()
void SetEventTriggerMask(UInt_t evtTrig=AliVEvent::kAny)
void SetICMethod(Int_t i)
Bool_t kEventSelection
Remove bad events.
void SetEMCALParametrizedMaxTimeCut(Int_t i, Float_t par)
void SwitchOffVertexBCEventSelection()
void SetTriggerDetector(TString &det)
Set the detrimeter for the analysis.
Correlate trigger particles (photon, pi0, tracks) and charged tracks: Azimuthal correlations, xE distributions.
virtual void SetNTrackMultBin(Int_t n=1)
Number of bins in centrality.
Base class for CaloTrackCorr analysis algorithms.
void SwitchOffTrackMatchRejection()
Definition: AliAnaPhoton.h:132
TString kCalorimeter
Use main analysis detector EMCal or PHOS or CTS.
void SetDeltaPhiCutRange(Double_t phimin, Double_t phimax)
void SetUeDeltaPhiCutRange(Double_t uephimin, Double_t uephimax)
1 calorimeter cluster and 1 photon conversion pair invariant mass selection
Definition: AliAnaPi0EbE.h:88
void SetHistoPtInConeRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void SetDebug(Int_t d)
void SetHistoPOverERangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual AliFiducialCut * GetFiducialCut()
virtual AliFiducialCut * GetFiducialCut()
AliAnaChargedParticles * ConfigureChargedAnalysis()
virtual void SetCentralityOpt(Int_t opt)
void SetHistoPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Bool_t kHadronAN
Execute the hadron selection and correlation analysis.
int Int_t
Definition: External.C:63
void SetSideBandCutRanges(Double_t lmin, Double_t lmax, Double_t rmin, Double_t rmax)
virtual AliHistogramRanges * GetHistogramRanges()
unsigned int UInt_t
Definition: External.C:33
void SwitchOnSplitAsymmetryCut()
Definition: AliCaloPID.h:256
void SetHistoPtSumRangeAndNBins(Float_t min, Float_t max, Int_t n)
float Float_t
Definition: External.C:68
void SetTrackStatus(ULong_t bit)
void SetPi0MassShiftHighECell(Float_t s)
Definition: AliCaloPID.h:285
Bool_t IsBadChannelsRemovalSwitchedOn() const
AliCaloTrackReader * ConfigureReader()
Filter EMCal/PHOS clusters for photon analysis.
Definition: AliAnaPhoton.h:33
void SetHistoTrackResidualPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetConeSizes(Int_t i, Float_t r)
Bool_t kExotic
Remove exotic clusters.
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
TString kName
Name of the analysis, used in created AOD branches and histo container.
Class for filtering generated MC particles and prepare them as input for the analysis.
Fill histograms for cluster spectra dependence on pile-up.
void SetEtaCut(Float_t min, Float_t max)
void SetM02Cut(Float_t min=0, Float_t max=10)
void SwitchOnSplitClusterDistToBad()
Definition: AliAnaPi0EbE.h:160
Int_t kMinCen
Set the minimum centrality to be analyzed.
void SwitchOnRecalculateClusterTrackMatching()
void SwitchOnUnMatchedTriggerEventsRemoval()
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SwitchOffTrackMatchRejection()
Definition: AliAnaPi0EbE.h:149
virtual void SetHistoERangeAndNBins(Float_t min, Float_t max, Int_t n)
Base class for event, clusters and tracks filtering and preparation for the analysis.
void SetInputAODGammaConvName(TString name)
Definition: AliAnaPi0EbE.h:98
Bool_t kCalibE
Calibrate energy of clusters.
AliAnaClusterPileUp * ConfigureClusterPileUpAnalysis()
void SetHistoNClusterCellRangeAndNBins(Int_t min, Int_t max, Int_t n)
TString kCollisions
Declare the collision type of the data.
void SetEMCALClusterListName(TString &name)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Definition: AliAnaPi0.cxx:2551
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:305
void SetNumberOfSuperModulesUsed(Int_t nSM)
TString kInputDataType
Declare data ESD/AOD.
void SwitchOnTMHistoFill()
Definition: AliAnaPi0EbE.h:108
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetPi0MassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:304
Class containing more common histogram axis types.
void SetEMCALLambda0CutMax(Float_t lcut)
Definition: AliCaloPID.h:202
void SwitchOnTrackMatchRejection()
Definition: AliAnaPi0EbE.h:148
virtual void SetNCentrBin(Int_t n=1)
Number of bins in reaction plain.
Class for event, clusters and tracks filtering and preparation for the ESD analysis.
virtual void SetEventPlaneMethod(TString m)
void SetNAsymCuts(Int_t s)
Definition: AliAnaPi0.h:117
void SetPHOSEMin(Float_t en)
virtual void SetNRPBin(Int_t n=1)
Number of bins for vertex position.
void 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:306
void SwitchOffUseParametrizedTimeCut()
void SetLocalMaximaCutE(Float_t cut)
void SetPtThresholds(Int_t i, Float_t pt)
void SetdEdxCut(Double_t min, Double_t max)
Int_t kYears
Declare the year of the data.
void SetHistoRatioRangeAndNBins(Float_t min, Float_t max, Int_t n)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetNLMCut(Int_t min, Int_t max)
Definition: AliAnaPhoton.h:125
void SetAssocPtBinLimit(Int_t ibin, Float_t pt)
Set the list of pT limits for the of associated charged (neutral) hadrons.
Steering class of package CaloTrackCorrelartions.
void SetTriggerPtRange(Float_t min, Float_t max)