AliPhysics  7f2a7c4 (7f2a7c4)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AddTaskPi0IMGammaCorrQA.C
Go to the documentation of this file.
1 
16 
36  const Bool_t simulation = kFALSE,
37  const TString collision = "pp",
38  const TString suffix = "default",
39  const Bool_t qaan = kTRUE,
40  const Bool_t hadronan = kTRUE,
41  const Bool_t calibrate = kTRUE,
42  const Int_t minTime = -1000,
43  const Int_t maxTime = 1000,
44  const Int_t minCen = -1,
45  const Int_t maxCen = -1,
46  const Int_t debugLevel = -1,
47  const Int_t year = 2015
48  )
49 {
50  if(simulation && !suffix.Contains("default"))
51  {
52  printf("AddTaskPi0IMGammaCorrQA - CAREFUL : Triggered events not checked in simulation!! \n");
53  return 0x0;
54  }
55 
56  // Get the pointer to the existing analysis manager via the static access method.
57 
58  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
59  if (!mgr)
60  {
61  ::Error("AddTaskPi0IMGammaCorrQA", "No analysis manager to connect to.");
62  return NULL;
63  }
64 
65  // Check the analysis type using the event handlers connected to the analysis manager.
66 
67  if (!mgr->GetInputEventHandler())
68  {
69  ::Error("AddTaskPi0IMGammaCorrQA", "This task requires an input event handler");
70  return NULL;
71  }
72 
73  // Make sure the B field is enabled for track selection, some cuts need it
74  ((AliInputEventHandler*)mgr->GetInputEventHandler())->SetNeedField(kTRUE);
75 
76  TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
77 
78  // Name for containers
79 
80  TString containerName = Form("%s_%s",calorimeter.Data(), suffix.Data());
81 
82  if(collision!="pp" && maxCen>=0) containerName+=Form("Cen%d_%d",minCen,maxCen);
83 
84  printf("AddTaskPi0IMGammaCorrQA - Container NAME: %s \n",containerName.Data());
85 
86  // #### Configure analysis ####
87 
89 
90  // General frame setting and configuration
91  maker->SetReader ( ConfigureReader (inputDataType,collision,calibrate,minTime,maxTime,minCen,maxCen,simulation,year,debugLevel) );
92  maker->SetCaloUtils( ConfigureCaloUtils(calorimeter,simulation,calibrate,year,debugLevel) );
93 
94  // Analysis tasks setting and configuration
95  Int_t n = 0;//Analysis number, order is important
96 
97  // Photon analysis
98  maker->AddAnalysis(ConfigurePhotonAnalysis(calorimeter,0,collision,containerName,simulation,year ,debugLevel), n++); // Photon cluster selection
99  maker->AddAnalysis(ConfigurePi0Analysis (calorimeter,0,collision,containerName,simulation,year,qaan,debugLevel,minCen) ,n++); // Previous photon invariant mass
100  if(qaan) maker->AddAnalysis(ConfigureQAAnalysis(calorimeter,0,collision,simulation,year,debugLevel),n++);
101 
102  if(calorimeter=="EMCAL") // DCal
103  {
104  maker->AddAnalysis(ConfigurePhotonAnalysis(calorimeter,1,collision,containerName,simulation,year ,debugLevel), n++); // Photon cluster selection
105  maker->AddAnalysis(ConfigurePi0Analysis (calorimeter,1,collision,containerName,simulation,year,qaan,debugLevel,minCen) ,n++); // Previous photon invariant mass
106  if(qaan) maker->AddAnalysis(ConfigureQAAnalysis(calorimeter,1,collision,simulation,year,debugLevel),n++);
107  }
108 
109  if(hadronan)
110  {
111  maker->GetReader()->SwitchOnCTS();
112  maker->AddAnalysis(ConfigureChargedAnalysis(collision,containerName,simulation,year,debugLevel), n++); // charged tracks plots
113  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Photon",calorimeter,0,collision,containerName,simulation,year,debugLevel,minCen), n++); // Gamma hadron correlation
114  if(calorimeter=="EMCAL") // DCal
115  maker->AddAnalysis(ConfigureHadronCorrelationAnalysis("Photon",calorimeter,1,collision,containerName,simulation,year,debugLevel,minCen), n++); // Gamma hadron correlation
116  }
117 
118 
119  maker->SetAnaDebug(debugLevel) ;
120  maker->SwitchOnHistogramsMaker() ;
121  maker->SwitchOnAODsMaker() ;
122 // maker->SwitchOffDataControlHistograms();
123 // if(suffix.Contains("EMC"))
124 // maker->SwitchOnDataControlHistograms();
125 
126  if(simulation)
127  {
128  // Calculate the cross section weights, apply them to all histograms
129  // and fill xsec and trial histo. Sumw2 must be activated.
130  //maker->GetReader()->GetWeightUtils()->SwitchOnMCCrossSectionCalculation();
131  //maker->SwitchOnSumw2Histograms();
132 
133  // For recent productions where the cross sections and trials are not stored in separate file
134  //maker->GetReader()->GetWeightUtils()->SwitchOnMCCrossSectionFromEventHeader() ;
135 
136  // Just fill cross section and trials histograms.
137  maker->GetReader()->GetWeightUtils()->SwitchOnMCCrossSectionHistoFill();
138 
139  // Add control histogram with pT hard to control aplication of weights
140  maker->SwitchOnPtHardHistogram();
141  }
142 
143  if(debugLevel > 0) maker->Print("");
144 
145  // Create task
146 
147  TString taskName =Form("Pi0IM_GammaTrackCorr_%s",containerName.Data());
148 
150  task->SetConfigFileName(""); //Don't configure the analysis via configuration file.
151  task->SetDebugLevel(debugLevel);
152  //task->SetBranches("ESD:AliESDRun.,AliESDHeader");
153  //task->SetBranches("AOD:header,tracks,vertices,emcalCells,caloClusters");
154  task->SetAnalysisMaker(maker);
155  mgr->AddTask(task);
156 
157  //Create containers
158 
159  TString outputfile = AliAnalysisManager::GetCommonFileName();
160 
161  AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(taskName, TList::Class(),
162  AliAnalysisManager::kOutputContainer,
163  Form("%s:%s",outputfile.Data(),taskName.Data()));
164 
165  AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Param_%s",taskName.Data()), TList::Class(),
166  AliAnalysisManager::kParamContainer,
167  Form("%s_Parameters.root",taskName.Data()));
168 
169  // Create ONLY the output containers for the data produced by the task.
170  // Get and connect other common input/output containers via the manager as below
171  //==============================================================================
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 
182 AliCaloTrackReader * ConfigureReader(TString inputDataType, TString collision, Bool_t calibrate,
183  Int_t minTime, Int_t maxTime,
184  Int_t minCen, Int_t maxCen,
185  Bool_t simulation, Int_t year, Int_t debugLevel)
186 {
187  AliCaloTrackReader * reader = 0;
188  if (inputDataType=="AOD")
189  reader = new AliCaloTrackAODReader();
190  else if(inputDataType=="ESD")
191  reader = new AliCaloTrackESDReader();
192  else
193  printf("AliCaloTrackReader::ConfigureReader() - Data combination not known input Data=%s\n",
194  inputDataType.Data());
195 
196  reader->SetDebug(debugLevel);//10 for lots of messages
197 
198  // MC settings
199  if(simulation)
200  {
201  if(inputDataType == "ESD")
202  {
203  reader->SwitchOnStack();
204  reader->SwitchOffAODMCParticles();
205  }
206  else if(inputDataType == "AOD")
207  {
208  reader->SwitchOffStack();
209  reader->SwitchOnAODMCParticles();
210  }
211  }
212 
213  //------------------------
214  // Detector input filling
215  //------------------------
216 
217  //Min cluster/track E
218  reader->SetEMCALEMin(0.3);
219  reader->SetEMCALEMax(1000);
220  reader->SetPHOSEMin(0.3);
221  reader->SetPHOSEMax(1000);
222  reader->SetCTSPtMin(0.2);
223  reader->SetCTSPtMax(1000);
224 
225  // Time cut
227  reader->SwitchOnUseEMCALTimeCut() ;
228  reader->SetEMCALTimeCut(minTime,maxTime);
229 
230  reader->SwitchOffUseTrackTimeCut();
231  reader->SetTrackTimeCut(-1e10,1e10);
232 
233  reader->SwitchOffFiducialCut();
234 
235  // Tracks
236  reader->SwitchOffCTS();
240  reader->SwitchOffUseTrackDCACut();
241  //reader->SetTrackDCACut(0,0.0105);
242  //reader->SetTrackDCACut(1,0.035);
243  //reader->SetTrackDCACut(2,1.1);
244 
245  if(inputDataType=="ESD")
246  {
247  gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/macros/CreateTrackCutsPWGJE.C");
248  if(year > 2010)
249  {
250  //Hybrids 2011
251  AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001008);
252  reader->SetTrackCuts(esdTrackCuts);
253  AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10011008);
254  reader->SetTrackComplementaryCuts(esdTrackCuts2);
255  }
256  else
257  {
258  //Hybrids 2010
259  AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001006);
260  reader->SetTrackCuts(esdTrackCuts);
261  AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10041006);
262  reader->SetTrackComplementaryCuts(esdTrackCuts2);
263  }
264  }
265  else if(inputDataType=="AOD")
266  {
267  reader->SwitchOnAODHybridTrackSelection(); // Check that the AODs have Hybrids!!!!
268  reader->SetTrackStatus(AliVTrack::kITSrefit);
269  }
270 
271  // Calorimeter
272 
273  reader->SetEMCALClusterListName("");
274 
275  if(calibrate && !simulation) reader->SwitchOnClusterRecalculation();
276  else reader->SwitchOffClusterRecalculation();
277 
278  reader->SwitchOnEMCALCells();
279  reader->SwitchOnEMCAL();
280 
281  reader->SwitchOnPHOSCells();
282  reader->SwitchOnPHOS();
283 
284  //-----------------
285  // Event selection
286  //-----------------
287 
288  reader->SwitchOnEventTriggerAtSE();
289 
290  reader->SetZvertexCut(10.);
291  reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
292  reader->SwitchOffPileUpEventRejection(); // remove pileup
293  reader->SwitchOffV0ANDSelection() ; // and besides v0 AND
294 
295  if(collision=="PbPb")
296  {
297  if(year < 2014) reader->SwitchOnAliCentrality();
298  reader->SetCentralityBin(minCen,maxCen); // Accept all events, if not select range
299  reader->SetCentralityOpt(100); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
300  }
301 
302  if(debugLevel > 0) reader->Print("");
303 
304  return reader;
305 }
306 
311  Int_t year, Int_t debugLevel)
312 {
314  cu->SetDebug(debugLevel);
315 
316  // Remove clusters close to borders, at least max energy cell is 1 cell away
319 
320  // Search of local maxima in cluster
321  cu->SetLocalMaximaCutE(0.1);
322  cu->SetLocalMaximaCutEDiff(0.03);
323 
324  cu->SwitchOffClusterPlot();
326 
328 
329  //EMCAL settings
330 
331  if(!simulation)
333 
334  AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
335  cu->SwitchOffRecalibration(); // Check the reader if it is taken into account during filtering
337 
339 
340  Bool_t bExotic = kTRUE;
341  Bool_t bNonLin = kTRUE;
342  Bool_t bBadMap = kTRUE;
343 
344  Bool_t bEnCalib = kFALSE;
345  Bool_t bTiCalib = kFALSE;
346 
347  if(calibrate && !simulation)
348  {
349  cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
352 
353  bEnCalib = kTRUE;
354  bTiCalib = kTRUE;
355  }
356 
357  gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/EMCAL/macros/ConfigureEMCALRecoUtils.C");
359  simulation,
360  bExotic,
361  bNonLin,
362  bEnCalib,
363  bBadMap,
364  bTiCalib);
365  recou->SetExoticCellDiffTimeCut(50.);
366 
367  if(calorimeter=="PHOS")
368  {
370  }
371  else
372  {
373  if (year == 2010) cu->SetNumberOfSuperModulesUsed(4); // EMCAL first year
374  else if (year < 2014) cu->SetNumberOfSuperModulesUsed(10);
375  else cu->SetNumberOfSuperModulesUsed(20);
376  }
377 
378  // PHOS
380 
381  if(debugLevel > 0) cu->Print("");
382 
383  return cu;
384 }
385 
391  TString containerName, Bool_t simulation,
392  Int_t year, Int_t debugLevel)
393 {
394  AliAnaPhoton *ana = new AliAnaPhoton();
395  ana->SetDebug(debugLevel); //10 for lots of messages
396 
397  // cluster selection cuts
398 
399  ana->SwitchOnFiducialCut();
400  if(caloType==0)ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.7, 100, 187) ; // EMC
401  else ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.7, 260, 327) ; // DMC
402  ana->GetFiducialCut()->DoEMCALFiducialCut(kTRUE);
403 
404  ana->SetCalorimeter(calorimeter);
405 
406  if(calorimeter == "PHOS")
407  {
408  ana->SetNCellCut(2);// At least 3 cells
409  ana->SetMinPt(0.5);
410  ana->SetMinDistanceToBadChannel(2, 4, 5);
411  ana->SetTimeCut(-1e10,1e10); // open cut
412  }
413  else
414  {//EMCAL
415  ana->SetNCellCut(1);// At least 2 cells
416  ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
417  ana->SetMaxEnergy(1000);
418  ana->SetTimeCut(-1e10,1e10); // open cut, usual time window of [425-825] ns if time recalibration is off
419  // restrict to less than 100 ns when time calibration is on
420  ana->SetMinDistanceToBadChannel(2, 4, 6);
421  // Not useful if M02 cut is already strong
422  ana->SetNLMCut(1, 2) ;
423  }
424 
426  ana->SwitchOffTMHistoFill() ;
427 
428 
429  //PID cuts (shower shape)
430  ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
431  AliCaloPID* caloPID = ana->GetCaloPID();
432  //Not used in bayesian
433 
434  //EMCAL
435  caloPID->SetEMCALLambda0CutMax(0.4); // Rather open
436  caloPID->SetEMCALLambda0CutMin(0.10);
437 
438  caloPID->SetEMCALDEtaCut(0.025);
439  caloPID->SetEMCALDPhiCut(0.030);
440 
441  //PHOS
442  caloPID->SetPHOSDispersionCut(2.5);
443  caloPID->SetPHOSRCut(2.);
444 
445  ana->SwitchOnFillShowerShapeHistograms(); // Filled before photon shower shape selection
446  //if(!simulation)ana->SwitchOnFillPileUpHistograms();
447 
448  if(collision.Contains("Pb")) ana->SwitchOnFillHighMultiplicityHistograms();
449 
450  // Input / output delta AOD settings
451  ana->SetOutputAODName(Form("Photon%s_Calo%d",containerName.Data(),caloType));
452  ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
453  ana->SetInputAODName (Form("Photon%s_Calo%d",containerName.Data(),caloType));
454 
455  // Set Histograms name tag, bins and ranges
456  ana->AddToHistogramsName(Form("AnaPhoton_Calo%d_",caloType));
457  SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter,caloType,collision,year); // see method below
458 
459  // Number of particle type MC histograms
460  ana->FillNOriginHistograms(7);
461  ana->FillNPrimaryHistograms(4);
462 
463  if(simulation) ana->SwitchOnDataMC();
464 
465  if(debugLevel > 0 ) ana->Print("");
466 
467  return ana;
468 }
469 
474  TString containerName, Bool_t simulation, Int_t year,
475  Bool_t qaan, Int_t debugLevel, Int_t minCen)
476 {
477  AliAnaPi0 *ana = new AliAnaPi0();
478 
479  ana->SetDebug(debugLevel);//10 for lots of messages
480 
481  // Input delta AOD settings
482  ana->SetInputAODName(Form("Photon%s_Calo%d",containerName.Data(),caloType));
483 
484  // Calorimeter settings
485  ana->SetCalorimeter(calorimeter);
486 
487  ana->SwitchOnFiducialCut();
488  if(caloType==0)ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.7, 100, 187) ; // EMC
489  else ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.7, 260, 327) ; // DMC
490  ana->GetFiducialCut()->DoEMCALFiducialCut(kTRUE);
491 
493 
494  // Settings for pp collision mixing
495  ana->SwitchOnOwnMix(); //Off when mixing done with general mixing frame
496 
497  // Cuts
498  if(calorimeter=="EMCAL") ana->SetPairTimeCut(70);
499 
500  ana->SetNPIDBits(1);
501  ana->SetNAsymCuts(1); // no asymmetry cut, previous studies showed small effect.
502  // In EMCAL assymetry cut prevents combination of assymetric decays which is the main source of pi0 at high E.
503 
504  if (collision == "pp" )
505  {
506  ana->SetNCentrBin(1);
507  ana->SetNZvertBin(10);
508  ana->SetNRPBin(1);
509  ana->SetNMaxEvMix(100);
510  ana->SetMinPt(0.5);
511  }
512  else if(collision =="PbPb")
513  {
514  ana->SetNCentrBin(10);
515  ana->SetNZvertBin(10);
516  ana->SetNRPBin(4);
517  ana->SetNMaxEvMix(10);
518  if(minCen >= 10) ana->SetNMaxEvMix(50);
519  if(minCen >= 50) ana->SetNMaxEvMix(100);
520  ana->SetMinPt(1.5);
522  }
523  else if(collision =="pPb")
524  {
525  ana->SetNCentrBin(1);
526  ana->SetNZvertBin(10);
527  ana->SetNRPBin(4);
528  ana->SetNMaxEvMix(100);
529  ana->SetMinPt(0.5);
531  }
532 
534  ana->SwitchOnSMCombinations();
535  ana->SwitchOnFillAngleHisto();
537 
538  //Set Histograms name tag, bins and ranges
539 
540  ana->AddToHistogramsName(Form("AnaPi0_Calo%d_",caloType));
541  SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter,caloType,collision,year); // see method below
542 
543  if(simulation) ana->SwitchOnDataMC();
544 
545  if(debugLevel > 0) ana->Print("");
546 
547  return ana;
548 }
549 
554  Bool_t simulation, Int_t year, Int_t debugLevel)
555 {
557  ana->SetDebug(debugLevel); //10 for lots of messages
558 
559  // selection cuts
560 
561  ana->SetMinPt(0.5);
562  ana->SwitchOnFiducialCut();
563  ana->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ; //more restrictive cut in reader and after in isolation
564 
566  //if(!simulation) ana->SwitchOnFillPileUpHistograms();
567 
568  // Input / output delta AOD settings
569 
570  ana->SetOutputAODName(Form("Hadron%s",containerName.Data()));
571  ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
572  ana->SetInputAODName(Form("Hadron%s",containerName.Data()));
573 
574  //Set Histograms name tag, bins and ranges
575 
576  ana->AddToHistogramsName("AnaHadrons_");
577  SetHistoRangeAndNBins(ana->GetHistogramRanges(),"",kFALSE,collision,year); // see method below
578 
579  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
580  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
581 
582  if(debugLevel > 0) ana->Print("");
583 
584  return ana;
585 }
586 
591  TString collision, TString containerName,
592  Bool_t simulation, Int_t year, Int_t debugLevel, Int_t minCen)
593 {
595  ana->SetDebug(debugLevel);
596 
597  ana->SetTriggerPtRange(5,100);
598  ana->SetAssociatedPtRange(0.2,100);
599  //ana->SetDeltaPhiCutRange( TMath::Pi()/2,3*TMath::Pi()/2 ); //[90 deg, 270 deg]
600  ana->SetDeltaPhiCutRange (TMath::DegToRad()*120.,TMath::DegToRad()*240.);
601  ana->SetUeDeltaPhiCutRange(TMath::DegToRad()*60. ,TMath::DegToRad()*120.);
603 
604  ana->SetNAssocPtBins(4);
605  ana->SetAssocPtBinLimit(0, 0.5) ;
606  ana->SetAssocPtBinLimit(1, 2) ;
607  ana->SetAssocPtBinLimit(2, 5) ;
608  ana->SetAssocPtBinLimit(3, 10) ;
609  ana->SetAssocPtBinLimit(4, 20) ;
610 
611  ana->SelectIsolated(kFALSE); // do correlation with isolated photons
612 
613  //if(!simulation) ana->SwitchOnFillPileUpHistograms();
614 
615  ana->SwitchOnAbsoluteLeading(); // Select trigger leading particle of all the selected tracks
616  ana->SwitchOffNearSideLeading(); // Select trigger leading particle of all the particles at +-90 degrees, default
617 
618  //ana->SwitchOnLeadHadronSelection();
619  //ana->SetLeadHadronPhiCut(TMath::DegToRad()*100., TMath::DegToRad()*260.);
620  //ana->SetLeadHadronPtCut(0.5, 100);
621 
622 
623  // Mixing with own pool
624  ana->SwitchOffOwnMix();
625 
626  ana->SetNZvertBin(20);
628 
629  if(collision.Contains("Pb")) ana->SwitchOnFillHighMultiplicityHistograms();
630 
631  if(collision=="pp")
632  {
633  ana->SetNMaxEvMix(100);
634  ana->SwitchOnTrackMultBins();
635  ana->SetNTrackMultBin(10); // same as SetNCentrBin(10);
636  ana->SetNRPBin(1);
637  }
638  else
639  {
640  ana->SetNMaxEvMix(10);
641  if(minCen >= 10) ana->SetNMaxEvMix(50);
642  if(minCen >= 50) ana->SetNMaxEvMix(100);
643  ana->SwitchOffTrackMultBins(); // centrality bins
644  ana->SetNCentrBin(10);
645  ana->SetNRPBin(3);
646  }
647 
648  // Input / output delta AOD settings
649 
650  ana->SetInputAODName(Form("%s%s_Calo%d",particle.Data(),containerName.Data(),caloType));
651  ana->SetAODObjArrayName(Form("%sHadronCorr_%s_Calo%d",particle.Data(),containerName.Data(),caloType));
652 
655  ana->SwitchOffNeutralCorr(); // Do only correlation with TPC
658 
659  // Underlying event
661  ana->SetUeDeltaPhiCutRange(TMath::Pi()/3, 2*TMath::Pi()/3);
662 
663  //Set Histograms name tag, bins and ranges
664 
665  ana->AddToHistogramsName(Form("Ana%sHadronCorr_Calo%d_",particle.Data(),caloType));
666  SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter,caloType,collision,year); // see method below
667 
668  if(simulation) ana->SwitchOnDataMC();
669 
670  if(debugLevel > 0) ana->Print("");
671 
672  return ana;
673 }
674 
679  Bool_t simulation, Int_t year, Int_t debugLevel)
680 {
682  ana->SetDebug(debugLevel); //10 for lots of messages
683  ana->SetCalorimeter(calorimeter);
684 
685  ana->SetTimeCut(-1e10,1e10); // Open time cut
686  ana->SwitchOnCorrelation();
693  ana->SwitchOffStudyWeight();
696 
697  ana->AddToHistogramsName(Form("QA_Calo%d_",caloType)); //Begining of histograms name
698  SetHistoRangeAndNBins(ana->GetHistogramRanges(),calorimeter, caloType, collision,year); // see method below
699 
700  ana->SwitchOnFiducialCut();
701  if(caloType==0)ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.7, 100, 187) ; // EMC
702  else ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.7, 260, 327) ; // DMC
703  ana->GetFiducialCut()->DoEMCALFiducialCut(kTRUE);
704 
705  if(simulation) ana->SwitchOnDataMC();
706 
707  if(debugLevel > 0) ana->Print("");
708 
709  return ana;
710 }
711 
712 
717  TString collision, Int_t year)
718 {
719  histoRanges->SetHistoPtRangeAndNBins(0, 100, 200) ; // Energy and pt histograms
720 
721  if(calorimeter=="EMCAL")
722  {
723  if ( year == 2010 )
724  {
725  histoRanges->SetHistoPhiRangeAndNBins(79*TMath::DegToRad(), 121*TMath::DegToRad(), 42) ;
726  histoRanges->SetHistoXRangeAndNBins(-230,90,120); // QA
727  histoRanges->SetHistoYRangeAndNBins(370,450,40); // QA
728  }
729  else if ( year < 2014 )
730  {
731  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
732  histoRanges->SetHistoXRangeAndNBins(-460,90,200); // QA
733  histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
734  }
735  else // Run2
736  {
737  if(caloType == 0) histoRanges->SetHistoPhiRangeAndNBins(78 *TMath::DegToRad(), 189*TMath::DegToRad(), 111) ;
738  else histoRanges->SetHistoPhiRangeAndNBins(258*TMath::DegToRad(), 329*TMath::DegToRad(), 71) ;
739  histoRanges->SetHistoXRangeAndNBins(-460,460,230); // QA
740  histoRanges->SetHistoYRangeAndNBins(-450,450,225); // QA
741  }
742 
743  histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
744  }
745  else
746  {
747  histoRanges->SetHistoPhiRangeAndNBins(250*TMath::DegToRad(), 320*TMath::DegToRad(), 70) ;
748  histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
749  }
750 
751  histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 4.9, 500);
752 
753  // Invariant mass histoRangeslysis
754  histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
755  histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
756 
757  // check if time calibration is on
758  histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,500);
759  //histoRanges->SetHistoTimeRangeAndNBins(-400.,400,400);
760  histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
761 
762  // track-cluster residuals
763  histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.15,0.15,300);
764  histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.15,0.15,300);
765  histoRanges->SetHistodRRangeAndNBins(0.,0.15,150);//QA
766 
767  // QA, electron, charged
768  histoRanges->SetHistoPOverERangeAndNBins(0, 2. ,200);
769  histoRanges->SetHistodEdxRangeAndNBins (0.,200.0,200);
770 
771  // QA
772  histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
773  histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
774  histoRanges->SetHistoZRangeAndNBins(-350,350,175);
775  histoRanges->SetHistoRRangeAndNBins(430,460,30);
776  histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
777  histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
778 
779  // QA, correlation
780  if(collision=="PbPb")
781  {
782  histoRanges->SetHistoNClusterCellRangeAndNBins(0,100,100);
783  histoRanges->SetHistoNClustersRangeAndNBins(0,500,50);
784  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,2000,200);
785  }
786  else
787  {
788  histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
789  histoRanges->SetHistoNClustersRangeAndNBins(0,50,50);
790  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,200,200);
791  }
792 
793  // xE, zT
794  histoRanges->SetHistoRatioRangeAndNBins(0.,2.,200);
795  histoRanges->SetHistoHBPRangeAndNBins (0.,10.,200);
796 
797  // Isolation
798  histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 250);
799  histoRanges->SetHistoPtSumRangeAndNBins (0, 100, 250);
800 
801 }
802 
void SetHistoTrackMultiplicityRangeAndNBins(Int_t min, Int_t max, Int_t n)
virtual void SetDebug(Int_t d)
void SetNumberOfCellsFromPHOSBorder(Int_t n)
AliAnaPhoton * ConfigurePhotonAnalysis(TString calorimeter, Bool_t caloType, TString collision, TString containerName, Bool_t simulation, Int_t year, Int_t debugLevel)
void SetTimeCut(Double_t min, Double_t max)
void ana(Int_t mode=mGRID)
Definition: ana.C:86
void SetSimpleCTSFiducialCut(Float_t abseta, Float_t phimin, Float_t phimax)
void SetHistoMassRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void AddToHistogramsName(TString add)
void SwitchOnFillAllTrackMatchingHistogram()
void SetHistoXRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOnTrackMatchRejection()
Definition: AliAnaPhoton.h:125
void SwitchOnLoadOwnEMCALGeometryMatrices()
void SetAssociatedPtRange(Float_t min, Float_t max)
void SetNPIDBits(Int_t s)
Definition: AliAnaPi0.h:118
virtual void SwitchOnAODHybridTrackSelection()
virtual void SetCentralityBin(Int_t min, Int_t max)
AliEMCALRecoUtils * GetEMCALRecoUtils() const
void FillNPrimaryHistograms(Int_t n)
Definition: AliAnaPhoton.h:136
void SetCTSPtMax(Float_t pt)
void SetHistoPtRangeAndNBins(Float_t min, Float_t max, Int_t n)
Selected photon clusters invariant mass analysis.
Definition: AliAnaPi0.h:38
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)
void SwitchOnSMCombinations()
Definition: AliAnaPi0.h:89
void SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3)
Definition: AliAnaPhoton.h:108
void SwitchOffTMHistoFill()
Definition: AliAnaPhoton.h:91
void SetSimpleEMCALFiducialCut(Float_t abseta, Float_t phimin, Float_t phimax)
virtual void SetOutputAODClassName(TString name)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SwitchOffMultipleCutAnalysis()
Definition: AliAnaPi0.h:110
Class for the Calorimeter QA analysis.
AliAnalysisTaskCaloTrackCorrelation * AddTaskPi0IMGammaCorrQA(const TString calorimeter="EMCAL", const Bool_t simulation=kFALSE, const TString collision="pp", const TString suffix="default", const Bool_t qaan=kTRUE, const Bool_t hadronan=kTRUE, const Bool_t calibrate=kTRUE, const Int_t minTime=-1000, const Int_t maxTime=1000, const Int_t minCen=-1, const Int_t maxCen=-1, const Int_t debugLevel=-1, const Int_t year=2015)
AliCaloTrackReader * ConfigureReader(TString inputDataType, TString collision, Bool_t calibrate, Int_t minTime, Int_t maxTime, Int_t minCen, Int_t maxCen, Bool_t simulation, Int_t year, Int_t debugLevel)
void SetHistodRRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetLocalMaximaCutEDiff(Float_t c)
void SetNumberOfCellsFromEMCALBorder(Int_t n)
void SetNCellCut(Int_t n)
Definition: AliAnaPhoton.h:116
const TString calorimeter
Definition: anaM.C:35
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)
void SetPHOSRCut(Float_t rcut)
Definition: AliCaloPID.h:207
void SetEMCALDPhiCut(Float_t dcut)
Definition: AliCaloPID.h:201
virtual void SetOutputAODName(TString name)
void SwitchOffRecalculateClusterTrackMatching()
void SwitchOnFillAngleHisto()
Definition: AliAnaPi0.h:79
void SwitchOffVertexBCEventSelection()
Correlate trigger particles (photon, pi0, tracks) and charged tracks: Azimuthal correlations, xE distributions.
virtual void SetNTrackMultBin(Int_t n=1)
Number of bins in centrality.
void DoEMCALFiducialCut(Bool_t b)
void SetDeltaPhiCutRange(Double_t phimin, Double_t phimax)
void SetUeDeltaPhiCutRange(Double_t uephimin, Double_t uephimax)
void SetHistoPtInConeRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void SetDebug(Int_t d)
void SetHistoPOverERangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual AliFiducialCut * GetFiducialCut()
virtual void SetCentralityOpt(Int_t opt)
void SetHistoPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
AliAnaPi0 * ConfigurePi0Analysis(TString calorimeter, Bool_t caloType, TString collision, TString containerName, Bool_t simulation, Int_t year, Bool_t qaan, Int_t debugLevel, Int_t minCen)
int Int_t
Definition: External.C:63
virtual AliHistogramRanges * GetHistogramRanges()
AliCalorimeterUtils * ConfigureCaloUtils(TString calorimeter, Bool_t simulation, Bool_t calibrate, Int_t year, Int_t debugLevel)
void SetHistoPtSumRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetTrackStatus(ULong_t bit)
Filter EMCal/PHOS clusters for photon analysis.
Definition: AliAnaPhoton.h:32
void SetHistoTrackResidualPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
AliAnaCalorimeterQA * ConfigureQAAnalysis(TString calorimeter, Bool_t caloType, TString collision, Bool_t simulation, Int_t year, Int_t debugLevel)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Base class for event, clusters and tracks filtering and preparation for the analysis.
void SetHistoNClusterCellRangeAndNBins(Int_t min, Int_t max, Int_t n)
void SetEMCALClusterListName(TString &name)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Definition: AliAnaPi0.cxx:2428
void SetHistoYRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetTimeCut(Double_t min, Double_t max)
Definition: AliAnaPhoton.h:111
virtual void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
AliAnaParticleHadronCorrelation * ConfigureHadronCorrelationAnalysis(TString particle, TString calorimeter, Bool_t caloType, TString collision, TString containerName, Bool_t simulation, Int_t year, Int_t debugLevel, Int_t minCen)
virtual void SetZvertexCut(Float_t zcut=10.)
void SetHistoRangeAndNBins(AliHistogramRanges *histoRanges, TString calorimeter, Bool_t caloType, TString collision, Int_t year)
void SetNumberOfSuperModulesUsed(Int_t nSM)
Class containing more common histogram axis types.
void SetEMCALLambda0CutMax(Float_t lcut)
Definition: AliCaloPID.h:192
virtual void SwitchOnAliCentrality()
virtual void SetNCentrBin(Int_t n=1)
Number of bins in reaction plain.
Class for event, clusters and tracks filtering and preparation for the ESD analysis.
void SetNAsymCuts(Int_t s)
Definition: AliAnaPi0.h:116
void SetPHOSEMin(Float_t en)
virtual void SetNRPBin(Int_t n=1)
Number of bins for vertex position.
void SetHistoNClustersRangeAndNBins(Int_t min, Int_t max, Int_t n)
void SetPHOSDispersionCut(Float_t dcut)
Definition: AliCaloPID.h:210
virtual void SetTrackCuts(AliESDtrackCuts *)
Track selection for correlation analysis.
virtual void SwitchOffFiducialCut()
void SwitchOnFillShowerShapeHistograms()
Definition: AliAnaPhoton.h:73
void SetHistoEtaRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetTrackTimeCut(Double_t a, Double_t b)
void SetEMCALTimeCut(Double_t a, Double_t b)
void SetHistoAsymmetryRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoV0MultiplicityRangeAndNBins(Int_t min, Int_t max, Int_t n)
virtual void SetAODObjArrayName(TString name)
Main class conecting the CaloTrackCorrelations package and Analysis Frame.
void SwitchOffLoadOwnPHOSGeometryMatrices()
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)
void SetNAssocPtBins(Int_t n)
Set number of associated charged (neutral) hadrons pT bins.
Class for PID selection with calorimeters.
Definition: AliCaloPID.h:51
void FillNOriginHistograms(Int_t n)
Definition: AliAnaPhoton.h:134
virtual void SetNMaxEvMix(Int_t n=20)
Number of bins in track multiplicity.
void SetHistoShowerShapeRangeAndNBins(Float_t min, Float_t max, Int_t n)
bool Bool_t
Definition: External.C:53
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 SetEMCALLambda0CutMin(Float_t lcut)
Definition: AliCaloPID.h:195
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 SetEMCALDEtaCut(Float_t dcut)
Definition: AliCaloPID.h:198
void SwitchOffUseParametrizedTimeCut()
void SwitchOffFillOriginHisto()
Definition: AliAnaPi0.h:135
void SetLocalMaximaCutE(Float_t cut)
void SetHistoRatioRangeAndNBins(Float_t min, Float_t max, Int_t n)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetNLMCut(Int_t min, Int_t max)
Definition: AliAnaPhoton.h:119
void SetAssocPtBinLimit(Int_t ibin, Float_t pt)
Set the list of pT limits for the of associated charged (neutral) hadrons.
void ConfigureEMCALRecoUtils(AliEMCALRecoUtils *reco, Bool_t bMC=kFALSE, Bool_t bExotic=kTRUE, Bool_t bNonLin=kFALSE, Bool_t bRecalE=kTRUE, Bool_t bBad=kTRUE, Bool_t bRecalT=kTRUE)
Steering class of package CaloTrackCorrelartions.
AliAnaChargedParticles * ConfigureChargedAnalysis(TString collision, TString containerName, Bool_t simulation, Int_t year, Int_t debugLevel)
void SetTriggerPtRange(Float_t min, Float_t max)