AliPhysics  vAN-20150425 (2dcf1b0)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AddTaskPi0.C
Go to the documentation of this file.
1 
9 TString kAnaPi0 = "";
10 
35 (
36  TString calorimeter = "EMCAL",
37  Bool_t simulation = kFALSE,
38  Int_t year = 2011,
39  TString col = "pp",
40  TString trigger = "EMC7",
41  Int_t rejectEMCTrig = 0,
42  TString clustersArray = "",
43  Bool_t tender = kFALSE,
44  Bool_t nonLinOn = kFALSE,
45  Float_t shshMax = 0.5,
46  Bool_t tm = kTRUE,
47  Int_t minCen = -1,
48  Int_t maxCen = -1,
49  Bool_t mixOn = kTRUE,
50  TString outputfile = "",
51  Bool_t printSettings = kFALSE,
52  Int_t debug = 0 // Debug level
53  )
54 
55 {
56  // Get the pointer to the existing analysis manager via the static access method.
57 
58  printf("Passed settings:\n calorimeter <%s>, simulation <%d>, year <%d>,\n col <%s>, trigger <%s>, reject EMC <%d> clustersArray <%s>, tender <%d>, non linearity <%d>\n shshMax <%2.2f>, tm %d, minCen %d, maxCen %d, mixOn <%d>,\n outputfile <%s>, printSettings <%d>, debug <%d>\n",
59  calorimeter.Data(),simulation,year,col.Data(),trigger.Data(), rejectEMCTrig, clustersArray.Data(),tender, nonLinOn, shshMax,tm,
60  minCen,maxCen,mixOn,outputfile.Data(),printSettings,debug);
61 
62  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
63  if (!mgr)
64  {
65  ::Error("AddTask", "No analysis manager to connect to.");
66  return NULL;
67  }
68 
69  // Check the analysis type using the event handlers connected to the analysis manager.
70 
71  if (!mgr->GetInputEventHandler())
72  {
73  ::Error("AddTask", "This task requires an input event handler");
74  return NULL;
75  }
76 
77  // Make sure the B field is enabled for track selection, some cuts need it
78  ((AliInputEventHandler*)mgr->GetInputEventHandler())->SetNeedField(kTRUE);
79 
80  // Name for containers
81 
82  kAnaPi0 = Form("Pi0_%s_Trig%s_Col_%s_Year%d_Cl%s_Ten%d_TM%d_M02_%1.2f_Mix%d",
83  calorimeter.Data(),trigger.Data(),col.Data(),year,clustersArray.Data(),tender,
84  tm, shshMax,mixOn);
85 
86  if(col=="PbPb" && maxCen>=0) kAnaPi0+=Form("Cen%d_%d",minCen,maxCen);
87 
88  printf("<<<< NAME: %s >>>>>\n",kAnaPi0.Data());
89 
90  // #### Configure analysis ####
91 
93 
94  // General frame setting and configuration
95  maker->SetReader ( ConfigureReader (col,simulation,clustersArray,tender,calorimeter,nonLinOn,trigger,rejectEMCTrig,minCen,maxCen,printSettings,debug) );
96  maker->SetCaloUtils( ConfigureCaloUtils(col,simulation,clustersArray,tender,nonLinOn,year, printSettings,debug) );
97 
98  // Analysis tasks setting and configuration
99  Int_t n = 0;//Analysis number, order is important
100 
101  // Photon analysis
102  //
103  maker->AddAnalysis(ConfigurePhotonAnalysis(col, simulation, calorimeter, year, tm, shshMax, printSettings, debug), n++);
104 
105  // Pi0 analysis
106  //
107  maker->AddAnalysis(ConfigurePi0Analysis (col, simulation, calorimeter, year, tm, mixOn , printSettings, debug), n++);
108 
109  maker->SetAnaDebug(debug) ;
110 
111  maker->SwitchOnHistogramsMaker() ;
112  maker->SwitchOnAODsMaker() ;
113 
114  maker->SwitchOffDataControlHistograms();
115  if(rejectEMCTrig) maker->SwitchOnDataControlHistograms();
116 
117  if(printSettings) maker->Print("");
118 
119  printf("<< End Configuration of %d analysis for calorimeter %s >>\n",n, calorimeter.Data());
120 
121  // Create task
122 
124 
125  task->SetDebugLevel(debug);
126 
127  //task->SetBranches("ESD:AliESDRun.,AliESDHeader");
128  //task->SetConfigFileName(""); //Don't configure the analysis via configuration file.
129 
130  task->SetAnalysisMaker(maker);
131 
132  mgr->AddTask(task);
133 
134  //Create containers
135 
136  if(outputfile.Length()==0) outputfile = AliAnalysisManager::GetCommonFileName();
137 
138  AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(kAnaPi0, TList::Class(),
139  AliAnalysisManager::kOutputContainer,
140  Form("%s",outputfile.Data()));
141 
142  AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Param_%s",kAnaPi0.Data()), TList::Class(),
143  AliAnalysisManager::kParamContainer,
144  "AnalysisParameters.root");
145 
146  // Create ONLY the output containers for the data produced by the task.
147  // Get and connect other common input/output containers via the manager as below
148  //==============================================================================
149  mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
150  //if(!kData.Contains("delta") && outputAOD) mgr->ConnectOutput (task, 0, mgr->GetCommonOutputContainer());
151  mgr->ConnectOutput (task, 1, cout_pc);
152  mgr->ConnectOutput (task, 2, cout_cuts);
153 
154  if(!mixOn)
155  {
156  UInt_t mask = SetTriggerMaskFromName(trigger);
157  task->SelectCollisionCandidates(mask);
158  }
159 
160  return task;
161 }
162 
166 AliCaloTrackReader * ConfigureReader(TString col, Bool_t simulation,
167  TString clustersArray, Bool_t tender,
168  TString calorimeter, Bool_t nonLinOn,
169  TString trigger, Bool_t rejectEMCTrig,
170  Int_t minCen, Int_t maxCen,
171  Bool_t printSettings, Int_t debug )
172 {
173  // Get the data type ESD or AOD
174  AliAnalysisManager * mgr = AliAnalysisManager::GetAnalysisManager();
175  TString inputDataType = mgr->GetInputEventHandler()->GetDataType();
176 
177  AliCaloTrackReader * reader = 0;
178  if (inputDataType == "AOD") reader = new AliCaloTrackAODReader();
179  else if(inputDataType == "ESD") reader = new AliCaloTrackESDReader();
180  else printf("AliCaloTrackReader::ConfigureReader() - Data not known InputData=%s\n",inputDataType.Data());
181 
182  reader->SetDebug(debug);//10 for lots of messages
183 
184  //
185  // MC settings
186  //
187  // Check if kine stack is available, independent of request of simulation
188  Bool_t useKinematics = kFALSE;
189  useKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
190 
191  if(simulation)
192  {
193  if (!useKinematics && inputDataType=="AOD") useKinematics = kTRUE; //AOD primary should be available ...
194  }
195 
196  if(useKinematics)
197  {
198  if(inputDataType == "ESD")
199  {
200  reader->SwitchOnStack();
201  reader->SwitchOffAODMCParticles();
202  }
203  else if(inputDataType == "AOD")
204  {
205  reader->SwitchOffStack();
206  reader->SwitchOnAODMCParticles();
207  }
208  }
209 
210  // In case of Pythia pt Hard bin simulations (jet-jet, gamma-jet)
211  // reject some special events that bother the cross section
212  if(simulation)
213  {
214  // Event rejection cuts for jet-jet simulations, do not use in other
215  reader->SetPtHardAndJetPtComparison(kTRUE);
216  reader->SetPtHardAndJetPtFactor(4);
217 
218  reader->SetPtHardAndClusterPtComparison(kTRUE);
219  reader->SetPtHardAndClusterPtFactor(1.5);
220  }
221 
222  //------------------------
223  // Detector input filling
224  //------------------------
225 
226  //Min cluster/track E
227  reader->SetEMCALEMin(0.3);
228  reader->SetEMCALEMax(1000);
229  reader->SetPHOSEMin(0.3);
230  reader->SetPHOSEMax(1000);
231  reader->SetCTSPtMin(0.2);
232  reader->SetCTSPtMax(1000);
233 
236 
237  // Shower shape smearing
238  // Set it in the train configuration page not here for the moment
239 // if(simulation)
240 // {
241 // reader->SwitchOffShowerShapeSmearing(); // Active only on MC, off by default
242 // reader->SetShowerShapeSmearWidth(0.005);
243 // }
244 
245  //
246  // Tracks
247  //
248  reader->SwitchOnCTS();
249 
250  reader->SwitchOffUseTrackTimeCut();
251  reader->SetTrackTimeCut(0,50);
252 
253  reader->SwitchOnFiducialCut();
254  reader->GetFiducialCut()->SetSimpleCTSFiducialCut(0.8, 0, 360) ;
255 
256  reader->SwitchOffUseTrackDCACut();
257  //reader->SetTrackDCACut(0,0.0105);
258  //reader->SetTrackDCACut(1,0.035);
259  //reader->SetTrackDCACut(2,1.1);
260 
261  if(inputDataType=="ESD")
262  {
263  gROOT->LoadMacro("$ALICE_PHYSICS/PWGJE/macros/CreateTrackCutsPWGJE.C");
264 
265  //AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10041004);
266  //reader->SetTrackCuts(esdTrackCuts);
267 
268  AliESDtrackCuts * esdTrackCuts = CreateTrackCutsPWGJE(10001008);
269  reader->SetTrackCuts(esdTrackCuts);
270  AliESDtrackCuts * esdTrackCuts2 = CreateTrackCutsPWGJE(10011008);
271  reader->SetTrackComplementaryCuts(esdTrackCuts2);
272 
274  }
275  else if(inputDataType=="AOD")
276  {
277  reader->SwitchOnAODHybridTrackSelection(); // Check that the AODs have Hybrids!!!!
279  reader->SetTrackStatus(AliVTrack::kITSrefit);
280 
281  //reader->SwitchOnAODPrimaryTrackSelection(); // Used in preliminary results of QM from Nicolas and Xiangrong?
282  //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
283  //reader->SetTrackFilterMask(128); // Filter bit, not mask, use if off hybrid, TPC only
284  }
285 
286  //
287  // Calorimeter
288  //
289  if(clustersArray == "" && !tender)
290  {
291  printf("**************** Standard EMCAL clusters branch analysis **************** \n");
293  // Check in ConfigureCaloUtils that the recalibration and bad map are ON
294  }
295  else
296  {
297  printf("**************** Input for analysis is Clusterizer %s **************** \n", clustersArray.Data());
298  reader->SetEMCALClusterListName(clustersArray);
300  }
301 
302  // Time cuts
304  if(simulation)
305  {
306  reader->SwitchOffUseEMCALTimeCut();
307  reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
308  }
309  else
310  {
311  reader->SwitchOnUseEMCALTimeCut();
312  reader->SetEMCALTimeCut(-25,20);
313  }
314 
315  // CAREFUL
316  if(nonLinOn) reader->SwitchOnClusterELinearityCorrection();
318 
319  if(calorimeter == "EMCAL")
320  {
321  reader->SwitchOnEMCALCells();
322  reader->SwitchOnEMCAL();
323  }
324 
325  if(calorimeter == "PHOS")
326  { // Should be on if QA is activated with correlation on
327  reader->SwitchOnPHOSCells();
328  reader->SwitchOnPHOS();
329  }
330 
331  //-----------------
332  // Event selection
333  //-----------------
334 
335  //if(!simulation) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma
336 
337  // Event triggered by EMCal selection settings
340 
341  if( rejectEMCTrig > 0 && !simulation && (trigger.Contains("EMC") || trigger.Contains("L")))
342  {
343  printf("=== Remove bad triggers === \n");
346 
347 // reader->SetTriggerPatchTimeWindow(8,9); // default values
348 // if (kRunNumber < 146861) reader->SetEventTriggerL0Threshold(3.);
349 // else if(kRunNumber < 154000) reader->SetEventTriggerL0Threshold(4.);
350 // else if(kRunNumber < 165000) reader->SetEventTriggerL0Threshold(5.5);
351 // //redefine for other periods, triggers
352 //
353 // if(kRunNumber < 172000)
354 // {
355 // reader->SetEventTriggerL1Bit(4,5); // current LHC11 data
356 // printf("\t Old L1 Trigger data format!\n");
357 // }
358 // else
359 // {
360 // reader->SetEventTriggerL1Bit(6,8); // LHC12-13 data
361 // printf("\t Current L1 Trigger data format!\n");
362 // }
363 
364  if(clustersArray != "" || tender)
365  {
366  printf("Trigger cluster calibration OFF\n");
368  }
369  }
370 
371  //reader->RejectFastClusterEvents() ;
372 
373  reader->SetZvertexCut(10.); // Open cut
374  reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
375  reader->SwitchOnRejectNoTrackEvents();
376 
377  reader->SwitchOffV0ANDSelection() ; // and besides v0 AND
378  reader->SwitchOffPileUpEventRejection(); // remove pileup by default off, apply it only for MB not for trigger
379 
380  if(col=="PbPb")
381  {
382  // Centrality
383  reader->SetCentralityClass("V0M");
384  reader->SetCentralityOpt(100); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
385  reader->SetCentralityBin(minCen,maxCen); // Accept all events, if not select range
386 
387  // Event plane (only used in Maker and mixing for AliAnaPi0/AliAnaHadronCorrelation for the moment)
388  reader->SetEventPlaneMethod("V0");
389  }
390 
391  if(printSettings) reader->Print("");
392 
393  return reader;
394 }
395 
399 AliCalorimeterUtils* ConfigureCaloUtils(TString col, Bool_t simulation,
400  TString clustersArray, Bool_t tender,
401  Bool_t nonLinOn, Int_t year,
402  Bool_t printSettings, Int_t debug)
403 {
405 
406  cu->SetDebug(debug);
407 
408  // Remove clusters close to borders, at least max energy cell is 1 cell away
411 
413 
414  if (year == 2010) cu->SetNumberOfSuperModulesUsed(4);
415  else if(year <= 2013) cu->SetNumberOfSuperModulesUsed(10);
416  else if(year > 2013) cu->SetNumberOfSuperModulesUsed(20);
417  else cu->SetNumberOfSuperModulesUsed(10);
418 
419  printf("xxx Number of SM set to <%d> xxx\n",cu->GetNumberOfSuperModulesUsed());
420 
421  // Search of local maxima in cluster
422  if(col=="pp")
423  {
424  cu->SetLocalMaximaCutE(0.1);
425  cu->SetLocalMaximaCutEDiff(0.03);
426  }
427  else
428  {
429  cu->SetLocalMaximaCutE(0.2);
430  cu->SetLocalMaximaCutEDiff(0.03);
431  }
432 
434 
436 
437  // EMCAL settings
438 
439  if(!simulation)
441 
442  AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
443 
444  // calibrations
445  Bool_t calibEner = kFALSE;
446  Bool_t calibTime = kFALSE;
447  cu->SwitchOffRecalibration();
449 
450  if( !tender )
451  {
452  cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
454 
455  calibEner = kTRUE;
456  calibTime = kTRUE;
457  }
458 
459  if( simulation )
460  {
461  calibEner = kFALSE;
462  calibTime = kFALSE;
463 
464  cu->SwitchOffRecalibration(); // Check the reader if it is taken into account during filtering
466  }
467 
468  gROOT->LoadMacro("$ALICE_PHYSICS/PWGGA/EMCALTasks/macros/ConfigureEMCALRecoUtils.C");
469  ConfigureEMCALRecoUtils(recou,
470  simulation,
471  kTRUE, // exotic
472  nonLinOn, // Non linearity
473  calibEner, // E calib
474  kTRUE, // bad map
475  calibTime); // time calib
476 
477  if( calibTime ) recou->SetExoticCellDiffTimeCut(50);
478 
479  if( nonLinOn ) cu->SwitchOnCorrectClusterLinearity();
480 
481  printf("ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
482  printf("ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
483 
484  // PHOS
486 
487  if(printSettings) cu->Print("");
488 
489  return cu;
490 }
491 
496 AliAnaPhoton* ConfigurePhotonAnalysis(TString col, Bool_t simulation,
497  TString calorimeter, Int_t year,
498  Int_t tm, Float_t shshMax,
499  Bool_t printSettings, Int_t debug)
500 {
501  AliAnaPhoton *ana = new AliAnaPhoton();
502 
503  // cluster selection cuts
504 
506 
507  ana->SwitchOffFiducialCut();
508 
509  ana->SetCalorimeter(calorimeter);
510 
511  ana->SwitchOnFillShowerShapeHistograms(); // Filled before photon shower shape selection
512 
513  //if(!simulation) ana->SwitchOnFillPileUpHistograms();
514 
515  if(tm) ana->SwitchOnTrackMatchRejection() ;
516  else ana->SwitchOffTrackMatchRejection() ;
517 
518  ana->SwitchOnTMHistoFill() ;
519 
520  if(calorimeter == "PHOS")
521  {
522  ana->SetNCellCut(2);// At least 3 cells
523  ana->SetMinPt(0.3);
524  ana->SetMinDistanceToBadChannel(2, 4, 5);
525  ana->SetTimeCut(-1e10,1e10); // open cut
526  }
527  else
528  {//EMCAL
529  ana->SetNCellCut(1);// At least 2 cells
530  ana->SetMinEnergy(0.3); // avoid mip peak at E = 260 MeV
531  ana->SetMaxEnergy(100);
532  ana->SetTimeCut(-1e10,1e10); // open cut, usual time window of [425-825] ns if time recalibration is off
533  // restrict to less than 100 ns when time calibration is on
534  ana->SetMinDistanceToBadChannel(2, 4, 6);
535 
536  // NLM cut, used in all, exclude clusters with more than 2 maxima
537  // Not needed if M02 cut is already strong or clusterizer V2
538  ana->SetNLMCut(1, 2) ;
539  }
540 
541  //PID cuts (shower shape)
542  ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
543  AliCaloPID* caloPID = ana->GetCaloPID();
544  //Not used in bayesian
545 
546  // EMCAL
547 
548  //caloPID->SetEMCALLambda0CutMax(0.27);
549  caloPID->SetEMCALLambda0CutMax(shshMax);
550  caloPID->SetEMCALLambda0CutMin(0.10);
551 
552  // Track matching
553  caloPID->SetEMCALDEtaCut(0.025);
554  caloPID->SetEMCALDPhiCut(0.030);
555 
556  // PHOS
557  caloPID->SetPHOSDispersionCut(2.5);
558  caloPID->SetPHOSRCut(2.);
559  //if(kInputData=="AOD") caloPID->SetPHOSRCut(2000.); // Open cut since dX, dZ not stored
560 
561  // Branch AOD settings
562  ana->SetOutputAODName(Form("Photon_%s",kAnaPi0.Data()));
563  ana->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
564 
565  //Set Histograms name tag, bins and ranges
566  ana->AddToHistogramsName(Form("AnaPhoton_TM%d_",tm));
567 
568  SetAnalysisCommonParameters(ana,calorimeter,year,col,simulation,printSettings,debug) ; // see method below
569 
570  if(ana->GetFirstSMCoveredByTRD() > 0)
571  printf(">>> Set first SM covered by TRD, SM=%d <<< year %d \n", ana->GetFirstSMCoveredByTRD(),year);
572 
573  // Number of particle type MC histograms
574  ana->FillNOriginHistograms (14); // 14 max
575  ana->FillNPrimaryHistograms(6); // 6 max
576 
577  return ana;
578 }
579 
583 AliAnaPi0* ConfigurePi0Analysis(TString col, Bool_t simulation,
584  TString calorimeter, Int_t year,
585  Int_t tm, Bool_t mixOn,
586  Bool_t printSettings, Int_t debug)
587 {
588  AliAnaPi0 *ana = new AliAnaPi0();
589 
590  ana->SetDebug(debug);
591 
592  // Input delta AOD settings
593  ana->SetInputAODName(Form("Photon_%s",kAnaPi0.Data()));
594 
595  // Calorimeter settings
596  ana->SetCalorimeter(calorimeter);
597 
598  // settings for pp collision mixing
599  if(mixOn) ana->SwitchOnOwnMix();
600  else ana->SwitchOffOwnMix();
601 
602  // Cuts
603  if (calorimeter == "EMCAL" ) ana->SetPairTimeCut(70);
604 
605  ana->SetNPIDBits(1);
606  ana->SetNAsymCuts(1); // no asymmetry cut, previous studies showed small effect.
607  // In EMCAL assymetry cut prevents combination of assymetric decays which is the main source of pi0 at high E.
608 
609  if (col == "pp" )
610  {
611  ana->SetNCentrBin(1);
612  ana->SetNZvertBin(10);
613  ana->SetNRPBin(1);
614  ana->SetNMaxEvMix(100);
615  ana->SetMinPt(0.5);
616  }
617  else if(col == "PbPb")
618  {
619  ana->SetNCentrBin(10);
620  ana->SetNZvertBin(10);
621  ana->SetNRPBin(4);
622  ana->SetNMaxEvMix(10);
623  ana->SetMinPt(1.5);
624  }
625  else if(collision =="pPb")
626  {
627  ana->SetNCentrBin(1);
628  ana->SetNZvertBin(10);
629  ana->SetNRPBin(4);
630  ana->SetNMaxEvMix(100);
631  ana->SetMinPt(0.5);
632  }
633 
634  ana->SwitchOnSMCombinations();
637  ana->SwitchOnFillOriginHisto(); // MC
638 
639  // Set Histograms name tag, bins and ranges
640 
641  ana->AddToHistogramsName(Form("AnaPi0_TM%d_",tm));
642 
643  SetAnalysisCommonParameters(ana,calorimeter,year,col,simulation,printSettings,debug) ; // see method below
644 
645  if(printSettings) ana->Print("");
646 
647  return ana;
648 }
649 
657  TString calorimeter, Int_t year,
658  TString col, Bool_t simulation,
659  Bool_t printSettings, Int_t debug)
660 {
661  //
662  // Histograms ranges
663  //
664  AliHistogramRanges* histoRanges = ana->GetHistogramRanges();
665 
666  histoRanges->SetHistoPtRangeAndNBins(0, 100, 200) ; // Energy and pt histograms
667 
668  if(calorimeter=="EMCAL")
669  {
670  if(year==2010)
671  {
672  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 122*TMath::DegToRad(), 78) ;
673  histoRanges->SetHistoXRangeAndNBins(-230,90,120); // QA
674  histoRanges->SetHistoYRangeAndNBins(370,450,40); // QA
675  }
676  else if( year>=2011 || year<=2013 )
677  {
678  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
679  histoRanges->SetHistoXRangeAndNBins(-600,90,200); // QA
680  histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
681  }
682  else if(year > 2013)
683  {
684  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 330*TMath::DegToRad(), 122) ;
685  histoRanges->SetHistoXRangeAndNBins(-100,90,200); // QA to be checked
686  histoRanges->SetHistoYRangeAndNBins(50,450,100); // QA to be checked
687  }
688 
689  histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
690  }
691  else if(calorimeter=="PHOS")
692  {
693  histoRanges->SetHistoPhiRangeAndNBins(260*TMath::DegToRad(), 320*TMath::DegToRad(), 60) ;
694  histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
695  }
696  else if(calorimeter=="CTS")
697  {
698  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
699  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
700  }
701 
702  histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 4.9, 500);
703 
704  // Invariant mass histo
705  histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
706  histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
707 
708  // check if time calibration is on
709  //histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000);
710  histoRanges->SetHistoTimeRangeAndNBins(-400.,400,400);
711  histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
712 
713  // track-cluster residuals
714  histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.15,0.15,300);
715  histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.15,0.15,300);
716  histoRanges->SetHistodRRangeAndNBins(0.,0.15,150);//QA
717 
718  // QA, electron, charged
719  histoRanges->SetHistoPOverERangeAndNBins(0,2.,200);
720  histoRanges->SetHistodEdxRangeAndNBins(0.,200.,200);
721 
722  // QA
723  histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
724  histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
725  histoRanges->SetHistoZRangeAndNBins(-400,400,200);
726  histoRanges->SetHistoRRangeAndNBins(400,450,25);
727  histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
728  histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
729 
730  // QA, correlation
731  if(col=="PbPb")
732  {
733  histoRanges->SetHistoNClusterCellRangeAndNBins(0,100,100);
734  histoRanges->SetHistoNClustersRangeAndNBins(0,500,50);
735  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,2000,200);
736  }
737  else
738  {
739  histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
740  histoRanges->SetHistoNClustersRangeAndNBins(0,50,50);
741  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,200,200);
742  }
743 
744  // xE, zT
745  histoRanges->SetHistoRatioRangeAndNBins(0.,2.,200);
746  histoRanges->SetHistoHBPRangeAndNBins (0.,10.,200);
747 
748  // Isolation
749  histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 250);
750  histoRanges->SetHistoPtSumRangeAndNBins (0, 100, 250);
751 
752  //
753  // TRD SM
754  //
755  if (year == 2011) ana->SetFirstSMCoveredByTRD( 6);
756  else if(year == 2012 ||
757  year == 2013) ana->SetFirstSMCoveredByTRD( 4);
758  else ana->SetFirstSMCoveredByTRD(-1);
759 
760  //
761  // MC histograms?
762  //
763  if(simulation) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.
764  else ana->SwitchOffDataMC() ;
765 
766  //Set here generator name, default pythia
767  //ana->GetMCAnalysisUtils()->SetMCGenerator("");
768 
769  //
770  // Debug
771  //
772  if(printSettings) ana->Print("");
773 
774  ana->SetDebug(debug); // 10 for lots of messages
775 }
776 
781 UInt_t SetTriggerMaskFromName(TString trigger)
782 {
783  if(trigger=="EMC7")
784  {
785  printf("CaloTrackCorr trigger EMC7\n");
786  return AliVEvent::kEMC7;
787  }
788  else if (trigger=="INT7")
789  {
790  printf("CaloTrackCorr trigger INT7\n");
791  return AliVEvent::kINT7;
792  }
793  else if(trigger=="EMC1")
794  {
795  printf("CaloTrackCorr trigger EMC1\n");
796  return AliVEvent::kEMC1;
797  }
798  else if(trigger=="MB")
799  {
800  printf("CaloTrackCorr trigger MB\n");
801  return AliVEvent::kMB;
802  }
803  else if(trigger=="PHOS")
804  {
805  printf("CaloTrackCorr trigger PHOS\n");
806  return AliVEvent::kPHI7;
807  }
808  else if(trigger=="PHOSPb")
809  {
810  printf("CaloTrackCorr trigger PHOSPb\n");
811  return AliVEvent::kPHOSPb;
812  }
813  else if(trigger=="AnyINT")
814  {
815  printf("CaloTrackCorr trigger AnyINT\n");
816  return AliVEvent::kAnyINT;
817  }
818  else if(trigger=="INT")
819  {
820  printf("CaloTrackCorr trigger AnyINT\n");
821  return AliVEvent::kAny;
822  }
823  else if(trigger=="EMCEGA")
824  {
825  printf("CaloTrackCorr trigger EMC Gamma\n");
826  return AliVEvent::kEMCEGA;
827  }
828  else if(trigger=="EMCEJE")
829  {
830  printf("CaloTrackCorr trigger EMC Jet\n");
831  return AliVEvent::kEMCEJE;
832  }
833  else if(trigger=="Central")
834  {
835  printf("CaloTrackCorr trigger Central\n");
836  return AliVEvent::kCentral;
837  }
838  else if(trigger=="CentralEGA")
839  {
840  printf("CaloTrackCorr trigger Central+EMCEGA\n");
841  return (AliVEvent::kCentral | AliVEvent::kEMCEGA);
842  }
843  else if(trigger=="SemiCentral")
844  {
845  printf("CaloTrackCorr trigger SemiCentral\n");
846  return AliVEvent::kSemiCentral;
847  }
848  else if(trigger=="SemiOrCentral")
849  {
850  printf("CaloTrackCorr trigger SemiCentral Or Central\n");
851  return (AliVEvent::kSemiCentral | AliVEvent::kCentral);
852  }
853  else return AliVEvent::kAny;
854 }
855 
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 SwitchOnFillOriginHisto()
Definition: AliAnaPi0.h:128
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)
virtual void SwitchOnFiducialCut()
void SetHistoXRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOnTrackMatchRejection()
Definition: AliAnaPhoton.h:102
void SwitchOnLoadOwnEMCALGeometryMatrices()
void SwitchOnTMHistoFill()
Definition: AliAnaPhoton.h:76
void SetNPIDBits(Int_t s)
Definition: AliAnaPi0.h:115
virtual void SwitchOnAODHybridTrackSelection()
virtual void SetCentralityBin(Int_t min, Int_t max)
AliEMCALRecoUtils * GetEMCALRecoUtils() const
void FillNPrimaryHistograms(Int_t n)
Definition: AliAnaPhoton.h:107
void SwitchOffClusterELinearityCorrection()
void SetCTSPtMax(Float_t pt)
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.
AliAnalysisTaskCaloTrackCorrelation * AddTaskPi0(TString calorimeter="EMCAL", 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, Float_t shshMax=0.5, Bool_t tm=kTRUE, Int_t minCen=-1, Int_t maxCen=-1, Bool_t mixOn=kTRUE, TString outputfile="", Bool_t printSettings=kFALSE, Int_t debug=0)
Definition: AddTaskPi0.C:35
virtual void SetInputAODName(TString name)
virtual void SetTrackComplementaryCuts(AliESDtrackCuts *)
void SwitchOnSMCombinations()
Definition: AliAnaPi0.h:89
void SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3)
Definition: AliAnaPhoton.h:85
virtual void SetOutputAODClassName(TString name)
void SwitchOffMultipleCutAnalysis()
Definition: AliAnaPi0.h:110
void SetHistodRRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetLocalMaximaCutEDiff(Float_t c)
void SetPHOSEMax(Float_t e)
void SetNumberOfCellsFromEMCALBorder(Int_t n)
void SetEMCALEMin(Float_t e)
void SetNCellCut(Int_t n)
Definition: AliAnaPhoton.h:93
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 SetPHOSRCut(Float_t rcut)
Definition: AliCaloPID.h:207
void SetEMCALDPhiCut(Float_t dcut)
Definition: AliCaloPID.h:201
virtual void SetOutputAODName(TString name)
void SwitchOffRecalculateClusterTrackMatching()
void SwitchOffVertexBCEventSelection()
virtual void SetPtHardAndClusterPtFactor(Float_t factor)
Base class for CaloTrackCorr analysis algorithms.
void SwitchOffTrackMatchRejection()
Definition: AliAnaPhoton.h:103
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()
void SwitchOffFillAngleHisto()
Definition: AliAnaPi0.h:80
virtual void SetCentralityOpt(Int_t opt)
void SetHistoPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual AliHistogramRanges * GetHistogramRanges()
void SetHistoPtSumRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetTrackStatus(ULong_t bit)
TString kAnaPi0
Global name to be composed of the settings, used to set the AOD branch name.
Definition: AddTaskPi0.C:9
AliAnaPi0 * ConfigurePi0Analysis(TString col, Bool_t simulation, TString calorimeter, Int_t year, Int_t tm, Bool_t mixOn, Bool_t printSettings, Int_t debug)
Definition: AddTaskPi0.C:583
Bool_t IsBadChannelsRemovalSwitchedOn() const
Filter EMCal/PHOS clusters for photon analysis.
Definition: AliAnaPhoton.h:32
void SetHistoTrackResidualPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
AliCaloTrackReader * ConfigureReader(TString col, Bool_t simulation, TString clustersArray, Bool_t tender, TString calorimeter, Bool_t nonLinOn, TString trigger, Bool_t rejectEMCTrig, Int_t minCen, Int_t maxCen, Bool_t printSettings, Int_t debug)
Definition: AddTaskPi0.C:166
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)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
Definition: AliAnaPi0.cxx:1268
Int_t GetNumberOfSuperModulesUsed() const
void SetHistoYRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetTimeCut(Double_t min, Double_t max)
Definition: AliAnaPhoton.h:88
void SetAnalysisCommonParameters(AliAnaCaloTrackCorrBaseClass *ana, TString calorimeter, Int_t year, TString col, Bool_t simulation, Bool_t printSettings, Int_t debug)
Definition: AddTaskPi0.C:656
virtual void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
virtual void SetZvertexCut(Float_t zcut=10.)
void SetNumberOfSuperModulesUsed(Int_t nSM)
Class containing more common histogram axis types.
void SetEMCALLambda0CutMax(Float_t lcut)
Definition: AliCaloPID.h:192
virtual void SetPtHardAndJetPtFactor(Float_t factor)
Class for event, clusters and tracks filtering and preparation for the ESD analysis.
AliAnaPhoton * ConfigurePhotonAnalysis(TString col, Bool_t simulation, TString calorimeter, Int_t year, Int_t tm, Float_t shshMax, Bool_t printSettings, Int_t debug)
Definition: AddTaskPi0.C:496
virtual void SetEventPlaneMethod(TString m)
void SetNAsymCuts(Int_t s)
Definition: AliAnaPi0.h:113
void SetHistoNClustersRangeAndNBins(Int_t min, Int_t max, Int_t n)
void SetPHOSDispersionCut(Float_t dcut)
Definition: AliCaloPID.h:210
UInt_t SetTriggerMaskFromName(TString trigger)
Definition: AddTaskPi0.C:781
virtual void SetTrackCuts(AliESDtrackCuts *)
virtual void SetCentralityClass(TString name)
void SwitchOnFillShowerShapeHistograms()
Definition: AliAnaPhoton.h:68
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)
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()
void SetHistoZRangeAndNBins(Float_t min, Float_t max, Int_t n)
AliCalorimeterUtils * ConfigureCaloUtils(TString col, Bool_t simulation, TString clustersArray, Bool_t tender, Bool_t nonLinOn, Int_t year, Bool_t printSettings, Int_t debug)
Definition: AddTaskPi0.C:399
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
void FillNOriginHistograms(Int_t n)
Definition: AliAnaPhoton.h:105
void SetPHOSEMin(Float_t e)
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 SetEMCALLambda0CutMin(Float_t lcut)
Definition: AliCaloPID.h:195
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 SetEMCALDEtaCut(Float_t dcut)
Definition: AliCaloPID.h:198
void SwitchOffUseParametrizedTimeCut()
void SetLocalMaximaCutE(Float_t cut)
void SetHistoRatioRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetNLMCut(Int_t min, Int_t max)
Definition: AliAnaPhoton.h:96
Steering class of package CaloTrackCorrelartions.