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