]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/EMCALTasks/AliAnalysisTaskEMCALClusterize.h
remove obsolete restriction on aplication of time cuts in case of AOD analysis
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / 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
8fa7608a 12#include "AliCentrality.h"
cb68426a 13
37d2296c 14//EMCAL
15class AliEMCALGeometry;
16class AliEMCALCalibData;
17class AliCaloCalibPedestal;
18class AliEMCALClusterizer;
19class AliEMCALAfterBurnerUF;
3769e0cb 20#include "AliEMCALRecParam.h"
21#include "AliEMCALRecoUtils.h"
37d2296c 22
23
24#include "AliAnalysisTaskSE.h"
25
26class AliAnalysisTaskEMCALClusterize : public AliAnalysisTaskSE {
27 public:
28 AliAnalysisTaskEMCALClusterize();
29 AliAnalysisTaskEMCALClusterize(const char *name);
30 virtual ~AliAnalysisTaskEMCALClusterize();
31
37d2296c 32 virtual void UserCreateOutputObjects();
33 virtual void UserExec(Option_t *option);
34 virtual void Init();
35 virtual void LocalInit() { Init() ; }
6544055e 36
37 // Event methods, settings
5aa88029 38
39 Bool_t AcceptEventEMCAL();
40 void SwitchOnSelectEMCALEvent() { fSelectEMCALEvent = kTRUE ; }
41 void SwitchOffSelectEMCALEvent() { fSelectEMCALEvent = kFALSE ; }
42 void SetEMCALEnergyCut(Float_t cut) { fEMCALEnergyCut = cut ; }
43 void SetEMCALNcellsCut(Int_t cut) { fEMCALNcellsCut = cut ; }
44
6544055e 45 void CheckAndGetEvent();
46
47 Bool_t IsExoticEvent();
48 void SwitchOnExoticEventsRemoval() { fRemoveExoticEvents= kTRUE ; }
49 void SwitchOffExoticEventsRemoval() { fRemoveExoticEvents= kFALSE ; }
50
3769e0cb 51 Bool_t IsLEDEvent(const Int_t run);
6544055e 52 void SwitchOnLEDEventsRemoval() { fRemoveLEDEvents = kTRUE ; }
53 void SwitchOffLEDEventsRemoval() { fRemoveLEDEvents = kFALSE ; }
e9dd2d80 54
55 //OCDB
37d2296c 56 Bool_t AccessOCDB();
d390e7cb 57 void SwitchOnAccessOCDB() { fAccessOCDB = kTRUE ; }
58 void SwitchOffAccessOCDB() { fAccessOCDB = kFALSE ; }
59 void SetOCDBPath(const char *path) { fOCDBpath = path ; }
37d2296c 60
61 //Geometry methods
6544055e 62 void InitGeometry();
37d2296c 63 void SetGeometryName(TString &name) { fGeomName = name ; }
64 TString GeometryName() const { return fGeomName ; }
65 void SwitchOnLoadOwnGeometryMatrices() { fLoadGeomMatrices = kTRUE ; }
66 void SwitchOffLoadOwnGeometryMatrices() { fLoadGeomMatrices = kFALSE ; }
67 void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fGeomMatrix[i] = m ; }
68
9ac44255 69 void SetImportGeometryFromFile(Bool_t im,
3769e0cb 70 TString pa = "") { fImportGeometryFromFile = im ;
9ac44255 71 fImportGeometryFilePath = pa ; }
37d2296c 72 //AOD methods
73 void SetAODBranchName(TString &name) { fOutputAODBranchName = name ; }
74 void FillAODFile(Bool_t yesno) { fFillAODFile = yesno ; }
1f77507b 75 void FillAODCaloCells();
76 void FillAODHeader();
d390e7cb 77 void SwitchOnFillAODHeader() { fFillAODHeader = kTRUE ; }
78 void SwitchOffFillAODHeader() { fFillAODHeader = kFALSE ; }
79 void SwitchOnFillAODCaloCells() { fFillAODCaloCells = kTRUE ; }
80 void SwitchOffFillAODCaloCells() { fFillAODCaloCells = kFALSE ; }
37d2296c 81
82 //Algorithms settings
3769e0cb 83
84 AliEMCALRecParam * GetRecParam() { if(!fRecParam) fRecParam = new AliEMCALRecParam ;
85 return fRecParam ; }
86
87 AliEMCALRecoUtils* GetRecoUtils() { if(!fRecoUtils) fRecoUtils = new AliEMCALRecoUtils ;
88 return fRecoUtils ; }
89
37d2296c 90 void InitClusterization();
6544055e 91 void ClusterizeCells();
92 void ClusterUnfolding();
93 void JustUnfold(Bool_t yesno) { fJustUnfold = yesno ; }
3769e0cb 94
d390e7cb 95 void SetConfigFileName(TString name) { fConfigName = name ; }
96 void SetMaxEvent(Int_t max) { fMaxEvent = max ; }
37d2296c 97
d390e7cb 98 void SwitchOnTrackMatching() { fDoTrackMatching = kTRUE ; }
99 void SwitchOffTrackMatching() { fDoTrackMatching = kFALSE ; }
100
101 // Cell selection after unfolding
102 void SwitchOnCellEnergySelection() { fSelectCell = kTRUE ; }
103 void SwitchOffCellEnergySelection() { fSelectCell = kFALSE ; }
104 void SetCellCuts(Float_t e, Float_t frac) { fSelectCellMinE = e ;
6544055e 105 fSelectCellMinFrac = frac ; }
3769e0cb 106 // OADB options settings
107
108 void AccessOADB() ;
109
110 TString GetPass() ;
111
978e653c 112 void SwitchOnEMCALOADB() { fAccessOADB = kTRUE ; }
113 void SwitchOffEMCALOADB() { fAccessOADB = kFALSE ; }
3769e0cb 114
978e653c 115 void SetOADBFilePath(TString path) { fOADBFilePath = path ; }
cb3001b9 116
cb68426a 117 // Centrality selection
118
119 AliCentrality* GetCentrality() { return InputEvent()->GetCentrality() ; } //Look in AOD reader, different there
8fa7608a 120 void SetCentralityClass(TString name) { fCentralityClass = name ; }
121 TString GetCentralityClass() const { return fCentralityClass ; }
122 Float_t GetEventCentrality() { if(GetCentrality()) return GetCentrality()->GetCentralityPercentile(fCentralityClass) ;
123 else return -1. ; }
124 void SetCentralityBin(Int_t min, Int_t max) //Set the centrality bin to select the event. If used, then need to get percentile
cb68426a 125 { fCentralityBin[0]=min ; fCentralityBin[1]=max ; }
8fa7608a 126 Float_t GetCentralityBin(Int_t i) const { if(i < 0 || i > 1) return -1 ;
cb68426a 127 else return fCentralityBin[i] ; }
128
37d2296c 129 private:
130
afc22931 131 virtual void FillCaloClusterInEvent();
b43bdd14 132
133 virtual void RecPoints2Clusters();
134
37d2296c 135
6544055e 136 AliVEvent *fEvent; // Event
137
37d2296c 138 //Geometry
6544055e 139 AliEMCALGeometry *fGeom; // EMCAL geometry
140 TString fGeomName; // Name of geometry to use.
e3990982 141 TGeoHMatrix *fGeomMatrix[12]; // Geometry matrices with alignments
6544055e 142 Bool_t fGeomMatrixSet; // Set geometry matrices only once, for the first event.
143 Bool_t fLoadGeomMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs
37d2296c 144
145 //OCDB
6544055e 146 AliEMCALCalibData *fCalibData; // EMCAL calib data
147 AliCaloCalibPedestal *fPedestalData; // EMCAL pedestal
148 TString fOCDBpath; // Path with OCDB location
149 Bool_t fAccessOCDB; // Need to access info from OCDB (not really)
37d2296c 150
151 //Temporal arrays
7377e825 152 TClonesArray *fDigitsArr; //! Digits array
153 TObjArray *fClusterArr; //! Recpoints array
596697e6 154 TObjArray *fCaloClusterArr; //! CaloClusters array
37d2296c 155
156 //Clusterizers
6544055e 157 AliEMCALRecParam *fRecParam; // Reconstruction parameters container
158 AliEMCALClusterizer *fClusterizer; //! EMCAL clusterizer
159 AliEMCALAfterBurnerUF *fUnfolder; //! Unfolding procedure
160 Bool_t fJustUnfold; // Just unfold, do not recluster
37d2296c 161
162 //AOD
6544055e 163 TClonesArray *fOutputAODBranch; //! AOD Branch with output clusters
164 TString fOutputAODBranchName; // New of output AOD branch
6a797202 165 Bool_t fOutputAODBranchSet ; // Set the AOD clusters branch in the input event once
6544055e 166 Bool_t fFillAODFile; // Fill the output AOD file with the new clusters,
167 // if not they will be only available for the event they were generated
168 Bool_t fFillAODHeader; // Copy header to standard branch
169 Bool_t fFillAODCaloCells; // Copy calocells to standard branch
170
7377e825 171 Int_t fRun; // run number
37d2296c 172
6544055e 173 AliEMCALRecoUtils* fRecoUtils; // Access to factorized reconstruction algorithms
174 TString fConfigName; // Name of analysis configuration file
37d2296c 175
176 Int_t fCellLabels[12672]; // Array with MC label to be passed to digit.
177 Int_t fCellSecondLabels[12672]; // Array with Second MC label to be passed to digit.
a39f5b70 178 Double_t fCellTime[12672]; // Array with cluster time to be passed to digit in case of AODs
adad4ea9 179 Float_t fCellMatchdEta[12672]; // Array with cluster-track dPhi
180 Float_t fCellMatchdPhi[12672]; // Array with cluster-track dEta
a39f5b70 181
6544055e 182 Int_t fMaxEvent; // Set a maximum event
1f77507b 183
6544055e 184 Bool_t fDoTrackMatching; // On/Off the matching recalulation to speed up analysis in PbPb
185 Bool_t fSelectCell; // Reject cells from cluster if energy is too low and recalculate position/energy and other
186 Float_t fSelectCellMinE; // Min energy cell threshold, after unfolding
187 Float_t fSelectCellMinFrac; // Min fraction of cell energy after unfolding cut
188 Bool_t fRemoveLEDEvents; // Remove LED events, use only for LHC11a
189 Bool_t fRemoveExoticEvents; // Remove exotic events
cb3001b9 190
9ac44255 191 Bool_t fImportGeometryFromFile; // Import geometry settings in geometry.root file
192 TString fImportGeometryFilePath; // path fo geometry.root file
193
596697e6 194 Bool_t fOADBSet ; // AODB parameters already set
195 Bool_t fAccessOADB ; // Get calibration from OADB for EMCAL
196 TString fOADBFilePath ; // Default path $ALICE_ROOT/OADB/EMCAL, if needed change
6a797202 197
cb68426a 198 //Centrality
199 TString fCentralityClass; // Name of selected centrality class
8fa7608a 200 Float_t fCentralityBin[2]; // Minimum and maximum value of the centrality for the analysis
cb68426a 201
5aa88029 202 // Event selection with some signal in EMCAL
203 Bool_t fSelectEMCALEvent; // Process the event if there is some high energy cluster
204 Float_t fEMCALEnergyCut; // At least an EMCAL cluster with this energy in the event
205 Int_t fEMCALNcellsCut; // At least an EMCAL cluster with fNCellsCut cells over fEnergyCut
206
a1eeb25d 207 AliAnalysisTaskEMCALClusterize( const AliAnalysisTaskEMCALClusterize&); // not implemented
208 AliAnalysisTaskEMCALClusterize& operator=(const AliAnalysisTaskEMCALClusterize&); // not implemented
209
5aa88029 210 ClassDef(AliAnalysisTaskEMCALClusterize, 23);
d390e7cb 211
37d2296c 212};
213
214#endif //ALIANALYSISTASKEMCALCLUSTERIZE_H