Fix Coverity
[u/mrichter/AliRoot.git] / PWG4 / CaloCalib / AliAnalysisTaskEMCALClusterize.h
CommitLineData
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
9class TTree;
10class TClonesArray;
11
12//EMCAL
13class AliEMCALGeometry;
14class AliEMCALCalibData;
15class AliCaloCalibPedestal;
16class AliEMCALClusterizer;
17class AliEMCALAfterBurnerUF;
18class AliEMCALRecParam;
19class AliEMCALRecoUtils;
20
21
22#include "AliAnalysisTaskSE.h"
23
24class AliAnalysisTaskEMCALClusterize : public AliAnalysisTaskSE {
25 public:
26 AliAnalysisTaskEMCALClusterize();
27 AliAnalysisTaskEMCALClusterize(const char *name);
28 virtual ~AliAnalysisTaskEMCALClusterize();
29
30 private:
31 AliAnalysisTaskEMCALClusterize(const AliAnalysisTaskEMCALClusterize&);
32 AliAnalysisTaskEMCALClusterize& operator=(const AliAnalysisTaskEMCALClusterize&); // not implemented
33
34 public:
35 virtual void UserCreateOutputObjects();
36 virtual void UserExec(Option_t *option);
37 virtual void Init();
38 virtual void LocalInit() { Init() ; }
6544055e 39
40 // Event methods, settings
41 void CheckAndGetEvent();
42
43 Bool_t IsExoticEvent();
44 void SwitchOnExoticEventsRemoval() { fRemoveExoticEvents= kTRUE ; }
45 void SwitchOffExoticEventsRemoval() { fRemoveExoticEvents= kFALSE ; }
46
6544055e 47 Bool_t IsLEDEvent();
48 void SwitchOnLEDEventsRemoval() { fRemoveLEDEvents = kTRUE ; }
49 void SwitchOffLEDEventsRemoval() { fRemoveLEDEvents = kFALSE ; }
e9dd2d80 50
51 //OCDB
37d2296c 52 Bool_t AccessOCDB();
d390e7cb 53 void SwitchOnAccessOCDB() { fAccessOCDB = kTRUE ; }
54 void SwitchOffAccessOCDB() { fAccessOCDB = kFALSE ; }
55 void SetOCDBPath(const char *path) { fOCDBpath = path ; }
37d2296c 56
57 //Geometry methods
6544055e 58 void InitGeometry();
37d2296c 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 ; }
64
9ac44255 65 void SetImportGeometryFromFile(Bool_t im,
66 TString pa = ".") {
67 fImportGeometryFromFile = im ;
68 fImportGeometryFilePath = pa ; }
69
37d2296c 70 //AOD methods
71 void SetAODBranchName(TString &name) { fOutputAODBranchName = name ; }
72 void FillAODFile(Bool_t yesno) { fFillAODFile = yesno ; }
1f77507b 73 void FillAODCaloCells();
74 void FillAODHeader();
d390e7cb 75 void SwitchOnFillAODHeader() { fFillAODHeader = kTRUE ; }
76 void SwitchOffFillAODHeader() { fFillAODHeader = kFALSE ; }
77 void SwitchOnFillAODCaloCells() { fFillAODCaloCells = kTRUE ; }
78 void SwitchOffFillAODCaloCells() { fFillAODCaloCells = kFALSE ; }
37d2296c 79
80 //Algorithms settings
37d2296c 81 AliEMCALRecParam * GetRecParam() const { return fRecParam ; }
82 void InitClusterization();
6544055e 83 void ClusterizeCells();
84 void ClusterUnfolding();
85 void JustUnfold(Bool_t yesno) { fJustUnfold = yesno ; }
37d2296c 86
d390e7cb 87 void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) { fRecoUtils = ru ; }
37d2296c 88 AliEMCALRecoUtils* GetRecoUtils() const { return fRecoUtils ; }
89
d390e7cb 90 void SetConfigFileName(TString name) { fConfigName = name ; }
91 void SetMaxEvent(Int_t max) { fMaxEvent = max ; }
37d2296c 92
d390e7cb 93 void SwitchOnTrackMatching() { fDoTrackMatching = kTRUE ; }
94 void SwitchOffTrackMatching() { fDoTrackMatching = kFALSE ; }
95
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 ;
6544055e 100 fSelectCellMinFrac = frac ; }
cb3001b9 101
37d2296c 102 private:
103
104 virtual void RecPoints2Clusters(TClonesArray *fdigitsArr, TObjArray *fRecPoints, TObjArray *clusArray);
105
6544055e 106 AliVEvent *fEvent; // Event
107
37d2296c 108 //Geometry
6544055e 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
37d2296c 114
115 //OCDB
6544055e 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)
37d2296c 120
121 //Temporal arrays
6544055e 122 TClonesArray *fDigitsArr; //-> Digits array
123 TObjArray *fClusterArr; //-> Recpoints array
124 TObjArray *fCaloClusterArr; //-> CaloClusters array
37d2296c 125
126 //Clusterizers
6544055e 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
37d2296c 131
132 //AOD
6544055e 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
139
140 Int_t fRun; //!run number
37d2296c 141
6544055e 142 AliEMCALRecoUtils* fRecoUtils; // Access to factorized reconstruction algorithms
143 TString fConfigName; // Name of analysis configuration file
37d2296c 144
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.
a39f5b70 147 Double_t fCellTime[12672]; // Array with cluster time to be passed to digit in case of AODs
adad4ea9 148 Float_t fCellMatchdEta[12672]; // Array with cluster-track dPhi
149 Float_t fCellMatchdPhi[12672]; // Array with cluster-track dEta
a39f5b70 150
6544055e 151 Int_t fMaxEvent; // Set a maximum event
1f77507b 152
6544055e 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
cb3001b9 159
9ac44255 160 Bool_t fImportGeometryFromFile; // Import geometry settings in geometry.root file
161 TString fImportGeometryFilePath; // path fo geometry.root file
162
163
164 ClassDef(AliAnalysisTaskEMCALClusterize, 17);
d390e7cb 165
37d2296c 166};
167
168#endif //ALIANALYSISTASKEMCALCLUSTERIZE_H