AliPhysics  251aa1e (251aa1e)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AddTaskCaloTrackPi0Flow.C
Go to the documentation of this file.
1 //
2 // AddTask macro for AliAnaPi0Flow within the framework of CaloTrackCorrelation,
3 // similar to AddTaskCaloTrackCorr.C
4 //
5 
6 // Global variables to be accessed by the different methods
7 TString kData = ""; //< Declare data MC or deltaAOD
8 TString kInputDataType = "AOD"; //< Declare data ESD/AOD
9 TString kCalorimeter = "EMCAL"; //< Use main analysis detector EMCal or PHOS or CTS
10 Bool_t kSimulation = kFALSE; //< Declare the analysis simulation
11 Bool_t kEventSelection= kFALSE; //< Remove bad events
12 Bool_t kExotic = kTRUE; //< Remove exotic clusters
13 Bool_t kNonLinearity = kFALSE; //< Correct cluster non linearity
14 Int_t kYears = 2011; //< Declare the year of the data
15 TString kCollisions = "PbPb"; //< Declare the collision type of the data
16 TString kClusterArray = "V1_Ecell150_Eseed300_DT0_WT0"; //< Name of branch with clusters, from AliAnalysisTaskEMCALClusterize
17 Bool_t kRecalTM = kFALSE; //< Recalculate track-cluster matching
18 Bool_t kTM = kTRUE; //< Remove matched clusters to tracks
19 Int_t kMinCen = -1; //< Set the minimum centrality to be analyzed
20 Int_t kMaxCen = -1; //< Set the maximum centrality to be analyzed
21 Bool_t kCalibE = kTRUE; //< Calibrate energy of clusters
22 Bool_t kBadMap = kTRUE; //< Reject bad cells/clusters
23 Bool_t kCalibT = kTRUE; //< Calibrate time of clusters
24 Bool_t kTender = kFALSE; //< Declare that tender was executed
25 Bool_t kOutputAOD = kFALSE; //< Create output AOD with generated particle AOD objects
26 Bool_t kPrint = kFALSE; //< Print setted parameters when configuring
27 Int_t kRunNumber = -1; //< Declare the run number
28 Bool_t kPhosCali = kTRUE; //< Switch on EP flattening by phos
29 Bool_t kCentFlat = kFALSE; //< Switch on Centrality flattening
30 Int_t kDebug = 0; //< Do the analysis with this debug level
31 
32 Bool_t kUseKinematics = kFALSE; //< Use the MC information
33 TString kName = ""; //< Name of the analysis, used in created AOD branches and histo container
34 
35 //
36 // Main method calling all the configuration
37 // Creates a CaloTrackCorr task, configures it and adds it to the analysis manager.
38 //
40  const TString dataType = "AOD",
41  const TString calorimeter = "EMCAL",
42  const Bool_t simulation = kFALSE,
43  const Bool_t eventsel = kFALSE,
44  const Bool_t exotic = kTRUE,
45  const Bool_t nonlin = kFALSE,
46  const Int_t year = 2011,
47  const TString col = "PbPb",
48  AliVEvent::EOfflineTriggerTypes trig = AliVEvent::kCentral + AliVEvent::kSemiCentral + AliVEvent::kMB + AliVEvent::kEMCEGA,
49  const TString clustersArray = "V1_Ecell150_Eseed300_DT0_WT0",
50  const Int_t nlmMin = 1,
51  const Int_t nlmMax = 2,
52  const Bool_t simpleM02Cut = kFALSE,
53  const Bool_t simpleMassCut = kFALSE,
54  const Bool_t recaltm = kFALSE,
55  const Bool_t tm = kTRUE,
56  const Int_t minCen = -1,
57  const Int_t maxCen = -1,
58  const Bool_t calibE = kTRUE,
59  const Bool_t badmap = kTRUE,
60  const Bool_t calibT = kTRUE,
61  const Bool_t tender = kFALSE,
62  const Bool_t outputAOD = kFALSE,
63  const Bool_t printSettings = kFALSE,
64  const Int_t runNumber = -1,
65  const Bool_t isPhosCali = kTRUE,
66  const Bool_t isCentFlat = kFALSE,
67  const Int_t debug = 0
68  )
69 {
70  kData = data;
71  kInputDataType = dataType;
72  kCalorimeter = calorimeter;
73  kSimulation = simulation;
74  kEventSelection = eventsel;
75  kExotic = exotic;
76  kNonLinearity = nonlin;
77  kYears = year;
78  kCollisions = col;
79  kClusterArray = clustersArray;
80  kRecalTM = recaltm;
81  kTM = tm;
82  kMinCen = minCen;
83  kMaxCen = maxCen;
84  kCalibE = calibE;
85  kBadMap = badmap;
86  kCalibT = calibT;
87  kTender = tender;
88  kOutputAOD = outputAOD;
89  kPrint = printSettings;
90  kRunNumber = runNumber;
91  kPhosCali = isPhosCali;
92  kCentFlat = isCentFlat;
93  kDebug = debug;
94 
95  // Get the pointer to the existing analysis manager via the static access method.
96  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
97  if (!mgr)
98  {
99  ::Error("AddTask", "No analysis manager to connect to.");
100  return NULL;
101  }
102  // Check the analysis type using the event handlers connected to the analysis manager.
103  if (!mgr->GetInputEventHandler())
104  {
105  ::Error("AddTask", "This task requires an input event handler");
106  return NULL;
107  }
108  // Make sure the B field is enabled for track selection, some cuts need it
109  ((AliInputEventHandler*)mgr->GetInputEventHandler())->SetNeedField(kTRUE);
110  kInputDataType = "AOD";
111  if(!kData.Contains("delta"))
112  kInputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
113  if(kSimulation)
114  {
115  kUseKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
116  if (!kUseKinematics && data=="AOD" && kInputDataType != "ESD") kUseKinematics = kTRUE; //AOD primary should be available ...
117  }
118  cout<<"********* ACCESS KINE? "<<kUseKinematics<<endl;
119  // Name for containers
120  kName = Form("%s_Cl%s_TM%d",kCalorimeter.Data(), kClusterArray.Data(), kTM);
121  if (kCollisions=="PbPb" && kMaxCen>=0) kName+=Form("Cen%d_%d",kMinCen,kMaxCen);
122  printf("<<<< NAME: %s >>>>>\n",kName.Data());
123 
124  //
125  // Create maker
126  //
128  // General frame setting and configuration
129  maker->SetReader (ConfigureReader() );
130  maker->SetCaloUtils(ConfigureCaloUtils());
131 
132  //
133  // Add and configure analysis
134  //
135  Int_t n = 0; // Analysis number, order is important
136 
137  // Split cluster analysis
138  if (kCalorimeter == "EMCAL") {
139  maker->AddAnalysis(ConfigurePi0EbEAnalysis("Pi0", AliAnaPi0EbE::kSSCalo, kTRUE, kTRUE, nlmMin, nlmMax, simpleM02Cut, simpleMassCut), n++); // Pi0 event by event selection, cluster splitting
140  }
141  maker->AddAnalysis(ConfigurePi0Flow(), n++);
142 
143  maker->SetAnaDebug(kDebug) ;
144  maker->SwitchOnHistogramsMaker() ;
145  if(kData.Contains("delta")) maker->SwitchOffAODsMaker() ;
146  else maker->SwitchOnAODsMaker() ;
147  if(kPrint) maker->Print("");
148  if(kSimulation) maker->SwitchOffDataControlHistograms();
149  printf("<< End Configuration of %d analysis for calorimeter %s >>\n",n, kCalorimeter.Data());
150 
151  //
152  // Create task
153  //
154  AliAnalysisTaskCaloTrackCorrelation * task = new AliAnalysisTaskCaloTrackCorrelation(Form("CaloTrackCorr%s",kName.Data()));
155  task->SetConfigFileName(""); // Don't configure the analysis via configuration file.
156  task->SetDebugLevel(kDebug);
157  // task->SetBranches("ESD:AliESDRun.,AliESDHeader");
158  task->SelectCollisionCandidates(trig);
159  task->SetAnalysisMaker(maker);
160  mgr->AddTask(task);
161 
162  //
163  // Create and set containers
164  //
165  TString outputfile = AliAnalysisManager::GetCommonFileName();
166  AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(kName, TList::Class(),
167  AliAnalysisManager::kOutputContainer,
168  Form("%s",outputfile.Data()));
169  AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Param_%s",kName.Data()), TList::Class(),
170  AliAnalysisManager::kParamContainer,
171  "AnalysisParameters.root");
172  mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
173  mgr->ConnectOutput (task, 1, cout_pc);
174  mgr->ConnectOutput (task, 2, cout_cuts);
175 
176  return task;
177 }
178 
179 //
180 // Configure the class handling the events and cluster/tracks filtering.
181 //
183 {
184  AliCaloTrackReader * reader = 0;
185  if (kInputDataType == "ESD"&& kData=="MC" )
186  reader = new AliCaloTrackMCReader();
187  else if(kInputDataType=="AOD" || kData.Contains("AOD"))
188  reader = new AliCaloTrackAODReader();
189  else if(kInputDataType=="ESD")
190  reader = new AliCaloTrackESDReader();
191  else
192  printf("AliCaloTrackReader::ConfigureReader() - Data combination not known kData=%s, kInputData=%s\n",kData.Data(),kInputDataType.Data());
193 
194  reader->SetDebug(kDebug);//10 for lots of messages
195 
196  //Delta AOD?
197  //reader->SetDeltaAODFileName("");
198  if(kOutputAOD) reader->SwitchOnWriteDeltaAOD() ;
199 
200  // MC settings
201  if(kUseKinematics){
202  if(kInputDataType == "ESD"){
203  reader->SwitchOnStack();
204  reader->SwitchOffAODMCParticles();
205  }
206  else if(kInputDataType == "AOD"){
207  reader->SwitchOffStack();
208  reader->SwitchOnAODMCParticles();
209  }
210  }
211 
212  //------------------------
213  // Detector input filling
214  //------------------------
215 
216  //Min cluster/track E
217  reader->SetEMCALEMin(0.3);
218  reader->SetEMCALEMax(1000);
219  reader->SetPHOSEMin(0.3);
220  reader->SetPHOSEMax(1000);
221  reader->SetCTSPtMin(0.2);
222  reader->SetCTSPtMax(1000);
223 
224  // Time cuts
225  if(kSimulation)
226  {
227  reader->SwitchOffUseTrackTimeCut();
229  reader->SwitchOffUseEMCALTimeCut();
230  reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
231  }
232  else
233  {
234  if(kCalibT)
235  {
236  printf("Set time cut parameters for run %d\n",kRunNumber);
237  reader->SwitchOnUseEMCALTimeCut();
239 
240  //Absolute window
241  reader->SetEMCALTimeCut(-25,20);
242 
243  //Parametrization
244  if (kRunNumber >= 151636 && kRunNumber <= 155384 )
245  {
246  printf("Set time parameters for LHC11c");
249  }
250  else if(kRunNumber >= 156447 && kRunNumber <= 159635 )
251  {
252  printf("Set time parameters for LHC11d");
255  }
256  else
257  {
259  }
260  }
261  else
262  {
264  reader->SwitchOffUseEMCALTimeCut();
265  reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
266  }
267  }
268 
269  reader->SwitchOnFiducialCut();
270  reader->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ;
271 
272  // Tracks
273  reader->SwitchOnCTS();
275 
278 
279  reader->SwitchOffUseTrackTimeCut();
280  reader->SetTrackTimeCut(0,50);
281 
282  reader->SwitchOffUseTrackDCACut();
283  //reader->SetTrackDCACut(0,0.0105);
284  //reader->SetTrackDCACut(1,0.035);
285  //reader->SetTrackDCACut(2,1.1);
286 
287  if(kInputDataType=="ESD")
288  {
289  gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/macros/CreateTrackCutsPWGJE.C");
290  //AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10041004);
291  //reader->SetTrackCuts(esdTrackCuts);
292  //reader->SwitchOnConstrainTrackToVertex();
293 
294  if(kYears>2010)
295  {
296  //Hybrids 2011
297  AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001008);
298  reader->SetTrackCuts(esdTrackCuts);
299  AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10011008);
300  reader->SetTrackComplementaryCuts(esdTrackCuts2);
301  }
302  else
303  {
304  //Hybrids 2010
305  AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001006);
306  reader->SetTrackCuts(esdTrackCuts);
307  AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10041006);
308  reader->SetTrackComplementaryCuts(esdTrackCuts2);
309  }
310  }
311  else if(kInputDataType=="AOD")
312  {
313  //reader->SetTrackFilterMask(128); // Filter bit, not mask, use if off hybrid
314  reader->SwitchOnAODHybridTrackSelection(); // Check that the AODs have Hybrids!!!!
315  reader->SetTrackStatus(AliVTrack::kITSrefit);
316  //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
317  }
318 
319  // Calorimeter
320 
321  reader->SetEMCALClusterListName(kClusterArray);
322  if(kClusterArray == "" && !kTender)
323  {
324  printf("**************** Standard EMCAL clusters branch analysis **************** \n");
326  // Check in ConfigureCaloUtils that the recalibration and bad map are ON
327  }
328  else
329  {
330  printf("**************** Input for analysis is Clusterizer %s **************** \n", kClusterArray.Data());
332  }
333 
335 
336  if(kCalorimeter == "EMCAL") {
337  reader->SwitchOnEMCALCells();
338  reader->SwitchOnEMCAL();
339  }
340  if(kCalorimeter == "PHOS") {
341  reader->SwitchOnPHOSCells();
342  reader->SwitchOnPHOS();
343  }
344 
345  // for case data="deltaAOD", no need to fill the EMCAL/PHOS cluster lists
346  if(kData.Contains("delta"))
347  {
348  reader->SwitchOffEMCAL();
349  reader->SwitchOffPHOS();
350  reader->SwitchOffEMCALCells();
351  reader->SwitchOffPHOSCells();
352  }
353 
354  //-----------------
355  // Event selection
356  //-----------------
357 
358  //reader->RejectFastClusterEvents() ;
359 
360  // Event triggered selection settings
362  //reader->SwitchOffTriggerClusterTimeRecal() ;
363 
364  //redefine for other periods, triggers
365 
366  //if(!kUseKinematics) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma
367 
368  reader->SwitchOnEventTriggerAtSE();
369 
370  reader->SetZvertexCut(10.); // Open cut
371  reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
372 
373  if(kEventSelection)
374  {
375  reader->SwitchOnEventPileUpRejection(); // remove pileup by default
376  reader->SwitchOnV0ANDSelection() ; // and besides v0 AND
377  }
378  else
379  {
380  reader->SwitchOffPileUpEventRejection();// remove pileup by default
381  reader->SwitchOffV0ANDSelection() ; // and besides v0 AND
382  }
383 
384  if(kCollisions=="PbPb")
385  {
386  // Centrality
387  reader->SwitchOnAliCentrality();
388  reader->SetCentralityClass("V0M");
389  reader->SetCentralityOpt(100); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
390  reader->SetCentralityBin(kMinCen,kMaxCen); // Accept all events, if not select range
391 
392  // Event plane (only used in Maker and mixing for AliAnaPi0/AliAnaHadronCorrelation for the moment)
393  reader->SetEventPlaneMethod("V0");
394  }
395 
396  if(kPrint) reader->Print("");
397 
398  return reader;
399 }
400 
401 //
402 // Configure the class handling the calorimeter clusters specific methods
403 //
405 {
407  cu->SetDebug(kDebug);
408 
409  // Remove clusters close to borders, at least max energy cell is 1 cell away
412 
413  // Search of local maxima in cluster
414  if(kCollisions=="pp")
415  {
416  cu->SetLocalMaximaCutE(0.1);
417  cu->SetLocalMaximaCutEDiff(0.03);
418  if(kName.Contains("150"))
419  {
420  printf("Reclusterize with 150 threshold, set PbPb settings\n");
421  cu->SetLocalMaximaCutE(0.2);
422  cu->SetLocalMaximaCutEDiff(0.03);
423  }
424  }
425  else
426  {
427  cu->SetLocalMaximaCutE(0.2);
428  cu->SetLocalMaximaCutEDiff(0.03);
429  }
430 
431  cu->SwitchOffClusterPlot();
432 
433  if (kRecalTM) cu->SwitchOnRecalculateClusterTrackMatching(); // Done in clusterization
435 
437 
438  //EMCAL settings
439 
440  if(!kSimulation)
442 
443  AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
444 
445  if(!kSimulation)
446  {
447  cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
448  if(kClusterArray == "" && !kTender) cu->SwitchOnRunDepCorrection();
449  }
450 
451  gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/EMCAL/macros/ConfigureEMCALRecoUtils.C");
453  kSimulation,
454  kExotic,
455  kTRUE,//kNonLinearity,
456  kCalibE,
457  kBadMap,
458  kCalibT);
459  //recou->SetExoticCellDiffTimeCut(50.);
460 
461 
462  if( kNonLinearity )
463  {
464  printf("ConfigureCaloUtils() - Apply non linearity to EMCAL\n");
466  }
467 
468  printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
469  printf("ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
470 
471 
472  if(kCalorimeter=="PHOS")
473  {
474  if (kYears < 2014) cu->SetNumberOfSuperModulesUsed(3);
475  else cu->SetNumberOfSuperModulesUsed(4);
476  }
477  else
478  {
479  if (kYears == 2010) cu->SetNumberOfSuperModulesUsed(4); //EMCAL first year
480  else if (kYears < 2014) cu->SetNumberOfSuperModulesUsed(10);
481  else cu->SetNumberOfSuperModulesUsed(20);
482  }
483 
484  // PHOS
486 
487  if(kPrint) cu->Print("");
488 
489  return cu;
490 }
491 
492 //
493 // Configure the task doing the pi0 even by event selection via the split method.
494 // Here the pairs, clusters, are added to an AOD branch to be used by other analysis
495 // unlike in ConfigurePi0Analysis.
496 //
498  Int_t analysis, Bool_t useSS = kTRUE, Bool_t useAsy = kTRUE,
499  Int_t nlmMin = 1, Int_t nlmMax = 2,
500  Bool_t simpleSplitM02Cut = kFALSE, Bool_t simpleSplitMassCut = kFALSE)
501 {
502  AliAnaPi0EbE *ana = new AliAnaPi0EbE();
503  ana->SetDebug(kDebug);//10 for lots of messages
504 
505  ana->SetAnalysisType(analysis);
506  TString opt = "";
507  if (analysis == AliAnaPi0EbE::kIMCaloTracks) opt = "Conv";
508  if (analysis == AliAnaPi0EbE::kSSCalo) opt = "SS";
509  if (analysis == AliAnaPi0EbE::kIMCalo && kCalorimeter=="EMCAL" && !kSimulation) ana->SetPairTimeCut(100);
510  if (analysis == AliAnaPi0EbE::kIMCaloTracks) ana->SetInputAODGammaConvName("PhotonsCTS");
511 
512  // Common settings for all 3 type of analysis
514  ana->SetCalorimeter(kCalorimeter);
515 
516  //Set Histograms name tag, bins and ranges
517  ana->AddToHistogramsName(Form("Ana%s%sEbE_TM%d_",particle.Data(),opt.Data(),kTM));
518 
519  // Specific settings for different type of analysis
520 
523 
524  if (kTM) {
525  //printf("--->>>REMOVE MATCHED Pi0\n");
527  ana->SwitchOffTMHistoFill() ;
528  } else {
529  //printf("---->>>ACCEPT MATCHED Pi0\n");
531  ana->SwitchOnTMHistoFill() ;
532  }
533 
534  SetHistoRangeAndNBins(ana->GetHistogramRanges()); // see method below
535 
536  //ana->SwitchOnFillEMCALBCHistograms();
537 
538  if (!kInputDataType.Contains("delta")) {
539  ana->SetOutputAODName(Form("%s%s%s",particle.Data(), opt.Data(), kName.Data()));
540  ana->SetOutputAODClassName("AliAODPWG4Particle");
541  } else
542  ana->SetInputAODName(Form("%s%s%s",particle.Data(),opt.Data(),kName.Data()));
543 
544  // cluster splitting settings
545  ana->SetMinEnergy(6);
546  ana->SetMaxEnergy(200.);
547  ana->SetNLMMinEnergy(0, 10);
548  ana->SetNLMMinEnergy(1, 6);
549  ana->SetNLMMinEnergy(2, 6);
550  ana->SetMinDistanceToBadChannel(2, 4, 6); // only use the first one
552  ana->SetTimeCut(-1e10,1e10); // Open time cut
553 
554  // NLM cut, used in all, exclude clusters with more than 2 maxima
555  ana->SetNLMCut(nlmMin, nlmMax) ;
556 
557  AliCaloPID* caloPID = ana->GetCaloPID();
558  caloPID->SetSplitWidthSigma(3.); // cut at 3 sigma of the mean pi0 peak.
559 
560  if (!useSS) {
561  printf("Do not apply SS cut on merged pi0 analysis \n");
562  caloPID->SwitchOffSplitShowerShapeCut() ;
563  ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenSS_TM%d_",particle.Data(),opt.Data(),kTM));
564  ana->SetOutputAODName(Form("%s%s%s_OpenSS",particle.Data(), opt.Data(), kName.Data()));
565  caloPID->SetClusterSplittingM02Cut(0.1,10000);
566  } else {
567  caloPID->SetClusterSplittingM02Cut(0.3,5); // Do the selection in the analysis class and not in the PID method to fill SS histograms
568  caloPID->SwitchOnSplitShowerShapeCut() ;
569  if (simpleSplitM02Cut) caloPID->SwitchOnSimpleSplitM02Cut();
570  }
571 
572  if (simpleSplitMassCut) caloPID->SwitchOnSimpleSplitMassCut();
573 
574  if (useAsy) caloPID->SwitchOnSplitAsymmetryCut() ;
575  else {
576  caloPID->SwitchOffSplitAsymmetryCut() ;
577  if (!useSS) {
578  ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenSS_OpenAsy_TM%d_",particle.Data(),opt.Data(),kTM));
579  ana->SetOutputAODName(Form("%s%s%s_OpenSS_OpenAsy",particle.Data(), opt.Data(), kName.Data()));
580  } else {
581  ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenAsy_TM%d_",particle.Data(),opt.Data(),kTM));
582  ana->SetOutputAODName(Form("%s%s%s_OpenAsy",particle.Data(), opt.Data(), kName.Data()));
583  }
584  }
585 
586  //For Pi0 only if SwitchOnSimpleSplitMassCut()
587  caloPID->SetPi0MassRange(0.11, 0.18);
588  caloPID->SetEtaMassRange(0.40, 0.60);
589  caloPID->SetPhotonMassRange(0.00, 0.08);
590  caloPID->SetClusterSplittingMinNCells(6);
591  //caloPID->SetSplitEnergyFractionMinimum(0, 0.95);
592  //caloPID->SetSplitEnergyFractionMinimum(1, 0.95);
593  //caloPID->SetSplitEnergyFractionMinimum(2, 0.8);
594  if (kCollisions=="PbPb" || kName.Contains("150")) {
595  caloPID->SetClusterSplittingMinNCells(4);
596  caloPID->SetPi0MassShiftHighECell(0.005);
597  }
598 
599  if (kPrint) ana->Print("");
600  return ana;
601 }
602 
603 //
604 // Configure the task doing the pi0 flow.
605 // Input AOD branch is from task AliAnaPi0EbE.
606 //
608 {
610  ana->SetDebug(kDebug);
611 
612  TString particle = "Pi0";
613  TString opt = "SS";
614  ana->SetInputAODName(Form("%s%s%s",particle.Data(),opt.Data(),kName.Data()));
615  ana->IsPHOSCali(kPhosCali);
616  ana->IsCentFlat(kCentFlat);
617 
618  if (kPrint) ana->Print("");
619  return ana;
620 }
621 
622 //
623 // Set common histograms binning and ranges
624 //
626 {
627  // Set common bins for all analysis and MC histograms filling
628 
629  histoRanges->SetHistoPtRangeAndNBins(0, 100, 200) ; // Energy and pt histograms
630 
631  if(kCalorimeter=="EMCAL")
632  {
633  if ( kYears == 2010 )
634  {
635  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 122*TMath::DegToRad(), 78) ;
636  histoRanges->SetHistoXRangeAndNBins(-230,90,120); // QA
637  histoRanges->SetHistoYRangeAndNBins(370,450,40); // QA
638  }
639  else if ( kYears < 2014 )
640  {
641  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
642  histoRanges->SetHistoXRangeAndNBins(-460,90,200); // QA
643  histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
644  }
645  else // Run2
646  {
647  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 329*TMath::DegToRad(), 250) ;
648  histoRanges->SetHistoXRangeAndNBins(-460,460,230); // QA
649  histoRanges->SetHistoYRangeAndNBins(-450,450,225); // QA
650  }
651 
652  histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
653  }
654  else
655  {
656  histoRanges->SetHistoPhiRangeAndNBins(250*TMath::DegToRad(), 320*TMath::DegToRad(), 70) ;
657  histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
658  }
659 
660  histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 4.9, 500);
661 
662  // Invariant mass histoRangeslysis
663  histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
664  histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
665 
666  // check if time calibration is on
667  histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000);
668  histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
669 
670  // track-cluster residuals
671  histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.15,0.15,300);
672  histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.15,0.15,300);
673  histoRanges->SetHistodRRangeAndNBins(0.,0.15,150);//QA
674 
675  // QA, electron, charged
676  histoRanges->SetHistoPOverERangeAndNBins(0,2.,200);
677  histoRanges->SetHistodEdxRangeAndNBins(0.,200.,200);
678 
679  // QA
680  histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
681  histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
682  histoRanges->SetHistoZRangeAndNBins(-350,350,175);
683  histoRanges->SetHistoRRangeAndNBins(430,460,30);
684  histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
685  histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
686 
687  // QA, correlation
688  if(kCollisions=="PbPb")
689  {
690  histoRanges->SetHistoNClusterCellRangeAndNBins(0,100,100);
691  histoRanges->SetHistoNClustersRangeAndNBins(0,500,50);
692  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,2000,200);
693  }
694  else
695  {
696  histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
697  histoRanges->SetHistoNClustersRangeAndNBins(0,50,50);
698  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,200,200);
699  }
700 
701  // xE, zT
702  histoRanges->SetHistoRatioRangeAndNBins(0.,2.,200);
703  histoRanges->SetHistoHBPRangeAndNBins (0.,10.,200);
704 
705  // Isolation
706  histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 250);
707  histoRanges->SetHistoPtSumRangeAndNBins (0, 100, 250);
708 
709 }
void SetHistoTrackMultiplicityRangeAndNBins(Int_t min, Int_t max, Int_t n)
virtual void SetDebug(Int_t d)
void SetNumberOfCellsFromPHOSBorder(Int_t n)
void ana(Int_t mode=mGRID)
Definition: ana.C:86
void SetSimpleCTSFiducialCut(Float_t abseta, Float_t phimin, Float_t phimax)
void SetHistoMassRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void AddToHistogramsName(TString add)
void SetSplitWidthSigma(Float_t s)
Definition: AliCaloPID.h:248
virtual void SwitchOnFiducialCut()
void SetHistoXRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetClusterSplittingM02Cut(Float_t min=0, Float_t max=100)
Definition: AliCaloPID.h:229
void SwitchOnLoadOwnEMCALGeometryMatrices()
void SwitchOnSplitShowerShapeCut()
Definition: AliCaloPID.h:225
TString kData
virtual void SwitchOnAODHybridTrackSelection()
virtual void SetCentralityBin(Int_t min, Int_t max)
AliEMCALRecoUtils * GetEMCALRecoUtils() const
Bool_t kEventSelection
void SetEMCALParametrizedMinTimeCut(Int_t i, Float_t par)
Int_t kRunNumber
void SetTimeCut(Double_t min, Double_t max)
Definition: AliAnaPi0EbE.h:143
void SwitchOffClusterELinearityCorrection()
void SetCTSPtMax(Float_t pt)
void SwitchOffSplitShowerShapeCut()
Definition: AliCaloPID.h:226
Bool_t kNonLinearity
void SetClusterSplittingMinNCells(Int_t c)
Definition: AliCaloPID.h:232
void SetHistoPtRangeAndNBins(Float_t min, Float_t max, Int_t n)
AliAnaPi0Flow * ConfigurePi0Flow()
virtual void SetCalorimeter(TString &calo)
Set the calorimeter for the analysis. A string.
virtual void SetInputAODName(TString name)
virtual void SetTrackComplementaryCuts(AliESDtrackCuts *)
void SetEMCALEMin(Float_t en)
Bool_t kUseKinematics
void SwitchOnSelectedClusterHistoFill()
Definition: AliAnaPi0EbE.h:112
virtual void SetOutputAODClassName(TString name)
void SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3)
Definition: AliAnaPi0EbE.h:134
void SetHistodRRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetLocalMaximaCutEDiff(Float_t c)
void SwitchOffSplitAsymmetryCut()
Definition: AliCaloPID.h:222
void SetAnalysisType(anaTypes ana)
Definition: AliAnaPi0EbE.h:93
Int_t kMinCen
void SetNumberOfCellsFromEMCALBorder(Int_t n)
void SwitchOffTMHistoFill()
Definition: AliAnaPi0EbE.h:110
Select cluster pairs or single merged clusters with pi0 or eta invariant mass.
Definition: AliAnaPi0EbE.h:31
TString kInputDataType
2 calorimeter clusters invariant mass selection
Definition: AliAnaPi0EbE.h:87
const TString calorimeter
Definition: anaM.C:35
void IsCentFlat(Bool_t e)
Definition: AliAnaPi0Flow.h:43
Bool_t IsRecalibrationOn() const
Bool_t kPrint
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.
AliAnalysisTaskCaloTrackCorrelation * AddTaskCaloTrackPi0Flow(const TString data="", const TString dataType="AOD", const TString calorimeter="EMCAL", const Bool_t simulation=kFALSE, const Bool_t eventsel=kFALSE, const Bool_t exotic=kTRUE, const Bool_t nonlin=kFALSE, const Int_t year=2011, const TString col="PbPb", AliVEvent::EOfflineTriggerTypes trig=AliVEvent::kCentral+AliVEvent::kSemiCentral+AliVEvent::kMB+AliVEvent::kEMCEGA, const TString clustersArray="V1_Ecell150_Eseed300_DT0_WT0", const Int_t nlmMin=1, const Int_t nlmMax=2, const Bool_t simpleM02Cut=kFALSE, const Bool_t simpleMassCut=kFALSE, const Bool_t recaltm=kFALSE, const Bool_t tm=kTRUE, const Int_t minCen=-1, const Int_t maxCen=-1, 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 Int_t runNumber=-1, const Bool_t isPhosCali=kTRUE, const Bool_t isCentFlat=kFALSE, const Int_t debug=0)
void SetCTSPtMin(Float_t pt)
virtual void SetOutputAODName(TString name)
void SwitchOffRecalculateClusterTrackMatching()
void SetEMCALParametrizedMaxTimeCut(Int_t i, Float_t par)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SwitchOffVertexBCEventSelection()
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)
Bool_t kCentFlat
virtual void SetDebug(Int_t d)
void SetHistoPOverERangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual AliFiducialCut * GetFiducialCut()
virtual void SetCentralityOpt(Int_t opt)
void SetHistoPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
int Int_t
Definition: External.C:63
virtual AliHistogramRanges * GetHistogramRanges()
void SwitchOnSplitAsymmetryCut()
Definition: AliCaloPID.h:221
void SetHistoPtSumRangeAndNBins(Float_t min, Float_t max, Int_t n)
AliCalorimeterUtils * ConfigureCaloUtils()
Bool_t kRecalTM
void SetTrackStatus(ULong_t bit)
void SetPi0MassShiftHighECell(Float_t s)
Definition: AliCaloPID.h:250
Bool_t IsBadChannelsRemovalSwitchedOn() const
void SetHistoTrackResidualPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
Class for filtering generated MC particles and prepare them as input for the analysis.
void SwitchOnSplitClusterDistToBad()
Definition: AliAnaPi0EbE.h:161
void SwitchOnRecalculateClusterTrackMatching()
Bool_t kCalibT
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Bool_t kTM
void SwitchOffTrackMatchRejection()
Definition: AliAnaPi0EbE.h:150
Base class for event, clusters and tracks filtering and preparation for the analysis.
void SetHistoRangeAndNBins(AliHistogramRanges *histoRanges)
void SetInputAODGammaConvName(TString name)
Definition: AliAnaPi0EbE.h:99
void SetHistoNClusterCellRangeAndNBins(Int_t min, Int_t max, Int_t n)
void SetEMCALClusterListName(TString &name)
TString kCalorimeter
void SetHistoYRangeAndNBins(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.
void SwitchOnSimpleSplitMassCut()
Definition: AliCaloPID.h:215
virtual void SetZvertexCut(Float_t zcut=10.)
void SetEtaMassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:270
void SetNumberOfSuperModulesUsed(Int_t nSM)
void SwitchOnTMHistoFill()
Definition: AliAnaPi0EbE.h:109
void SetPi0MassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:269
Class containing more common histogram axis types.
virtual void SwitchOnAliCentrality()
void SwitchOnTrackMatchRejection()
Definition: AliAnaPi0EbE.h:149
void IsPHOSCali(Bool_t e)
Definition: AliAnaPi0Flow.h:42
Class for event, clusters and tracks filtering and preparation for the ESD analysis.
Bool_t kTender
virtual void SetEventPlaneMethod(TString m)
void SetPHOSEMin(Float_t en)
Bool_t kBadMap
void SetHistoNClustersRangeAndNBins(Int_t min, Int_t max, Int_t n)
virtual void SetTrackCuts(AliESDtrackCuts *)
TString kCollisions
void SetNLMCut(Int_t min, Int_t max)
Definition: AliAnaPi0EbE.h:101
Int_t kDebug
virtual void SetCentralityClass(TString name)
Int_t kYears
TString kClusterArray
void SetHistoEtaRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOffFillWeightHistograms()
Definition: AliAnaPi0EbE.h:153
void SetTrackTimeCut(Double_t a, Double_t b)
void SetEMCALTimeCut(Double_t a, Double_t b)
AliCaloTrackReader * ConfigureReader()
void SetHistoAsymmetryRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoV0MultiplicityRangeAndNBins(Int_t min, Int_t max, Int_t n)
Main class conecting the CaloTrackCorrelations package and Analysis Frame.
void SwitchOffLoadOwnPHOSGeometryMatrices()
Bool_t kOutputAOD
Bool_t kCalibE
void SetHistoZRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoV0SignalRangeAndNBins(Int_t min, Int_t max, Int_t n)
void SetHistoTimeRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoFinePtRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetEMCALEMax(Float_t en)
Bool_t kSimulation
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 SetNLMMinEnergy(Int_t i, Float_t min)
Definition: AliAnaPi0EbE.h:139
void SetHistoShowerShapeRangeAndNBins(Float_t min, Float_t max, Int_t n)
bool Bool_t
Definition: External.C:53
Bool_t kExotic
void SetPHOSEMax(Float_t en)
void SetHistodEdxRangeAndNBins(Float_t min, Float_t max, Int_t n)
Class with utils specific to calorimeter clusters/cells.
void SetHistoHBPRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoRRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoVertexDistRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoDiffTimeRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetPhotonMassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:271
void SwitchOffUseParametrizedTimeCut()
Bool_t kPhosCali
void SetLocalMaximaCutE(Float_t cut)
AliAnaPi0EbE * ConfigurePi0EbEAnalysis(TString particle, Int_t analysis, Bool_t useSS=kTRUE, Bool_t useAsy=kTRUE, Int_t nlmMin=1, Int_t nlmMax=2, Bool_t simpleSplitM02Cut=kFALSE, Bool_t simpleSplitMassCut=kFALSE)
TString kName
Int_t kMaxCen
void SetHistoRatioRangeAndNBins(Float_t min, Float_t max, Int_t n)
void ConfigureEMCALRecoUtils(AliEMCALRecoUtils *reco, Bool_t bMC=kFALSE, Bool_t bExotic=kTRUE, Bool_t bNonLin=kFALSE, Bool_t bRecalE=kTRUE, Bool_t bBad=kTRUE, Bool_t bRecalT=kTRUE)
Steering class of package CaloTrackCorrelartions.
void SwitchOnSimpleSplitM02Cut()
Definition: AliCaloPID.h:218