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