1 #ifndef ALIANALYSISTASKEMCALCLUSTERIZEFAST_H
2 #define ALIANALYSISTASKEMCALCLUSTERIZEFAST_H
8 class AliEMCALCalibData;
9 class AliCaloCalibPedestal;
10 class AliEMCALClusterizer;
11 class AliEMCALAfterBurnerUF;
12 class AliEMCALRecParam;
13 class AliEMCALRecoUtils;
15 class AliEMCALGeometry;
17 #include "AliAnalysisTaskSE.h"
19 class AliAnalysisTaskEMCALClusterizeFast : public AliAnalysisTaskSE {
32 AliAnalysisTaskEMCALClusterizeFast();
33 AliAnalysisTaskEMCALClusterizeFast(const char *name);
34 virtual ~AliAnalysisTaskEMCALClusterizeFast();
37 virtual void UserCreateOutputObjects();
38 virtual void UserExec(Option_t *option);
40 Bool_t GetAttachClusters() const { return fAttachClusters ; }
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] ; }
50 const TString &GetCaloClustersName() const { return fCaloClustersName ; }
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 ; }
56 InputCellType GetInputCellType() const { return fInputCellType ; }
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 ; }
69 void SetSubBackground(Bool_t b) { fSubBackground = b ; }
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 ; }
75 void SetInputCellType(InputCellType ic) { fInputCellType = ic ; }
76 void SetTrackName(const char *n) { fTrackName = n ; }
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 ; }
83 void SetRejectExoticCells(Bool_t b) { fRejectExoticCells = b ; }
84 void SetFiducial(Bool_t b) { fFiducial = b ; }
85 void SetDoNonLinearity(Bool_t b) { fDoNonLinearity = b ; }
86 void SetRecalDistToBadChannels(Bool_t b) { fRecalDistToBadChannels = b ; }
87 void SetCellMCLabelFromCluster(Int_t s) { fSetCellMCLabelFromCluster = s ; }
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() ; }
98 Bool_t AcceptCell(Int_t cellNumber);
99 virtual void Clusterize();
100 virtual void FillDigitsArray();
102 virtual void RecPoints2Clusters(TClonesArray *clus);
103 virtual void UpdateCells();
104 virtual void UpdateClusters();
105 virtual void CalibrateClusters();
106 virtual void TrackClusterMatching(AliVCluster *c, TClonesArray *tarr);
107 virtual void CopyClusters(TClonesArray *orig, TClonesArray *dest);
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)
129 Bool_t fSubBackground; // subtract background if true (def=off)
130 Int_t fNPhi; // nPhi (for FixedWindowsClusterizer)
131 Int_t fNEta; // nEta (for FixedWinoswsClusterizer)
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)
135 InputCellType fInputCellType; // input cells type to make clusters
136 TString fTrackName; // if not null use track collection for track/cluster matching
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
143 Bool_t fRejectExoticCells; // reject exotic cells on-the-fly
144 Bool_t fFiducial; // fiducial cut
145 Bool_t fDoNonLinearity; // non linearity calib
146 Bool_t fRecalDistToBadChannels; // recalculate distance to bad channel
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
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
157 AliAnalysisTaskEMCALClusterizeFast(const AliAnalysisTaskEMCALClusterizeFast&); // not implemented
158 AliAnalysisTaskEMCALClusterizeFast &operator=(const AliAnalysisTaskEMCALClusterizeFast&); // not implemented
160 ClassDef(AliAnalysisTaskEMCALClusterizeFast, 9);
162 #endif //ALIANALYSISTASKEMCALCLUSTERIZEFAST_H