AliPhysics  7c9d977 (7c9d977)
AliAnalysisTaskEMCALClusterizeFast.h
Go to the documentation of this file.
1 #ifndef ALIANALYSISTASKEMCALCLUSTERIZEFAST_H
2 #define ALIANALYSISTASKEMCALCLUSTERIZEFAST_H
3 
4 //_________________________________________________________________________
15 //_________________________________________________________________________
16 
17 class TObjArray;
18 class TClonesArray;
19 class AliAODEvent;
20 class AliESDEvent;
21 class AliEMCALCalibData;
22 class AliCaloCalibPedestal;
23 class AliEMCALClusterizer;
24 class AliEMCALAfterBurnerUF;
25 class AliEMCALRecParam;
26 class AliEMCALRecoUtils;
27 class AliVCaloCells;
28 class AliEMCALGeometry;
29 
30 #include "AliEMCALGeoParams.h"
31 
32 #include "AliAnalysisTaskSE.h"
33 
35  public:
37  kFEEData = 0,
44  };
45 
46 
48  AliAnalysisTaskEMCALClusterizeFast(const char *name);
50 
51  public:
52  virtual void UserCreateOutputObjects();
53  virtual void UserExec(Option_t *option);
54 
56  Bool_t GetSubBackground() const { return fSubBackground ; }
57  const TObjArray *GetClusters() const { return fClusterArr ; }
58  const TClonesArray *GetDigits() const { return fDigitsArr ; }
59  const TString &GeometryName() const { return fGeomName ; }
60  AliEMCALRecParam *GetRecParam() const { return fRecParam ; }
62  AliEMCALCalibData *GetCalibData() const { return fCalibData ; }
63  AliCaloCalibPedestal *GetPedData() const { return fPedestalData ; }
64  TGeoHMatrix *GetGeometryMatrix(Int_t i) const { return fGeomMatrix[i] ; }
65  const TString &GetCaloClustersName() const { return fCaloClustersName ; }
66  Int_t GetnPhi() const { return fNPhi ; }
67  Int_t GetnEta() const { return fNEta ; }
68  Int_t GetShiftPhi() const { return fShiftPhi ; }
69  Int_t GetShiftEta() const { return fShiftEta ; }
70  Bool_t GetTRUShift() const { return fTRUShift ; }
72  void JustUnfold(Bool_t yesno) { fJustUnfold = yesno ; }
74  void SetAODBranchName(const char *name) { fOutputAODBrName = name ; }
76  void SetCalibData(AliEMCALCalibData *d) { fCalibData = d ; }
78  void SetGeometryMatrix(TGeoHMatrix* m, Int_t i) { fGeomMatrix[i] = m ; }
79  void SetGeometryName(const char *name) { fGeomName = name ; }
80  void SetLoadCalib(Bool_t b) { fLoadCalib = b ; }
81  void SetLoadPed(Bool_t b) { fLoadPed = b ; }
82  void SetOCDBPath(const char *path) { fOCDBpath = path ; }
83  void SetPedestalData(AliCaloCalibPedestal *d) { fPedestalData = d ; }
85  void SetnPhi(Int_t n) { fNPhi = n ; }
86  void SetnEta(Int_t n) { fNEta = n ; }
87  void SetShiftPhi(Int_t n) { fShiftPhi = n ; }
88  void SetShiftEta(Int_t n) { fShiftEta = n ; }
89  void SetTRUShift(Bool_t yes) { fTRUShift = yes ; }
91  void SetTrackName(const char *n) { fTrackName = n ; }
92  void SetCaloClustersName(const char *name) { fCaloClustersName = name ; }
93  void SetCaloCellsName(const char *name) { fCaloCellsName = name ; }
99  void SetFiducial(Bool_t b) { fFiducial = b ; }
103 
104  // For backward compatibility
105  const TString &GetNewClusterArrayName() const { return GetCaloClustersName() ; }
106  void SetNewClusterArrayName(const char *name) { SetCaloClustersName(name) ; }
107  void SetOverwrite(Bool_t b) { if (b) SetCaloClustersName(""); else SetCaloClustersName("newCaloClusters");}
108  void SetRecalibrateCellsOnly(Bool_t b) { if (b) { SetUpdateCells(kTRUE); SetClusterize(kFALSE);} else { SetClusterize(kTRUE); } }
110  Bool_t GetOverwrite() const { return fCaloClustersName.IsNull() ; }
111 
112  protected:
113  Bool_t AcceptCell(Int_t cellNumber);
114  virtual void Clusterize();
115  virtual void FillDigitsArray();
116  virtual void Init();
117  virtual void RecPoints2Clusters(TClonesArray *clus);
118  virtual void UpdateCells();
119  virtual void UpdateClusters();
120  virtual void CalibrateClusters();
121  virtual void TrackClusterMatching(AliVCluster *c, TClonesArray *tarr);
122  virtual void CopyClusters(TClonesArray *orig, TClonesArray *dest);
123 
125  TClonesArray *fDigitsArr;
127  AliEMCALRecParam *fRecParam; // reconstruction parameters container
128  AliEMCALClusterizer *fClusterizer;
129  AliEMCALAfterBurnerUF *fUnfolder;
130  Bool_t fJustUnfold; // just unfold, do not recluster
131  TString fGeomName; // name of geometry to use.
132  Bool_t fGeomMatrixSet; // set geometry matrices only once, for the first event.
133  Bool_t fLoadGeomMatrices; // matrices from configuration, not geometry.root nor ESDs/AODs
134  TGeoHMatrix *fGeomMatrix[AliEMCALGeoParams::fgkEMCALModules]; // geometry matrices with alignments
135  TString fOCDBpath; // path with OCDB location
136  AliEMCALCalibData *fCalibData; // EMCAL calib data
137  AliCaloCalibPedestal *fPedestalData; // EMCAL pedestal
138  TClonesArray *fOutputAODBranch;
139  TString fOutputAODBrName; // output AOD branch name (none by default)
140  AliEMCALRecoUtils *fRecoUtils; // access to factorized reconstruction algorithms
141  Bool_t fLoadCalib; // access calib object from OCDB (def=off)
142  Bool_t fLoadPed; // access ped object from OCDB (def=off)
143  Bool_t fAttachClusters; // attach clusters to input event (AOD or ESD)
144  Bool_t fSubBackground; // subtract background if true (def=off)
145  Int_t fNPhi; // nPhi (for FixedWindowsClusterizer)
146  Int_t fNEta; // nEta (for FixedWinoswsClusterizer)
147  Int_t fShiftPhi; // shift in phi (for FixedWindowsClusterizer)
148  Int_t fShiftEta; // shift in eta (for FixedWindowsClusterizer)
149  Bool_t fTRUShift; // shifting inside a TRU (true) or through the whole calorimeter (false) (for FixedWindowsClusterizer)
150  InputCellType fInputCellType; // input cells type to make clusters
151  TString fTrackName; // if not null use track collection for track/cluster matching
152  TString fCaloCellsName; // name of calo cells object
153  TString fCaloClustersName; // name of calo cluster collection
154  Bool_t fDoUpdateCells; // recalibrate cells
155  Bool_t fDoClusterize; // clusterize
156  Bool_t fClusterBadChannelCheck; // cluster bad channel check
157  Bool_t fRejectExoticClusters; // reject exotic cluster
158  Bool_t fRejectExoticCells; // reject exotic cells on-the-fly
159  Bool_t fFiducial; // fiducial cut
160  Bool_t fDoNonLinearity; // non linearity calib
161  Bool_t fRecalDistToBadChannels; // recalculate distance to bad channel
162 
163  // MC labels
164  static const Int_t fgkTotalCellNumber = 17664 ; // Maximum number of cells in EMCAL/DCAL: (48*24)*(10+4/3.+6*2/3.)
165 
166  Int_t fOrgClusterCellId[fgkTotalCellNumber]; // Array ID of cluster to wich the cell belongs in unmodified clusters.
167  Int_t fCellLabels [fgkTotalCellNumber]; // Array with MC label/map
168 
169  Int_t fSetCellMCLabelFromCluster; // Use cluster MC label as cell label:
170  // 0 - get the MC label stored in cells (not available for productions done with aliroot < v5-02-Rev09)
171  // 1 - assign to the cell the MC label of the cluster
172 
173  Bool_t fSetCellMCLabelFromEdepFrac; // For MC generated with aliroot > v5-07-21, check the EDep information
174  // stored in ESDs/AODs to set the cell MC labels
175 
176  AliVCaloCells *fCaloCells;
177  TClonesArray *fCaloClusters;
180  AliEMCALGeometry *fGeom;
181 
182  private:
185 
187 };
188 #endif //ALIANALYSISTASKEMCALCLUSTERIZEFAST_H
TString fOutputAODBrName
AOD Branch with output clusters.
AliAnalysisTaskEMCALClusterizeFast & operator=(const AliAnalysisTaskEMCALClusterizeFast &)
TCanvas * c
Definition: TestFitELoss.C:172
AliEMCALAfterBurnerUF * fUnfolder
clusterizer
Some utilities for cluster and cell treatment.
virtual void TrackClusterMatching(AliVCluster *c, TClonesArray *tarr)
int Int_t
Definition: External.C:63
virtual void CopyClusters(TClonesArray *orig, TClonesArray *dest)
TGeoHMatrix * fGeomMatrix[AliEMCALGeoParams::fgkEMCALModules]
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53