AliPhysics  4e47bdd (4e47bdd)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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  if(useKinematics)
232  {
233  if(inputDataType == "ESD")
234  {
235  reader->SwitchOnStack();
236  reader->SwitchOffAODMCParticles();
237  }
238  else if(inputDataType == "AOD")
239  {
240  reader->SwitchOffStack();
241  reader->SwitchOnAODMCParticles();
242  }
243  }
244 
245  // In case of Pythia pt Hard bin simulations (jet-jet, gamma-jet)
246  // reject some special events that bother the cross section
247  if(simulation)
248  {
249  // Event rejection cuts for jet-jet simulations, do not use in other
250  reader->SetPtHardAndJetPtComparison(kTRUE);
251  reader->SetPtHardAndJetPtFactor(4);
252 
253  reader->SetPtHardAndClusterPtComparison(kTRUE);
254  reader->SetPtHardAndClusterPtFactor(1.5);
255  }
256 
257  //------------------------
258  // Detector input filling
259  //------------------------
260 
261  //Min cluster/track E
262  reader->SetEMCALEMin(0.3);
263  reader->SetEMCALEMax(1000);
264  reader->SetPHOSEMin(0.3);
265  reader->SetPHOSEMax(1000);
266  reader->SetCTSPtMin(0.2);
267  reader->SetCTSPtMax(1000);
268 
271 
272  // Shower shape smearing
273  // Set it in the train configuration page not here for the moment
274 // if(simulation)
275 // {
276 // reader->SwitchOffShowerShapeSmearing(); // Active only on MC, off by default
277 // reader->SetShowerShapeSmearWidth(0.005);
278 // }
279 
280  //
281  // Tracks
282  //
283  reader->SwitchOnCTS();
284 
285  reader->SwitchOffUseTrackTimeCut();
286  reader->SetTrackTimeCut(0,50);
287 
288  reader->SwitchOnFiducialCut();
289  reader->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ;
290 
291  reader->SwitchOffUseTrackDCACut();
292  //reader->SetTrackDCACut(0,0.0105);
293  //reader->SetTrackDCACut(1,0.035);
294  //reader->SetTrackDCACut(2,1.1);
295 
296  if(inputDataType=="ESD")
297  {
298  gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/macros/CreateTrackCutsPWGJE.C");
299 
300  //AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10041004);
301  //reader->SetTrackCuts(esdTrackCuts);
302 
303  AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001008);
304  reader->SetTrackCuts(esdTrackCuts);
305  AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10011008);
306  reader->SetTrackComplementaryCuts(esdTrackCuts2);
307 
309  }
310  else if(inputDataType=="AOD")
311  {
312  reader->SwitchOnAODHybridTrackSelection(); // Check that the AODs have Hybrids!!!!
314  reader->SetTrackStatus(AliVTrack::kITSrefit);
315 
316  //reader->SwitchOnAODPrimaryTrackSelection(); // Used in preliminary results of QM from Nicolas and Xiangrong?
317  //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
318  //reader->SetTrackFilterMask(128); // Filter bit, not mask, use if off hybrid, TPC only
319  }
320 
321  //
322  // Calorimeter
323  //
324  if(clustersArray == "" && !tender)
325  {
326  printf("**************** Standard EMCAL clusters branch analysis **************** \n");
328  // Check in ConfigureCaloUtils that the recalibration and bad map are ON
329  }
330  else
331  {
332  printf("**************** Input for analysis is Clusterizer %s **************** \n", clustersArray.Data());
333  reader->SetEMCALClusterListName(clustersArray);
335  }
336 
337  // Time cuts
339  if(simulation)
340  {
341  reader->SwitchOffUseEMCALTimeCut();
342  reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
343  }
344  else
345  {
346  reader->SwitchOnUseEMCALTimeCut();
347  reader->SetEMCALTimeCut(-25,20);
348  }
349 
350  // CAREFUL
351  if(nonLinOn) reader->SwitchOnClusterELinearityCorrection();
353 
354 
355  reader->SwitchOnEMCALCells();
356  reader->SwitchOnEMCAL();
357 
358  reader->SwitchOffPHOSCells();
359  reader->SwitchOffPHOS();
360 
361 
362  //-----------------
363  // Event selection
364  //-----------------
365 
366  //if(!simulation) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma
367 
368  // Event triggered by EMCal selection settings
371 
372  if( rejectEMCTrig > 0 && !simulation && (trigger.Contains("EMC") || trigger.Contains("L")))
373  {
374  printf("=== Remove bad triggers === \n");
377 
378 // reader->SetTriggerPatchTimeWindow(8,9); // default values
379 // if (kRunNumber < 146861) reader->SetEventTriggerL0Threshold(3.);
380 // else if(kRunNumber < 154000) reader->SetEventTriggerL0Threshold(4.);
381 // else if(kRunNumber < 165000) reader->SetEventTriggerL0Threshold(5.5);
382 // //redefine for other periods, triggers
383 //
384 // if(kRunNumber < 172000)
385 // {
386 // reader->SetEventTriggerL1Bit(4,5); // current LHC11 data
387 // printf("\t Old L1 Trigger data format!\n");
388 // }
389 // else
390 // {
391 // reader->SetEventTriggerL1Bit(6,8); // LHC12-13 data
392 // printf("\t Current L1 Trigger data format!\n");
393 // }
394 
395  if(clustersArray != "" || tender)
396  {
397  printf("Trigger cluster calibration OFF\n");
399  }
400 
401  }
402 
403  //reader->RejectFastClusterEvents() ;
404 
405  reader->SwitchOnEventTriggerAtSE();
406 
407  reader->SetZvertexCut(10.); // Open cut
408  reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
409  reader->SwitchOnRejectNoTrackEvents();
410 
411  reader->SwitchOffV0ANDSelection() ; // and besides v0 AND
412  reader->SwitchOffPileUpEventRejection(); // remove pileup by default off, apply it only for MB not for trigger
413 
414  if(col=="PbPb")
415  {
416  // Centrality
417  reader->SetCentralityClass("V0M");
418  reader->SetCentralityOpt(100); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
419  reader->SetCentralityBin(minCen,maxCen); // Accept all events, if not select range
420 
421  // Event plane (only used in Maker and mixing for AliAnaPi0/AliAnaHadronCorrelation for the moment)
422  reader->SetEventPlaneMethod("V0");
423  }
424 
425  if(printSettings) reader->Print("");
426 
427  return reader;
428 }
429 
434  TString clustersArray, Bool_t tender,
435  Bool_t nonLinOn, Int_t year,
436  Bool_t printSettings, Int_t debug)
437 {
439 
440  cu->SetDebug(debug);
441 
442  // Remove clusters close to borders, at least max energy cell is 1 cell away
445 
447 
448  if (year == 2010) cu->SetNumberOfSuperModulesUsed(4);
449  else if(year <= 2013) cu->SetNumberOfSuperModulesUsed(10);
450  else if(year > 2013) cu->SetNumberOfSuperModulesUsed(20);
451  else cu->SetNumberOfSuperModulesUsed(10);
452 
453  printf("xxx Number of SM set to <%d> xxx\n",cu->GetNumberOfSuperModulesUsed());
454 
455  // Search of local maxima in cluster
456  if(col=="pp")
457  {
458  cu->SetLocalMaximaCutE(0.1);
459  cu->SetLocalMaximaCutEDiff(0.03);
460  }
461  else
462  {
463  cu->SetLocalMaximaCutE(0.2);
464  cu->SetLocalMaximaCutEDiff(0.03);
465  }
466 
468 
470 
471  // EMCAL settings
472 
473  if(!simulation)
475 
476  AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
477 
478  // calibrations
479  Bool_t calibEner = kFALSE;
480  Bool_t calibTime = kFALSE;
481  cu->SwitchOffRecalibration();
483 
484  if( !tender )
485  {
486  cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
488 
489  calibEner = kTRUE;
490  calibTime = kTRUE;
491  }
492 
493  if( simulation )
494  {
495  calibEner = kFALSE;
496  calibTime = kFALSE;
497 
498  cu->SwitchOffRecalibration(); // Check the reader if it is taken into account during filtering
500  }
501 
502  gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/EMCAL/macros/ConfigureEMCALRecoUtils.C");
504  simulation,
505  kTRUE, // exotic
506  nonLinOn, // Non linearity
507  calibEner, // E calib
508  kTRUE, // bad map
509  calibTime); // time calib
510 
511  if( calibTime ) recou->SetExoticCellDiffTimeCut(50);
512 
513  if( nonLinOn ) cu->SwitchOnCorrectClusterLinearity();
514 
515  printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
516  printf("ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
517 
518  // PHOS
520 
521  if(printSettings) cu->Print("");
522 
523  return cu;
524 }
525 
530  Bool_t useMass, Bool_t tm,
531  TString col, Bool_t simulation, Int_t year,
532  Bool_t printSet, Int_t debug )
533 {
534  printf("Set: TM%d_SS%d_Asy%d_Mass%d_%s \n", tm,useSS,useAsy,useMass,kAnaMergedPi0.Data());
535  AliAnaPi0EbE *ana = new AliAnaPi0EbE();
536 
537  ana->SetAnalysisType(AliAnaPi0EbE::kSSCalo);
538 
539  ana->SwitchOffAllNLMHistoFill();
540  ana->SwitchOffSelectedClusterHistoFill();
541 
542  ana->SwitchOffFillWeightHistograms();
543 
544  if(tm) ana->SwitchOnTrackMatchRejection() ;
545  else ana->SwitchOffTrackMatchRejection() ;
546  ana->SwitchOffTMHistoFill() ;
547 
548  ana->SetCalorimeter("EMCAL");
549 
550  // Branch AOD settings
551  ana->SetOutputAODName(Form("Pi0SS_TM%d_SS%d_Asy%d_Mass%d_%s",tm,useSS,useAsy,useMass,kAnaMergedPi0.Data()));
552  ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
553 
554  // Set Histograms name tag, bins and ranges
555  ana->AddToHistogramsName(Form("AnaPi0SSEbE_TM%d_SS%d_Asy%d_Mass%d_",tm,useSS,useAsy,useMass));
556 
557  SetAnalysisCommonParameters(ana,"EMCAL",year,col,simulation,printSet,debug); // see method below
558 
559  // cluster splitting settings
560  ana->SetMinEnergy(6);
561  ana->SetMaxEnergy(100.);
562 
563  ana->SetNLMMinEnergy(0, 10);
564  ana->SetNLMMinEnergy(1, 6);
565  ana->SetNLMMinEnergy(2, 6);
566 
567  // NLM cut, used in all, exclude clusters with more than 2 maxima
568  ana->SetNLMCut(1, 2) ;
569 
570  //
571  ana->SetMinDistanceToBadChannel(2, 4, 6);
572  ana->SwitchOnSplitClusterDistToBad();
573  ana->SetTimeCut(-1e10,1e10); // Open time cut
574 
575  AliCaloPID* caloPID = ana->GetCaloPID();
576 
577  caloPID->SetSplitWidthSigma(3); // cut at 3 sigma of the mean pi0 peak.
578 
579  if(!useSS)
580  {
581  printf("Do not apply SS cut on merged pi0 analysis \n");
582  caloPID->SwitchOffSplitShowerShapeCut() ;
583  caloPID->SetClusterSplittingM02Cut(0.1,10);
584  }
585  else
586  {
587  caloPID->SetClusterSplittingM02Cut(0.3,4); // Do the selection in the analysis class and not in the PID method to fill SS histograms
588  caloPID->SwitchOnSplitShowerShapeCut() ;
589  }
590 
591  if(useAsy)
592  {
593  caloPID->SwitchOnSplitAsymmetryCut() ;
594  ana->GetCaloPID()->SetSubClusterEnergyMinimum(0,2);
595  ana->GetCaloPID()->SetSubClusterEnergyMinimum(1,0.5);
596  ana->GetCaloPID()->SetSubClusterEnergyMinimum(2,0.5);
597  }
598  else
599  {
600  caloPID->SwitchOffSplitAsymmetryCut() ;
601  }
602 
603  if(!useMass)
604  {
605  ana->SwitchOffSplitClusterDistToBad();
606  caloPID->SwitchOnSimpleSplitMassCut();
607  caloPID->SetPi0MassRange(-1, 10000); // Open the cut
608  }
609 
610 
611  // For Pi0 only if SwitchOnSimpleSplitMassCut()
612  caloPID->SetPi0MassRange(0.10, 0.18);
613  caloPID->SetEtaMassRange(0.50, 0.60);
614  caloPID->SetPhotonMassRange(0.00, 0.08);
615 
616  caloPID->SetClusterSplittingMinNCells(6);
617 
618  //caloPID->SetSplitEnergyFractionMinimum(0, 0.95);
619  //caloPID->SetSplitEnergyFractionMinimum(1, 0.95);
620  //caloPID->SetSplitEnergyFractionMinimum(2, 0.8);
621 
622  if(col=="PbPb")
623  {
624  caloPID->SetClusterSplittingMinNCells(4);
625  //caloPID->SetPi0MassShiftHighECell(0.005);
626  }
627 
628  return ana;
629 }
630 
635 {
636  AliAnaPi0 *ana = new AliAnaPi0();
637 
639 
641 
643  //ana->SwitchOnFiducialCut();
644  //ana->GetFiducialCut()->SetSimpleEMCALFiducialCut(0.65, 81, 179);
645 
646  // Calorimeter settings
647  ana->SetCalorimeter("EMCAL");
648 
649  //Set Histograms name tag, bins and ranges
650 
651  ana->AddToHistogramsName("AnaPi0Kine_");
652 
653  SetAnalysisCommonParameters(ana,"EMCAL",year,col,kTRUE,printSet,debug); // see method below
654 
655  return ana;
656 
657 }
658 
666  TString calorimeter, Int_t year,
667  TString col, Bool_t simulation,
668  Bool_t printSettings, Int_t debug)
669 {
670  //
671  // Histograms ranges
672  //
673  AliHistogramRanges* histoRanges = ana->GetHistogramRanges();
674 
675  histoRanges->SetHistoPtRangeAndNBins(0, 100, 200) ; // Energy and pt histograms
676 
677  if(calorimeter=="EMCAL")
678  {
679  if(year==2010)
680  {
681  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 122*TMath::DegToRad(), 78) ;
682  histoRanges->SetHistoXRangeAndNBins(-230,90,120); // QA
683  histoRanges->SetHistoYRangeAndNBins(370,450,40); // QA
684  }
685  else if ( year < 2014 )
686  {
687  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
688  histoRanges->SetHistoXRangeAndNBins(-460,90,200); // QA
689  histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
690  }
691  else // Run2
692  {
693  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 329*TMath::DegToRad(), 250) ;
694  histoRanges->SetHistoXRangeAndNBins(-460,460,230); // QA
695  histoRanges->SetHistoYRangeAndNBins(-450,450,225); // QA
696  }
697 
698  histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
699  }
700  else if(calorimeter=="PHOS")
701  {
702  histoRanges->SetHistoPhiRangeAndNBins(250*TMath::DegToRad(), 320*TMath::DegToRad(), 70) ;
703  histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
704  }
705  else if(calorimeter=="CTS")
706  {
707  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
708  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
709  }
710 
711  histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 4.9, 500);
712 
713  // Invariant mass histo
714  histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
715  histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
716 
717  // check if time calibration is on
718  //histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000);
719  histoRanges->SetHistoTimeRangeAndNBins(-400.,400,400);
720  histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
721 
722  // track-cluster residuals
723  histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.15,0.15,300);
724  histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.15,0.15,300);
725  histoRanges->SetHistodRRangeAndNBins(0.,0.15,150);//QA
726 
727  // QA, electron, charged
728  histoRanges->SetHistoPOverERangeAndNBins(0,2.,200);
729  histoRanges->SetHistodEdxRangeAndNBins(0.,200.,200);
730 
731  // QA
732  histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
733  histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
734  histoRanges->SetHistoZRangeAndNBins(-350,350,175);
735  histoRanges->SetHistoRRangeAndNBins(430,460,30);
736  histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
737  histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
738 
739  // QA, correlation
740  if(col=="PbPb")
741  {
742  histoRanges->SetHistoNClusterCellRangeAndNBins(0,100,100);
743  histoRanges->SetHistoNClustersRangeAndNBins(0,500,50);
744  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,2000,200);
745  }
746  else
747  {
748  histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
749  histoRanges->SetHistoNClustersRangeAndNBins(0,50,50);
750  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,200,200);
751  }
752 
753  // xE, zT
754  histoRanges->SetHistoRatioRangeAndNBins(0.,2.,200);
755  histoRanges->SetHistoHBPRangeAndNBins (0.,10.,200);
756 
757  // Isolation
758  histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 250);
759  histoRanges->SetHistoPtSumRangeAndNBins (0, 100, 250);
760 
761  //
762  // TRD SM
763  //
764  if (year == 2011) ana->SetFirstSMCoveredByTRD( 6);
765  else if(year == 2012 ||
766  year == 2013) ana->SetFirstSMCoveredByTRD( 4);
767  else ana->SetFirstSMCoveredByTRD(-1);
768 
769  //
770  // MC histograms?
771  //
772  if(simulation) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.
773  else ana->SwitchOffDataMC() ;
774 
775  //Set here generator name, default pythia
776  //ana->GetMCAnalysisUtils()->SetMCGenerator("");
777 
778  //
779  // Debug
780  //
781  if(printSettings) ana->Print("");
782 
783  ana->SetDebug(debug); // 10 for lots of messages
784 }
785 
791 {
792  if(trigger=="EMC7")
793  {
794  printf("CaloTrackCorr trigger EMC7\n");
795  return AliVEvent::kEMC7;
796  }
797  else if (trigger=="INT7")
798  {
799  printf("CaloTrackCorr trigger INT7\n");
800  return AliVEvent::kINT7;
801  }
802  else if(trigger=="EMC1")
803  {
804  printf("CaloTrackCorr trigger EMC1\n");
805  return AliVEvent::kEMC1;
806  }
807  else if(trigger=="MB")
808  {
809  printf("CaloTrackCorr trigger MB\n");
810  return AliVEvent::kMB;
811  }
812  else if(trigger=="PHOS")
813  {
814  printf("CaloTrackCorr trigger PHOS\n");
815  return AliVEvent::kPHI7;
816  }
817  else if(trigger=="PHOSPb")
818  {
819  printf("CaloTrackCorr trigger PHOSPb\n");
820  return AliVEvent::kPHOSPb;
821  }
822  else if(trigger=="AnyINT")
823  {
824  printf("CaloTrackCorr trigger AnyINT\n");
825  return AliVEvent::kAnyINT;
826  }
827  else if(trigger=="INT")
828  {
829  printf("CaloTrackCorr trigger AnyINT\n");
830  return AliVEvent::kAny;
831  }
832  else if(trigger=="EMCEGA")
833  {
834  printf("CaloTrackCorr trigger EMC Gamma\n");
835  return AliVEvent::kEMCEGA;
836  }
837  else if(trigger=="EMCEJE")
838  {
839  printf("CaloTrackCorr trigger EMC Jet\n");
840  return AliVEvent::kEMCEJE;
841  }
842  else if(trigger=="Central")
843  {
844  printf("CaloTrackCorr trigger Central\n");
845  return AliVEvent::kCentral;
846  }
847  else if(trigger=="CentralEGA")
848  {
849  printf("CaloTrackCorr trigger Central+EMCEGA\n");
850  return (AliVEvent::kCentral | AliVEvent::kEMCEGA);
851  }
852  else if(trigger=="SemiCentral")
853  {
854  printf("CaloTrackCorr trigger SemiCentral\n");
855  return AliVEvent::kSemiCentral;
856  }
857  else if(trigger=="SemiOrCentral")
858  {
859  printf("CaloTrackCorr trigger SemiCentral Or Central\n");
860  return (AliVEvent::kSemiCentral | AliVEvent::kCentral);
861  }
862  else return AliVEvent::kAny;
863 }
864 
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:87
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:249
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:230
void SwitchOnLoadOwnEMCALGeometryMatrices()
void SwitchOnSplitShowerShapeCut()
Definition: AliCaloPID.h:226
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:227
void SetClusterSplittingMinNCells(Int_t c)
Definition: AliCaloPID.h:233
void SetHistoPtRangeAndNBins(Float_t min, Float_t max, Int_t n)
Selected photon clusters invariant mass analysis.
Definition: AliAnaPi0.h:39
virtual void SetCalorimeter(TString &calo)
Set the calorimeter for the analysis. A string.
virtual void SetTrackComplementaryCuts(AliESDtrackCuts *)
void SetEMCALEMin(Float_t en)
void SetHistodRRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetLocalMaximaCutEDiff(Float_t c)
void SwitchOffSplitAsymmetryCut()
Definition: AliCaloPID.h:223
void SetNumberOfCellsFromEMCALBorder(Int_t n)
Select cluster pairs or single merged clusters with pi0 or eta invariant mass.
Definition: AliAnaPi0EbE.h:30
const TString calorimeter
Definition: anaM.C:36
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:103
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:222
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:216
virtual void SetZvertexCut(Float_t zcut=10.)
void SetEtaMassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:271
void SetNumberOfSuperModulesUsed(Int_t nSM)
void SetPi0MassRange(Float_t min, Float_t max)
Definition: AliCaloPID.h:270
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:52
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:272
void SwitchOffUseParametrizedTimeCut()
void SwitchOffFillOriginHisto()
Definition: AliAnaPi0.h:136
void SetLocalMaximaCutE(Float_t cut)
void SetHistoRatioRangeAndNBins(Float_t min, Float_t max, Int_t n)
Steering class of package CaloTrackCorrelartions.