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