AliPhysics  2aaea23 (2aaea23)
AliEmcalCorrectionCellBadChannel.cxx
Go to the documentation of this file.
1 // AliEmcalCorrectionCellBadChannel
2 //
3 
4 #include <TObjArray.h>
5 #include <TFile.h>
6 #include "AliEMCALGeometry.h"
7 #include "AliEMCALRecoUtils.h"
8 #include "AliAODEvent.h"
9 
11 
15 
16 // Actually registers the class with the base class
18 
23  AliEmcalCorrectionComponent("AliEmcalCorrectionCellBadChannel")
24  ,fCellEnergyDistBefore(0)
25  ,fCellEnergyDistAfter(0)
26 {
27 }
28 
33 {
34 }
35 
40 {
41  // Initialization
43 
44  AliWarning("Init EMCAL cell bad channel removal");
45 
46  // init reco utils
47  if (!fRecoUtils)
49 
51 
52  return kTRUE;
53 }
54 
59 {
61 
62  if (fCreateHisto){
63  fCellEnergyDistBefore = new TH1F("hCellEnergyDistBefore","hCellEnergyDistBefore;E_{cell} (GeV)",1000,0,10);
65  fCellEnergyDistAfter = new TH1F("hCellEnergyDistAfter","hCellEnergyDistAfter;E_{cell} (GeV)",1000,0,10);
67  }
68 }
69 
74 {
76 
77  if (!fEventManager.InputEvent()) {
78  AliError("Event ptr = 0, returning");
79  return kFALSE;
80  }
81 
83 
84  // CONFIGURE THE RECO UTILS -------------------------------------------------
85 
87 
88  // START PROCESSING ---------------------------------------------------------
89  // Test if cells present
90  if (fCaloCells->GetNumberOfCells()<=0)
91  {
92  AliWarning(Form("Number of EMCAL cells = %d, returning", fCaloCells->GetNumberOfCells()));
93  return kFALSE;
94  }
95 
96  // mark the cells not recalibrated
98 
99  if(fCreateHisto)
100  FillCellQA(fCellEnergyDistBefore); // "before" QA
101 
102  // CELL RECALIBRATION -------------------------------------------------------
103  // update cell objects
104  UpdateCells();
105 
106  if(fCreateHisto)
107  FillCellQA(fCellEnergyDistAfter); // "after" QA
108 
109  return kTRUE;
110 }
111 
117 {
119 
120  if (runChanged) {
121  // init bad channels
122  Int_t fInitBC = InitBadChannels();
123  if (fInitBC==0) {
124  AliError("InitBadChannels returned false, returning");
125  }
126  if (fInitBC==1) {
127  AliWarning("InitBadChannels OK");
128  }
129  if (fInitBC>1) {
130  AliWarning(Form("No external hot channel set: %d - %s", fEventManager.InputEvent()->GetRunNumber(), fFilepass.Data()));
131  }
132  }
133  return runChanged;
134 }
AliVCaloCells * fCaloCells
! Pointer to CaloCells
Some utilities for cluster and cell treatment.
AliEMCALRecoUtils * fRecoUtils
Pointer to RecoUtils.
int Int_t
Definition: External.C:63
Base class for correction components in the EMCal correction framework.
TH1F * fCellEnergyDistBefore
! cell energy distribution, before bad channel correction
static RegisterCorrectionComponent< AliEmcalCorrectionCellBadChannel > reg
TH1F * fCellEnergyDistAfter
! cell energy distribution, after bad channel correction
void SetPositionAlgorithm(Int_t alg)
TList * fOutput
! List of output histograms
Bool_t fCreateHisto
Flag to make some basic histograms.
Bad channel correction component in the EMCal correction framework.
AliEmcalCorrectionEventManager fEventManager
Minimal task which inherits from AliAnalysisTaskSE and manages access to the event.
bool Bool_t
Definition: External.C:53
TString fFilepass
Input data pass number.