]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ANALYSIS/TenderSupplies/AliEMCALTenderSupply.h
fix problem with streaming - Jiri
[u/mrichter/AliRoot.git] / ANALYSIS / TenderSupplies / AliEMCALTenderSupply.h
CommitLineData
6d67b5a7 1#ifndef ALIEMCALTENDERSUPPLY_H
2#define ALIEMCALTENDERSUPPLY_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7////////////////////////////////////////////////////////////////////////
8// //
9// EMCAL tender, apply corrections to EMCAl clusters //
766cc9de 10// and do track matching. //
11// Author: Deepa Thomas (Utrecht University) //
6d67b5a7 12// //
13////////////////////////////////////////////////////////////////////////
14
766cc9de 15#include "AliTenderSupply.h"
6d67b5a7 16
b20bc239 17class TTree;
18class TClonesArray;
19
6d67b5a7 20class AliVCluster;
21class AliEMCALRecoUtils;
22class AliEMCALGeometry;
23class TGeoHMatrix;
24class TTree;
25class TFile;
26class TString;
b20bc239 27class AliEMCALClusterizer;
b20bc239 28class AliEMCALAfterBurnerUF;
4d3c549c 29class AliEMCALRecParam;
acf53135 30
6d67b5a7 31class AliEMCALTenderSupply: public AliTenderSupply {
32
33public:
34 AliEMCALTenderSupply();
35 AliEMCALTenderSupply(const char *name, const AliTender *tender=NULL);
36 virtual ~AliEMCALTenderSupply();
37
ef51b5f7 38 enum NonlinearityFunctions{kPi0MC=0,kPi0GammaGamma=1,kPi0GammaConversion=2,kNoCorrection=3,kBeamTest=4,kBeamTestCorrected=5};
a0beb012 39 enum MisalignSettings{kdefault=0,kSurveybyS=1,kSurveybyM=2};
ef51b5f7 40
766cc9de 41 virtual void Init();
42 virtual void ProcessEvent();
6d67b5a7 43
e768f43c 44 void SetEMCALGeometryName(const char *name) { fEMCALGeoName = name ;}
766cc9de 45 TString EMCALGeometryName() const { return fEMCALGeoName ;}
6d67b5a7 46
766cc9de 47 void SetDebugLevel(Int_t level) { fDebugLevel=level ;}
6d67b5a7 48
766cc9de 49 void SetBasePath(const Char_t *basePath) { fBasePath = basePath ;}
b20bc239 50
e768f43c 51 void SetConfigFileName(const char *name) { fConfigName = name ;}
413a7463 52
766cc9de 53 void SetNonLinearityFunction(Int_t fun) { fNonLinearFunc = fun ;}
54 Int_t GetNonLinearityFunction() const { return fNonLinearFunc ;}
6d67b5a7 55
766cc9de 56 void SetNonLinearityThreshold(Int_t threshold) { fNonLinearThreshold = threshold ;} //only for Alexei's non linearity correction
57 Int_t GetNonLinearityThreshold() const { return fNonLinearThreshold ;}
6d67b5a7 58
50b7a951 59 void SwitchOnNonLinearityCorrection() { fDoNonLinearity = kTRUE ;}
60 void SwitchOffNonLinearityCorrection() { fDoNonLinearity = kFALSE ;}
61
766cc9de 62 void SwitchOnReCalibrateCluster() { fReCalibCluster = kTRUE ;}
63 void SwitchOffReCalibrateCluster() { fReCalibCluster = kFALSE ;}
c958a2f7 64
766cc9de 65 void SwitchOnRecalculateClusPos() { fRecalClusPos = kTRUE ;}
66 void SwitchOffRecalculateClusPos() { fRecalClusPos = kFALSE ;}
6d67b5a7 67
50b7a951 68 void SetMisalignmentMatrixSurvey(Int_t misalignSurvey) { fMisalignSurvey = misalignSurvey ;}
69 Int_t GetMisalignmentMatrixSurvey() const { return fMisalignSurvey ;}
acf53135 70
766cc9de 71 void SwitchOnCellFiducialRegion() { fFiducial = kTRUE ;}
72 void SwitchOffCellFiducialRegion() { fFiducial = kFALSE ;}
6d67b5a7 73
50b7a951 74 void SetNumberOfCellsFromEMCALBorder(Int_t n) { fNCellsFromEMCALBorder = n ;}
75 Int_t GetNumberOfCellsFromEMCALBorder() const { return fNCellsFromEMCALBorder ;}
6d67b5a7 76
766cc9de 77 void SwitchOnRecalDistBadChannel() { fRecalDistToBadChannels = kTRUE ;}
78 void SwitchOffRecalDistBadChannel() { fRecalDistToBadChannels = kFALSE ;}
6d67b5a7 79
50b7a951 80 void SwitchOnRecalShowerShape() { fRecalShowerShape = kTRUE ;}
81 void SwitchOffRecalShowerShape() { fRecalShowerShape = kFALSE ;}
82
766cc9de 83 Float_t GetRCut() const { return fRcut ;}
84 void SetRCut(Float_t rcut) { fRcut = rcut ;}
6d67b5a7 85
766cc9de 86 Double_t GetMass() const { return fMass ;}
87 void SetMass(Double_t mass) { fMass = mass ;}
6d67b5a7 88
766cc9de 89 Double_t GetStep() const { return fStep ;}
90 void SetStep(Double_t step) { fStep = step ;}
6d67b5a7 91
6b7df55d 92 Double_t GetEtaCut() const { return fEtacut ;}
50b7a951 93 void SetEtaCut(Double_t eta) { fEtacut = eta ;}
94
95 Double_t GetPhiCut() const { return fPhicut ;}
96 void SetPhiCut(Double_t phi) { fPhicut = phi ;}
97
98 Float_t GetExoticCellFraction() const { return fExoticCellFraction ;}
99 void SetExoticCellFraction(Float_t f) { fExoticCellFraction = f ;}
428f69ce 100
50b7a951 101 Float_t GetExoticCellDiffTime() const { return fExoticCellDiffTime ;}
102 void SetExoticCellDiffTime(Float_t f) { fExoticCellDiffTime = f ;}
103
104 Float_t GetExoticCellMinAmplitude() const { return fExoticCellMinAmplitude ;}
105 void SetExoticCellMinAmplitude(Float_t f) { fExoticCellMinAmplitude = f ;}
428f69ce 106
6b7df55d 107 void SwitchOnReclustering() { fReClusterize = kTRUE ;}
108 void SwitchOffReclustering() { fReClusterize = kFALSE ;}
428f69ce 109
766cc9de 110 void SwitchOnCutEtaPhiSum() { fCutEtaPhiSum=kTRUE; fCutEtaPhiSeparate=kFALSE ;}
111 void SwitchOnCutEtaPhiSeparate() { fCutEtaPhiSeparate=kTRUE; fCutEtaPhiSum=kFALSE ;}
b20bc239 112
766cc9de 113 void SwitchOnLoadOwnGeometryMatrices() { fLoadGeomMatrices = kTRUE ;}
114 void SwitchOffLoadOwnGeometryMatrices() { fLoadGeomMatrices = kFALSE ;}
115 void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fEMCALMatrix[i] = m ;}
3b233502 116
8b775c10 117 AliEMCALRecParam *GetRecParam() const { return fRecParam ;}
a0beb012 118 void SetRecParam(AliEMCALRecParam *p) { fRecParam = p ;}
8b775c10 119
acf53135 120 AliEMCALRecoUtils *GetRecoUtils() const { return fEMCALRecoUtils ;}
b20bc239 121
50b7a951 122 //Will update cell list by removing bad channels and recalibration + reclusterize
8b775c10 123 void SwitchOnUpdateCell() { fUpdateCell = kTRUE ;}
50b7a951 124 void SwitchOffUpdateCell() { fUpdateCell = kFALSE ;}
125
126 void SwitchOnBadCellRemove() { fBadCellRemove = kTRUE ;}
127 void SwitchOffBadCellRemove() { fBadCellRemove = kFALSE ;}
128
129 void SwitchOnClusterBadChannelCheck() { fClusterBadChannelCheck = kTRUE ;}
130 void SwitchOffClusterBadChannelCheck() { fClusterBadChannelCheck = kFALSE ;}
131
132 void SwitchOnExoticCellRemove() { fRejectExoticCells = kTRUE ;}
133 void SwitchOffExoticCellRemove() { fRejectExoticCells = kFALSE ;}
134
135 void SwitchOnClusterExoticChannelCheck() { fRejectExoticClusters = kTRUE ;}
136 void SwitchOffClusterExoticChannelCheck() { fRejectExoticClusters = kFALSE ;}
137
138 void SwitchOnCalibrateEnergy() { fCalibrateEnergy = kTRUE ;}
139 void SwitchOffCalibrateEnergy() { fCalibrateEnergy = kFALSE ;}
140
141 void SwitchOnCalibrateTime() { fCalibrateTime = kTRUE ;}
142 void SwitchOffCalibrateTime() { fCalibrateTime = kFALSE ;}
a0beb012 143
144 void SwitchOnUpdateCellOnly() { fDoUpdateOnly = kTRUE ;}
50b7a951 145 void SwitchOffUpdateCellOnly() { fDoUpdateOnly = kFALSE ;}
a0beb012 146
147 void SwitchOnTrackMatch() { fDoTrackMatch = kTRUE ;}
50b7a951 148 void SwitchOffTrackMatch() { fDoTrackMatch = kFALSE ;}
6d67b5a7 149
150private:
151
acf53135 152 Int_t InitBadChannels();
766cc9de 153
154 Bool_t InitClusterization();
155
acf53135 156 void InitRecParam();
157
766cc9de 158 Bool_t InitMisalignMatrix();
159
acf53135 160 Int_t InitRecalib();
50b7a951 161
162 Int_t InitTimeCalibration();
766cc9de 163
164 void Clusterize();
165
166 void FillDigitsArray();
167
168 void GetPass();
169
170 void RecPoints2Clusters(TClonesArray *clus);
171
172 void RecalibrateCells();
173
acf53135 174 void UpdateCells();
175
766cc9de 176 void UpdateClusters();
177
6931af96 178 AliEMCALGeometry *fEMCALGeo; // EMCAL geometry
766cc9de 179 TString fEMCALGeoName; // name of geometry to use.
180 AliEMCALRecoUtils *fEMCALRecoUtils; // pointer to EMCAL utilities for clusterization
181 TString fConfigName; // name of analysis configuration file
182 Int_t fDebugLevel; // debug level
183 Int_t fNonLinearFunc; // non linearity function
184 Int_t fNonLinearThreshold; // non linearity threshold value for kBeamTesh non linearity function
185 Bool_t fReCalibCluster; // switch for Recalibrate clusters
acf53135 186 Bool_t fUpdateCell; // Flag cell update
50b7a951 187 Bool_t fCalibrateEnergy; // Flag cell energy clibration
188 Bool_t fCalibrateTime; // Flag cell time clSibration
189 Bool_t fDoNonLinearity; // Non linearity correction flag
190 Bool_t fBadCellRemove; // Zero bad cells
191 Bool_t fRejectExoticCells; // reject exotic cells
192 Bool_t fRejectExoticClusters; // recect clusters with exotic cells
193 Bool_t fClusterBadChannelCheck; // Check clusters for bad channels
766cc9de 194 TGeoHMatrix *fEMCALMatrix[10]; // geometry matrices with misalignments
195 Bool_t fRecalClusPos; // switch for applying missalignment
196 Bool_t fFiducial; // switch for checking cells in the fiducial region
50b7a951 197 Int_t fNCellsFromEMCALBorder; // number os cells from EMCAL border
198 Bool_t fRecalDistToBadChannels; // switch for recalculation cluster position from bad channel
199 Bool_t fRecalShowerShape; // switch for recalculation of the shower shape
766cc9de 200 TTree *fInputTree; //! input data tree
201 TFile *fInputFile; //! input data file
202 TString fFilepass; //! input data pass number
203 Double_t fMass; // mass for track matching
204 Double_t fStep; // step size during track matching
6b7df55d 205 Bool_t fCutEtaPhiSum; // swicth to apply residual cut together
206 Bool_t fCutEtaPhiSeparate; // swicth to apply residual cut separately
766cc9de 207 Float_t fRcut; // residual cut for track matching
208 Float_t fEtacut; // eta cut for track matching
209 Float_t fPhicut; // phi cut for track matching
210 TString fBasePath; // base folder path to get root files
6b7df55d 211 Bool_t fReClusterize; // switch for reclustering
766cc9de 212 AliEMCALClusterizer *fClusterizer; //! clusterizer
213 Bool_t fGeomMatrixSet; // set geometry matrices only once, for the first event.
214 Bool_t fLoadGeomMatrices; // matrices set from configuration, not get from geometry.root or from ESDs/AODs
215 AliEMCALRecParam *fRecParam; // reconstruction parameters container
a0beb012 216 Bool_t fDoTrackMatch; // do track matching
217 Bool_t fDoUpdateOnly; // do only update of cells
766cc9de 218 AliEMCALAfterBurnerUF *fUnfolder; //! unfolding procedure
219 TClonesArray *fDigitsArr; //! digits array
220 TObjArray *fClusterArr; //! recpoints array
6931af96 221 Int_t fMisalignSurvey; // misalignment matrix survey
50b7a951 222 Float_t fExoticCellFraction; // Good cell if fraction < 1-ecross/ecell
223 Float_t fExoticCellDiffTime; // If time of candidate to exotic and close cell is too different (in ns), it must be noisy, set amp to 0
224 Float_t fExoticCellMinAmplitude; // Check for exotic only if amplitud is larger than this value
225
226
8b775c10 227
6d67b5a7 228 AliEMCALTenderSupply(const AliEMCALTenderSupply&c);
229 AliEMCALTenderSupply& operator= (const AliEMCALTenderSupply&c);
230
6931af96 231 ClassDef(AliEMCALTenderSupply, 10); // EMCAL tender task
6d67b5a7 232};
8b775c10 233
6d67b5a7 234#endif