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