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