]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/CaloCalib/AliAnalysisTaskEMCALClusterize.h
Move exotic cell rejection methods from AliAnalysisTaskEMCALClusterize to AliEMCALRec...
[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
65 //AOD methods
66 void SetAODBranchName(TString &name) { fOutputAODBranchName = name ; }
67 void FillAODFile(Bool_t yesno) { fFillAODFile = yesno ; }
1f77507b 68 void FillAODCaloCells();
69 void FillAODHeader();
d390e7cb 70 void SwitchOnFillAODHeader() { fFillAODHeader = kTRUE ; }
71 void SwitchOffFillAODHeader() { fFillAODHeader = kFALSE ; }
72 void SwitchOnFillAODCaloCells() { fFillAODCaloCells = kTRUE ; }
73 void SwitchOffFillAODCaloCells() { fFillAODCaloCells = kFALSE ; }
37d2296c 74
75 //Algorithms settings
37d2296c 76 AliEMCALRecParam * GetRecParam() const { return fRecParam ; }
77 void InitClusterization();
6544055e 78 void ClusterizeCells();
79 void ClusterUnfolding();
80 void JustUnfold(Bool_t yesno) { fJustUnfold = yesno ; }
37d2296c 81
d390e7cb 82 void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) { fRecoUtils = ru ; }
37d2296c 83 AliEMCALRecoUtils* GetRecoUtils() const { return fRecoUtils ; }
84
d390e7cb 85 void SetConfigFileName(TString name) { fConfigName = name ; }
86 void SetMaxEvent(Int_t max) { fMaxEvent = max ; }
37d2296c 87
d390e7cb 88 void SwitchOnTrackMatching() { fDoTrackMatching = kTRUE ; }
89 void SwitchOffTrackMatching() { fDoTrackMatching = kFALSE ; }
90
91 // Cell selection after unfolding
92 void SwitchOnCellEnergySelection() { fSelectCell = kTRUE ; }
93 void SwitchOffCellEnergySelection() { fSelectCell = kFALSE ; }
94 void SetCellCuts(Float_t e, Float_t frac) { fSelectCellMinE = e ;
6544055e 95 fSelectCellMinFrac = frac ; }
cb3001b9 96
37d2296c 97 private:
98
99 virtual void RecPoints2Clusters(TClonesArray *fdigitsArr, TObjArray *fRecPoints, TObjArray *clusArray);
100
6544055e 101 AliVEvent *fEvent; // Event
102
37d2296c 103 //Geometry
6544055e 104 AliEMCALGeometry *fGeom; // EMCAL geometry
105 TString fGeomName; // Name of geometry to use.
106 TGeoHMatrix *fGeomMatrix[10]; // Geometry matrices with alignments
107 Bool_t fGeomMatrixSet; // Set geometry matrices only once, for the first event.
108 Bool_t fLoadGeomMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs
37d2296c 109
110 //OCDB
6544055e 111 AliEMCALCalibData *fCalibData; // EMCAL calib data
112 AliCaloCalibPedestal *fPedestalData; // EMCAL pedestal
113 TString fOCDBpath; // Path with OCDB location
114 Bool_t fAccessOCDB; // Need to access info from OCDB (not really)
37d2296c 115
116 //Temporal arrays
6544055e 117 TClonesArray *fDigitsArr; //-> Digits array
118 TObjArray *fClusterArr; //-> Recpoints array
119 TObjArray *fCaloClusterArr; //-> CaloClusters array
37d2296c 120
121 //Clusterizers
6544055e 122 AliEMCALRecParam *fRecParam; // Reconstruction parameters container
123 AliEMCALClusterizer *fClusterizer; //! EMCAL clusterizer
124 AliEMCALAfterBurnerUF *fUnfolder; //! Unfolding procedure
125 Bool_t fJustUnfold; // Just unfold, do not recluster
37d2296c 126
127 //AOD
6544055e 128 TClonesArray *fOutputAODBranch; //! AOD Branch with output clusters
129 TString fOutputAODBranchName; // New of output AOD branch
130 Bool_t fFillAODFile; // Fill the output AOD file with the new clusters,
131 // if not they will be only available for the event they were generated
132 Bool_t fFillAODHeader; // Copy header to standard branch
133 Bool_t fFillAODCaloCells; // Copy calocells to standard branch
134
135 Int_t fRun; //!run number
37d2296c 136
6544055e 137 AliEMCALRecoUtils* fRecoUtils; // Access to factorized reconstruction algorithms
138 TString fConfigName; // Name of analysis configuration file
37d2296c 139
140 Int_t fCellLabels[12672]; // Array with MC label to be passed to digit.
141 Int_t fCellSecondLabels[12672]; // Array with Second MC label to be passed to digit.
a39f5b70 142 Double_t fCellTime[12672]; // Array with cluster time to be passed to digit in case of AODs
143
6544055e 144 Int_t fMaxEvent; // Set a maximum event
1f77507b 145
6544055e 146 Bool_t fDoTrackMatching; // On/Off the matching recalulation to speed up analysis in PbPb
147 Bool_t fSelectCell; // Reject cells from cluster if energy is too low and recalculate position/energy and other
148 Float_t fSelectCellMinE; // Min energy cell threshold, after unfolding
149 Float_t fSelectCellMinFrac; // Min fraction of cell energy after unfolding cut
150 Bool_t fRemoveLEDEvents; // Remove LED events, use only for LHC11a
151 Bool_t fRemoveExoticEvents; // Remove exotic events
cb3001b9 152
a7e5a381 153 ClassDef(AliAnalysisTaskEMCALClusterize, 15);
d390e7cb 154
37d2296c 155};
156
157#endif //ALIANALYSISTASKEMCALCLUSTERIZE_H