AliPhysics  0d55a7a (0d55a7a)
AddTaskMergedPi0Selection.C
Go to the documentation of this file.
1 
12 
47 (
48  Bool_t simulation = kFALSE,
49  Int_t year = 2011,
50  TString col = "pp",
51  TString trigger = "EMC7",
52  Int_t rejectEMCTrig = 0,
53  TString clustersArray = "",
54  Bool_t tender = kFALSE,
55  Bool_t nonLinOn = kFALSE,
56  Int_t minCen = -1,
57  Int_t maxCen = -1,
58  TString outputfile = "",
59  Bool_t printSettings = kFALSE,
60  Int_t debug = 0 // Debug level
61  )
62 {
63  // Get the pointer to the existing analysis manager via the static access method.
64 
65  printf("Passed settings:\n simulation <%d>, year <%d>,\n col <%s>, trigger <%s>, reject EMC <%d>, clustersArray <%s>, tender <%d>, non linearity <%d>\n, minCen <%d>, maxCen <%d>,\n, outputfile <%s>, printSettings <%d>, debug <%d>\n",
66  simulation,year,col.Data(),trigger.Data(), rejectEMCTrig, clustersArray.Data(),tender, nonLinOn,
67  minCen,maxCen,outputfile.Data(),printSettings,debug);
68 
69  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
70  if (!mgr)
71  {
72  ::Error("AddTask", "No analysis manager to connect to.");
73  return NULL;
74  }
75 
76  // Check the analysis type using the event handlers connected to the analysis manager.
77 
78  if (!mgr->GetInputEventHandler())
79  {
80  ::Error("AddTask", "This task requires an input event handler");
81  return NULL;
82  }
83 
84  // Make sure the B field is enabled for track selection, some cuts need it
85  ((AliInputEventHandler*)mgr->GetInputEventHandler())->SetNeedField(kTRUE);
86 
87  // Name for containers
88 
89  kAnaMergedPi0 = Form("MergedPi0_Trig%s_Col_%s_Year%d_Cl%s_Ten%d",
90  trigger.Data(),col.Data(),year,clustersArray.Data(),tender);
91 
92  if(col=="PbPb" && maxCen>=0) kAnaMergedPi0+=Form("Cen%d_%d",minCen,maxCen);
93 
94  printf("<<<< NAME: %s >>>>>\n",kAnaMergedPi0.Data());
95 
96  // #### Configure analysis ####
97 
99 
100  // General frame setting and configuration
101  maker->SetReader ( ConfigureReader (col,simulation,clustersArray,tender,nonLinOn,trigger,rejectEMCTrig,minCen,maxCen,printSettings,debug) );
102  maker->SetCaloUtils( ConfigureCaloUtils(col,simulation,clustersArray,tender,nonLinOn,year, printSettings,debug) );
103 
104  // Analysis tasks setting and configuration
105  Int_t n = 0;//Analysis number, order is important
106 
107  //
108  // Merged pi0 analysis
109  //
110 
111  // Track matching rejection on
112  maker->AddAnalysis(ConfigurePi0EbEAnalysis(1,1,1,1,col,simulation,year,printSettings,debug), n++); // all cuts
113  maker->AddAnalysis(ConfigurePi0EbEAnalysis(0,1,1,1,col,simulation,year,printSettings,debug), n++); // no ss cut
114  maker->AddAnalysis(ConfigurePi0EbEAnalysis(0,0,1,1,col,simulation,year,printSettings,debug), n++); // no ss and asy cuts
115  maker->AddAnalysis(ConfigurePi0EbEAnalysis(1,0,1,1,col,simulation,year,printSettings,debug), n++); // no asy cut
116  maker->AddAnalysis(ConfigurePi0EbEAnalysis(1,0,0,1,col,simulation,year,printSettings,debug), n++); // no asy and mass cut
117  maker->AddAnalysis(ConfigurePi0EbEAnalysis(1,1,0,1,col,simulation,year,printSettings,debug), n++); // no mass cut
118 
119  // Track matching rejection off
120  maker->AddAnalysis(ConfigurePi0EbEAnalysis(1,1,1,0,col,simulation,year,printSettings,debug), n++); // all cuts
121  maker->AddAnalysis(ConfigurePi0EbEAnalysis(0,1,1,0,col,simulation,year,printSettings,debug), n++); // no ss cut
122  maker->AddAnalysis(ConfigurePi0EbEAnalysis(0,0,1,0,col,simulation,year,printSettings,debug), n++); // no ss and asy cuts
123  maker->AddAnalysis(ConfigurePi0EbEAnalysis(1,0,1,0,col,simulation,year,printSettings,debug), n++); // no asy cut
124  maker->AddAnalysis(ConfigurePi0EbEAnalysis(1,0,0,0,col,simulation,year,printSettings,debug), n++); // no asy and mass cut
125  maker->AddAnalysis(ConfigurePi0EbEAnalysis(1,1,0,0,col,simulation,year,printSettings,debug), n++); // no mass cut
126 
127  // Needed for pi0 primary spectra histogram, activate only for simulations
128  if(simulation) maker->AddAnalysis(ConfigurePi0KineAnalysis(col,year,printSettings,debug), n++);
129 
130  maker->SetAnaDebug(debug) ;
131 
132  maker->SwitchOnHistogramsMaker() ;
133  maker->SwitchOnAODsMaker() ;
134 
135  if( simulation || !trigger.Contains("EMC") ) maker->SwitchOffDataControlHistograms();
136 
137  if(simulation)
138  {
139  // Calculate the cross section weights, apply them to all histograms
140  // and fill xsec and trial histo. Sumw2 must be activated.
141  //maker->GetReader()->GetWeightUtils()->SwitchOnMCCrossSectionCalculation();
142  //maker->SwitchOnSumw2Histograms();
143 
144  // For recent productions where the cross sections and trials are not stored in separate file
145  //maker->GetReader()->GetWeightUtils()->SwitchOnMCCrossSectionFromEventHeader() ;
146 
147  // Just fill cross section and trials histograms.
148  maker->GetReader()->GetWeightUtils()->SwitchOnMCCrossSectionHistoFill();
149 
150  // Add control histogram with pT hard to control aplication of weights
151  maker->SwitchOnPtHardHistogram();
152  }
153 
154 
155  if(printSettings) maker->Print("");
156 
157  // Create task
158 
159  AliAnalysisTaskCaloTrackCorrelation * task = new AliAnalysisTaskCaloTrackCorrelation (Form("Pi0SS%s",kAnaMergedPi0.Data()));
160 
161  task->SetDebugLevel(debug);
162 
163  //task->SetBranches("ESD:AliESDRun.,AliESDHeader");
164  //task->SetConfigFileName(""); //Don't configure the analysis via configuration file.
165 
166  task->SetAnalysisMaker(maker);
167 
168  mgr->AddTask(task);
169 
170  //Create containers
171 
172  if(outputfile.Length()==0) outputfile = AliAnalysisManager::GetCommonFileName();
173 
174  AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(kAnaMergedPi0, TList::Class(),
175  AliAnalysisManager::kOutputContainer,
176  Form("%s",outputfile.Data()));
177 
178  AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Param_%s",kAnaMergedPi0.Data()), TList::Class(),
179  AliAnalysisManager::kParamContainer,
180  "AnalysisParameters.root");
181 
182  // Create ONLY the output containers for the data produced by the task.
183  // Get and connect other common input/output containers via the manager as below
184  //==============================================================================
185  mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
186  //if(!kData.Contains("delta") && outputAOD) mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer());
187  mgr->ConnectOutput (task, 1, cout_pc);
188  mgr->ConnectOutput (task, 2, cout_cuts);
189 
190 
191  UInt_t mask = SetTriggerMaskFromName(trigger);
192  task->SelectCollisionCandidates(mask);
193 
194 
195  return task;
196 }
197 
202  TString clustersArray, Bool_t tender,
203  Bool_t nonLinOn,
204  TString trigger, Bool_t rejectEMCTrig,
205  Int_t minCen, Int_t maxCen,
206  Bool_t printSettings, Int_t debug )
207 {
208  // Get the data type ESD or AOD
209  AliAnalysisManager * mgr = AliAnalysisManager::GetAnalysisManager();
210  TString inputDataType = mgr->GetInputEventHandler()->GetDataType();
211 
212  AliCaloTrackReader * reader = 0;
213  if (inputDataType == "AOD") reader = new AliCaloTrackAODReader();
214  else if(inputDataType == "ESD") reader = new AliCaloTrackESDReader();
215  else printf("AliCaloTrackReader::ConfigureReader() - Data not known InputData=%s\n",inputDataType.Data());
216 
217  reader->SetDebug(debug);//10 for lots of messages
218 
219  //
220  // MC settings
221  //
222  // Check if kine stack is available, independent of request of simulation
223 // Bool_t useKinematics = kFALSE;
224 // useKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
225 //
226 // if(simulation)
227 // {
228 // if (!useKinematics && inputDataType=="AOD") useKinematics = kTRUE; //AOD primary should be available ...
229 // }
230 
231  // In case of Pythia pt Hard bin simulations (jet-jet, gamma-jet)
232  // reject some special events that bother the cross section
233  if(simulation)
234  {
235  // Event rejection cuts for jet-jet simulations, do not use in other
236  reader->SetPtHardAndJetPtComparison(kTRUE);
237  reader->SetPtHardAndJetPtFactor(4);
238 
239  reader->SetPtHardAndClusterPtComparison(kTRUE);
240  reader->SetPtHardAndClusterPtFactor(1.5);
241  }
242 
243  //------------------------
244  // Detector input filling
245  //------------------------
246 
247  //Min cluster/track E
248  reader->SetEMCALEMin(0.3);
249  reader->SetEMCALEMax(1000);
250  reader->SetPHOSEMin(0.3);
251  reader->SetPHOSEMax(1000);
252  reader->SetCTSPtMin(0.2);
253  reader->SetCTSPtMax(1000);
254 
257 
258  // Shower shape smearing
259  // Set it in the train configuration page not here for the moment
260 // if(simulation)
261 // {
262 // reader->SwitchOffShowerShapeSmearing(); // Active only on MC, off by default
263 // reader->SetShowerShapeSmearWidth(0.005);
264 // }
265 
266  //
267  // Tracks
268  //
269  reader->SwitchOnCTS();
270 
271  reader->SwitchOffUseTrackTimeCut();
272  reader->SetTrackTimeCut(0,50);
273 
274  reader->SwitchOnFiducialCut();
275  reader->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ;
276 
277  reader->SwitchOffUseTrackDCACut();
278  //reader->SetTrackDCACut(0,0.0105);
279  //reader->SetTrackDCACut(1,0.035);
280  //reader->SetTrackDCACut(2,1.1);
281 
282  if(inputDataType=="ESD")
283  {
284  gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/macros/CreateTrackCutsPWGJE.C");
285 
286  //AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10041004);
287  //reader->SetTrackCuts(esdTrackCuts);
288 
289  AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001008);
290  reader->SetTrackCuts(esdTrackCuts);
291  AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10011008);
292  reader->SetTrackComplementaryCuts(esdTrackCuts2);
293 
295  }
296  else if(inputDataType=="AOD")
297  {
298  reader->SwitchOnAODHybridTrackSelection(); // Check that the AODs have Hybrids!!!!
300  reader->SetTrackStatus(AliVTrack::kITSrefit);
301 
302  //reader->SwitchOnAODPrimaryTrackSelection(); // Used in preliminary results of QM from Nicolas and Xiangrong?
303  //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
304  //reader->SetTrackFilterMask(128); // Filter bit, not mask, use if off hybrid, TPC only
305  }
306 
307  //
308  // Calorimeter
309  //
310  if(clustersArray == "" && !tender)
311  {
312  printf("**************** Standard EMCAL clusters branch analysis **************** \n");
314  // Check in ConfigureCaloUtils that the recalibration and bad map are ON
315  }
316  else
317  {
318  printf("**************** Input for analysis is Clusterizer %s **************** \n", clustersArray.Data());
319  reader->SetEMCALClusterListName(clustersArray);
321  }
322 
323  // Time cuts
325  if(simulation)
326  {
327  reader->SwitchOffUseEMCALTimeCut();
328  reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
329  }
330  else
331  {
332  reader->SwitchOnUseEMCALTimeCut();
333  reader->SetEMCALTimeCut(-25,20);
334  }
335 
336  // CAREFUL
337  if(nonLinOn) reader->SwitchOnClusterELinearityCorrection();
339 
340 
341  reader->SwitchOnEMCALCells();
342  reader->SwitchOnEMCAL();
343 
344  reader->SwitchOffPHOSCells();
345  reader->SwitchOffPHOS();
346 
347 
348  //-----------------
349  // Event selection
350  //-----------------
351 
352  //if(!simulation) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma
353 
354  // Event triggered by EMCal selection settings
357 
358  if( rejectEMCTrig > 0 && !simulation && (trigger.Contains("EMC") || trigger.Contains("L")))
359  {
360  printf("=== Remove bad triggers === \n");
363 
364 // reader->SetTriggerPatchTimeWindow(8,9); // default values
365 // if (kRunNumber < 146861) reader->SetEventTriggerL0Threshold(3.);
366 // else if(kRunNumber < 154000) reader->SetEventTriggerL0Threshold(4.);
367 // else if(kRunNumber < 165000) reader->SetEventTriggerL0Threshold(5.5);
368 // //redefine for other periods, triggers
369 //
370 // if(kRunNumber < 172000)
371 // {
372 // reader->SetEventTriggerL1Bit(4,5); // current LHC11 data
373 // printf("\t Old L1 Trigger data format!\n");
374 // }
375 // else
376 // {
377 // reader->SetEventTriggerL1Bit(6,8); // LHC12-13 data
378 // printf("\t Current L1 Trigger data format!\n");
379 // }
380 
381  if(clustersArray != "" || tender)
382  {
383  printf("Trigger cluster calibration OFF\n");
385  }
386 
387  }
388 
389  //reader->RejectFastClusterEvents() ;
390 
391  reader->SwitchOnEventTriggerAtSE();
392 
393  reader->SetZvertexCut(10.); // Open cut
394  reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
395  reader->SwitchOnRejectNoTrackEvents();
396 
397  reader->SwitchOffV0ANDSelection() ; // and besides v0 AND
398  reader->SwitchOffPileUpEventRejection(); // remove pileup by default off, apply it only for MB not for trigger
399 
400  if(col=="PbPb")
401  {
402  // Centrality
403  reader->SetCentralityClass("V0M");
404  reader->SetCentralityOpt(100); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
405  reader->SetCentralityBin(minCen,maxCen); // Accept all events, if not select range
406 
407  // Event plane (only used in Maker and mixing for AliAnaPi0/AliAnaHadronCorrelation for the moment)
408  reader->SetEventPlaneMethod("V0");
409  }
410 
411  if(printSettings) reader->Print("");
412 
413  return reader;
414 }
415 
420  TString clustersArray, Bool_t tender,
421  Bool_t nonLinOn, Int_t year,
422  Bool_t printSettings, Int_t debug)
423 {
425 
426  cu->SetDebug(debug);
427 
428  // Remove clusters close to borders, at least max energy cell is 1 cell away
431 
433 
434  if (year == 2010) cu->SetNumberOfSuperModulesUsed(4);
435  else if(year <= 2013) cu->SetNumberOfSuperModulesUsed(10);
436  else if(year > 2013) cu->SetNumberOfSuperModulesUsed(20);
437  else cu->SetNumberOfSuperModulesUsed(10);
438 
439  printf("xxx Number of SM set to <%d> xxx\n",cu->GetNumberOfSuperModulesUsed());
440 
441  // Search of local maxima in cluster
442  if(col=="pp")
443  {
444  cu->SetLocalMaximaCutE(0.1);
445  cu->SetLocalMaximaCutEDiff(0.03);
446  }
447  else
448  {
449  cu->SetLocalMaximaCutE(0.2);
450  cu->SetLocalMaximaCutEDiff(0.03);
451  }
452 
454 
456 
457  // EMCAL settings
458 
459  if(!simulation)
461 
462  AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
463 
464  // calibrations
465  Bool_t calibEner = kFALSE;
466  Bool_t calibTime = kFALSE;
467  cu->SwitchOffRecalibration();
469 
470  if( !tender )
471  {
472  cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
474 
475  calibEner = kTRUE;
476  calibTime = kTRUE;
477  }
478 
479  if( simulation )
480  {
481  calibEner = kFALSE;
482  calibTime = kFALSE;
483 
484  cu->SwitchOffRecalibration(); // Check the reader if it is taken into account during filtering
486  }
487 
488  gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/EMCAL/macros/ConfigureEMCALRecoUtils.C");
490  simulation,
491  kTRUE, // exotic
492  nonLinOn, // Non linearity
493  calibEner, // E calib
494  kTRUE, // bad map
495  calibTime); // time calib
496 
497  if( calibTime ) recou->SetExoticCellDiffTimeCut(50);
498 
499  if( nonLinOn ) cu->SwitchOnCorrectClusterLinearity();
500 
501  printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
502  printf("ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
503 
504  // PHOS
506 
507  if(printSettings) cu->Print("");
508 
509  return cu;
510 }
511 
516  Bool_t useMass, Bool_t tm,
517  TString col, Bool_t simulation, Int_t year,
518  Bool_t printSet, Int_t debug )
519 {
520  printf("Set: TM%d_SS%d_Asy%d_Mass%d_%s \n", tm,useSS,useAsy,useMass,kAnaMergedPi0.Data());
521  AliAnaPi0EbE *ana = new AliAnaPi0EbE();
522 
523  ana->SetAnalysisType(AliAnaPi0EbE::kSSCalo);
524 
525  ana->SwitchOffAllNLMHistoFill();
526  ana->SwitchOffSelectedClusterHistoFill();
527 
528  ana->SwitchOffFillWeightHistograms();
529 
530  if(tm) ana->SwitchOnTrackMatchRejection() ;
531  else ana->SwitchOffTrackMatchRejection() ;
532  ana->SwitchOffTMHistoFill() ;
533 
534  ana->SetCalorimeter("EMCAL");
535 
536  // Branch AOD settings
537  ana->SetOutputAODName(Form("Pi0SS_TM%d_SS%d_Asy%d_Mass%d_%s",tm,useSS,useAsy,useMass,kAnaMergedPi0.Data()));
538  ana->SetOutputAODClassName("AliCaloTrackParticleCorrelation");
539 
540  // Set Histograms name tag, bins and ranges
541  ana->AddToHistogramsName(Form("AnaPi0SSEbE_TM%d_SS%d_Asy%d_Mass%d_",tm,useSS,useAsy,useMass));
542 
543  SetAnalysisCommonParameters(ana,"EMCAL",year,col,simulation,printSet,debug); // see method below
544 
545  // cluster splitting settings
546  ana->SetMinEnergy(6);
547  ana->SetMaxEnergy(100.);
548 
549  ana->SetNLMMinEnergy(0, 10);
550  ana->SetNLMMinEnergy(1, 6);
551  ana->SetNLMMinEnergy(2, 6);
552 
553  // NLM cut, used in all, exclude clusters with more than 2 maxima
554  ana->SetNLMCut(1, 2) ;
555 
556  //
557  ana->SetMinDistanceToBadChannel(2, 4, 6);
558  ana->SwitchOnSplitClusterDistToBad();
559  ana->SetTimeCut(-1e10,1e10); // Open time cut
560 
561  AliCaloPID* caloPID = ana->GetCaloPID();
562 
563  caloPID->SetSplitWidthSigma(3); // cut at 3 sigma of the mean pi0 peak.
564 
565  if(!useSS)
566  {
567  printf("Do not apply SS cut on merged pi0 analysis \n");
568  caloPID->SwitchOffSplitShowerShapeCut() ;
569  caloPID->SetClusterSplittingM02Cut(0.1,10);
570  }
571  else
572  {
573  caloPID->SetClusterSplittingM02Cut(0.3,4); // Do the selection in the analysis class and not in the PID method to fill SS histograms
574  caloPID->SwitchOnSplitShowerShapeCut() ;
575  }
576 
577  if(useAsy)
578  {
579  caloPID->SwitchOnSplitAsymmetryCut() ;
580  ana->GetCaloPID()->SetSubClusterEnergyMinimum(0,2);
581  ana->GetCaloPID()->SetSubClusterEnergyMinimum(1,0.5);
582  ana->GetCaloPID()->SetSubClusterEnergyMinimum(2,0.5);
583  }
584  else
585  {
586  caloPID->SwitchOffSplitAsymmetryCut() ;
587  }
588 
589  if(!useMass)
590  {
591  ana->SwitchOffSplitClusterDistToBad();
592  caloPID->SwitchOnSimpleSplitMassCut();
593  caloPID->SetPi0MassRange(-1, 10000); // Open the cut
594  }
595 
596 
597  // For Pi0 only if SwitchOnSimpleSplitMassCut()
598  caloPID->SetPi0MassRange(0.10, 0.18);
599  caloPID->SetEtaMassRange(0.50, 0.60);
600  caloPID->SetPhotonMassRange(0.00, 0.08);
601 
602  caloPID->SetClusterSplittingMinNCells(6);
603 
604  //caloPID->SetSplitEnergyFractionMinimum(0, 0.95);
605  //caloPID->SetSplitEnergyFractionMinimum(1, 0.95);
606  //caloPID->SetSplitEnergyFractionMinimum(2, 0.8);
607 
608  if(col=="PbPb")
609  {
610  caloPID->SetClusterSplittingMinNCells(4);
611  //caloPID->SetPi0MassShiftHighECell(0.005);
612  }
613 
614  return ana;
615 }
616 
621 {
622  AliAnaPi0 *ana = new AliAnaPi0();
623 
625 
627 
629  //ana->SwitchOnFiducialCut();
630  //ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.65, 81, 179);
631 
632  // Calorimeter settings
633  ana->SetCalorimeter("EMCAL");
634 
635  //Set Histograms name tag, bins and ranges
636 
637  ana->AddToHistogramsName("AnaPi0Kine_");
638 
639  SetAnalysisCommonParameters(ana,"EMCAL",year,col,kTRUE,printSet,debug); // see method below
640 
641  return ana;
642 
643 }
644 
652  TString calorimeter, Int_t year,
653  TString col, Bool_t simulation,
654  Bool_t printSettings, Int_t debug)
655 {
656  //
657  // Histograms ranges
658  //
659  AliHistogramRanges* histoRanges = ana->GetHistogramRanges();
660 
661  histoRanges->SetHistoPtRangeAndNBins(0, 100, 200) ; // Energy and pt histograms
662 
663  if(calorimeter=="EMCAL")
664  {
665  if(year==2010)
666  {
667  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 122*TMath::DegToRad(), 78) ;
668  histoRanges->SetHistoXRangeAndNBins(-230,90,120); // QA
669  histoRanges->SetHistoYRangeAndNBins(370,450,40); // QA
670  }
671  else if ( year < 2014 )
672  {
673  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
674  histoRanges->SetHistoXRangeAndNBins(-460,90,200); // QA
675  histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
676  }
677  else // Run2
678  {
679  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 329*TMath::DegToRad(), 250) ;
680  histoRanges->SetHistoXRangeAndNBins(-460,460,230); // QA
681  histoRanges->SetHistoYRangeAndNBins(-450,450,225); // QA
682  }
683 
684  histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
685  }
686  else if(calorimeter=="PHOS")
687  {
688  histoRanges->SetHistoPhiRangeAndNBins(250*TMath::DegToRad(), 320*TMath::DegToRad(), 70) ;
689  histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
690  }
691  else if(calorimeter=="CTS")
692  {
693  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
694  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
695  }
696 
697  histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 4.9, 500);
698 
699  // Invariant mass histo
700  histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
701  histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
702 
703  // check if time calibration is on
704  //histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000);
705  histoRanges->SetHistoTimeRangeAndNBins(-400.,400,400);
706  histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
707 
708  // track-cluster residuals
709  histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.15,0.15,300);
710  histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.15,0.15,300);
711  histoRanges->SetHistodRRangeAndNBins(0.,0.15,150);//QA
712 
713  // QA, electron, charged
714  histoRanges->SetHistoPOverERangeAndNBins(0,2.,200);
715  histoRanges->SetHistodEdxRangeAndNBins(0.,200.,200);
716 
717  // QA
718  histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
719  histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
720  histoRanges->SetHistoZRangeAndNBins(-350,350,175);
721  histoRanges->SetHistoRRangeAndNBins(430,460,30);
722  histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
723  histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
724 
725  // QA, correlation
726  if(col=="PbPb")
727  {
728  histoRanges->SetHistoNClusterCellRangeAndNBins(0,100,100);
729  histoRanges->SetHistoNClustersRangeAndNBins(0,500,50);
730  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,2000,200);
731  }
732  else
733  {
734  histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
735  histoRanges->SetHistoNClustersRangeAndNBins(0,50,50);
736  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,200,200);
737  }
738 
739  // xE, zT
740  histoRanges->SetHistoRatioRangeAndNBins(0.,2.,200);
741  histoRanges->SetHistoHBPRangeAndNBins (0.,10.,200);
742 
743  // Isolation
744  histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 250);
745  histoRanges->SetHistoPtSumRangeAndNBins (0, 100, 250);
746 
747  //
748  // TRD SM
749  //
750  if (year == 2011) ana->SetFirstSMCoveredByTRD( 6);
751  else if(year == 2012 ||
752  year == 2013) ana->SetFirstSMCoveredByTRD( 4);
753  else ana->SetFirstSMCoveredByTRD(-1);
754 
755  //
756  // MC histograms?
757  //
758  if(simulation) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.
759  else ana->SwitchOffDataMC() ;
760 
761  //
762  // Debug
763  //
764  if(printSettings) ana->Print("");
765 
766  ana->SetDebug(debug); // 10 for lots of messages
767 }
768 
774 {
775  if(trigger=="EMC7")
776  {
777  printf("CaloTrackCorr trigger EMC7\n");
778  return AliVEvent::kEMC7;
779  }
780  else if (trigger=="INT7")
781  {
782  printf("CaloTrackCorr trigger INT7\n");
783  return AliVEvent::kINT7;
784  }
785  else if(trigger=="EMC1")
786  {
787  printf("CaloTrackCorr trigger EMC1\n");
788  return AliVEvent::kEMC1;
789  }
790  else if(trigger=="MB")
791  {
792  printf("CaloTrackCorr trigger MB\n");
793  return AliVEvent::kMB;
794  }
795  else if(trigger=="PHOS")
796  {
797  printf("CaloTrackCorr trigger PHOS\n");
798  return AliVEvent::kPHI7;
799  }
800  else if(trigger=="PHOSPb")
801  {
802  printf("CaloTrackCorr trigger PHOSPb\n");
803  return AliVEvent::kPHOSPb;
804  }
805  else if(trigger=="AnyINT")
806  {
807  printf("CaloTrackCorr trigger AnyINT\n");
808  return AliVEvent::kAnyINT;
809  }
810  else if(trigger=="INT")
811  {
812  printf("CaloTrackCorr trigger AnyINT\n");
813  return AliVEvent::kAny;
814  }
815  else if(trigger=="EMCEGA")
816  {
817  printf("CaloTrackCorr trigger EMC Gamma\n");
818  return AliVEvent::kEMCEGA;
819  }
820  else if(trigger=="EMCEJE")
821  {
822  printf("CaloTrackCorr trigger EMC Jet\n");
823  return AliVEvent::kEMCEJE;
824  }
825  else if(trigger=="Central")
826  {
827  printf("CaloTrackCorr trigger Central\n");
828  return AliVEvent::kCentral;
829  }
830  else if(trigger=="CentralEGA")
831  {
832  printf("CaloTrackCorr trigger Central+EMCEGA\n");
833  return (AliVEvent::kCentral | AliVEvent::kEMCEGA);
834  }
835  else if(trigger=="SemiCentral")
836  {
837  printf("CaloTrackCorr trigger SemiCentral\n");
838  return AliVEvent::kSemiCentral;
839  }
840  else if(trigger=="SemiOrCentral")
841  {
842  printf("CaloTrackCorr trigger SemiCentral Or Central\n");
843  return (AliVEvent::kSemiCentral | AliVEvent::kCentral);
844  }
845  else return AliVEvent::kAny;
846 }
847 
void SetAnalysisCommonParameters(AliAnaCaloTrackCorrBaseClass *ana, TString calorimeter, Int_t year, TString col, Bool_t simulation, Bool_t printSettings, Int_t debug)
virtual void SwitchOnAODTrackSharedClusterSelection()
void SetHistoTrackMultiplicityRangeAndNBins(Int_t min, Int_t max, Int_t n)
virtual void SetDebug(Int_t d)
void SetNumberOfCellsFromPHOSBorder(Int_t n)
void SetSimpleCTSFiducialCut(Float_t abseta, Float_t phimin, Float_t phimax)
void SetHistoMassRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void AddToHistogramsName(TString add)
void SetSplitWidthSigma(Float_t s)
Definition: AliCaloPID.h:283
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:264
void SwitchOnLoadOwnEMCALGeometryMatrices()
void SwitchOnSplitShowerShapeCut()
Definition: AliCaloPID.h:260
virtual void SwitchOnAODHybridTrackSelection()
virtual void SetCentralityBin(Int_t min, Int_t max)
AliEMCALRecoUtils * GetEMCALRecoUtils() const
AliCaloTrackReader * ConfigureReader(TString col, Bool_t simulation, TString clustersArray, Bool_t tender, Bool_t nonLinOn, TString trigger, Bool_t rejectEMCTrig, Int_t minCen, Int_t maxCen, Bool_t printSettings, Int_t debug)
void SwitchOffClusterELinearityCorrection()
void SetCTSPtMax(Float_t pt)
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)
Selected photon clusters invariant mass analysis.
Definition: AliAnaPi0.h:39
virtual void SetTrackComplementaryCuts(AliESDtrackCuts *)
void SetEMCALEMin(Float_t en)
void ana(anaModes mode=mLocal)
Definition: ana.C:990
void SetHistodRRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetLocalMaximaCutEDiff(Float_t c)
void SwitchOffSplitAsymmetryCut()
Definition: AliCaloPID.h:257
void SetNumberOfCellsFromEMCALBorder(Int_t n)
Select cluster pairs or single merged clusters with pi0 or eta invariant mass.
Definition: AliAnaPi0EbE.h:30
Bool_t IsBadChannelsRemovalSwitchedOn() const
const TString calorimeter
Definition: anaM.C:36
virtual void SetPtHardAndJetPtComparison(Bool_t compare)
Bool_t IsRecalibrationOn() const
Bool_t IsRecalibrationOn() const
Some utilities for cluster and cell treatment.
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 SwitchOffRecalculateClusterTrackMatching()
void SwitchOffVertexBCEventSelection()
virtual void SetPtHardAndClusterPtFactor(Float_t factor)
virtual void SetCalorimeter(TString calo)
Set the calorimeter for the analysis. A string.
void SwitchOnFillOnlyMCAcceptanceHisto()
Definition: AliAnaPi0.h:107
Base class for CaloTrackCorr analysis algorithms.
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)
int Int_t
Definition: External.C:63
AliAnalysisTaskCaloTrackCorrelation * AddTaskMergedPi0Selection(Bool_t simulation=kFALSE, Int_t year=2011, TString col="pp", TString trigger="EMC7", Int_t rejectEMCTrig=0, TString clustersArray="", Bool_t tender=kFALSE, Bool_t nonLinOn=kFALSE, Int_t minCen=-1, Int_t maxCen=-1, TString outputfile="", Bool_t printSettings=kFALSE, Int_t debug=0)
virtual AliHistogramRanges * GetHistogramRanges()
unsigned int UInt_t
Definition: External.C:33
void SwitchOnSplitAsymmetryCut()
Definition: AliCaloPID.h:256
void SetHistoPtSumRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetTrackStatus(ULong_t bit)
Bool_t IsBadChannelsRemovalSwitchedOn() const
void SetHistoTrackResidualPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetExoticCellDiffTimeCut(Float_t dt)
virtual void SetPtHardAndClusterPtComparison(Bool_t compare)
void SetEMCALClusterListName(TString name)
void SwitchOffTriggerClusterTimeRecal()
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 SwitchOffBadTriggerEventsRemoval()
Int_t GetNumberOfSuperModulesUsed() const
void SetAnalysisMaker(AliAnaCaloTrackCorrMaker *const maker)
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:250
virtual void SetZvertexCut(Float_t zcut=10.)
void SetEtaMassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:305
void SetNumberOfSuperModulesUsed(Int_t nSM)
void SetPi0MassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:304
Class containing more common histogram axis types.
UInt_t SetTriggerMaskFromName(TString trigger)
virtual void SetPtHardAndJetPtFactor(Float_t factor)
Class for event, clusters and tracks filtering and preparation for the ESD analysis.
virtual void SetEventPlaneMethod(TString m)
AliAnaPi0EbE * ConfigurePi0EbEAnalysis(Bool_t useSS, Bool_t useAsy, Bool_t useMass, Bool_t tm, TString col, Bool_t simulation, Int_t year, Bool_t printSet, Int_t debug)
void SetPHOSEMin(Float_t en)
void SetHistoNClustersRangeAndNBins(Int_t min, Int_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, Int_t debug=-1)
virtual void SetTrackCuts(AliESDtrackCuts *)
virtual void SetCentralityClass(TString name)
void SwitchOnBadTriggerEventsRemoval()
void SetHistoEtaRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOnClusterELinearityCorrection()
void SetTrackTimeCut(Double_t a, Double_t b)
void SetEMCALTimeCut(Double_t a, Double_t b)
AliAnaPi0 * ConfigurePi0KineAnalysis(TString col, Int_t year, Bool_t printSet, Int_t debug)
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()
TString kAnaMergedPi0
Global name to be composed of the settings, used to set the AOD branch name.
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.
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)
Class for PID selection with calorimeters.
Definition: AliCaloPID.h:53
1 calorimeter cluster shower shape and split invariatn mass selection
Definition: AliAnaPi0EbE.h:87
AliCalorimeterUtils * ConfigureCaloUtils(TString col, Bool_t simulation, TString clustersArray, Bool_t tender, Bool_t nonLinOn, Int_t year, Bool_t printSettings, Int_t debug)
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.
virtual void SwitchOnConstrainTrackToVertex()
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:306
void SwitchOffUseParametrizedTimeCut()
void SwitchOffFillOriginHisto()
Definition: AliAnaPi0.h:140
void SetLocalMaximaCutE(Float_t cut)
void SetHistoRatioRangeAndNBins(Float_t min, Float_t max, Int_t n)
Steering class of package CaloTrackCorrelartions.