1 #ifndef ALIEMCALTENDERSUPPLY_H
2 #define ALIEMCALTENDERSUPPLY_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 ////////////////////////////////////////////////////////////////////////
9 // EMCAL tender, apply corrections to EMCAl clusters //
10 // and do track matching. //
11 // Author: Deepa Thomas (Utrecht University) //
13 ////////////////////////////////////////////////////////////////////////
15 #include "AliTenderSupply.h"
21 class AliEMCALRecoUtils;
22 class AliEMCALGeometry;
27 class AliEMCALClusterizer;
28 class AliEMCALRecParam;
29 class AliEMCALAfterBurnerUF;
31 class AliEMCALTenderSupply: public AliTenderSupply {
34 AliEMCALTenderSupply();
35 AliEMCALTenderSupply(const char *name, const AliTender *tender=NULL);
36 virtual ~AliEMCALTenderSupply();
38 enum NonlinearityFunctions{kPi0MC=0,kPi0GammaGamma=1,kPi0GammaConversion=2,kNoCorrection=3,kBeamTest=4,kBeamTestCorrected=5};
41 virtual void ProcessEvent();
43 void SetEMCALGeometryName(TString name) { fEMCALGeoName = name ;}
44 TString EMCALGeometryName() const { return fEMCALGeoName ;}
46 void SetDebugLevel(Int_t level) { fDebugLevel=level ;}
48 void SetBasePath(const Char_t *basePath) { fBasePath = basePath ;}
50 void SetConfigFileName(TString name) { fConfigName = name ;}
52 void SetNonLinearityFunction(Int_t fun) { fNonLinearFunc = fun ;}
53 Int_t GetNonLinearityFunction() const { return fNonLinearFunc ;}
55 void SetNonLinearityThreshold(Int_t threshold) { fNonLinearThreshold = threshold ;} //only for Alexei's non linearity correction
56 Int_t GetNonLinearityThreshold() const { return fNonLinearThreshold ;}
58 void SwitchOnReCalibrateCluster() { fReCalibCluster = kTRUE ;}
59 void SwitchOffReCalibrateCluster() { fReCalibCluster = kFALSE ;}
61 void SwitchOnReCalibrateCell() { fReCalibCell = kTRUE ;}
62 void SwitchOffReCalibrateCell() { fReCalibCell = kFALSE ;}
64 void SwitchOnRecalculateClusPos() { fRecalClusPos = kTRUE ;}
65 void SwitchOffRecalculateClusPos() { fRecalClusPos = kFALSE ;}
67 void SwitchOnCellFiducialRegion() { fFiducial = kTRUE ;}
68 void SwitchOffCellFiducialRegion() { fFiducial = kFALSE ;}
70 void SetNumberOfcellsFromEMCALBorder(Int_t n) { fNCellsFromEMCALBorder = n ;}
71 Int_t GetNumberOfcellsFromEMCALBorder() const { return fNCellsFromEMCALBorder ;}
73 void SwitchOnRecalDistBadChannel() { fRecalDistToBadChannels = kTRUE ;}
74 void SwitchOffRecalDistBadChannel() { fRecalDistToBadChannels = kFALSE ;}
76 Float_t GetRCut() const { return fRcut ;}
77 void SetRCut(Float_t rcut) { fRcut = rcut ;}
79 Double_t GetMass() const { return fMass ;}
80 void SetMass(Double_t mass) { fMass = mass ;}
82 Double_t GetStep() const { return fStep ;}
83 void SetStep(Double_t step) { fStep = step ;}
85 Double_t GetEtaCut() const { return fEtacut ;}
86 void SetEtaCut(Double_t eta) { fEtacut = eta ;}
88 Double_t GetPhiCut() const { return fPhicut ;}
89 void SetPhiCut(Double_t phi) { fPhicut = phi ;}
91 void SwitchOnReclustering() { fReClusterize = kTRUE ;}
92 void SwitchOffReclustering() { fReClusterize = kFALSE ;}
94 void SwitchOnCutEtaPhiSum() { fCutEtaPhiSum=kTRUE; fCutEtaPhiSeparate=kFALSE ;}
95 void SwitchOnCutEtaPhiSeparate() { fCutEtaPhiSeparate=kTRUE; fCutEtaPhiSum=kFALSE ;}
97 void SwitchOnLoadOwnGeometryMatrices() { fLoadGeomMatrices = kTRUE ;}
98 void SwitchOffLoadOwnGeometryMatrices() { fLoadGeomMatrices = kFALSE ;}
99 void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fEMCALMatrix[i] = m ;}
101 AliEMCALRecParam *GetRecParam() const { return fRecParam ;}
103 AliEMCALRecoUtils *GetRecoUtils() const { return fEMCALRecoUtils ;}
105 void SetOCDBPath(const char *path) { fOCDBpath = path ;}
109 Bool_t InitBadChannels();
111 Bool_t InitClusterization();
113 Bool_t InitMisalignMatrix();
115 Bool_t InitRecalib();
119 void FillDigitsArray();
123 void RecPoints2Clusters(TClonesArray *clus);
125 void RecalibrateCells();
127 void SetClusterMatchedToTrack (AliESDEvent *event);
129 void SetTracksMatchedToCluster(AliESDEvent *event);
131 void UpdateClusters();
133 AliEMCALGeometry *fEMCALGeo; //! EMCAL geometry
134 TString fEMCALGeoName; // name of geometry to use.
135 AliEMCALRecoUtils *fEMCALRecoUtils; // pointer to EMCAL utilities for clusterization
136 TString fConfigName; // name of analysis configuration file
137 Int_t fDebugLevel; // debug level
138 Int_t fNonLinearFunc; // non linearity function
139 Int_t fNonLinearThreshold; // non linearity threshold value for kBeamTesh non linearity function
140 Bool_t fReCalibCluster; // switch for Recalibrate clusters
141 Bool_t fReCalibCell; // switch for Recalibrate cell
142 TGeoHMatrix *fEMCALMatrix[10]; // geometry matrices with misalignments
143 Bool_t fRecalClusPos; // switch for applying missalignment
144 Bool_t fFiducial; // switch for checking cells in the fiducial region
145 Int_t fNCellsFromEMCALBorder; // number os cells from EMCAL border
146 Bool_t fRecalDistToBadChannels; // switch for recalculation cluster position from bad channel
147 TTree *fInputTree; //! input data tree
148 TFile *fInputFile; //! input data file
149 TString fFilepass; //! input data pass number
150 Double_t fMass; // mass for track matching
151 Double_t fStep; // step size during track matching
152 Bool_t fCutEtaPhiSum; // swicth to apply residual cut together
153 Bool_t fCutEtaPhiSeparate; // swicth to apply residual cut separately
154 Float_t fRcut; // residual cut for track matching
155 Float_t fEtacut; // eta cut for track matching
156 Float_t fPhicut; // phi cut for track matching
157 TString fBasePath; // base folder path to get root files
158 Bool_t fReClusterize; // switch for reclustering
159 AliEMCALClusterizer *fClusterizer; //! clusterizer
160 Bool_t fGeomMatrixSet; // set geometry matrices only once, for the first event.
161 Bool_t fLoadGeomMatrices; // matrices set from configuration, not get from geometry.root or from ESDs/AODs
162 AliEMCALRecParam *fRecParam; // reconstruction parameters container
163 TString fOCDBpath; // path with OCDB location
164 AliEMCALAfterBurnerUF *fUnfolder; //! unfolding procedure
165 TClonesArray *fDigitsArr; //! digits array
166 TObjArray *fClusterArr; //! recpoints array
168 AliEMCALTenderSupply(const AliEMCALTenderSupply&c);
169 AliEMCALTenderSupply& operator= (const AliEMCALTenderSupply&c);
171 ClassDef(AliEMCALTenderSupply, 5); // EMCAL tender task