]>
Commit | Line | Data |
---|---|---|
37d2296c | 1 | #ifndef ALIANALYSISTASKEMCALCLUSTERIZE_H |
2 | #define ALIANALYSISTASKEMCALCLUSTERIZE_H | |
3 | ||
4 | // This analysis provides a new list of clusters to be used in other analysis | |
5 | // Author: Gustavo Conesa Balbastre, | |
6 | // Adapted from analysis class from Deepa Thomas | |
7 | ||
8 | //Root | |
9 | class TTree; | |
10 | class TClonesArray; | |
11 | ||
12 | //EMCAL | |
13 | class AliEMCALGeometry; | |
14 | class AliEMCALCalibData; | |
15 | class AliCaloCalibPedestal; | |
16 | class AliEMCALClusterizer; | |
17 | class AliEMCALAfterBurnerUF; | |
3769e0cb | 18 | #include "AliEMCALRecParam.h" |
19 | #include "AliEMCALRecoUtils.h" | |
37d2296c | 20 | |
21 | ||
22 | #include "AliAnalysisTaskSE.h" | |
23 | ||
24 | class AliAnalysisTaskEMCALClusterize : public AliAnalysisTaskSE { | |
25 | public: | |
26 | AliAnalysisTaskEMCALClusterize(); | |
27 | AliAnalysisTaskEMCALClusterize(const char *name); | |
28 | virtual ~AliAnalysisTaskEMCALClusterize(); | |
29 | ||
37d2296c | 30 | virtual void UserCreateOutputObjects(); |
31 | virtual void UserExec(Option_t *option); | |
32 | virtual void Init(); | |
33 | virtual void LocalInit() { Init() ; } | |
6544055e | 34 | |
35 | // Event methods, settings | |
36 | void CheckAndGetEvent(); | |
37 | ||
38 | Bool_t IsExoticEvent(); | |
39 | void SwitchOnExoticEventsRemoval() { fRemoveExoticEvents= kTRUE ; } | |
40 | void SwitchOffExoticEventsRemoval() { fRemoveExoticEvents= kFALSE ; } | |
41 | ||
3769e0cb | 42 | Bool_t IsLEDEvent(const Int_t run); |
6544055e | 43 | void SwitchOnLEDEventsRemoval() { fRemoveLEDEvents = kTRUE ; } |
44 | void SwitchOffLEDEventsRemoval() { fRemoveLEDEvents = kFALSE ; } | |
e9dd2d80 | 45 | |
46 | //OCDB | |
37d2296c | 47 | Bool_t AccessOCDB(); |
d390e7cb | 48 | void SwitchOnAccessOCDB() { fAccessOCDB = kTRUE ; } |
49 | void SwitchOffAccessOCDB() { fAccessOCDB = kFALSE ; } | |
50 | void SetOCDBPath(const char *path) { fOCDBpath = path ; } | |
37d2296c | 51 | |
52 | //Geometry methods | |
6544055e | 53 | void InitGeometry(); |
37d2296c | 54 | void SetGeometryName(TString &name) { fGeomName = name ; } |
55 | TString GeometryName() const { return fGeomName ; } | |
56 | void SwitchOnLoadOwnGeometryMatrices() { fLoadGeomMatrices = kTRUE ; } | |
57 | void SwitchOffLoadOwnGeometryMatrices() { fLoadGeomMatrices = kFALSE ; } | |
58 | void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fGeomMatrix[i] = m ; } | |
59 | ||
9ac44255 | 60 | void SetImportGeometryFromFile(Bool_t im, |
3769e0cb | 61 | TString pa = "") { fImportGeometryFromFile = im ; |
9ac44255 | 62 | fImportGeometryFilePath = pa ; } |
63 | ||
37d2296c | 64 | //AOD methods |
65 | void SetAODBranchName(TString &name) { fOutputAODBranchName = name ; } | |
66 | void FillAODFile(Bool_t yesno) { fFillAODFile = yesno ; } | |
1f77507b | 67 | void FillAODCaloCells(); |
68 | void FillAODHeader(); | |
d390e7cb | 69 | void SwitchOnFillAODHeader() { fFillAODHeader = kTRUE ; } |
70 | void SwitchOffFillAODHeader() { fFillAODHeader = kFALSE ; } | |
71 | void SwitchOnFillAODCaloCells() { fFillAODCaloCells = kTRUE ; } | |
72 | void SwitchOffFillAODCaloCells() { fFillAODCaloCells = kFALSE ; } | |
37d2296c | 73 | |
74 | //Algorithms settings | |
3769e0cb | 75 | |
76 | AliEMCALRecParam * GetRecParam() { if(!fRecParam) fRecParam = new AliEMCALRecParam ; | |
77 | return fRecParam ; } | |
78 | ||
79 | AliEMCALRecoUtils* GetRecoUtils() { if(!fRecoUtils) fRecoUtils = new AliEMCALRecoUtils ; | |
80 | return fRecoUtils ; } | |
81 | ||
37d2296c | 82 | void InitClusterization(); |
6544055e | 83 | void ClusterizeCells(); |
84 | void ClusterUnfolding(); | |
85 | void JustUnfold(Bool_t yesno) { fJustUnfold = yesno ; } | |
3769e0cb | 86 | |
d390e7cb | 87 | void SetConfigFileName(TString name) { fConfigName = name ; } |
88 | void SetMaxEvent(Int_t max) { fMaxEvent = max ; } | |
37d2296c | 89 | |
d390e7cb | 90 | void SwitchOnTrackMatching() { fDoTrackMatching = kTRUE ; } |
91 | void SwitchOffTrackMatching() { fDoTrackMatching = kFALSE ; } | |
92 | ||
93 | // Cell selection after unfolding | |
94 | void SwitchOnCellEnergySelection() { fSelectCell = kTRUE ; } | |
95 | void SwitchOffCellEnergySelection() { fSelectCell = kFALSE ; } | |
96 | void SetCellCuts(Float_t e, Float_t frac) { fSelectCellMinE = e ; | |
6544055e | 97 | fSelectCellMinFrac = frac ; } |
3769e0cb | 98 | // OADB options settings |
99 | ||
100 | void AccessOADB() ; | |
101 | ||
102 | TString GetPass() ; | |
103 | ||
104 | void SwitchOnEMCALOADB() { fAccessOCDB = kTRUE ; } | |
105 | void SwitchOffEMCALOADB() { fAccessOCDB = kFALSE ; } | |
106 | ||
107 | void SetOADBFilePath(TString path) { fOADBFilePath = path ; } | |
cb3001b9 | 108 | |
37d2296c | 109 | private: |
110 | ||
b43bdd14 | 111 | virtual void FillCaloClusterInAOD(); |
112 | ||
113 | virtual void RecPoints2Clusters(); | |
114 | ||
37d2296c | 115 | |
6544055e | 116 | AliVEvent *fEvent; // Event |
117 | ||
37d2296c | 118 | //Geometry |
6544055e | 119 | AliEMCALGeometry *fGeom; // EMCAL geometry |
120 | TString fGeomName; // Name of geometry to use. | |
e3990982 | 121 | TGeoHMatrix *fGeomMatrix[12]; // Geometry matrices with alignments |
6544055e | 122 | Bool_t fGeomMatrixSet; // Set geometry matrices only once, for the first event. |
123 | Bool_t fLoadGeomMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs | |
37d2296c | 124 | |
125 | //OCDB | |
6544055e | 126 | AliEMCALCalibData *fCalibData; // EMCAL calib data |
127 | AliCaloCalibPedestal *fPedestalData; // EMCAL pedestal | |
128 | TString fOCDBpath; // Path with OCDB location | |
129 | Bool_t fAccessOCDB; // Need to access info from OCDB (not really) | |
37d2296c | 130 | |
131 | //Temporal arrays | |
6544055e | 132 | TClonesArray *fDigitsArr; //-> Digits array |
133 | TObjArray *fClusterArr; //-> Recpoints array | |
134 | TObjArray *fCaloClusterArr; //-> CaloClusters array | |
37d2296c | 135 | |
136 | //Clusterizers | |
6544055e | 137 | AliEMCALRecParam *fRecParam; // Reconstruction parameters container |
138 | AliEMCALClusterizer *fClusterizer; //! EMCAL clusterizer | |
139 | AliEMCALAfterBurnerUF *fUnfolder; //! Unfolding procedure | |
140 | Bool_t fJustUnfold; // Just unfold, do not recluster | |
37d2296c | 141 | |
142 | //AOD | |
6544055e | 143 | TClonesArray *fOutputAODBranch; //! AOD Branch with output clusters |
144 | TString fOutputAODBranchName; // New of output AOD branch | |
145 | Bool_t fFillAODFile; // Fill the output AOD file with the new clusters, | |
146 | // if not they will be only available for the event they were generated | |
147 | Bool_t fFillAODHeader; // Copy header to standard branch | |
148 | Bool_t fFillAODCaloCells; // Copy calocells to standard branch | |
149 | ||
150 | Int_t fRun; //!run number | |
37d2296c | 151 | |
6544055e | 152 | AliEMCALRecoUtils* fRecoUtils; // Access to factorized reconstruction algorithms |
153 | TString fConfigName; // Name of analysis configuration file | |
37d2296c | 154 | |
155 | Int_t fCellLabels[12672]; // Array with MC label to be passed to digit. | |
156 | Int_t fCellSecondLabels[12672]; // Array with Second MC label to be passed to digit. | |
a39f5b70 | 157 | Double_t fCellTime[12672]; // Array with cluster time to be passed to digit in case of AODs |
adad4ea9 | 158 | Float_t fCellMatchdEta[12672]; // Array with cluster-track dPhi |
159 | Float_t fCellMatchdPhi[12672]; // Array with cluster-track dEta | |
a39f5b70 | 160 | |
6544055e | 161 | Int_t fMaxEvent; // Set a maximum event |
1f77507b | 162 | |
6544055e | 163 | Bool_t fDoTrackMatching; // On/Off the matching recalulation to speed up analysis in PbPb |
164 | Bool_t fSelectCell; // Reject cells from cluster if energy is too low and recalculate position/energy and other | |
165 | Float_t fSelectCellMinE; // Min energy cell threshold, after unfolding | |
166 | Float_t fSelectCellMinFrac; // Min fraction of cell energy after unfolding cut | |
167 | Bool_t fRemoveLEDEvents; // Remove LED events, use only for LHC11a | |
168 | Bool_t fRemoveExoticEvents; // Remove exotic events | |
cb3001b9 | 169 | |
9ac44255 | 170 | Bool_t fImportGeometryFromFile; // Import geometry settings in geometry.root file |
171 | TString fImportGeometryFilePath; // path fo geometry.root file | |
172 | ||
3769e0cb | 173 | Bool_t fOADBSet ; // AODB parameters already set |
174 | Bool_t fAccessOADB ; // Get calibration from OADB for EMCAL | |
175 | TString fOADBFilePath ; // Default path $ALICE_ROOT/OADB/EMCAL, if needed change | |
176 | ||
177 | ||
a1eeb25d | 178 | AliAnalysisTaskEMCALClusterize( const AliAnalysisTaskEMCALClusterize&); // not implemented |
179 | AliAnalysisTaskEMCALClusterize& operator=(const AliAnalysisTaskEMCALClusterize&); // not implemented | |
180 | ||
b43bdd14 | 181 | ClassDef(AliAnalysisTaskEMCALClusterize, 20); |
d390e7cb | 182 | |
37d2296c | 183 | }; |
184 | ||
185 | #endif //ALIANALYSISTASKEMCALCLUSTERIZE_H |