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 class AliEMCALRecParam;
19 class AliEMCALRecoUtils;
22 #include "AliAnalysisTaskSE.h"
24 class AliAnalysisTaskEMCALClusterize : public AliAnalysisTaskSE {
26 AliAnalysisTaskEMCALClusterize();
27 AliAnalysisTaskEMCALClusterize(const char *name);
28 virtual ~AliAnalysisTaskEMCALClusterize();
31 AliAnalysisTaskEMCALClusterize(const AliAnalysisTaskEMCALClusterize&);
32 AliAnalysisTaskEMCALClusterize& operator=(const AliAnalysisTaskEMCALClusterize&); // not implemented
35 virtual void UserCreateOutputObjects();
36 virtual void UserExec(Option_t *option);
38 virtual void LocalInit() { Init() ; }
40 // Event methods, settings
41 void CheckAndGetEvent();
43 Bool_t IsExoticEvent();
44 void SwitchOnExoticEventsRemoval() { fRemoveExoticEvents= kTRUE ; }
45 void SwitchOffExoticEventsRemoval() { fRemoveExoticEvents= kFALSE ; }
48 void SwitchOnLEDEventsRemoval() { fRemoveLEDEvents = kTRUE ; }
49 void SwitchOffLEDEventsRemoval() { fRemoveLEDEvents = kFALSE ; }
53 void SwitchOnAccessOCDB() { fAccessOCDB = kTRUE ; }
54 void SwitchOffAccessOCDB() { fAccessOCDB = kFALSE ; }
55 void SetOCDBPath(const char *path) { fOCDBpath = path ; }
59 void SetGeometryName(TString &name) { fGeomName = name ; }
60 TString GeometryName() const { return fGeomName ; }
61 void SwitchOnLoadOwnGeometryMatrices() { fLoadGeomMatrices = kTRUE ; }
62 void SwitchOffLoadOwnGeometryMatrices() { fLoadGeomMatrices = kFALSE ; }
63 void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fGeomMatrix[i] = m ; }
65 void SetImportGeometryFromFile(Bool_t im,
67 fImportGeometryFromFile = im ;
68 fImportGeometryFilePath = pa ; }
71 void SetAODBranchName(TString &name) { fOutputAODBranchName = name ; }
72 void FillAODFile(Bool_t yesno) { fFillAODFile = yesno ; }
73 void FillAODCaloCells();
75 void SwitchOnFillAODHeader() { fFillAODHeader = kTRUE ; }
76 void SwitchOffFillAODHeader() { fFillAODHeader = kFALSE ; }
77 void SwitchOnFillAODCaloCells() { fFillAODCaloCells = kTRUE ; }
78 void SwitchOffFillAODCaloCells() { fFillAODCaloCells = kFALSE ; }
81 AliEMCALRecParam * GetRecParam() const { return fRecParam ; }
82 void InitClusterization();
83 void ClusterizeCells();
84 void ClusterUnfolding();
85 void JustUnfold(Bool_t yesno) { fJustUnfold = yesno ; }
87 void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) { fRecoUtils = ru ; }
88 AliEMCALRecoUtils* GetRecoUtils() const { return fRecoUtils ; }
90 void SetConfigFileName(TString name) { fConfigName = name ; }
91 void SetMaxEvent(Int_t max) { fMaxEvent = max ; }
93 void SwitchOnTrackMatching() { fDoTrackMatching = kTRUE ; }
94 void SwitchOffTrackMatching() { fDoTrackMatching = kFALSE ; }
96 // Cell selection after unfolding
97 void SwitchOnCellEnergySelection() { fSelectCell = kTRUE ; }
98 void SwitchOffCellEnergySelection() { fSelectCell = kFALSE ; }
99 void SetCellCuts(Float_t e, Float_t frac) { fSelectCellMinE = e ;
100 fSelectCellMinFrac = frac ; }
104 virtual void RecPoints2Clusters(TClonesArray *fdigitsArr, TObjArray *fRecPoints, TObjArray *clusArray);
106 AliVEvent *fEvent; // Event
109 AliEMCALGeometry *fGeom; // EMCAL geometry
110 TString fGeomName; // Name of geometry to use.
111 TGeoHMatrix *fGeomMatrix[10]; // Geometry matrices with alignments
112 Bool_t fGeomMatrixSet; // Set geometry matrices only once, for the first event.
113 Bool_t fLoadGeomMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs
116 AliEMCALCalibData *fCalibData; // EMCAL calib data
117 AliCaloCalibPedestal *fPedestalData; // EMCAL pedestal
118 TString fOCDBpath; // Path with OCDB location
119 Bool_t fAccessOCDB; // Need to access info from OCDB (not really)
122 TClonesArray *fDigitsArr; //-> Digits array
123 TObjArray *fClusterArr; //-> Recpoints array
124 TObjArray *fCaloClusterArr; //-> CaloClusters array
127 AliEMCALRecParam *fRecParam; // Reconstruction parameters container
128 AliEMCALClusterizer *fClusterizer; //! EMCAL clusterizer
129 AliEMCALAfterBurnerUF *fUnfolder; //! Unfolding procedure
130 Bool_t fJustUnfold; // Just unfold, do not recluster
133 TClonesArray *fOutputAODBranch; //! AOD Branch with output clusters
134 TString fOutputAODBranchName; // New of output AOD branch
135 Bool_t fFillAODFile; // Fill the output AOD file with the new clusters,
136 // if not they will be only available for the event they were generated
137 Bool_t fFillAODHeader; // Copy header to standard branch
138 Bool_t fFillAODCaloCells; // Copy calocells to standard branch
140 Int_t fRun; //!run number
142 AliEMCALRecoUtils* fRecoUtils; // Access to factorized reconstruction algorithms
143 TString fConfigName; // Name of analysis configuration file
145 Int_t fCellLabels[12672]; // Array with MC label to be passed to digit.
146 Int_t fCellSecondLabels[12672]; // Array with Second MC label to be passed to digit.
147 Double_t fCellTime[12672]; // Array with cluster time to be passed to digit in case of AODs
148 Float_t fCellMatchdEta[12672]; // Array with cluster-track dPhi
149 Float_t fCellMatchdPhi[12672]; // Array with cluster-track dEta
151 Int_t fMaxEvent; // Set a maximum event
153 Bool_t fDoTrackMatching; // On/Off the matching recalulation to speed up analysis in PbPb
154 Bool_t fSelectCell; // Reject cells from cluster if energy is too low and recalculate position/energy and other
155 Float_t fSelectCellMinE; // Min energy cell threshold, after unfolding
156 Float_t fSelectCellMinFrac; // Min fraction of cell energy after unfolding cut
157 Bool_t fRemoveLEDEvents; // Remove LED events, use only for LHC11a
158 Bool_t fRemoveExoticEvents; // Remove exotic events
160 Bool_t fImportGeometryFromFile; // Import geometry settings in geometry.root file
161 TString fImportGeometryFilePath; // path fo geometry.root file
164 ClassDef(AliAnalysisTaskEMCALClusterize, 17);
168 #endif //ALIANALYSISTASKEMCALCLUSTERIZE_H