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