AliPhysics  a8afd6c (a8afd6c)
AddTaskClusterShape.C
Go to the documentation of this file.
1 
10 // Set includes for compilation
11 
12 #if !defined(__CINT__) || defined(__MAKECINT__)
13 
14 // ROOT
15 #include <TString.h>
16 #include <TROOT.h>
17 #include <TSystem.h>
18 
19 // ALIROOT/ALIPHYSICS
20 #include "AliAnalysisManager.h"
21 #include "AliInputEventHandler.h"
22 #include "AliVTrack.h"
23 #include "AliLog.h"
24 
25 // CaloTrackCorrr
27 #include "AliCaloTrackESDReader.h"
28 #include "AliCaloTrackAODReader.h"
29 #include "AliCalorimeterUtils.h"
31 #include "AliHistogramRanges.h"
32 #include "AliAnaCalorimeterQA.h"
34 
35 // Macros
36 R__ADD_INCLUDE_PATH($ALICE_PHYSICS)
37 //#include "ConfigureEMCALRecoUtils.C"
38 #include "PWGGA/CaloTrackCorrelations/macros/ConfigureAndGetEventTriggerMaskAndCaloTriggerString.C"
41 
42 #endif // CINT
43 
44  // Declare methods for compilation
45 
47 (TString col, Bool_t simulation,
48  TString clustersArray, Bool_t tender,
49  TString calorimeter, Bool_t nonLinOn,
50  TString trigger, Bool_t rejectEMCTrig,
51  Int_t minCen, Int_t maxCen,
52  Bool_t printSettings, Int_t debug );
53 
55 (TString col, Bool_t simulation,
56  Bool_t tender,
57  Bool_t nonLinOn, Int_t year,
58  Bool_t printSettings, Int_t debug );
59 
61 (Bool_t tmPtDep, TString col , Bool_t simulation,
62  TString calorimeter, Int_t year, Bool_t printSettings, Int_t debug);
63 
65 (TString col, Bool_t simulation,
67  Bool_t printSettings, Int_t debug );
68 
71  TString calorimeter , Int_t year,
72  TString col , Bool_t simulation,
73  Bool_t printSettings, Int_t debug);
74 
75 
78 
100 (
101  TString calorimeter = "EMCAL",
102  Bool_t simulation = kFALSE,
103  TString collision = "pp",
104  TString period = "",
105  Int_t rejectEMCTrig = 0,
106  TString clustersArray = "",
107  Bool_t tender = kFALSE,
108  Bool_t nonLinOn = kFALSE,
109  Bool_t tmDep = kTRUE,
110  Bool_t qaAn = kFALSE,
111  TString outputfile = "",
112  Bool_t printSettings = kFALSE,
113  Int_t debug = 0, // Debug level
114  const char *trigSuffix = "EMC7"
115 )
116 {
117  // Check the global variables, and reset the provided ones if empty.
118  //
119  TString trigger = trigSuffix;
120 
121  gROOT->LoadMacro("$ALICE_PHYSICS/PWGGA/CaloTrackCorrelations/macros/GetAlienGlobalProductionVariables.C");
122 
123  Int_t year = 2017;
124  Bool_t printGlobal = kTRUE;
125 
126  GetAlienGlobalProductionVariables(simulation,collision,period,year,printGlobal);
127 
128  // Get the pointer to the existing analysis manager via the static access method.
129  //
130  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
131  if (!mgr)
132  {
133  ::Error("AddTaskClusterShape", "No analysis manager to connect to.");
134  return NULL;
135  }
136 
137  // Check the analysis type using the event handlers connected to the analysis manager.
138 
139  if (!mgr->GetInputEventHandler())
140  {
141  ::Error("AddTaskClusterShape", "This task requires an input event handler");
142  return NULL;
143  }
144 
145  //
146  // Create task
147  //
148 
149  // Name for containers
150  kAnaClusterShape = Form("ShapeAna%s_%s",trigger.Data(),clustersArray.Data());
151 
152  Int_t minCen = -1, maxCen = -1;
153 
154  if(collision=="PbPb" && maxCen>=0) kAnaClusterShape+=Form("Cen%d_%d",minCen,maxCen);
155 
156  // Create task
157 
158  AliAnalysisTaskCaloTrackCorrelation * task = new AliAnalysisTaskCaloTrackCorrelation (Form("%s",kAnaClusterShape.Data()));
159 
160  task->SetDebugLevel(debug);
161 
162  // task->SetFirstEvent(1800);
163  // task->SetLastEvent (2000);
164 
166 
167  task->SetAnalysisMaker(maker);
168 
169  mgr->AddTask(task);
170 
171  //
172  // Create containers
173 
174  if(outputfile.Length()==0) outputfile = AliAnalysisManager::GetCommonFileName();
175 
176  TString containerName = Form("Shape_%s",calorimeter.Data());
177  if(clustersArray.Length()>0) containerName = Form("%s_%s",containerName.Data(),clustersArray.Data());
178 
179  TString subcontainerName = Form("%s",trigger.Data());
180  if(clustersArray.Length()>0) subcontainerName = Form("%s_%s",subcontainerName.Data(),clustersArray.Data());
181 
182  AliAnalysisDataContainer *cout_pc = mgr->CreateContainer(subcontainerName, TList::Class(),
183  AliAnalysisManager::kOutputContainer,
184  Form("%s:%s",outputfile.Data(),containerName.Data()));
185 
186  AliAnalysisDataContainer *cout_cuts = mgr->CreateContainer(Form("Param_%s",subcontainerName.Data()), TList::Class(),
187  AliAnalysisManager::kParamContainer,
188  Form("%s_Parameters.root",containerName.Data()));
189 
190 
191  // Create ONLY the output containers for the data produced by the task.
192  // Get and connect other common input/output containers via the manager as below
193  mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
194  mgr->ConnectOutput (task, 1, cout_pc);
195  mgr->ConnectOutput (task, 2, cout_cuts);
196  //==============================================================================
197 
198  // Do not configure the wagon for certain analysis combinations
199  // But create the task so that the sub-wagon train can run
200  //
201  gROOT->LoadMacro("$ALICE_PHYSICS/PWGGA/CaloTrackCorrelations/macros/CheckActiveEMCalTriggerPerPeriod.C");
202  Bool_t doAnalysis = CheckActiveEMCalTriggerPerPeriod(simulation,trigger,period,year);
203  if(!doAnalysis)
204  {
205  maker->SwitchOffProcessEvent();
206  return task;
207  }
208 
209  // #### Start analysis configuration ####
210  //
211  TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
212 
213  // Make sure the B field is enabled for track selection, some cuts need it
214  //
215  ((AliInputEventHandler*)mgr->GetInputEventHandler())->SetNeedField(kTRUE);
216 
217  // Print settings to check all is as expected
218  //
219  printf("AddTaskClusterShape() - Task NAME: %s; Passed settings\n",kAnaClusterShape.Data());
220 
221  printf("\t calorimeter <%s>, simulation <%d>, year <%d>, collision <%s>, trigger <%s>, reject EMC <%d>,\n"
222  "\t clustersArray <%s>, tender <%d>, non linearity <%d>, TM dep <%d>, QA on <%d>,\n"
223  "\t outputfile <%s>, printSettings <%d>, debug <%d>\n",
224  calorimeter.Data(),simulation,year,collision.Data(),trigger.Data(), rejectEMCTrig,
225  clustersArray.Data(),tender, nonLinOn, tmDep, qaAn, outputfile.Data(),printSettings,debug);
226 
227 
228  // General frame setting and configuration
229  maker->SetReader ( ConfigureReader (collision,simulation,clustersArray,tender,calorimeter,nonLinOn,trigger,rejectEMCTrig,minCen,maxCen,printSettings,debug) );
230  maker->SetCaloUtils( ConfigureCaloUtils(collision,simulation,tender,nonLinOn,year,printSettings,debug) );
231 
232  // Analysis tasks setting and configuration
233  Int_t n = 0;//Analysis number, order is important
234 
235  // SHAPE
236  maker->AddAnalysis(ConfigureClusterShape(tmDep, collision,simulation,calorimeter,year,printSettings,debug) , n++);
237 
238  // Detector QA
239  if (qaAn) maker->AddAnalysis(ConfigureQAAnalysis(collision,simulation,calorimeter,year,printSettings,debug) , n++);
240 
241 
242  maker->SetAnaDebug(debug) ;
243 
244  maker->SwitchOnHistogramsMaker() ;
245  maker->SwitchOnAODsMaker() ;
246 
247  //if( simulation || !trigger.Contains("EMC") )
249 
250  if(simulation)
251  {
252  // Calculate the cross section weights, apply them to all histograms
253  // and fill xsec and trial histo. Sumw2 must be activated.
254  //maker->GetReader()->GetWeightUtils()->SwitchOnMCCrossSectionCalculation();
255  //maker->SwitchOnSumw2Histograms();
256 
257  // Just fill cross section and trials histograms.
259 
260  // For recent productions where the cross sections and trials are not stored in separate file
261  TString prodType = gSystem->Getenv("ALIEN_JDL_LPMPRODUCTIONTYPE");
262  printf("AddTaskClusterShape() - MC production name: %s\n",prodType.Data());
263  if ( prodType.Contains("LHC16c") ) // add here any other affected periods, for the moment jet-jet 8 TeV
264  {
265  printf("\t use the cross section from EventHeader per Event\n");
267  }
268 
269  // Add control histogram with pT hard to control aplication of weights
270  maker->SwitchOnPtHardHistogram();
271  }
272 
273  if(printSettings) maker->Print("");
274 
275  printf("AddTaskClusterShape() - << End Configuration of %d analysis for calorimeter %s >>\n",n, calorimeter.Data());
276 
277 
278  //
279  // Select events trigger depending on trigger
280  //
281  if(!simulation)
282  {
283  gROOT->LoadMacro("$ALICE_PHYSICS/PWGGA/CaloTrackCorrelations/macros/ConfigureAndGetEventTriggerMaskAndCaloTriggerString.C");
284  TString caloTriggerString = "";
285  UInt_t mask = ConfigureAndGetEventTriggerMaskAndCaloTriggerString(trigger, year, caloTriggerString);
286 
287  maker->GetReader()->SetFiredTriggerClassName(caloTriggerString);
288 
289  task ->SelectCollisionCandidates( mask );
290  }
291 
292  return task;
293 }
294 
299  TString clustersArray, Bool_t tender,
300  TString calorimeter, Bool_t nonLinOn,
301  TString trigger, Bool_t rejectEMCTrig,
302  Int_t minCen, Int_t maxCen,
303  Bool_t printSettings, Int_t debug )
304 {
305  // Get the data type ESD or AOD
306  AliAnalysisManager * mgr = AliAnalysisManager::GetAnalysisManager();
307  TString inputDataType = mgr->GetInputEventHandler()->GetDataType();
308 
309  AliCaloTrackReader * reader = 0;
310  if (inputDataType == "AOD") reader = new AliCaloTrackAODReader();
311  else if(inputDataType == "ESD") reader = new AliCaloTrackESDReader();
312  else printf("AddTaskClusterShape::ConfigureReader() - Data not known InputData=%s\n",inputDataType.Data());
313 
314  reader->SetDebug(debug);//10 for lots of messages
315 
316  //
317  // MC settings
318  //
319  // Check if kine stack is available, independent of request of simulation
320 // Bool_t useKinematics = kFALSE;
321 // useKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
322 //
323 // if(simulation)
324 // {
325 // if (!useKinematics && inputDataType=="AOD") useKinematics = kTRUE; //AOD primary should be available ...
326 // }
327 
328  // In case of Pythia pt Hard bin simulations (jet-jet, gamma-jet)
329  // reject some special events that bother the cross section
330  if(simulation)
331  {
332  // Event rejection cuts for jet-jet simulations, do not use in other
333  reader->SetPtHardAndJetPtComparison(kTRUE);
334  reader->SetPtHardAndJetPtFactor(2);
335 
336  reader->SetPtHardAndClusterPtComparison(kTRUE);
337  reader->SetPtHardAndClusterPtFactor(1.5);
338  }
339 
340  //------------------------
341  // Detector input filling
342  //------------------------
343 
344  //Min cluster/track E
345  reader->SetEMCALEMin(0.3);
346  reader->SetEMCALEMax(1000);
347  reader->SetPHOSEMin(0.3);
348  reader->SetPHOSEMax(1000);
349  reader->SetCTSPtMin(0.2);
350  reader->SetCTSPtMax(1000);
351 
352  reader->SetEMCALBadChannelMinDist(5);
353  reader->SetEMCALNCellsCut(2);
354 
357 
358  // Shower shape smearing
359  // Set it in the train configuration page not here for the moment
360  // if(simulation)
361  // {
362  // reader->SwitchOffShowerShapeSmearing(); // Active only on MC, off by default
363  // reader->SetShowerShapeSmearWidth(0.005);
364  // }
366 
367  reader->SwitchOffFiducialCut();
368 
369  //
370  // No track in this analysis
371  reader->SwitchOffCTS();
372 
373  //
374  // Calorimeter
375  //
376  if(clustersArray == "" && !tender)
377  {
378  printf("AddTaskClusterShape::ConfigureReader() - **************** Standard EMCAL clusters branch analysis **************** \n");
380  // Check in ConfigureCaloUtils that the recalibration and bad map are ON
381  }
382  else
383  {
384  printf("AddTaskClusterShape::ConfigureReader() - **************** Input for analysis is Clusterizer %s **************** \n", clustersArray.Data());
385  reader->SetEMCALClusterListName(clustersArray);
387  }
388 
389  // Time cuts
391  if(simulation)
392  {
393  reader->SwitchOffUseEMCALTimeCut();
394  reader->SetEMCALTimeCut(-1e10,1e10); // Open time cut
395  }
396  else
397  {
398  reader->SwitchOnUseEMCALTimeCut();
399  reader->SetEMCALTimeCut(-25,20);
400  }
401 
402  // CAREFUL
403  if(nonLinOn) reader->SwitchOnClusterELinearityCorrection();
405 
406  if(calorimeter == "EMCAL")
407  {
408  reader->SwitchOnEMCALCells();
409  reader->SwitchOnEMCAL();
410  }
411 
412  if(calorimeter == "PHOS")
413  { // Should be on if QA is activated with correlation on
414  reader->SwitchOnPHOSCells();
415  reader->SwitchOnPHOS();
416  }
417 
418  //-----------------
419  // Event selection
420  //-----------------
421 
422  //if(!simulation) reader->SetFiredTriggerClassName("CEMC7EGA-B-NOPF-CENTNOTRD"); // L1 Gamma
423 
424  // Event triggered by EMCal selection settings
427 
428  if( rejectEMCTrig > 0 && !simulation && (trigger.Contains("EMC") || trigger.Contains("L")))
429  {
430  printf("AddTaskClusterShape::ConfigureReader() === Remove bad triggers === \n");
433 
434  // reader->SetTriggerPatchTimeWindow(8,9); // default values
435  // if (kRunNumber < 146861) reader->SetEventTriggerL0Threshold(3.);
436  // else if(kRunNumber < 154000) reader->SetEventTriggerL0Threshold(4.);
437  // else if(kRunNumber < 165000) reader->SetEventTriggerL0Threshold(5.5);
438  // //redefine for other periods, triggers
439  //
440  // if(kRunNumber < 172000)
441  // {
442  // reader->SetEventTriggerL1Bit(4,5); // current LHC11 data
443  // printf("\t Old L1 Trigger data format!\n");
444  // }
445  // else
446  // {
447  // reader->SetEventTriggerL1Bit(6,8); // LHC12-13 data
448  // printf("\t Current L1 Trigger data format!\n");
449  // }
450 
451  if(clustersArray != "" || tender)
452  {
453  printf("AddTaskClusterShape::ConfigureReader() - Trigger cluster calibration OFF\n");
455  }
456 
457  }
458 
459  //reader->RejectFastClusterEvents() ;
460 
461  // For mixing with AliAnaParticleHadronCorrelation switch it off
462  reader->SwitchOnEventTriggerAtSE(); // on is default case
463 
464  reader->SetZvertexCut(10.); // Open cut
465  reader->SwitchOnPrimaryVertexSelection(); // and besides primary vertex
466 
467  reader->SwitchOffV0ANDSelection() ; // and besides v0 AND
468  reader->SwitchOnPileUpEventRejection(); // remove pileup by default off, apply it only for MB not for trigger
469 
470  if(col=="PbPb")
471  {
472  // Centrality
473  reader->SetCentralityClass("V0M");
474  reader->SetCentralityOpt(100); // 10 (c= 0-10, 10-20 ...), 20 (c= 0-5, 5-10 ...) or 100 (c= 1, 2, 3 ..)
475  reader->SetCentralityBin(minCen,maxCen); // Accept all events, if not select range
476  // Event plane (only used in Maker and mixing for AliAnaPi0/AliAnaHadronCorrelation for the moment)
477  reader->SetEventPlaneMethod("V0");
478  }
479 
480  if(printSettings) reader->Print("");
481 
482  return reader;
483 }
484 
489  Bool_t tender,
490  Bool_t nonLinOn, Int_t year,
491  Bool_t printSettings, Int_t debug)
492 {
494 
495  cu->SetDebug(debug);
496 
497  // Remove clusters close to borders, at least max energy cell is 1 cell away
500 
502 
503  if (year == 2010) cu->SetNumberOfSuperModulesUsed(4);
504  else if(year <= 2013) cu->SetNumberOfSuperModulesUsed(10);
505  else if(year > 2013) cu->SetNumberOfSuperModulesUsed(20);
506  else cu->SetNumberOfSuperModulesUsed(10);
507 
508  printf("AddTaskClusterShape::ConfigureCaloUtils() xxx Number of SM set to <%d> xxx\n",
510 
511  // Search of local maxima in cluster
512  if(col=="pp")
513  {
514  cu->SetLocalMaximaCutE(0.1);
515  cu->SetLocalMaximaCutEDiff(0.03);
516  }
517  else
518  {
519  cu->SetLocalMaximaCutE(0.2);
520  cu->SetLocalMaximaCutEDiff(0.03);
521  }
522 
524 
526 
527  // EMCAL settings
528 
529  if(!simulation)
531 
532  // calibrations
533  Bool_t calibEner = kFALSE;
534  Bool_t calibTime = kFALSE;
537 
538  if( !tender )
539  {
540  cu->SwitchOnRecalibration(); // Check the reader if it is taken into account during filtering
542 
543  calibEner = kTRUE;
544  calibTime = kTRUE;
545  }
546 
547  if( simulation )
548  {
549  calibEner = kFALSE;
550  calibTime = kFALSE;
551 
552  cu->SwitchOffRecalibration(); // Check the reader if it is taken into account during filtering
554  }
555 
556 AliEMCALRecoUtils * recou = cu->GetEMCALRecoUtils();
557 //
558 // gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/EMCAL/macros/ConfigureEMCALRecoUtils.C");
559 // ConfigureEMCALRecoUtils(recou,
560 // simulation,
561 // kTRUE, // exotic
562 // nonLinOn, // Non linearity
563 // calibEner, // E calib
564 // kTRUE, // bad map
565 // calibTime); // time calib
566 
567  cu->ConfigureEMCALRecoUtils(simulation,
568  kTRUE, // exotic
569  nonLinOn, // Non linearity
570  calibEner, // E calib
571  kTRUE, // bad map
572  calibTime); // time calib
573 
574  //if( calibTime ) recou->SetExoticCellDiffTimeCut(1e6);
575 
576  if( nonLinOn ) cu->SwitchOnCorrectClusterLinearity();
577 
578  printf("AddTaskClusterShape::ConfigureCaloUtils() - EMCAL Recalibration ON? %d %d\n",recou->IsRecalibrationOn(), cu->IsRecalibrationOn());
579  printf("AddTaskClusterShape::ConfigureCaloUtils() - EMCAL BadMap ON? %d %d\n",recou->IsBadChannelsRemovalSwitchedOn(), cu->IsBadChannelsRemovalSwitchedOn());
580 
581  // PHOS
583 
584  if(printSettings) cu->Print("");
585 
586  return cu;
587 }
588 
593 (Bool_t tmPtDep, TString col , Bool_t simulation,
594  TString calorimeter, Int_t year, Bool_t printSettings, Int_t debug)
595 {
597 
598  ana->SetM02Min(-1);
599  ana->SetNCellsPerClusterMin(-1);
600 
601  ana->SetCalorimeter(calorimeter);
602 
603  if(simulation) ana->SetConstantTimeShift(615);
604 
605  ana->SwitchOffFiducialCut();
606 
608 
610 
612 
613  ana->SwitchOffStudyMatchedPID() ;
614 
615  ana->SwitchOffStudyWeight();
616 
617  ana->SetNCellBinLimits(-1); // no analysis on predefined bins in nCell
618 
620  ana->SwitchOffStudyExotic();
623  ana->SwitchOffStudyCellTime() ;
624 
625  // PID cuts (Track-matching)
626  ana->SwitchOnCaloPID(); // do PID selection, unless specified in GetCaloPID, selection not based on bayesian
627  AliCaloPID* caloPID = ana->GetCaloPID();
628 
629  if(tmPtDep)
630  {
631  // track pT dependent cut
633 
634  // Begining of histograms name
635  ana->AddToHistogramsName("Shape_TMDep_");
636  }
637  else
638  {
639  // Fix
641  caloPID->SetEMCALDEtaCut(0.025);
642  caloPID->SetEMCALDPhiCut(0.030);
643 
644  // Begining of histograms name
645  ana->AddToHistogramsName("Shape_TMFix_");
646  }
647 
648  SetAnalysisCommonParameters(ana,calorimeter,year,col,simulation,printSettings,debug); // see method below
649 
650  return ana;
651 }
652 
657  TString calorimeter, Int_t year,
658  Bool_t printSettings, Int_t debug )
659 {
661 
662  ana->SetEMCALM02Min(-1);
664  ana->SetEMCALCellAmpMin(0.1);
665 
666  ana->SetCalorimeter(calorimeter);
667 
668  ana->SetTimeCut(-1e10,1e10); // Open time cut
669  if(simulation) ana->SetConstantTimeShift(615);
670 
671  ana->SwitchOffCorrelation(); // make sure you switch in the reader PHOS and EMCAL cells and clusters if option is ON
672 
674 
675  ana->SwitchOffFiducialCut();
680  // ana->SwitchOffStudyClustersAsymmetry();
681  // ana->SwitchOffStudyWeight();
682  // ana->SwitchOnStudyTCardCorrelation() ;
683  // ana->SwitchOffStudyM02Dependence() ;
685  // ana->SwitchOnStudyExotic();
686 
688 
690 
691  ana->AddToHistogramsName("QA_"); // Begining of histograms name
692 
693  SetAnalysisCommonParameters(ana,calorimeter,year,col,simulation,printSettings,debug); // see method below
694 
695  return ana;
696 }
697 
698 
706  TString calorimeter, Int_t year,
707  TString col, Bool_t simulation,
708  Bool_t printSettings, Int_t debug)
709 {
710  //
711  // Histograms ranges
712  //
713  AliHistogramRanges* histoRanges = ana->GetHistogramRanges();
714 
715  histoRanges->SetHistoPtRangeAndNBins(0, 75, 150) ; // Energy and pt histograms
716 
717  if(calorimeter=="EMCAL")
718  {
719  if ( year == 2010 )
720  {
721  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 122*TMath::DegToRad(), 78) ;
722  histoRanges->SetHistoXRangeAndNBins(-230,90,120); // QA
723  histoRanges->SetHistoYRangeAndNBins(370,450,40); // QA
724  }
725  else if ( year < 2014 )
726  {
727  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 182*TMath::DegToRad(), 108) ;
728  histoRanges->SetHistoXRangeAndNBins(-460,90,200); // QA
729  histoRanges->SetHistoYRangeAndNBins(100,450,100); // QA
730  }
731  else // Run2
732  {
733  histoRanges->SetHistoPhiRangeAndNBins(78*TMath::DegToRad(), 329*TMath::DegToRad(), 250) ;
734  histoRanges->SetHistoXRangeAndNBins(-460,460,230); // QA
735  histoRanges->SetHistoYRangeAndNBins(-450,450,225); // QA
736  }
737 
738  histoRanges->SetHistoEtaRangeAndNBins(-0.72, 0.72, 144) ;
739  }
740  else if(calorimeter=="PHOS")
741  {
742  histoRanges->SetHistoPhiRangeAndNBins(250*TMath::DegToRad(), 320*TMath::DegToRad(), 70) ;
743  histoRanges->SetHistoEtaRangeAndNBins(-0.13, 0.13, 130) ;
744  }
745  else if(calorimeter=="CTS")
746  {
747  ana->GetHistogramRanges()->SetHistoPhiRangeAndNBins(0, TMath::TwoPi(), 200) ;
748  ana->GetHistogramRanges()->SetHistoEtaRangeAndNBins(-1.5, 1.5, 300) ;
749  }
750 
751  histoRanges->SetHistoShowerShapeRangeAndNBins(-0.1, 2.9, 300);
752 
753  // Invariant mass histo
754  histoRanges->SetHistoMassRangeAndNBins(0., 1., 200) ;
755  histoRanges->SetHistoAsymmetryRangeAndNBins(0., 1. , 100) ;
756 
757  // check if time calibration is on
758  //histoRanges->SetHistoTimeRangeAndNBins(-1000.,1000,1000);
759  histoRanges->SetHistoTimeRangeAndNBins(-400.,400,400);
760  histoRanges->SetHistoDiffTimeRangeAndNBins(-200, 200, 800);
761 
762  // track-cluster residuals
763  histoRanges->SetHistoTrackResidualEtaRangeAndNBins(-0.06,0.06,120);
764  histoRanges->SetHistoTrackResidualPhiRangeAndNBins(-0.06,0.06,120);
765  histoRanges->SetHistodRRangeAndNBins(0.,0.06,60);//QA
766 
767  // QA, electron, charged
768  histoRanges->SetHistoPOverERangeAndNBins(0,1.5,150);
769  histoRanges->SetHistodEdxRangeAndNBins(0.,200.,200);
770 
771  // QA
772  histoRanges->SetHistoFinePtRangeAndNBins(0, 10, 200) ; // bining for fhAmpId
773  histoRanges->SetHistoVertexDistRangeAndNBins(0.,500.,500);
774  histoRanges->SetHistoZRangeAndNBins(-350,350,175);
775  histoRanges->SetHistoRRangeAndNBins(430,460,30);
776  histoRanges->SetHistoV0SignalRangeAndNBins(0,5000,500);
777  histoRanges->SetHistoV0MultiplicityRangeAndNBins(0,5000,500);
778 
779  // QA, correlation
780  if(col=="PbPb")
781  {
782  histoRanges->SetHistoNClusterCellRangeAndNBins(0,100,100);
783  histoRanges->SetHistoNClustersRangeAndNBins(0,500,50);
784  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,2000,200);
785  }
786  else
787  {
788  histoRanges->SetHistoNClusterCellRangeAndNBins(0,50,50);
789  histoRanges->SetHistoNClustersRangeAndNBins(0,50,50);
790  histoRanges->SetHistoTrackMultiplicityRangeAndNBins(0,150,150);
791  }
792 
793  // xE, zT
794  histoRanges->SetHistoRatioRangeAndNBins(0.,2.,200);
795  histoRanges->SetHistoHBPRangeAndNBins (0.,10.,200);
796 
797  // Isolation
798  histoRanges->SetHistoPtInConeRangeAndNBins(0, 50 , 100);
799  histoRanges->SetHistoPtSumRangeAndNBins (0, 100, 100);
800 
801  //
802  // TRD SM
803  //
804  if (year == 2011) ana->SetFirstSMCoveredByTRD( 6);
805  else if(year == 2012 ||
806  year == 2013) ana->SetFirstSMCoveredByTRD( 4);
807  else ana->SetFirstSMCoveredByTRD(-1);
808 
809  //
810  // MC histograms?
811  //
812  if(simulation) ana->SwitchOnDataMC() ;//Access MC stack and fill more histograms, AOD MC not implemented yet.
813  else ana->SwitchOffDataMC() ;
814 
815  //
816  // Debug
817  //
818  if(printSettings) ana->Print("");
819 
820  ana->SetDebug(debug); // 10 for lots of messages
821 }
822 
void SetEMCALNCellsPerClusterMin(Int_t n)
void SetHistoTrackMultiplicityRangeAndNBins(Int_t min, Int_t max, Int_t n)
virtual void SetDebug(Int_t d)
void SetNumberOfCellsFromPHOSBorder(Int_t n)
void SetTimeCut(Double_t min, Double_t max)
void SetHistoMassRangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void AddToHistogramsName(TString add)
void SwitchOnFillAllTrackMatchingHistogram()
void SetHistoXRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOnLoadOwnEMCALGeometryMatrices()
void SetEMCALM02Min(Float_t m02)
AliAnaClusterShapeCorrelStudies * ConfigureClusterShape(Bool_t tmPtDep, TString col, Bool_t simulation, TString calorimeter, Int_t year, Bool_t printSettings, Int_t debug)
virtual void SetCentralityBin(Int_t min, Int_t max)
AliEMCALRecoUtils * GetEMCALRecoUtils() const
void SwitchOffClusterELinearityCorrection()
void SetCTSPtMax(Float_t pt)
void SetHistoPtRangeAndNBins(Float_t min, Float_t max, Int_t n)
TSystem * gSystem
void SetEMCALEMin(Float_t en)
void AddAnalysis(TObject *ana, Int_t n)
Add analysis depending on AliAnaCaloTrackCorrBaseClass to list.
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)
void ana(anaModes mode=mLocal)
Definition: ana.C:990
Class for the Calorimeter QA analysis.
void SetHistodRRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetLocalMaximaCutEDiff(Float_t c)
void SwitchOnMCCrossSectionHistoFill()
Definition: AliAnaWeights.h:88
void SetNumberOfCellsFromEMCALBorder(Int_t n)
Bool_t IsBadChannelsRemovalSwitchedOn() const
const TString calorimeter
Definition: anaM.C:36
virtual void SetPtHardAndJetPtComparison(Bool_t compare)
Bool_t IsRecalibrationOn() const
Bool_t IsRecalibrationOn() const
Some utilities for cluster and cell treatment.
void SetHistoTrackResidualEtaRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOnMCCrossSectionFromEventHeader()
Definition: AliAnaWeights.h:90
virtual void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
void SetAnalysisCommonParameters(AliAnaCaloTrackCorrBaseClass *ana, TString calorimeter, Int_t year, TString col, Bool_t simulation, Bool_t printSettings, Int_t debug)
Class for event, clusters and tracks filtering and preparation for the AOD analysis.
AliAnaCalorimeterQA * ConfigureQAAnalysis(TString col, Bool_t simulation, TString calorimeter, Int_t year, Bool_t printSettings, Int_t debug)
void SetCTSPtMin(Float_t pt)
void SetEMCALDPhiCut(Float_t dcut)
Definition: AliCaloPID.h:221
void SwitchOffRecalculateClusterTrackMatching()
void SwitchOffVertexBCEventSelection()
AliAnalysisTaskCaloTrackCorrelation * AddTaskClusterShape(TString calorimeter="EMCAL", Bool_t simulation=kFALSE, TString collision="pp", TString period="", Int_t rejectEMCTrig=0, TString clustersArray="", Bool_t tender=kFALSE, Bool_t nonLinOn=kFALSE, Bool_t tmDep=kTRUE, Bool_t qaAn=kFALSE, TString outputfile="", Bool_t printSettings=kFALSE, Int_t debug=0, const char *trigSuffix="EMC7")
virtual void SetPtHardAndClusterPtFactor(Float_t factor)
virtual void SetCalorimeter(TString calo)
Set the calorimeter for the analysis. A string.
Base class for CaloTrackCorr analysis algorithms.
void SetHistoPtInConeRangeAndNBins(Float_t min, Float_t max, Int_t n)
Check EMCal trigger availability in period.
virtual void SetDebug(Int_t d)
void SetHistoPOverERangeAndNBins(Float_t min, Float_t max, Int_t n)
virtual void SetCentralityOpt(Int_t opt)
void SetHistoPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
int Int_t
Definition: External.C:63
virtual AliHistogramRanges * GetHistogramRanges()
unsigned int UInt_t
Definition: External.C:33
void SwitchOnDataControlHistograms(Int_t lev=1)
TString kAnaClusterShape
Global name to be composed of the settings, used to set the AOD branch name.
void SetHistoPtSumRangeAndNBins(Float_t min, Float_t max, Int_t n)
Bool_t IsBadChannelsRemovalSwitchedOn() const
void SetHistoTrackResidualPhiRangeAndNBins(Float_t min, Float_t max, Int_t n)
Class for cluster shape, cell T-Card correlation and exoticity.
void SetEMCALBadChannelMinDist(Float_t di)
void GetAlienGlobalProductionVariables(Bool_t &simulation, TString &col, TString &period, Int_t &year, Bool_t print=kFALSE)
void SetEMCALNCellsCut(Int_t nc)
virtual void SetPtHardAndClusterPtComparison(Bool_t compare)
void SetEMCALClusterListName(TString name)
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()
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 SetConstantTimeShift(Float_t shift)
virtual void SetZvertexCut(Float_t zcut=10.)
void SetNumberOfSuperModulesUsed(Int_t nSM)
UInt_t ConfigureAndGetEventTriggerMaskAndCaloTriggerString(TString trigger, Int_t year, TString &triggerString)
Class containing more common histogram axis types.
virtual void SetPtHardAndJetPtFactor(Float_t factor)
Class for event, clusters and tracks filtering and preparation for the ESD analysis.
virtual void SetEventPlaneMethod(TString m)
void SetPHOSEMin(Float_t en)
void SetReader(AliCaloTrackReader *re)
void SetHistoNClustersRangeAndNBins(Int_t min, Int_t max, Int_t n)
void SetEMCALCellAmpMin(Float_t amp)
virtual void SwitchOffFiducialCut()
virtual void SetCentralityClass(TString name)
void SwitchOnBadTriggerEventsRemoval()
AliCalorimeterUtils * ConfigureCaloUtils(TString col, Bool_t simulation, Bool_t tender, Bool_t nonLinOn, Int_t year, Bool_t printSettings, Int_t debug)
void SetHistoEtaRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SwitchOnClusterELinearityCorrection()
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)
void SwitchOnEMCTrackPtDepResMatching()
Definition: AliCaloPID.h:228
Main class conecting the CaloTrackCorrelations package and Analysis Frame.
void SwitchOffLoadOwnPHOSGeometryMatrices()
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)
void ConfigureEMCALRecoUtils(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)
Class for PID selection with calorimeters.
Definition: AliCaloPID.h:53
void SetFiredTriggerClassName(TString name)
void SetHistoShowerShapeRangeAndNBins(Float_t min, Float_t max, Int_t n)
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
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.
void SwitchOffEMCTrackPtDepResMatching()
Definition: AliCaloPID.h:229
AliCaloTrackReader * GetReader()
AliAnaWeights * GetWeightUtils()
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 SetEMCALDEtaCut(Float_t dcut)
Definition: AliCaloPID.h:218
void SwitchOffUseParametrizedTimeCut()
void SetLocalMaximaCutE(Float_t cut)
Get year, collision type, mc/data type and period from alien global variables.
Bool_t CheckActiveEMCalTriggerPerPeriod(Bool_t simulation, TString &trigger, TString period, Int_t year)
void SetHistoRatioRangeAndNBins(Float_t min, Float_t max, Int_t n)
void SetCaloUtils(AliCalorimeterUtils *cu)
Steering class of package CaloTrackCorrelartions.