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 ; }
47 Bool_t IsExoticCell(const Int_t absId, const Float_t ecell,
48 const Float_t tcell, AliVCaloCells* cells);
49 void SwitchOnExoticCellRemoval() { fRemoveExoticCells = kTRUE ; }
50 void SwitchOffExoticCellRemoval() { fRemoveExoticCells = kFALSE ; }
52 void SetExoticCellFractionCut(Float_t f) { fExoticCellFraction = f ; }
53 void SetExoticCellDiffTimeCut(Float_t dt) { fExoticCellDiffTime = dt ; }
54 void SetExoticCellMinAmplitudeCut(Float_t ma) { fExoticCellMinAmplitude = ma ; }
57 void SwitchOnLEDEventsRemoval() { fRemoveLEDEvents = kTRUE ; }
58 void SwitchOffLEDEventsRemoval() { fRemoveLEDEvents = kFALSE ; }
60 Bool_t AcceptCalibrateCell(const Int_t absId, Float_t & amp, Double_t & time, AliVCaloCells* cells) ;
64 void SwitchOnAccessOCDB() { fAccessOCDB = kTRUE ; }
65 void SwitchOffAccessOCDB() { fAccessOCDB = kFALSE ; }
66 void SetOCDBPath(const char *path) { fOCDBpath = path ; }
70 void SetGeometryName(TString &name) { fGeomName = name ; }
71 TString GeometryName() const { return fGeomName ; }
72 void SwitchOnLoadOwnGeometryMatrices() { fLoadGeomMatrices = kTRUE ; }
73 void SwitchOffLoadOwnGeometryMatrices() { fLoadGeomMatrices = kFALSE ; }
74 void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fGeomMatrix[i] = m ; }
77 void SetAODBranchName(TString &name) { fOutputAODBranchName = name ; }
78 void FillAODFile(Bool_t yesno) { fFillAODFile = yesno ; }
79 void FillAODCaloCells();
81 void SwitchOnFillAODHeader() { fFillAODHeader = kTRUE ; }
82 void SwitchOffFillAODHeader() { fFillAODHeader = kFALSE ; }
83 void SwitchOnFillAODCaloCells() { fFillAODCaloCells = kTRUE ; }
84 void SwitchOffFillAODCaloCells() { fFillAODCaloCells = kFALSE ; }
87 AliEMCALRecParam * GetRecParam() const { return fRecParam ; }
88 void InitClusterization();
89 void ClusterizeCells();
90 void ClusterUnfolding();
91 void JustUnfold(Bool_t yesno) { fJustUnfold = yesno ; }
93 void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) { fRecoUtils = ru ; }
94 AliEMCALRecoUtils* GetRecoUtils() const { return fRecoUtils ; }
96 void SetConfigFileName(TString name) { fConfigName = name ; }
97 void SetMaxEvent(Int_t max) { fMaxEvent = max ; }
99 void SwitchOnTrackMatching() { fDoTrackMatching = kTRUE ; }
100 void SwitchOffTrackMatching() { fDoTrackMatching = kFALSE ; }
102 // Cell selection after unfolding
103 void SwitchOnCellEnergySelection() { fSelectCell = kTRUE ; }
104 void SwitchOffCellEnergySelection() { fSelectCell = kFALSE ; }
105 void SetCellCuts(Float_t e, Float_t frac) { fSelectCellMinE = e ;
106 fSelectCellMinFrac = frac ; }
110 virtual void RecPoints2Clusters(TClonesArray *fdigitsArr, TObjArray *fRecPoints, TObjArray *clusArray);
112 AliVEvent *fEvent; // Event
115 AliEMCALGeometry *fGeom; // EMCAL geometry
116 TString fGeomName; // Name of geometry to use.
117 TGeoHMatrix *fGeomMatrix[10]; // Geometry matrices with alignments
118 Bool_t fGeomMatrixSet; // Set geometry matrices only once, for the first event.
119 Bool_t fLoadGeomMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs
122 AliEMCALCalibData *fCalibData; // EMCAL calib data
123 AliCaloCalibPedestal *fPedestalData; // EMCAL pedestal
124 TString fOCDBpath; // Path with OCDB location
125 Bool_t fAccessOCDB; // Need to access info from OCDB (not really)
128 TClonesArray *fDigitsArr; //-> Digits array
129 TObjArray *fClusterArr; //-> Recpoints array
130 TObjArray *fCaloClusterArr; //-> CaloClusters array
133 AliEMCALRecParam *fRecParam; // Reconstruction parameters container
134 AliEMCALClusterizer *fClusterizer; //! EMCAL clusterizer
135 AliEMCALAfterBurnerUF *fUnfolder; //! Unfolding procedure
136 Bool_t fJustUnfold; // Just unfold, do not recluster
139 TClonesArray *fOutputAODBranch; //! AOD Branch with output clusters
140 TString fOutputAODBranchName; // New of output AOD branch
141 Bool_t fFillAODFile; // Fill the output AOD file with the new clusters,
142 // if not they will be only available for the event they were generated
143 Bool_t fFillAODHeader; // Copy header to standard branch
144 Bool_t fFillAODCaloCells; // Copy calocells to standard branch
146 Int_t fRun; //!run number
148 AliEMCALRecoUtils* fRecoUtils; // Access to factorized reconstruction algorithms
149 TString fConfigName; // Name of analysis configuration file
151 Int_t fCellLabels[12672]; // Array with MC label to be passed to digit.
152 Int_t fCellSecondLabels[12672]; // Array with Second MC label to be passed to digit.
153 Double_t fCellTime[12672]; // Array with cluster time to be passed to digit in case of AODs
155 Int_t fMaxEvent; // Set a maximum event
157 Bool_t fDoTrackMatching; // On/Off the matching recalulation to speed up analysis in PbPb
158 Bool_t fSelectCell; // Reject cells from cluster if energy is too low and recalculate position/energy and other
159 Float_t fSelectCellMinE; // Min energy cell threshold, after unfolding
160 Float_t fSelectCellMinFrac; // Min fraction of cell energy after unfolding cut
161 Bool_t fRemoveLEDEvents; // Remove LED events, use only for LHC11a
162 Bool_t fRemoveExoticEvents; // Remove exotic events
163 Bool_t fRemoveExoticCells; // Remove exotic cells
164 Float_t fExoticCellFraction; // Good cell if fraction < 1-ecross/ecell
165 Float_t fExoticCellDiffTime; // If time of candidate to exotic and close cell is too different, it must be noisy, set amp to 0
166 Float_t fExoticCellMinAmplitude; // Check for exotic only if amplitud is larger than this value
168 ClassDef(AliAnalysisTaskEMCALClusterize, 14);
172 #endif //ALIANALYSISTASKEMCALCLUSTERIZE_H