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() ; }
42 void SwitchOnAccessOCDB() { fAccessOCDB = kTRUE ; }
43 void SwitchOffAccessOCDB() { fAccessOCDB = kFALSE ; }
44 void SetOCDBPath(const char *path) { fOCDBpath = path ; }
47 void SetGeometryName(TString &name) { fGeomName = name ; }
48 TString GeometryName() const { return fGeomName ; }
49 void SwitchOnLoadOwnGeometryMatrices() { fLoadGeomMatrices = kTRUE ; }
50 void SwitchOffLoadOwnGeometryMatrices() { fLoadGeomMatrices = kFALSE ; }
51 void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fGeomMatrix[i] = m ; }
54 void SetAODBranchName(TString &name) { fOutputAODBranchName = name ; }
55 void FillAODFile(Bool_t yesno) { fFillAODFile = yesno ; }
56 void FillAODCaloCells();
58 void SwitchOnFillAODHeader() { fFillAODHeader = kTRUE ; }
59 void SwitchOffFillAODHeader() { fFillAODHeader = kFALSE ; }
60 void SwitchOnFillAODCaloCells() { fFillAODCaloCells = kTRUE ; }
61 void SwitchOffFillAODCaloCells() { fFillAODCaloCells = kFALSE ; }
64 void JustUnfold(Bool_t yesno) { fJustUnfold = yesno ; }
65 AliEMCALRecParam * GetRecParam() const { return fRecParam ; }
66 void InitClusterization();
68 void SetEMCALRecoUtils(AliEMCALRecoUtils * ru) { fRecoUtils = ru ; }
69 AliEMCALRecoUtils* GetRecoUtils() const { return fRecoUtils ; }
71 void SetConfigFileName(TString name) { fConfigName = name ; }
72 void SetMaxEvent(Int_t max) { fMaxEvent = max ; }
74 void SwitchOnTrackMatching() { fDoTrackMatching = kTRUE ; }
75 void SwitchOffTrackMatching() { fDoTrackMatching = kFALSE ; }
77 // Cell selection after unfolding
78 void SwitchOnCellEnergySelection() { fSelectCell = kTRUE ; }
79 void SwitchOffCellEnergySelection() { fSelectCell = kFALSE ; }
80 void SetCellCuts(Float_t e, Float_t frac) { fSelectCellMinE = e ;
81 fSelectCellMinFrac = frac ; }
82 void SwitchOnLEDEventsRemoval() { fRemoveLEDEvents = kTRUE ; }
83 void SwitchOffLEDEventsRemoval() { fRemoveLEDEvents = kFALSE ; }
88 virtual void RecPoints2Clusters(TClonesArray *fdigitsArr, TObjArray *fRecPoints, TObjArray *clusArray);
91 AliEMCALGeometry *fGeom; // EMCAL geometry
92 TString fGeomName; // Name of geometry to use.
93 TGeoHMatrix *fGeomMatrix[10]; // Geometry matrices with alignments
94 Bool_t fGeomMatrixSet; // Set geometry matrices only once, for the first event.
95 Bool_t fLoadGeomMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs
98 AliEMCALCalibData *fCalibData; // EMCAL calib data
99 AliCaloCalibPedestal *fPedestalData; // EMCAL pedestal
100 TString fOCDBpath; // Path with OCDB location
101 Bool_t fAccessOCDB; // Need to access info from OCDB (not really)
104 TClonesArray *fDigitsArr; //-> Digits array
105 TObjArray *fClusterArr; //-> Recpoints array
106 TObjArray *fCaloClusterArr; //-> CaloClusters array
109 AliEMCALRecParam *fRecParam; // Reconstruction parameters container
110 AliEMCALClusterizer *fClusterizer; //! EMCAL clusterizer
111 AliEMCALAfterBurnerUF *fUnfolder; //! Unfolding procedure
112 Bool_t fJustUnfold; // Just unfold, do not recluster
115 TClonesArray *fOutputAODBranch; //! AOD Branch with output clusters
116 TString fOutputAODBranchName; // New of output AOD branch
117 Bool_t fFillAODFile; // Fill the output AOD file with the new clusters,
118 // if not they will be only available for the event they were generated
119 Bool_t fFillAODHeader; // Copy header to standard branch
120 Bool_t fFillAODCaloCells; // Copy calocells to standard branch
122 Int_t fRun; //!run number
124 AliEMCALRecoUtils* fRecoUtils; // Access to factorized reconstruction algorithms
125 TString fConfigName; // Name of analysis configuration file
127 Int_t fCellLabels[12672]; // Array with MC label to be passed to digit.
128 Int_t fCellSecondLabels[12672]; // Array with Second MC label to be passed to digit.
129 Double_t fCellTime[12672]; // Array with cluster time to be passed to digit in case of AODs
131 Int_t fMaxEvent; // Set a maximum event
133 Bool_t fDoTrackMatching; // On/Off the matching recalulation to speed up analysis in PbPb
134 Bool_t fSelectCell; // Reject cells from cluster if energy is too low and recalculate position/energy and other
135 Float_t fSelectCellMinE; // Min energy cell threshold, after unfolding
136 Float_t fSelectCellMinFrac; // Min fraction of cell energy after unfolding cut
137 Bool_t fRemoveLEDEvents; // Remove LED events, use only for LHC11a and if input is V1 or V1+unfolding
139 ClassDef(AliAnalysisTaskEMCALClusterize, 12);
143 #endif //ALIANALYSISTASKEMCALCLUSTERIZE_H