]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/EMCAL/AliAnalysisTaskEMCALClusterizeFast.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWG / EMCAL / AliAnalysisTaskEMCALClusterizeFast.h
CommitLineData
2f7259cf 1#ifndef ALIANALYSISTASKEMCALCLUSTERIZEFAST_H
2#define ALIANALYSISTASKEMCALCLUSTERIZEFAST_H
3
2f7259cf 4class TObjArray;
5class TClonesArray;
6class AliAODEvent;
7class AliESDEvent;
8class AliEMCALCalibData;
9class AliCaloCalibPedestal;
10class AliEMCALClusterizer;
11class AliEMCALAfterBurnerUF;
12class AliEMCALRecParam;
13class AliEMCALRecoUtils;
507f74bc 14class AliVCaloCells;
15class AliEMCALGeometry;
2f7259cf 16
17#include "AliAnalysisTaskSE.h"
18
19class AliAnalysisTaskEMCALClusterizeFast : public AliAnalysisTaskSE {
20 public:
3119d479 21 enum InputCellType {
22 kFEEData = 0,
507f74bc 23 kFEEDataMCOnly,
24 kFEEDataExcludeMC,
3119d479 25 kPattern,
26 kL0FastORs,
27 kL0FastORsTC,
28 kL1FastORs
29 };
30
31
2431b20f 32 AliAnalysisTaskEMCALClusterizeFast();
33 AliAnalysisTaskEMCALClusterizeFast(const char *name);
2f7259cf 34 virtual ~AliAnalysisTaskEMCALClusterizeFast();
35
36 public:
37 virtual void UserCreateOutputObjects();
38 virtual void UserExec(Option_t *option);
39
5133b922 40 Bool_t GetAttachClusters() const { return fAttachClusters ; }
5133b922 41 Bool_t GetSubBackground() const { return fSubBackground ; }
42 const TObjArray *GetClusters() const { return fClusterArr ; }
43 const TClonesArray *GetDigits() const { return fDigitsArr ; }
44 const TString &GeometryName() const { return fGeomName ; }
45 AliEMCALRecParam *GetRecParam() const { return fRecParam ; }
46 AliEMCALRecoUtils *GetRecoUtils() const { return fRecoUtils ; }
47 AliEMCALCalibData *GetCalibData() const { return fCalibData ; }
48 AliCaloCalibPedestal *GetPedData() const { return fPedestalData ; }
49 TGeoHMatrix *GetGeometryMatrix(Int_t i) const { return fGeomMatrix[i] ; }
507f74bc 50 const TString &GetCaloClustersName() const { return fCaloClustersName ; }
5133b922 51 Int_t GetnPhi() const { return fNPhi ; }
52 Int_t GetnEta() const { return fNEta ; }
53 Int_t GetShiftPhi() const { return fShiftPhi ; }
54 Int_t GetShiftEta() const { return fShiftEta ; }
55 Bool_t GetTRUShift() const { return fTRUShift ; }
3119d479 56 InputCellType GetInputCellType() const { return fInputCellType ; }
5133b922 57 void JustUnfold(Bool_t yesno) { fJustUnfold = yesno ; }
58 void LoadOwnGeometryMatrices(Bool_t b) { fLoadGeomMatrices = b ; }
59 void SetAODBranchName(const char *name) { fOutputAODBrName = name ; }
60 void SetAttachClusters(Bool_t b) { fAttachClusters = b ; }
61 void SetCalibData(AliEMCALCalibData *d) { fCalibData = d ; }
62 void SetEMCALRecoUtils(AliEMCALRecoUtils *ru) { fRecoUtils = ru ; }
63 void SetGeometryMatrix(TGeoHMatrix* m, Int_t i) { fGeomMatrix[i] = m ; }
64 void SetGeometryName(const char *name) { fGeomName = name ; }
65 void SetLoadCalib(Bool_t b) { fLoadCalib = b ; }
66 void SetLoadPed(Bool_t b) { fLoadPed = b ; }
67 void SetOCDBPath(const char *path) { fOCDBpath = path ; }
68 void SetPedestalData(AliCaloCalibPedestal *d) { fPedestalData = d ; }
5133b922 69 void SetSubBackground(Bool_t b) { fSubBackground = b ; }
5133b922 70 void SetnPhi(Int_t n) { fNPhi = n ; }
71 void SetnEta(Int_t n) { fNEta = n ; }
72 void SetShiftPhi(Int_t n) { fShiftPhi = n ; }
73 void SetShiftEta(Int_t n) { fShiftEta = n ; }
74 void SetTRUShift(Bool_t yes) { fTRUShift = yes ; }
3119d479 75 void SetInputCellType(InputCellType ic) { fInputCellType = ic ; }
0408f54f 76 void SetTrackName(const char *n) { fTrackName = n ; }
507f74bc 77 void SetCaloClustersName(const char *name) { fCaloClustersName = name ; }
78 void SetCaloCellsName(const char *name) { fCaloCellsName = name ; }
79 void SetUpdateCells(Bool_t b) { fDoUpdateCells = b ; }
80 void SetClusterize(Bool_t b) { fDoClusterize = b ; }
81 void SetClusterBadChannelCheck(Bool_t b) { fClusterBadChannelCheck = b ; }
82 void SetRejectExoticClusters(Bool_t b) { fRejectExoticClusters = b ; }
eff32c61 83 void SetRejectExoticCells(Bool_t b) { fRejectExoticCells = b ; }
507f74bc 84 void SetFiducial(Bool_t b) { fFiducial = b ; }
85 void SetDoNonLinearity(Bool_t b) { fDoNonLinearity = b ; }
86 void SetRecalDistToBadChannels(Bool_t b) { fRecalDistToBadChannels = b ; }
815024bb 87 void SetCellMCLabelFromCluster(Int_t s) { fSetCellMCLabelFromCluster = s ; }
2f7259cf 88
507f74bc 89 // For backward compatibility
90 const TString &GetNewClusterArrayName() const { return GetCaloClustersName() ; }
91 void SetNewClusterArrayName(const char *name) { SetCaloClustersName(name) ; }
92 void SetOverwrite(Bool_t b) { if (b) SetCaloClustersName(""); else SetCaloClustersName("newCaloClusters");}
93 void SetRecalibrateCellsOnly(Bool_t b) { if (b) { SetUpdateCells(kTRUE); SetClusterize(kFALSE);} else { SetClusterize(kTRUE); } }
94 Bool_t GetRecalibrateOnly() const { return (Bool_t)(fDoUpdateCells && !fDoClusterize); }
95 Bool_t GetOverwrite() const { return fCaloClustersName.IsNull() ; }
96
5c5b84d6 97 protected:
eff32c61 98 Bool_t AcceptCell(Int_t cellNumber);
fa2d8807 99 virtual void Clusterize();
100 virtual void FillDigitsArray();
101 virtual void Init();
102 virtual void RecPoints2Clusters(TClonesArray *clus);
fa2d8807 103 virtual void UpdateCells();
104 virtual void UpdateClusters();
507f74bc 105 virtual void CalibrateClusters();
106 virtual void TrackClusterMatching(AliVCluster *c, TClonesArray *tarr);
107 virtual void CopyClusters(TClonesArray *orig, TClonesArray *dest);
2f7259cf 108
7a7d5a64 109 Int_t fRun; //!run number
110 TClonesArray *fDigitsArr; //!digits array
111 TObjArray *fClusterArr; //!recpoints array
112 AliEMCALRecParam *fRecParam; // reconstruction parameters container
113 AliEMCALClusterizer *fClusterizer; //!clusterizer
114 AliEMCALAfterBurnerUF *fUnfolder; //!unfolding procedure
115 Bool_t fJustUnfold; // just unfold, do not recluster
116 TString fGeomName; // name of geometry to use.
117 Bool_t fGeomMatrixSet; // set geometry matrices only once, for the first event.
118 Bool_t fLoadGeomMatrices; // matrices from configuration, not geometry.root nor ESDs/AODs
119 TGeoHMatrix *fGeomMatrix[12]; // geometry matrices with alignments
120 TString fOCDBpath; // path with OCDB location
121 AliEMCALCalibData *fCalibData; // EMCAL calib data
122 AliCaloCalibPedestal *fPedestalData; // EMCAL pedestal
123 TClonesArray *fOutputAODBranch; //!AOD Branch with output clusters
124 TString fOutputAODBrName; // output AOD branch name (none by default)
125 AliEMCALRecoUtils *fRecoUtils; // access to factorized reconstruction algorithms
126 Bool_t fLoadCalib; // access calib object from OCDB (def=off)
127 Bool_t fLoadPed; // access ped object from OCDB (def=off)
128 Bool_t fAttachClusters; // attach clusters to input event (AOD or ESD)
7a7d5a64 129 Bool_t fSubBackground; // subtract background if true (def=off)
7a7d5a64 130 Int_t fNPhi; // nPhi (for FixedWindowsClusterizer)
131 Int_t fNEta; // nEta (for FixedWinoswsClusterizer)
0408f54f 132 Int_t fShiftPhi; // shift in phi (for FixedWindowsClusterizer)
133 Int_t fShiftEta; // shift in eta (for FixedWindowsClusterizer)
134 Bool_t fTRUShift; // shifting inside a TRU (true) or through the whole calorimeter (false) (for FixedWindowsClusterizer)
3119d479 135 InputCellType fInputCellType; // input cells type to make clusters
0408f54f 136 TString fTrackName; // if not null use track collection for track/cluster matching
507f74bc 137 TString fCaloCellsName; // name of calo cells object
138 TString fCaloClustersName; // name of calo cluster collection
139 Bool_t fDoUpdateCells; // recalibrate cells
140 Bool_t fDoClusterize; // clusterize
141 Bool_t fClusterBadChannelCheck; // cluster bad channel check
142 Bool_t fRejectExoticClusters; // reject exotic cluster
eff32c61 143 Bool_t fRejectExoticCells; // reject exotic cells on-the-fly
507f74bc 144 Bool_t fFiducial; // fiducial cut
145 Bool_t fDoNonLinearity; // non linearity calib
146 Bool_t fRecalDistToBadChannels; // recalculate distance to bad channel
815024bb 147 Int_t fSetCellMCLabelFromCluster; // Use cluster MC label as cell label:
148 // 0 - get the MC label stored in cells (not available for productions done with aliroot < v5-02-Rev09)
149 // 1 - assign to the cell the MC label of the cluster
507f74bc 150 AliVCaloCells *fCaloCells; //!calo cells object
151 TClonesArray *fCaloClusters; //!calo clusters array
152 AliESDEvent *fEsd; //!esd event
153 AliAODEvent *fAod; //!aod event
154 AliEMCALGeometry *fGeom; //!geometry object
10d33986 155
5c5b84d6 156 private:
157 AliAnalysisTaskEMCALClusterizeFast(const AliAnalysisTaskEMCALClusterizeFast&); // not implemented
158 AliAnalysisTaskEMCALClusterizeFast &operator=(const AliAnalysisTaskEMCALClusterizeFast&); // not implemented
159
507f74bc 160 ClassDef(AliAnalysisTaskEMCALClusterizeFast, 9);
2f7259cf 161};
162#endif //ALIANALYSISTASKEMCALCLUSTERIZEFAST_H