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