1 #ifndef ALIANALYSISTASKEMCALCLUSTERIZE_H
2 #define ALIANALYSISTASKEMCALCLUSTERIZE_H
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
13 class AliEMCALGeometry;
14 class AliEMCALCalibData;
15 class AliCaloCalibPedestal;
16 class AliEMCALClusterizer;
17 class AliEMCALAfterBurnerUF;
18 #include "AliEMCALRecParam.h"
19 #include "AliEMCALRecoUtils.h"
22 #include "AliAnalysisTaskSE.h"
24 class AliAnalysisTaskEMCALClusterize : public AliAnalysisTaskSE {
26 AliAnalysisTaskEMCALClusterize();
27 AliAnalysisTaskEMCALClusterize(const char *name);
28 virtual ~AliAnalysisTaskEMCALClusterize();
30 virtual void UserCreateOutputObjects();
31 virtual void UserExec(Option_t *option);
33 virtual void LocalInit() { Init() ; }
35 // Event methods, settings
36 void CheckAndGetEvent();
38 Bool_t IsExoticEvent();
39 void SwitchOnExoticEventsRemoval() { fRemoveExoticEvents= kTRUE ; }
40 void SwitchOffExoticEventsRemoval() { fRemoveExoticEvents= kFALSE ; }
42 Bool_t IsLEDEvent(const Int_t run);
43 void SwitchOnLEDEventsRemoval() { fRemoveLEDEvents = kTRUE ; }
44 void SwitchOffLEDEventsRemoval() { fRemoveLEDEvents = kFALSE ; }
48 void SwitchOnAccessOCDB() { fAccessOCDB = kTRUE ; }
49 void SwitchOffAccessOCDB() { fAccessOCDB = kFALSE ; }
50 void SetOCDBPath(const char *path) { fOCDBpath = path ; }
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 ; }
60 void SetImportGeometryFromFile(Bool_t im,
61 TString pa = "") { fImportGeometryFromFile = im ;
62 fImportGeometryFilePath = pa ; }
65 void SetAODBranchName(TString &name) { fOutputAODBranchName = name ; }
66 void FillAODFile(Bool_t yesno) { fFillAODFile = yesno ; }
67 void FillAODCaloCells();
69 void SwitchOnFillAODHeader() { fFillAODHeader = kTRUE ; }
70 void SwitchOffFillAODHeader() { fFillAODHeader = kFALSE ; }
71 void SwitchOnFillAODCaloCells() { fFillAODCaloCells = kTRUE ; }
72 void SwitchOffFillAODCaloCells() { fFillAODCaloCells = kFALSE ; }
76 AliEMCALRecParam * GetRecParam() { if(!fRecParam) fRecParam = new AliEMCALRecParam ;
79 AliEMCALRecoUtils* GetRecoUtils() { if(!fRecoUtils) fRecoUtils = new AliEMCALRecoUtils ;
82 void InitClusterization();
83 void ClusterizeCells();
84 void ClusterUnfolding();
85 void JustUnfold(Bool_t yesno) { fJustUnfold = yesno ; }
87 void SetConfigFileName(TString name) { fConfigName = name ; }
88 void SetMaxEvent(Int_t max) { fMaxEvent = max ; }
90 void SwitchOnTrackMatching() { fDoTrackMatching = kTRUE ; }
91 void SwitchOffTrackMatching() { fDoTrackMatching = kFALSE ; }
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 ;
97 fSelectCellMinFrac = frac ; }
98 // OADB options settings
104 void SwitchOnEMCALOADB() { fAccessOCDB = kTRUE ; }
105 void SwitchOffEMCALOADB() { fAccessOCDB = kFALSE ; }
107 void SetOADBFilePath(TString path) { fOADBFilePath = path ; }
111 virtual void FillCaloClusterInAOD();
113 virtual void RecPoints2Clusters();
116 AliVEvent *fEvent; // Event
119 AliEMCALGeometry *fGeom; // EMCAL geometry
120 TString fGeomName; // Name of geometry to use.
121 TGeoHMatrix *fGeomMatrix[12]; // Geometry matrices with alignments
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
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)
132 TClonesArray *fDigitsArr; //! Digits array
133 TObjArray *fClusterArr; //! Recpoints array
134 TObjArray *fCaloClusterArr; //-> CaloClusters array
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
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
150 Int_t fRun; // run number
152 AliEMCALRecoUtils* fRecoUtils; // Access to factorized reconstruction algorithms
153 TString fConfigName; // Name of analysis configuration file
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.
157 Double_t fCellTime[12672]; // Array with cluster time to be passed to digit in case of AODs
158 Float_t fCellMatchdEta[12672]; // Array with cluster-track dPhi
159 Float_t fCellMatchdPhi[12672]; // Array with cluster-track dEta
161 Int_t fMaxEvent; // Set a maximum event
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
170 Bool_t fImportGeometryFromFile; // Import geometry settings in geometry.root file
171 TString fImportGeometryFilePath; // path fo geometry.root file
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
178 AliAnalysisTaskEMCALClusterize( const AliAnalysisTaskEMCALClusterize&); // not implemented
179 AliAnalysisTaskEMCALClusterize& operator=(const AliAnalysisTaskEMCALClusterize&); // not implemented
181 ClassDef(AliAnalysisTaskEMCALClusterize, 20);
185 #endif //ALIANALYSISTASKEMCALCLUSTERIZE_H