AliPhysics  05c4c93 (05c4c93)
ConfigureCaloTrackCorrAnalysis.C
Go to the documentation of this file.
1 
23 // Set includes for compilation
24 
25 #if !defined(__CINT__) || defined(__MAKECINT__)
26 
27 #include <TString.h>
28 #include <TSystem.h>
29 #include <TROOT.h>
30 
31 #include "AliAnaPhoton.h"
32 #include "AliAnaPi0EbE.h"
33 #include "AliHistogramRanges.h"
36 #include "AliAnaChargedParticles.h"
37 #include "AliAnaCalorimeterQA.h"
39 #include "AliAnaGeneratorKine.h"
42 #endif
43 
46 
48 TString kAnaCutsString = ""; // "Photon_MergedPi0_DecayPi0_Isolation_Correlation_Bkg_QA_Charged",
49 
67  TString col, Bool_t simulation,
68  Bool_t printSettings, Int_t debug)
69 {
70  //
71  // Histograms ranges
72  //
73  AliHistogramRanges* histoRanges = ana->GetHistogramRanges();
74 
75  if ( histoString != "" )
76  ana->AddToHistogramsName(Form("%s_%s", histoString.Data(), (ana->GetAddedHistogramsStringToName()).Data()) );
77 
78 
79  histoRanges->SetHistoPtRangeAndNBins(0, 100, 200) ; // Energy and pt histograms
80 
81  if(calorimeter=="EMCAL")
82  {
83  ana->SetFirstSMCoveredByTRD(-1);
84 
85  if ( year == 2010 )
86  {
87  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 122*TMath::DegToRad(), 78) ;
88  histoRanges->SetHistoXRangeAndNBins(-230,90,120); // QA
89  histoRanges->SetHistoYRangeAndNBins(370,450,40); // QA
90  }
91  else if ( year < 2014 )
92  {
93  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 104) ;
94  histoRanges->SetHistoXRangeAndNBins(-460,90,200); // QA
95  histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
96 
97  if (year == 2011) ana->SetFirstSMCoveredByTRD( 6);
98  else if(year == 2012 ||
99  year == 2013) ana->SetFirstSMCoveredByTRD( 4);
100  }
101  else // Run2
102  {
103  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 189*TMath::DegToRad(), 111) ;
104  histoRanges->SetHistoXRangeAndNBins(-460,460,230); // QA, revise
105  histoRanges->SetHistoYRangeAndNBins(-450,450,225); // QA, revise
106  }
107 
108  histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
109  }
110  else if(calorimeter=="DCAL")
111  {
112  histoRanges->SetHistoPhiRangeAndNBins(260*TMath::DegToRad(), 327*TMath::DegToRad(), 67) ;
113  histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
114  histoRanges->SetHistoXRangeAndNBins(-460,460,230); // QA, revise
115  histoRanges->SetHistoYRangeAndNBins(-450,450,225); // QA, revise
116  }
117  else if(calorimeter=="PHOS")
118  {
119  histoRanges->SetHistoPhiRangeAndNBins(250*TMath::DegToRad(), 320*TMath::DegToRad(), 70) ;
120  histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
121  }
122  else if(calorimeter=="CTS")
123  {
124  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
125  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
126  }
127 
128  histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 2.9, 300);
129 
130  // Invariant mass histo
131  histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
132  histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
133 
134  // check if time calibration is on
135  //histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000);
136  histoRanges->SetHistoTimeRangeAndNBins(-400.,400,400);
137  histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
138 
139  // track-cluster residuals
140  histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.06,0.06,120);
141  histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.06,0.06,120);
142  histoRanges->SetHistodRRangeAndNBins(0.,0.06,60);//QA
143 
144  // QA, electron, charged
145  histoRanges->SetHistoPOverERangeAndNBins(0,1.5,150);
146  histoRanges->SetHistodEdxRangeAndNBins(0.,200.,200);
147 
148  // QA
149  histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
150  histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
151  histoRanges->SetHistoZRangeAndNBins(-350,350,175);
152  histoRanges->SetHistoRRangeAndNBins(430,460,30);
153  histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
154  histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
155 
156  // QA, correlation
157  if(col=="PbPb")
158  {
159  histoRanges->SetHistoNClusterCellRangeAndNBins(0,100,100);
160  histoRanges->SetHistoNClustersRangeAndNBins(0,500,50);
161  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,2000,200);
162  }
163  else
164  {
165  histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
166  histoRanges->SetHistoNClustersRangeAndNBins(0,50,50);
167  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,200,200);
168  }
169 
170  // xE, zT
171  histoRanges->SetHistoRatioRangeAndNBins(0.,2.,200);
172  histoRanges->SetHistoHBPRangeAndNBins (0.,10.,200);
173 
174  // Isolation
175  histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 250);
176  histoRanges->SetHistoPtSumRangeAndNBins (0, 100, 250);
177 
178  //
179  // MC histograms?
180  //
181  if(simulation) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.
182  else ana->SwitchOffDataMC() ;
183 
184  //Set here generator name, default pythia
185  //ana->GetMCAnalysisUtils()->SetMCGenerator("");
186 
187  //
188  // Debug
189  //
190  if(printSettings) ana->Print("");
191 
192  ana->SetDebug(debug); // 10 for lots of messages
193 }
194 
209  TString calorimeter, Int_t year, Int_t tm,
210  Bool_t printSettings, Int_t debug,
211  TString histoString )
212 {
213  AliAnaPhoton *ana = new AliAnaPhoton();
214 
215  // cluster selection cuts
216 
218 
219  ana->SwitchOffFiducialCut();
220 
221  ana->SetCalorimeter(calorimeter);
222  if(calorimeter == "DCAL")
223  {
224  TString calo = "EMCAL";
225  ana->SetCalorimeter(calo);
226  }
227 
228  ana->SwitchOnFillShowerShapeHistograms(); // Filled before photon shower shape selection
229  if( kAnaCutsString.Contains("MultiIso") ) ana->SwitchOffFillShowerShapeHistograms();
230 
231  if ( kAnaCutsString.Contains("PerSM") )
233 
234  //if(!simulation) ana->SwitchOnFillPileUpHistograms();
235 
236  if(tm) ana->SwitchOnTrackMatchRejection() ;
237  else ana->SwitchOffTrackMatchRejection() ;
238 
239  // Fill track matching histograms if track matching activated
240  // and only once in case of multiple analysis
241  if ( tm && !kAnaCutsString.Contains("MultiIso") )
242  ana->SwitchOnTMHistoFill() ;
243 
244  if(calorimeter == "PHOS")
245  {
246  ana->SetNCellCut(2);// At least 3 cells
247  ana->SetMinPt(0.3);
248  ana->SetMinDistanceToBadChannel(2, 4, 5);
249  ana->SetTimeCut(-1e10,1e10); // open cut
250  }
251  else
252  {//EMCAL
253  ana->SetNCellCut(1);// At least 2 cells
254  ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
255  ana->SetMaxEnergy(100);
256  ana->SetTimeCut(-1e10,1e10); // open cut, usual time window of [425-825] ns if time recalibration is off
257  // restrict to less than 100 ns when time calibration is on
258  ana->SetMinDistanceToBadChannel(2, 4, 6);
259 
260  // NLM cut, used in all, exclude clusters with more than 2 maxima
261  // Not needed if M02 cut is already strong or clusterizer V2
262  ana->SetNLMCut(1, 2) ;
263  }
264 
265  //PID cuts (shower shape)
266  ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
267  AliCaloPID* caloPID = ana->GetCaloPID();
268  //Not used in bayesian
269 
270  // EMCAL
271 
272  //caloPID->SetEMCALLambda0CutMax(0.27);
273  caloPID->SetEMCALLambda0CutMax(10); // open, full shower shape needed for isolation studies
274  caloPID->SetEMCALLambda0CutMin(0.10);
275 
276  // Track matching
277  // tm = 1, fixed cuts
278  caloPID->SetEMCALDEtaCut(0.025);
279  caloPID->SetEMCALDPhiCut(0.030);
280 
281  // pT track dependent cuts
282  if(tm > 1) caloPID->SwitchOnEMCTrackPtDepResMatching();
283 
284  // PHOS
285  caloPID->SetPHOSDispersionCut(2.5);
286  caloPID->SetPHOSRCut(2.);
287  //if(kInputData=="AOD") caloPID->SetPHOSRCut(2000.); // Open cut since dX, dZ not stored
288 
289  // Branch AOD settings
290  ana->SetOutputAODName(Form("PhotonTrigger_%s",kAnaCaloTrackCorr.Data()));
291  ana->SetOutputAODClassName("AliCaloTrackParticleCorrelation");
292 
293  //Set Histograms name tag, bins and ranges
294  //ana->AddToHistogramsName(Form("AnaPhoton_TM%d_",tm));
295  ana->AddToHistogramsName("AnaPhoton_");
296 
297  SetAnalysisCommonParameters(ana,histoString,calorimeter,year,col,simulation,printSettings,debug) ; // see method below
298 
299  if(ana->GetFirstSMCoveredByTRD() > 0)
300  printf("ConfigurePhotonAnalysis() >>> Set first SM covered by TRD, SM=%d <<< year %d \n", ana->GetFirstSMCoveredByTRD(),year);
301 
302  // Number of particle type MC histograms
303  ana->FillNOriginHistograms (17); // 18 max
304  ana->FillNPrimaryHistograms(6); // 6 max
305 
306  return ana;
307 }
308 
327  Bool_t useSSIso, Bool_t useAsy,
328  TString col, Bool_t simulation,
329  TString calorimeter, Int_t year, Int_t tm,
330  Bool_t printSettings, Int_t debug,
331  TString histoString )
332 {
333  // Configuration of pi0 event by event selection
334 
335  AliAnaPi0EbE *ana = new AliAnaPi0EbE();
336 
337  ana->SetDebug(debug);
338 
339  ana->SetAnalysisType((AliAnaPi0EbE::anaTypes)analysis);
340  TString opt = "";
341  if(analysis==AliAnaPi0EbE::kIMCaloTracks) opt = "Conv";
342  if(analysis==AliAnaPi0EbE::kSSCalo) opt = "SS";
343 
346 
348  //if(!simulation) ana->SwitchOnFillPileUpHistograms();
349  //if(!kTime && !simulation) ana->SwitchOnFillEMCALBCHistograms();
350 
351  if(tm) ana->SwitchOnTrackMatchRejection() ;
352  else ana->SwitchOffTrackMatchRejection() ;
353 
354  if ( tm && !kAnaCutsString.Contains("Photon") && !kAnaCutsString.Contains("MultiIso") )
355  ana->SwitchOnTMHistoFill() ;
356  else
357  ana->SwitchOffTMHistoFill() ;
358 
359  ana->SetCalorimeter(calorimeter);
360  if(calorimeter == "DCAL")
361  {
362  TString calo = "EMCAL";
363  ana->SetCalorimeter(calo);
364  }
365 
366  // Branch AOD settings
367  ana->SetOutputAODName(Form("%s%sTrigger_%s",particle.Data(), opt.Data(), kAnaCaloTrackCorr.Data()));
368  printf("ConfigurePi0EbEAnalysis() *** Out branch %s***\n",ana->GetOutputAODName().Data());
369  ana->SetOutputAODClassName("AliCaloTrackParticleCorrelation");
370 
371  if(analysis == AliAnaPi0EbE::kIMCaloTracks) ana->SetInputAODGammaConvName("PhotonsCTS");
372 
373  //Set Histograms name tag, bins and ranges
374 
375  //ana->AddToHistogramsName(Form("Ana%s%sEbE_TM%d_",particle.Data(),opt.Data(),tm));
376  ana->AddToHistogramsName(Form("Ana%s%sEbE_",particle.Data(),opt.Data()));
377 
378  SetAnalysisCommonParameters(ana,histoString,calorimeter,year,col,simulation,printSettings,debug); // see method below
379 
381  if(analysis!=AliAnaPi0EbE::kSSCalo)
382  {
383  ana->SetInputAODName(Form("PhotonTrigger_%s",kAnaCaloTrackCorr.Data()));
384 
385  ana->SetM02CutForInvMass(0.1,0.35); // Loose SS cut
386 
388  ana->SetR(0.4);
390 
391  if(useSSIso)
392  {
394  //ana->AddToHistogramsName(Form("Ana%s%sEbEIsoDecay_TM%d_",particle.Data(),opt.Data(),tm));
395  ana->AddToHistogramsName(Form("Ana%s%sEbEIsoDecay_",particle.Data(),opt.Data()));
396  ana->SetOutputAODName(Form("%s%sIsoDecayTrigger_%s",particle.Data(), opt.Data(), kAnaCaloTrackCorr.Data()));
397  }
398 
399  if ( calorimeter.Contains("CAL") && !simulation ) ana->SetPairTimeCut(100);
400 
402  nms->SetParticle(particle);
403 
404  //****
405  nms->SetInvMassCutMaxParameters(0,0,0); // Overrule the setting in SetParticle for Pi0 option
406  //****
407 
408  // Tighten a bit mass cut with respect to default window
409  if(particle=="Pi0") nms->SetInvMassCutRange(0.110,0.160);
410  if(particle=="Eta") nms->SetInvMassCutRange(0.520,0.580);
411 
412  //if(!particle.Contains("SideBand")) nms->SwitchOnAngleSelection();
413  //else nms->SwitchOnAngleSelection();
414 
416 
417  if(particle.Contains("Pi0SideBand")) // For pi0, do not consider left band
418  nms->SetSideBandCutRanges(-1,0,0.190,0.240);
419 
420  if(particle.Contains("EtaSideBand")) // For pi0, do not consider left band
421  nms->SetSideBandCutRanges(0.410,0.470,0.620,0.680);
422 
424  //nms->SetAngleMaxParam(2,0.2);
425  nms->SetHistoERangeAndNBins(0, 20, 80) ;
426  //nms->SetHistoIMRangeAndNBins(0, 1, 400);
427  }
428  else
429  {
430  // cluster splitting settings
431  ana->SetMinEnergy(6);
432  ana->SetMaxEnergy(100.);
433 
434  ana->SetNLMMinEnergy(0, 10);
435  ana->SetNLMMinEnergy(1, 6);
436  ana->SetNLMMinEnergy(2, 6);
437 
438  // NLM cut, used in all, exclude clusters with more than 2 maxima
439  ana->SetNLMCut(1, 2) ;
440 
441  //
442  ana->SetMinDistanceToBadChannel(2, 4, 6);
444  ana->SetTimeCut(-1e10,1e10); // Open time cut
445 
446  AliCaloPID* caloPID = ana->GetCaloPID();
447 
448  // Track matching
449  // tm = 1, fixed cuts
450  caloPID->SetEMCALDEtaCut(0.025);
451  caloPID->SetEMCALDPhiCut(0.030);
452 
453  // pT track dependent cuts
454  if(tm > 1) caloPID->SwitchOnEMCTrackPtDepResMatching();
455 
456  caloPID->SetSplitWidthSigma(3); // cut at 3 sigma of the mean pi0 peak.
457 
458  if(!useSSIso)
459  {
460  printf("ConfigurePi0EbEAnalysis() << Do not apply SS cut on merged pi0 analysis >> \n");
461  caloPID->SwitchOffSplitShowerShapeCut() ;
462  //ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenSS_TM%d_",particle.Data(),opt.Data(),tm));
463  ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenSS_",particle.Data(),opt.Data()));
464  ana->SetOutputAODName(Form("%s%sTrigger_%s_OpenSS",particle.Data(), opt.Data(), kAnaCaloTrackCorr.Data()));
465  caloPID->SetClusterSplittingM02Cut(0.1,10);
466  }
467  else
468  {
469  caloPID->SetClusterSplittingM02Cut(0.3,4); // Do the selection in the analysis class and not in the PID method to fill SS histograms
470  caloPID->SwitchOnSplitShowerShapeCut() ;
471  }
472 
473  if(useAsy)
474  {
475  caloPID->SwitchOnSplitAsymmetryCut() ;
477  ana->GetCaloPID()->SetSubClusterEnergyMinimum(1,0.5);
478  ana->GetCaloPID()->SetSubClusterEnergyMinimum(2,0.5);
479  }
480  else
481  {
482  caloPID->SwitchOffSplitAsymmetryCut() ;
483  if(!useSSIso)
484  {
485  //ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenSS_OpenAsy_TM%d_",particle.Data(),opt.Data(),tm));
486  ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenSS_OpenAsy_",particle.Data(),opt.Data()));
487  ana->SetOutputAODName(Form("%s%sTrigger_%s_OpenSS_OpenAsy",particle.Data(), opt.Data(), kAnaCaloTrackCorr.Data()));
488  }
489  else
490  {
491  //ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenAsy_TM%d_",particle.Data(),opt.Data(),tm));
492  ana->AddToHistogramsName(Form("Ana%s%sEbE_OpenAsy_",particle.Data(),opt.Data()));
493  ana->SetOutputAODName(Form("%s%sTrigger_%s_OpenAsy",particle.Data(), opt.Data(), kAnaCaloTrackCorr.Data()));
494  }
495  }
496 
497  // For Pi0 only if SwitchOnSimpleSplitMassCut()
498  caloPID->SetPi0MassRange(0.10, 0.18);
499  caloPID->SetEtaMassRange(0.50, 0.60);
500  caloPID->SetPhotonMassRange(0.00, 0.08);
501 
502  caloPID->SetClusterSplittingMinNCells(6);
503 
504  //caloPID->SetSplitEnergyFractionMinimum(0, 0.95);
505  //caloPID->SetSplitEnergyFractionMinimum(1, 0.95);
506  //caloPID->SetSplitEnergyFractionMinimum(2, 0.8);
507 
508  if(col=="PbPb" || kAnaCaloTrackCorr.Contains("150"))
509  {
510  caloPID->SetClusterSplittingMinNCells(4);
511  //caloPID->SetPi0MassShiftHighECell(0.005);
512  }
513  }
515 
516  return ana;
517 }
518 
540  Int_t partInCone, Int_t thresType,
541  Float_t cone, Float_t coneMin,
542  Float_t pth, Bool_t multi,
543  TString col, Bool_t simulation,
544  TString calorimeter, Int_t year, Int_t tm,
545  Bool_t printSettings, Int_t debug,
546  TString histoString )
547 {
549 
550  ana->SetDebug(debug);
551 
552  ana->SetMinPt(5);
553  ana->SetCalorimeter(calorimeter);
554  if(calorimeter == "DCAL")
555  {
556  TString calo = "EMCAL";
557  ana->SetCalorimeter(calo);
558  }
559 
561  ana->SwitchOffCellHistoFill() ;
562 
563  ana->SwitchOffLeadingOnly();
565  if( leading > 0 ) ana->SwitchOnLeadingOnly();
566  if( leading == 2 ||
567  leading == 4) ana->SwitchOnCheckNeutralClustersForLeading();
568 
569  // MC
572 
573  ana->SwitchOffSSHistoFill();
574 
575  if(particle.Contains("Photon"))
576  {
577  ana->SwitchOnSSHistoFill();
578 
579  if(kAnaCutsString.Contains("Decay"))
580  {
582  ana->SetNDecayBits(5);
583  }
584  }
585 
586  if ( kAnaCutsString.Contains("PerSM") )
588 
589  if ( kAnaCutsString.Contains("PerTCard") )
591 
592  if(kAnaCutsString.Contains("Bkg"))
593  {
594  printf("ConfigureIsolationAnalysis() *** Activate analysis on PtTrig and Bkg bins >> \n");
596  ana->SetNPtTrigBins(6);
597  //ana->SetPtTrigLimits(0,8); ana->SetPtTrigLimits(1,12); ana->SetPtTrigLimits(2,16); ana->SetPtTrigLimits(3,25);
598 
600  ana->SetNBackgroundBins(11);
601  //ana->SetBackgroundLimits(0,0); ana->SetBackgroundLimits(1,0.2); ana->SetBackgroundLimits(2,3); ana->SetBackgroundLimits(3,0.4);
602  }
603 
604  if(!tm) ana->SwitchOnTMHistoFill();
605  else ana->SwitchOffTMHistoFill();
606 
607  //if(!simulation) ana->SwitchOnFillPileUpHistograms();
608 
609  // Avoid borders of calorimeter
611  ana->SwitchOnFiducialCut();
612  if ( calorimeter == "EMCAL" ) ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.60, 86, 174) ;
613  else if ( calorimeter == "DCAL" ) ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.60, 266, 314) ;
614  else if ( calorimeter == "PHOS" ) ana->GetFiducialCut()->SetSimplePHOSFiducialCut (0.10, 266, 314) ;
615 
616  // Same Eta as EMCal, cut in phi if EMCAL was triggering
617  if(particle=="Hadron" || particle.Contains("CTS"))
618  {
619  //if(trigger.Contains("EMC"))
620  // ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 260, 360) ;
621  //else
622  ana->GetFiducialCut()->SetSimpleCTSFiducialCut (0.6, 0, 360) ;
623  }
624 
625  // Branch AOD settings
626 
627  ana->SetInputAODName(Form("%sTrigger_%s",particle.Data(),kAnaCaloTrackCorr.Data()));
628  ana->SetAODObjArrayName(Form("IC%sTrigger_%s_R%1.1f_ThMin%1.1f",particle.Data(),kAnaCaloTrackCorr.Data(),cone,pth));
629 
630  //
631  // Do settings for main isolation cut class
632  //
633  AliIsolationCut * ic = ana->GetIsolationCut();
634  ic->SetDebug(debug);
635  ic->SetParticleTypeInCone(partInCone);
636  ic->SetICMethod(thresType);
637  ic->SetPtFraction(0.1);
638  ic->SetPtThreshold(0.5); // default, change in next lines
639  ic->SetSumPtThreshold(1.0); // default, change in next lines
640 
641  if(cone > 0 && pth > 0)
642  {
643  ic->SetConeSize(cone);
644  ic->SetMinDistToTrigger(coneMin);
645  ic->SetPtThresholdMax(10000);
646 
647  if(thresType == AliIsolationCut::kPtThresIC)
648  {
649  printf("ConfigureIsolationAnalysis() *** Iso *** PtThresMin = %1.1f GeV/c *** R = %1.2f *** R min %1.2f\n",pth,cone,coneMin);
650  ic->SetPtThreshold(pth);
651  }
652 
653  if(thresType == AliIsolationCut::kSumPtIC)
654  {
655  printf("ConfigureIsolationAnalysis() *** Iso *** SumPtMin = %1.1f GeV/c *** R = %1.1f *** R min %1.2f\n",pth,cone,coneMin);
656  ic->SetSumPtThreshold(pth);
657  }
658  }
659  else
660  {
661  if(col=="pp")
662  {
663  ic->SetPtThreshold(0.5);
664  ic->SetSumPtThreshold(1.0) ;
665  ic->SetConeSize(0.4);
666  ic->SetMinDistToTrigger(-1);
667  }
668  if(col=="PbPb")
669  {
670  ic->SetPtThreshold(3.);
671  ic->SetSumPtThreshold(3.0) ;
672  ic->SetConeSize(0.3);
673  ic->SetMinDistToTrigger(-1);
674  }
675  }
676 
677 
678  // Do or not do isolation with previously produced AODs.
679  // No effect if use of SwitchOnSeveralIsolation()
680  ana->SwitchOffReIsolation();
681 
682  // Multiple IC
683  if(multi)
684  {
685  ic->SetConeSize(1.); // Take all for first iteration
686  ic->SetPtThreshold(100);// Take all for first iteration
687  ic->SetMinDistToTrigger(-1);
688 
689  ana->SwitchOnSeveralIsolation() ;
690  //ana->SetAODObjArrayName(Form("MultiIC%sTM%d",particle.Data(),tm));
691  ana->SetAODObjArrayName(Form("MultiIC%s",particle.Data()));
692 
693  ana->SetNCones(3);
694  ana->SetNPtThresFrac(2);
695  ana->SetConeSizes(0,0.3); ana->SetConeSizes(1,0.4); ana->SetConeSizes(2,0.5);
696  ana->SetPtThresholds(0, 0.5); ana->SetPtThresholds(1, 1); ana->SetPtThresholds(2, 1.5); ana->SetPtThresholds(3, 2);
697  ana->SetPtFractions (0, 0.05) ; ana->SetPtFractions (1, 0.1); ana->SetPtFractions (2, 0.2) ; ana->SetPtFractions (3, 0.3) ;
698  ana->SetSumPtThresholds(0, 0.5) ; ana->SetSumPtThresholds(1, 1) ; ana->SetSumPtThresholds(2, 1.5); ana->SetSumPtThresholds(3, 2) ;
699  //ana->SetPtThresholds(0, 0.5);
700 
701  ana->SwitchOffTMHistoFill();
702  ana->SwitchOffSSHistoFill();
703  }
704  else
706 
707  AliCaloPID* caloPID = ana->GetCaloPID();
708 
709  // Track matching
710  // tm = 1, fixed cuts
711  caloPID->SetEMCALDEtaCut(0.025);
712  caloPID->SetEMCALDPhiCut(0.030);
713 
714  // pT track dependent cuts
715  if(tm > 1) caloPID->SwitchOnEMCTrackPtDepResMatching();
716 
717  //Set Histograms name tag, bins and ranges
718 
719 // if(!multi) ana->AddToHistogramsName(Form("AnaIsol%s_TM%d_" ,particle.Data(),tm));
720 // else ana->AddToHistogramsName(Form("AnaMultiIsol%s_TM%d_",particle.Data(),tm));
721  if(!multi) ana->AddToHistogramsName(Form("AnaIsol%s_" ,particle.Data()));
722  else ana->AddToHistogramsName(Form("AnaMultiIsol%s_",particle.Data()));
723 
724  SetAnalysisCommonParameters(ana,histoString, calorimeter,year,col,simulation,printSettings,debug); // see method below
725 
726  if(particle=="Hadron" || particle.Contains("CTS"))
727  {
728  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
729  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
730  }
731 
732  if(printSettings) ic ->Print("");
733 
734  return ana;
735 }
736 
759  Bool_t bIsolated, Float_t shshMax,
760  Int_t partInCone, Int_t thresType,
761  Float_t cone, Float_t coneMin,
762  Float_t pth, Bool_t mixOn,
763  TString col, Bool_t simulation,
764  TString calorimeter, Int_t year, Int_t tm,
765  Bool_t printSettings, Int_t debug,
766  TString histoString )
767 {
769 
770  ana->SetTriggerPtRange(5,100);
771  ana->SetAssociatedPtRange(0.2,100);
772  ana->SetDeltaPhiCutRange (TMath::DegToRad()*120.,TMath::DegToRad()*240.);
773 
774  // Underlying event
775  ana->SetUeDeltaPhiCutRange(TMath::DegToRad()*60. ,TMath::DegToRad()*120.);
777 
778  ana->SwitchOffAbsoluteLeading(); // Select trigger leading particle of all the selected tracks
779  ana->SwitchOffNearSideLeading(); // Select trigger leading particle of all the particles at +-90 degrees, default
781 
782  if(leading > 0 && leading < 3 ) ana->SwitchOnAbsoluteLeading();
783  if(leading > 2 ) ana->SwitchOnNearSideLeading();
784  if(leading == 2 || leading == 4 ) ana->SwitchOnCheckNeutralClustersForLeading();
785 
789 
791 
793 
794  if(particle.Contains("Photon"))
795  {
796  if(kAnaCutsString.Contains("Decay"))
797  {
798  printf("ConfigureHadronCorrelationAnalysis() *** Activate analysis on Tagged clusters as Decay product >> \n");
800  ana->SetNDecayBits(5);
802  if ( kAnaCutsString.Contains("Bkg") && !bIsolated )
804  }
805 
806  //printf("ConfigureHadronCorrelationAnalysis() *** SET M02 limits in correlation task *** \n");
807  ana->SetM02Cut(0.10,shshMax);
808  }
809 
810  if ( kAnaCutsString.Contains("PerSM") )
812 
813  if ( kAnaCutsString.Contains("PerTCard") )
815 
816  ana->SetMCGenType(0,7); // Change to higher to include Tagged decays
817 
818  ana->SwitchOffLeadHadronSelection(); // Open cuts, just fill histograms
820 
821  if ( kAnaCutsString.Contains("Bkg") && !bIsolated )
822  {
823  printf("ConfigureHadronCorrelationAnalysis() *** Activate analysis on PtTrig and Bkg bins,\n"
824  " \t make sure isolation runs first even if not used to select trigger >> \n");
826  }
827 
828  ana->SetLeadHadronPhiCut(TMath::DegToRad()*130, TMath::DegToRad()*230.);
829  ana->SetLeadHadronPtCut(0.5, 1000);
830 
831  // if triggering on PHOS and EMCAL is on
832  ana->SwitchOffNeutralCorr(); // Do only correlation with TPC
833  //ana->SetPi0AODBranchName("Pi0EMCAL_TrigEMC7_Cl_TM1");
834 
836 
838 
839  //if(!simulation) ana->SwitchOnFillPileUpHistograms();
840 
841  ana->SetNAssocPtBins(8);
842  ana->SetAssocPtBinLimit(0, 1) ;
843  ana->SetAssocPtBinLimit(1, 2) ;
844  ana->SetAssocPtBinLimit(2, 3) ;
845  ana->SetAssocPtBinLimit(3, 4) ;
846  ana->SetAssocPtBinLimit(4, 5) ;
847  ana->SetAssocPtBinLimit(5, 8) ;
848  ana->SetAssocPtBinLimit(6, 10) ;
849  ana->SetAssocPtBinLimit(7, 100);
850 
851  ana->SelectIsolated(bIsolated); // do correlation with isolated photons
852 
853  // Mixing with own pool
854  if(mixOn)
855  {
856  ana->SwitchOnOwnMix();
858 
859  if(bIsolated)
860  {
861  //Do settings for main isolation cut class
862  AliIsolationCut * ic = ana->GetIsolationCut();
863  ic->SetDebug(debug);
864 
865  if(cone >0 && pth > 0)
866  {
867  //printf("ConfigureHadronCorrelationAnalysis() *** PtThres = %1.1f GeV/c *** R = %1.1f *** R min = %1.2f\n",pth,cone,coneMin);
868  ic->SetPtThreshold(pth);
869  ic->SetConeSize(cone);
870  ic->SetMinDistToTrigger(coneMin);
871  }
872  else
873  {
874  if(col=="pp")
875  {
876  ic->SetPtThreshold(0.5);
877  ic->SetConeSize(0.4);
878  ic->SetMinDistToTrigger(-1);
879  }
880  if(col=="PbPb")
881  {
882  ic->SetPtThreshold(3.);
883  //ic->SetPtThreshold(1.);
884  ic->SetConeSize(0.3);
885  ic->SetMinDistToTrigger(-1);
886  }
887  }
888 
889  ic->SetPtFraction(0.1);
890  ic->SetSumPtThreshold(1.0) ;
891  ic->SetParticleTypeInCone(partInCone);
892  ic->SetICMethod(thresType);
893  }
894  }
895  else
896  ana->SwitchOffOwnMix();
897 
898  ana->SetNZvertBin(20);
899 
900  if(col=="pp")
901  {
902  ana->SetNMaxEvMix(100);
903  ana->SwitchOnTrackMultBins();
904  ana->SetNTrackMultBin(10);
905  ana->SetNRPBin(1);
906  }
907  else
908  {
909  ana->SetNMaxEvMix(10);
910  ana->SwitchOffTrackMultBins(); // centrality bins
911  ana->SetNCentrBin(12);
912  ana->SetNRPBin(3);
913  if(kAnaCaloTrackCorr.Contains("60_90"))
914  {
915  //printf("ConfigureHadronCorrelationAnalysis() *** Set mixing for peripheral ***\n");
916  ana->SetNMaxEvMix(50);
917  ana->SetNCentrBin(2);
918  }
919  }
920 
921  // Avoid borders of calorimeter, same as for isolation
922  //
923  ana->SwitchOnFiducialCut();
924  if ( calorimeter == "EMCAL" ) ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.60, 86, 174) ;
925  else if ( calorimeter == "DCAL" ) ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.60, 266, 314) ;
926  else if ( calorimeter == "PHOS" ) ana->GetFiducialCut()->SetSimplePHOSFiducialCut (0.10, 266, 314) ;
927 
928  // Track matching, in case of mixing and specially in isolation case
929  //
930  AliCaloPID* caloPID = ana->GetCaloPID();
931  // tm = 1, fixed cuts
932  caloPID->SetEMCALDEtaCut(0.025);
933  caloPID->SetEMCALDPhiCut(0.030);
934 
935  // pT track dependent cuts
936  if(tm > 1) caloPID->SwitchOnEMCTrackPtDepResMatching();
937 
938  // Input / output delta AOD settings
939  //
940  ana->SetInputAODName(Form("%sTrigger_%s",particle.Data(),kAnaCaloTrackCorr.Data()));
941  ana->SetAODObjArrayName(Form("%sHadronCorrIso%dTrigger_%s",particle.Data(),bIsolated,kAnaCaloTrackCorr.Data()));
942  //ana->SetAODNamepTInConeHisto(Form("IC%s_%s_R%1.1f_ThMin%1.1f" ,particle.Data(),kAnaCaloTrackCorr.Data(),cone,pth));
943 
944  //Set Histograms name tag, bins and ranges
945  //
946  //ana->AddToHistogramsName(Form("Ana%sHadronCorr_Iso%d_TM%d_",particle.Data(),bIsolated,tm));
947  ana->AddToHistogramsName(Form("Ana%sHadronCorr_Iso%d_",particle.Data(),bIsolated));
948 
949  SetAnalysisCommonParameters(ana,histoString,calorimeter,year,col,simulation,printSettings,debug); // see method below
950 
951  if(particle=="Hadron" || particle.Contains("CTS"))
952  {
953  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
954  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
955  }
956 
957  return ana;
958 }
959 
969 ( Bool_t simulation, Bool_t printSettings, Int_t debug, TString histoString )
970 {
972 
973  ana->SetDebug(debug);
974 
975  // selection cuts
976 
977  ana->SetMinPt(0.2);
978  ana->SwitchOnFiducialCut();
979  ana->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ; //more restrictive cut in reader and after in isolation
980 
982 
985 
986  // Branch AOD settings
987 
988  ana->SetOutputAODName(Form("HadronTrigger_%s",kAnaCaloTrackCorr.Data()));
989  ana->SetOutputAODClassName("AliCaloTrackParticle"); // use if no correlation done
990 
991  //Set Histograms name tag, bins and ranges
992 
993  ana->AddToHistogramsName("AnaHadrons_");
994 
995  SetAnalysisCommonParameters(ana,histoString,"CTS",2012,"pp",simulation,printSettings,debug); // see method below
996 
997  return ana;
998 }
999 
1013 (Int_t tm, TString col , Bool_t simulation,
1014  TString calorimeter, Int_t year,
1015  Bool_t printSettings, Int_t debug, TString histoString )
1016 {
1018 
1019  ana->SetM02Min(-1);
1020  ana->SetNCellsPerClusterMin(-1);
1021 
1022  ana->SetCalorimeter(calorimeter);
1023  if(calorimeter == "DCAL")
1024  {
1025  TString calo = "EMCAL";
1026  ana->SetCalorimeter(calo);
1027  }
1028 
1029  if(simulation) ana->SetConstantTimeShift(615);
1030 
1031  ana->SwitchOffFiducialCut();
1032 
1034 
1036 
1038 
1039  ana->SwitchOffStudyMatchedPID() ;
1040 
1041  ana->SwitchOffStudyWeight();
1042 
1043  ana->SetNCellBinLimits(-1); // no analysis on predefined bins in nCell
1044 
1046  ana->SwitchOffStudyExotic();
1049  ana->SwitchOffStudyCellTime() ;
1050 
1051  // PID cuts (Track-matching)
1052  ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
1053  AliCaloPID* caloPID = ana->GetCaloPID();
1054 
1055  if(tm > 1)
1056  {
1057  // track pT dependent cut
1059 
1060  // Begining of histograms name
1061  ana->AddToHistogramsName("Shape_TMDep_");
1062  }
1063  else if ( tm )
1064  {
1065  // Fix
1067  caloPID->SetEMCALDEtaCut(0.025);
1068  caloPID->SetEMCALDPhiCut(0.030);
1069 
1070  // Begining of histograms name
1071  ana->AddToHistogramsName("Shape_TMFix_");
1072  }
1073 
1074  SetAnalysisCommonParameters(ana,histoString,calorimeter,year,col,simulation,printSettings,debug); // see method below
1075 
1076  AliHistogramRanges* histoRanges = ana->GetHistogramRanges();
1077  histoRanges->SetHistoPtRangeAndNBins(0, 50, 100) ; // Reduce a bit size
1078 
1079  return ana;
1080 }
1081 
1094  TString calorimeter, Int_t year,
1095  Bool_t printSettings, Int_t debug,
1096  TString histoString )
1097 {
1099 
1100  ana->SetCalorimeter(calorimeter);
1101  if(calorimeter == "DCAL")
1102  {
1103  TString calo = "EMCAL";
1104  ana->SetCalorimeter(calo);
1105  }
1106 
1107  ana->SetTimeCut(-1e10,1e10); // Open time cut
1108 
1109  ana->SwitchOffCorrelation(); // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
1110 
1112 
1113  ana->SwitchOffFiducialCut();
1117  ana->SwitchOffStudyBadClusters() ;
1119 
1121 
1122  ana->AddToHistogramsName("QA_"); // Begining of histograms name
1123 
1124  SetAnalysisCommonParameters(ana,histoString,calorimeter,year,col,simulation,printSettings,debug); // see method below
1125 
1126  return ana;
1127 }
1128 
1145  Float_t cone, Float_t coneMin,
1146  TString col, Bool_t simulation,
1147  TString calorimeter, Int_t year,
1148  Bool_t printSettings, Int_t debug,
1149  TString histoString )
1150 {
1152 
1153  // Trigger detector, acceptance and pT cut
1154  ana->SetTriggerDetector(calorimeter);
1155  if(calorimeter == "DCAL")
1156  {
1157  TString calo = "EMCAL";
1158  ana->SetTriggerDetector(calo);
1159  }
1160 
1161  ana->SetMinPt(2); // Trigger photon, pi0 minimum pT
1162  if ( calorimeter == "EMCAL" ) ana->GetFiducialCutForTrigger()->SetSimpleEMCALFiducialCut(0.60, 86, 174) ;
1163  else if ( calorimeter == "DCAL" ) ana->GetFiducialCutForTrigger()->SetSimpleEMCALFiducialCut(0.60, 266, 314) ;
1164  else if ( calorimeter == "PHOS" ) ana->GetFiducialCutForTrigger()->SetSimplePHOSFiducialCut (0.10, 266, 314) ;
1165 
1166  // Particles associated to trigger or isolation cone acceptance and pT cut
1167  ana->SetCalorimeter(calorimeter);
1168  if(calorimeter == "DCAL")
1169  {
1170  TString calo = "EMCAL";
1171  ana->SetCalorimeter(calo);
1172  }
1173 
1174  ana->SetMinChargedPt(0.2);
1175  ana->SetMinNeutralPt(0.3);
1176 
1177  if ( calorimeter == "EMCAL" ) ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.70, 80, 174) ;
1178  else if ( calorimeter == "DCAL" ) ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.70, 260, 327) ;
1179  else if ( calorimeter == "PHOS" ) ana->GetFiducialCut()->SetSimplePHOSFiducialCut (0.12, 250, 320) ;
1180  ana->GetFiducialCut()->SetSimpleCTSFiducialCut(0.9, 0, 360);
1181 
1182  // Isolation paramters
1183  AliIsolationCut * ic = ana->GetIsolationCut();
1184  ic->SetDebug(debug);
1185  ic->SetPtThreshold(pth);
1186  ic->SetConeSize(cone);
1187  ic->SetMinDistToTrigger(coneMin);
1188  ic->SetSumPtThreshold(1.0) ;
1189  ic->SetICMethod(thresType);
1190 
1191  ana->AddToHistogramsName("AnaGenKine_");
1192 
1193  SetAnalysisCommonParameters(ana,histoString,calorimeter,year,col,simulation,printSettings,debug); // see method below
1194 
1195  return ana;
1196 }
1197 
1224  TList* anaList = 0x0,
1225  TString calorimeter = "EMCAL", // "DCAL", "PHOS"
1226  Bool_t simulation = kFALSE,
1227  Int_t year = 2011,
1228  TString col = "pp",
1229  TString analysisString= "Photon_MergedPi0_DecayPi0_Isolation_Correlation_QA_Charged",
1230  TString histoString = "",
1231  Float_t shshMax = 0.27,
1232  Float_t isoCone = 0.4,
1233  Float_t isoConeMin = -1,
1234  Float_t isoPtTh = 2,
1235  Int_t isoMethod = AliIsolationCut::kSumPtIC,
1237  Int_t leading = 0,
1238  Int_t tm = 2,
1239  Bool_t mixOn = kTRUE,
1240  Bool_t printSettings = kFALSE,
1241  Int_t debug = 0
1242 )
1243 {
1244  if ( !anaList )
1245  {
1246  printf("ConfigureCaloTrackCorrAnalysis() << No analysis list passed. Stop >>\n");
1247  return;
1248  }
1249 
1250  // Check the passed variables
1251  //
1252  printf("ConfigureCaloTrackCorrAnalysis() << Settings: Base string <%s>, Analysis string <%s>, "
1253  "\n calorimeter <%s>, simulation <%d>, year <%d>, col <%s>, "
1254  "\n shshMax <%2.2f>, R <%1.2f>, Rmin <%1.2f>, isoPtTh <%2.2f>, isoMethod <%d>,isoContent <%d>,"
1255  "\n leading <%d>, tm <%d>, mixOn <%d>, printSettings <%d>, debug <%d>\n",
1256  anaList->GetName(), analysisString.Data(),
1257  calorimeter.Data(), simulation, year, col.Data(),
1258  shshMax,isoCone,isoConeMin,isoPtTh,isoMethod,isoContent,
1259  leading,tm,mixOn,printSettings,debug);
1260 
1261  kAnaCutsString = analysisString;
1262 
1263  kAnaCaloTrackCorr = Form("%s",anaList->GetName());
1264 
1265  if ( analysisString.Contains("Isolation") )
1266  kAnaCaloTrackCorr+= Form("_Iso_Meth%d_Part%d_Pt%1.2f_R%1.2f",isoMethod,isoContent,isoPtTh,isoCone);
1267  if ( analysisString.Contains("Corr") && analysisString.Contains("Photon") && shshMax > 0)
1268  kAnaCaloTrackCorr+= Form("_CorrM02_%1.2f",shshMax);
1269 
1270  if ( isoConeMin > 0 ) kAnaCaloTrackCorr+=Form("_Rmin%1.2f",isoConeMin);
1271  if ( leading > 0 ) kAnaCaloTrackCorr+=Form("_Lead%d" ,leading);
1272  if ( tm > 0 ) kAnaCaloTrackCorr+=Form("_TM%d" ,tm);
1273 
1274  printf("ConfigureCaloTrackCorrAnalysis() <<<< TMP branch internal NAME: %s >>>>>\n",kAnaCaloTrackCorr.Data());
1275 
1276  // #### Configure analysis ####
1277 
1278 
1279  Int_t n = anaList->GetEntries();//Analysis number, order is important
1280 
1281  //
1282  // Photon analysis
1283  //
1284  if ( analysisString.Contains("Photon") )
1285  {
1286  anaList->AddAt(ConfigurePhotonAnalysis
1287  (col,simulation,calorimeter,year,tm,printSettings,debug,histoString), n++); // Photon cluster selection
1288 
1289  if ( analysisString.Contains("DecayPi0") )
1290  {
1291  anaList->AddAt(ConfigurePi0EbEAnalysis
1292  ("Pi0" , AliAnaPi0EbE::kIMCalo,kFALSE,kFALSE,
1293  col,simulation,calorimeter,year,tm,printSettings,debug,histoString), n++); // Pi0 event by event selection, invariant mass and photon tagging from decay
1294 
1295  anaList->AddAt(ConfigurePi0EbEAnalysis
1296  ("Eta" , AliAnaPi0EbE::kIMCalo,kFALSE,kFALSE,
1297  col,simulation,calorimeter,year,tm,printSettings,debug,histoString), n++); // Eta event by event selection, invariant mass and photon tagging from decay
1298 
1299  anaList->AddAt(ConfigurePi0EbEAnalysis
1300  ("Pi0SideBand", AliAnaPi0EbE::kIMCalo,kFALSE,kFALSE,
1301  col,simulation,calorimeter,year,tm,printSettings,debug,histoString), n++); // Pi0 out of peak event by event selection, and photon tagging from decay
1302 
1303  anaList->AddAt(ConfigurePi0EbEAnalysis
1304  ("EtaSideBand", AliAnaPi0EbE::kIMCalo,kFALSE,kFALSE,
1305  col,simulation,calorimeter,year,tm,printSettings,debug,histoString), n++); // Eta out of peak event by event selection, and photon tagging from decay
1306  }
1307 
1308  if ( analysisString.Contains("Isolation") )
1309  {
1310  anaList->AddAt(ConfigureIsolationAnalysis
1311  ("Photon", leading, isoContent,isoMethod,isoCone,isoConeMin,isoPtTh, kFALSE,
1312  col,simulation,calorimeter,year,tm,printSettings,debug,histoString), n++); // Photon isolation
1313 
1314  }
1315 
1316  if( analysisString.Contains("Correlation") )
1317  {
1318  if ( !analysisString.Contains("MultiIso") )
1319  {
1320  anaList->AddAt(ConfigureHadronCorrelationAnalysis
1321  ("Photon", leading, kFALSE, shshMax, isoContent,isoMethod,isoCone,isoConeMin,isoPtTh, mixOn,
1322  col,simulation,calorimeter,year,tm,printSettings,debug,histoString), n++); // Gamma-hadron correlation
1323  }
1324 
1325  if ( analysisString.Contains("Isolation") )
1326  {
1327  anaList->AddAt(ConfigureHadronCorrelationAnalysis
1328  ("Photon", leading, kTRUE, shshMax, isoContent,isoMethod,isoCone,isoConeMin,isoPtTh, mixOn,
1329  col,simulation,calorimeter,year,tm,printSettings,debug,histoString) , n++); // Isolated gamma hadron correlation
1330  }
1331  } // correlation
1332  }
1333 
1334  //
1335  // Merged pi0 analysis
1336  //
1337  if ( analysisString.Contains("MergedPi0") )
1338  {
1339  anaList->AddAt(ConfigurePi0EbEAnalysis
1340  ("Pi0", AliAnaPi0EbE::kSSCalo,kTRUE,kTRUE,
1341  col,simulation,calorimeter,year,tm,printSettings,debug,histoString), n++); // Pi0 event by event selection, cluster splitting
1342  if ( analysisString.Contains("Isolation") )
1343  {
1344  anaList->AddAt(ConfigureIsolationAnalysis
1345  ("Pi0SS", leading, isoContent,isoMethod,isoCone,isoConeMin,isoPtTh, kFALSE,
1346  col,simulation,calorimeter,year,tm,printSettings,debug,histoString), n++); // Pi0 isolation, cluster splits
1347 
1348  }
1349 
1350  if( analysisString.Contains("Correlation") )
1351  {
1352  if ( !analysisString.Contains("MultiIso") )
1353  {
1354  anaList->AddAt(ConfigureHadronCorrelationAnalysis
1355  ("Pi0SS", leading, kFALSE, shshMax, isoContent,isoMethod,isoCone,isoConeMin,isoPtTh, mixOn,
1356  col,simulation,calorimeter,year,tm,printSettings,debug,histoString), n++); // Pi0-hadron correlation
1357  }
1358 
1359  if ( analysisString.Contains("Isolation") )
1360  {
1361  anaList->AddAt(ConfigureHadronCorrelationAnalysis
1362  ("Pi0SS", leading, kTRUE, shshMax, isoContent,isoMethod,isoCone,isoConeMin,isoPtTh, mixOn,
1363  col,simulation,calorimeter,year,tm,printSettings,debug,histoString) , n++); // Isolated pi0-hadron correlation
1364  }
1365  } // correlation
1366  }
1367 
1368  // Check the generated kinematics
1369  if(simulation && analysisString.Contains("Generator"))
1370  {
1371  anaList->AddAt(ConfigureGenKineAnalysis
1372  (isoMethod,isoPtTh,isoCone,isoConeMin,
1373  col,simulation,calorimeter,year,printSettings,debug,histoString), n++);
1374  }
1375 
1376  // Charged analysis
1377  if ( analysisString.Contains("Charged") )
1378  {
1379  anaList->AddAt(ConfigureChargedAnalysis(simulation,printSettings,debug,histoString), n++); // track selection checks
1380  }
1381 
1382  // Cluster Shape studies
1383  if ( analysisString.Contains("ClusterShape") )
1384  {
1385  anaList->AddAt(ConfigureClusterShape(tm,col,simulation,calorimeter,year,printSettings,debug,histoString) , n++);
1386  }
1387 
1388  // Calo QA
1389  if ( analysisString.Contains("QA") )
1390  {
1391  anaList->AddAt(ConfigureQAAnalysis(col,simulation,calorimeter,year,printSettings,debug,histoString) , n++);
1392  }
1393 
1394  printf("ConfigureCaloTrackCorrAnalysis() << End configuration for %s with total analysis %d>>\n",
1395  kAnaCaloTrackCorr.Data(), n);
1396 }
1397 
1398 
1399 
void SetSumPtThresholds(Int_t i, Float_t pt)
void SwitchOffSelectedClusterHistoFill()
Definition: AliAnaPi0EbE.h:112
void SetPtThreshold(Float_t pt)
void ConfigureCaloTrackCorrAnalysis(TList *anaList=0x0, TString calorimeter="EMCAL", Bool_t simulation=kFALSE, Int_t year=2011, TString col="pp", TString analysisString="Photon_MergedPi0_DecayPi0_Isolation_Correlation_QA_Charged", TString histoString="", Float_t shshMax=0.27, Float_t isoCone=0.4, Float_t isoConeMin=-1, Float_t isoPtTh=2, Int_t isoMethod=AliIsolationCut::kSumPtIC, Int_t isoContent=AliIsolationCut::kNeutralAndCharged, Int_t leading=0, Int_t tm=2, Bool_t mixOn=kTRUE, Bool_t printSettings=kFALSE, Int_t debug=0)
void SetHistoTrackMultiplicityRangeAndNBins(Int_t min, Int_t max, Int_t n)
TString kAnaCaloTrackCorr
Global name to be composed of the settings, used to set the AOD branch name.
void SetTimeCut(Double_t min, Double_t max)
void ana(Int_t mode=mGRID)
Definition: ana.C:162
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)
TString kAnaCutsString
Global name to be composed of the analysis components chain and some internal settings.
void SwitchOnFillAllTrackMatchingHistogram()
void SetSplitWidthSigma(Float_t s)
Definition: AliCaloPID.h:283
const int debug
Definition: scanAll.C:15
void SwitchOnTrackMatchRejection()
Definition: AliAnaPhoton.h:134
void SetHistoXRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetClusterSplittingM02Cut(Float_t min=0, Float_t max=100)
Definition: AliCaloPID.h:264
void SwitchOnSplitShowerShapeCut()
Definition: AliCaloPID.h:260
void SwitchOnTMHistoFill()
Definition: AliAnaPhoton.h:96
void SetAssociatedPtRange(Float_t min, Float_t max)
Class with utils to perform Isolation Cuts.
AliAnaGeneratorKine * ConfigureGenKineAnalysis(Int_t thresType, Float_t pth, Float_t cone, Float_t coneMin, TString col, Bool_t simulation, TString calorimeter, Int_t year, Bool_t printSettings, Int_t debug, TString histoString)
void SetConeSize(Float_t r)
void SetPtFraction(Float_t pt)
void SwitchOnSelectPairInIsolationCone()
Definition: AliAnaPi0EbE.h:127
void SetTimeCut(Double_t min, Double_t max)
Definition: AliAnaPi0EbE.h:142
void FillNPrimaryHistograms(Int_t n)
Definition: AliAnaPhoton.h:145
void SwitchOffSplitShowerShapeCut()
Definition: AliCaloPID.h:261
void SetClusterSplittingMinNCells(Int_t c)
Definition: AliCaloPID.h:267
void SetHistoPtRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetDebug(Int_t d)
void SetMinChargedPt(Float_t pt)
virtual void SetCalorimeter(TString &calo)
Set the calorimeter for the analysis. A string.
virtual void SetInputAODName(TString name)
void SetM02CutForInvMass(Float_t min=0, Float_t max=10)
Definition: AliAnaPi0EbE.h:117
virtual AliIsolationCut * GetIsolationCut()
void SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3)
Definition: AliAnaPhoton.h:117
void SetInvMassCutRange(Double_t invmassmin, Double_t invmassmax)
void KeepNeutralMesonSelectionHistos(Bool_t keep)
void SetSimpleEMCALFiducialCut(Float_t abseta, Float_t phimin, Float_t phimax)
virtual void SetOutputAODClassName(TString name)
void SwitchOffFillShowerShapeHistograms()
Definition: AliAnaPhoton.h:74
virtual AliNeutralMesonSelection * GetNeutralMesonSelection()
void SetSumPtThreshold(Float_t s)
void SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3)
Definition: AliAnaPi0EbE.h:133
Class for the Calorimeter QA analysis.
void SwitchOnFillShowerShapeHistogramsPerSM()
Definition: AliAnaPhoton.h:79
void SetHistodRRangeAndNBins(Float_t min, Float_t max, Int_t n)
Get trigger particles/partons/jets and correlations at generator level.
void SwitchOffSplitAsymmetryCut()
Definition: AliCaloPID.h:257
void SetAnalysisType(anaTypes ana)
Definition: AliAnaPi0EbE.h:92
void SwitchOffTMHistoFill()
Definition: AliAnaPi0EbE.h:109
AliAnaCalorimeterQA * ConfigureQAAnalysis(TString col, Bool_t simulation, TString calorimeter, Int_t year, Bool_t printSettings, Int_t debug, TString histoString)
void SetNCellCut(Int_t n)
Definition: AliAnaPhoton.h:125
Select cluster pairs or single merged clusters with pi0 or eta invariant mass.
Definition: AliAnaPi0EbE.h:30
AliAnaPhoton * ConfigurePhotonAnalysis(TString col, Bool_t simulation, TString calorimeter, Int_t year, Int_t tm, Bool_t printSettings, Int_t debug, TString histoString)
void SetSimplePHOSFiducialCut(Float_t abseta, Float_t phimin, Float_t phimax)
AliAnaChargedParticles * ConfigureChargedAnalysis(Bool_t simulation, Bool_t printSettings, Int_t debug, TString histoString)
void SetPtFractions(Int_t i, Float_t pt)
2 calorimeter clusters invariant mass selection
Definition: AliAnaPi0EbE.h:86
const TString calorimeter
Definition: anaM.C:36
void SetHistoTrackResidualEtaRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetIsolationCandidateMinPt(Float_t min)
Definition: AliAnaPi0EbE.h:122
void SetAnalysisCommonParameters(AliAnaCaloTrackCorrBaseClass *ana, TString histoString, TString calorimeter, Int_t year, TString col, Bool_t simulation, Bool_t printSettings, Int_t debug)
void SetPHOSRCut(Float_t rcut)
Definition: AliCaloPID.h:213
void SetEMCALDPhiCut(Float_t dcut)
Definition: AliCaloPID.h:221
void SetLeadHadronPtCut(Float_t min, Float_t max)
virtual void SetOutputAODName(TString name)
void SetICMethod(Int_t i)
void SetR(Float_t r)
Definition: AliAnaPi0EbE.h:121
Correlate trigger particles (photon, pi0, tracks) and charged tracks: Azimuthal correlations, xE distributions.
virtual void SetNTrackMultBin(Int_t n=1)
Number of bins in centrality.
Base class for CaloTrackCorr analysis algorithms.
void SwitchOffTrackMatchRejection()
Definition: AliAnaPhoton.h:135
void SetDeltaPhiCutRange(Double_t phimin, Double_t phimax)
void SetUeDeltaPhiCutRange(Double_t uephimin, Double_t uephimax)
1 calorimeter cluster and 1 photon conversion pair invariant mass selection
Definition: AliAnaPi0EbE.h:88
void SetHistoPtInConeRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoPOverERangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual AliFiducialCut * GetFiducialCut()
void SetHistoPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
int Int_t
Definition: External.C:63
void SetSideBandCutRanges(Double_t lmin, Double_t lmax, Double_t rmin, Double_t rmax)
virtual AliHistogramRanges * GetHistogramRanges()
void SwitchOnSplitAsymmetryCut()
Definition: AliCaloPID.h:256
void SetHistoPtSumRangeAndNBins(Float_t min, Float_t max, Int_t n)
float Float_t
Definition: External.C:68
Filter EMCal/PHOS clusters for photon analysis.
Definition: AliAnaPhoton.h:33
void SetHistoTrackResidualPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetConeSizes(Int_t i, Float_t r)
Class for cluster shape, cell T-Card correlation and exoticity.
void SwitchOnSelectIsolatedDecay()
Definition: AliAnaPi0EbE.h:124
void SwitchOnUEBandSubtractionHistoFill(Int_t lev=1)
void SetM02Cut(Float_t min=0, Float_t max=10)
void SwitchOnSplitClusterDistToBad()
Definition: AliAnaPi0EbE.h:160
void SwitchOffTrackMatchRejection()
Definition: AliAnaPi0EbE.h:149
virtual void SetHistoERangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetInputAODGammaConvName(TString name)
Definition: AliAnaPi0EbE.h:98
void SetHistoNClusterCellRangeAndNBins(Int_t min, Int_t max, Int_t n)
void SetMinNeutralPt(Float_t pt)
anaTypes
Analysis types.
Definition: AliAnaPi0EbE.h:84
void SetParticle(TString particleName)
Set some default parameters for selection of pi0 or eta.
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetHistoYRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetTimeCut(Double_t min, Double_t max)
Definition: AliAnaPhoton.h:120
AliAnaParticleIsolation * ConfigureIsolationAnalysis(TString particle, Int_t leading, Int_t partInCone, Int_t thresType, Float_t cone, Float_t coneMin, Float_t pth, Bool_t multi, TString col, Bool_t simulation, TString calorimeter, Int_t year, Int_t tm, Bool_t printSettings, Int_t debug, TString histoString)
AliAnaClusterShapeCorrelStudies * ConfigureClusterShape(Int_t tm, TString col, Bool_t simulation, TString calorimeter, Int_t year, Bool_t printSettings, Int_t debug, TString histoString)
virtual TString GetAddedHistogramsStringToName() const
void SetPtThresholdMax(Float_t pt)
AliFiducialCut * GetFiducialCutForTrigger()
void SetEtaMassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:305
void SwitchOnTMHistoFill()
Definition: AliAnaPi0EbE.h:108
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
void SetPi0MassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:304
Class containing more common histogram axis types.
void SetEMCALLambda0CutMax(Float_t lcut)
Definition: AliCaloPID.h:202
void SwitchOnTrackMatchRejection()
Definition: AliAnaPi0EbE.h:148
virtual void SetNCentrBin(Int_t n=1)
Number of bins in reaction plain.
AliAnaPi0EbE * ConfigurePi0EbEAnalysis(TString particle, Int_t analysis, Bool_t useSSIso, Bool_t useAsy, TString col, Bool_t simulation, TString calorimeter, Int_t year, Int_t tm, Bool_t printSettings, Int_t debug, TString histoString)
virtual void SetNRPBin(Int_t n=1)
Number of bins for vertex position.
void SetPHOSDispersionCut(Float_t dcut)
Definition: AliCaloPID.h:208
void SetHistoNClustersRangeAndNBins(Int_t min, Int_t max, Int_t n)
void SetNLMCut(Int_t min, Int_t max)
Definition: AliAnaPi0EbE.h:100
Track selection for correlation analysis.
void SetMCGenType(Int_t min=0, Int_t max=6)
void SwitchOnFillShowerShapeHistograms()
Definition: AliAnaPhoton.h:73
Select clusters/tracks with low particle environment in their vecinity, isolated within a cone...
void SetHistoEtaRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOffFillWeightHistograms()
Definition: AliAnaPi0EbE.h:152
void SetTriggerDetector(TString &det)
Set the calorimeter for the analysis.
void SetHistoAsymmetryRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoV0MultiplicityRangeAndNBins(Int_t min, Int_t max, Int_t n)
void SwitchOnEMCTrackPtDepResMatching()
Definition: AliCaloPID.h:228
virtual void SetAODObjArrayName(TString name)
AliAnaParticleHadronCorrelation * ConfigureHadronCorrelationAnalysis(TString particle, Int_t leading, Bool_t bIsolated, Float_t shshMax, Int_t partInCone, Int_t thresType, Float_t cone, Float_t coneMin, Float_t pth, Bool_t mixOn, TString col, Bool_t simulation, TString calorimeter, Int_t year, Int_t tm, Bool_t printSettings, Int_t debug, TString histoString)
void SetHistoZRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoV0SignalRangeAndNBins(Int_t min, Int_t max, Int_t n)
virtual void Print(const Option_t *) const
Print some relevant parameters set for the analysis.
Class that contains methods to select candidate cluster pairs to neutral meson.
void SetHistoTimeRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetHistoFinePtRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetNAssocPtBins(Int_t n)
Set number of associated charged (neutral) hadrons pT bins.
Class for PID selection with calorimeters.
Definition: AliCaloPID.h:53
1 calorimeter cluster shower shape and split invariatn mass selection
Definition: AliAnaPi0EbE.h:87
void FillNOriginHistograms(Int_t n)
Definition: AliAnaPhoton.h:143
virtual void SetNMaxEvMix(Int_t n=20)
Number of bins in track multiplicity.
void SetNLMMinEnergy(Int_t i, Float_t min)
Definition: AliAnaPi0EbE.h:138
void SetHistoShowerShapeRangeAndNBins(Float_t min, Float_t max, Int_t n)
bool Bool_t
Definition: External.C:53
void SetLeadHadronPhiCut(Float_t min, Float_t max)
void SetHistodEdxRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOffEMCTrackPtDepResMatching()
Definition: AliCaloPID.h:229
void SetInvMassCutMaxParameters(Float_t a, Float_t b, Float_t c)
void SetHistoHBPRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetEMCALLambda0CutMin(Float_t lcut)
Definition: AliCaloPID.h:205
void SetHistoRRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetParticleTypeInCone(Int_t i)
void SetHistoVertexDistRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetSubClusterEnergyMinimum(Int_t i, Float_t min)
Definition: AliCaloPID.h:273
void SetHistoDiffTimeRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetEMCALDEtaCut(Float_t dcut)
Definition: AliCaloPID.h:218
void SetPhotonMassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:306
void SetPtThresholds(Int_t i, Float_t pt)
void SetHistoRatioRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOffAllNLMHistoFill()
Definition: AliAnaPi0EbE.h:106
void SetNLMCut(Int_t min, Int_t max)
Definition: AliAnaPhoton.h:128
void SetMinDistToTrigger(Float_t md)
void SetAssocPtBinLimit(Int_t ibin, Float_t pt)
Set the list of pT limits for the of associated charged (neutral) hadrons.
Int_t GetFirstSMCoveredByTRD() const
Time cut in ns.
void SetTriggerPtRange(Float_t min, Float_t max)