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