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