]>
Commit | Line | Data |
---|---|---|
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 | 17 | class TTree; |
18 | class TClonesArray; | |
19 | ||
6d67b5a7 | 20 | class AliVCluster; |
21 | class AliEMCALRecoUtils; | |
22 | class AliEMCALGeometry; | |
23 | class TGeoHMatrix; | |
24 | class TTree; | |
25 | class TFile; | |
26 | class TString; | |
b20bc239 | 27 | class AliEMCALClusterizer; |
b20bc239 | 28 | class AliEMCALAfterBurnerUF; |
4d3c549c | 29 | class AliEMCALRecParam; |
acf53135 | 30 | |
6d67b5a7 | 31 | class AliEMCALTenderSupply: public AliTenderSupply { |
32 | ||
33 | public: | |
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 | |
766cc9de | 44 | void SetEMCALGeometryName(TString name) { fEMCALGeoName = name ;} |
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 | |
766cc9de | 51 | void SetConfigFileName(TString 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 | |
766cc9de | 59 | void SwitchOnReCalibrateCluster() { fReCalibCluster = kTRUE ;} |
60 | void SwitchOffReCalibrateCluster() { fReCalibCluster = kFALSE ;} | |
c958a2f7 | 61 | |
766cc9de | 62 | void SwitchOnRecalculateClusPos() { fRecalClusPos = kTRUE ;} |
63 | void SwitchOffRecalculateClusPos() { fRecalClusPos = kFALSE ;} | |
6d67b5a7 | 64 | |
8b775c10 | 65 | void SetMisalignmentMatrixSurvey(Int_t misalignSurvey) { fMisalignSurvey = misalignSurvey ;} |
66 | Int_t GetMisalignmentMatrixSurvey() const { return fMisalignSurvey ;} | |
acf53135 | 67 | |
766cc9de | 68 | void SwitchOnCellFiducialRegion() { fFiducial = kTRUE ;} |
69 | void SwitchOffCellFiducialRegion() { fFiducial = kFALSE ;} | |
6d67b5a7 | 70 | |
766cc9de | 71 | void SetNumberOfcellsFromEMCALBorder(Int_t n) { fNCellsFromEMCALBorder = n ;} |
72 | Int_t GetNumberOfcellsFromEMCALBorder() const { return fNCellsFromEMCALBorder ;} | |
6d67b5a7 | 73 | |
766cc9de | 74 | void SwitchOnRecalDistBadChannel() { fRecalDistToBadChannels = kTRUE ;} |
75 | void SwitchOffRecalDistBadChannel() { fRecalDistToBadChannels = kFALSE ;} | |
6d67b5a7 | 76 | |
766cc9de | 77 | Float_t GetRCut() const { return fRcut ;} |
78 | void SetRCut(Float_t rcut) { fRcut = rcut ;} | |
6d67b5a7 | 79 | |
766cc9de | 80 | Double_t GetMass() const { return fMass ;} |
81 | void SetMass(Double_t mass) { fMass = mass ;} | |
6d67b5a7 | 82 | |
766cc9de | 83 | Double_t GetStep() const { return fStep ;} |
84 | void SetStep(Double_t step) { fStep = step ;} | |
6d67b5a7 | 85 | |
6b7df55d | 86 | Double_t GetEtaCut() const { return fEtacut ;} |
766cc9de | 87 | void SetEtaCut(Double_t eta) { fEtacut = eta ;} |
428f69ce | 88 | |
766cc9de | 89 | Double_t GetPhiCut() const { return fPhicut ;} |
90 | void SetPhiCut(Double_t phi) { fPhicut = phi ;} | |
428f69ce | 91 | |
6b7df55d | 92 | void SwitchOnReclustering() { fReClusterize = kTRUE ;} |
93 | void SwitchOffReclustering() { fReClusterize = kFALSE ;} | |
428f69ce | 94 | |
766cc9de | 95 | void SwitchOnCutEtaPhiSum() { fCutEtaPhiSum=kTRUE; fCutEtaPhiSeparate=kFALSE ;} |
96 | void SwitchOnCutEtaPhiSeparate() { fCutEtaPhiSeparate=kTRUE; fCutEtaPhiSum=kFALSE ;} | |
b20bc239 | 97 | |
766cc9de | 98 | void SwitchOnLoadOwnGeometryMatrices() { fLoadGeomMatrices = kTRUE ;} |
99 | void SwitchOffLoadOwnGeometryMatrices() { fLoadGeomMatrices = kFALSE ;} | |
100 | void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fEMCALMatrix[i] = m ;} | |
3b233502 | 101 | |
8b775c10 | 102 | AliEMCALRecParam *GetRecParam() const { return fRecParam ;} |
a0beb012 | 103 | void SetRecParam(AliEMCALRecParam *p) { fRecParam = p ;} |
8b775c10 | 104 | |
acf53135 | 105 | AliEMCALRecoUtils *GetRecoUtils() const { return fEMCALRecoUtils ;} |
b20bc239 | 106 | |
8b775c10 | 107 | //Will update cell list by removing bad channels and recalibration + reclusterize |
108 | void SwitchOnUpdateCell() { fUpdateCell = kTRUE ;} | |
109 | void SwitchOffUpdateCell() { fUpdateCell = kFALSE ;} | |
a0beb012 | 110 | |
111 | void SwitchOnUpdateCellOnly() { fDoUpdateOnly = kTRUE ;} | |
112 | void SwitchOffUpdateCellOnly() { fDoUpdateOnly = kFALSE ;} | |
113 | ||
114 | void SwitchOnTrackMatch() { fDoTrackMatch = kTRUE ;} | |
115 | void SwitchOffTrackMatch() { fDoTrackMatch = kFALSE ;} | |
6d67b5a7 | 116 | |
117 | private: | |
118 | ||
acf53135 | 119 | Int_t InitBadChannels(); |
766cc9de | 120 | |
121 | Bool_t InitClusterization(); | |
122 | ||
acf53135 | 123 | void InitRecParam(); |
124 | ||
766cc9de | 125 | Bool_t InitMisalignMatrix(); |
126 | ||
acf53135 | 127 | Int_t InitRecalib(); |
766cc9de | 128 | |
129 | void Clusterize(); | |
130 | ||
131 | void FillDigitsArray(); | |
132 | ||
133 | void GetPass(); | |
134 | ||
135 | void RecPoints2Clusters(TClonesArray *clus); | |
136 | ||
137 | void RecalibrateCells(); | |
138 | ||
acf53135 | 139 | void UpdateCells(); |
140 | ||
766cc9de | 141 | void UpdateClusters(); |
142 | ||
143 | AliEMCALGeometry *fEMCALGeo; //! EMCAL geometry | |
144 | TString fEMCALGeoName; // name of geometry to use. | |
145 | AliEMCALRecoUtils *fEMCALRecoUtils; // pointer to EMCAL utilities for clusterization | |
146 | TString fConfigName; // name of analysis configuration file | |
147 | Int_t fDebugLevel; // debug level | |
148 | Int_t fNonLinearFunc; // non linearity function | |
149 | Int_t fNonLinearThreshold; // non linearity threshold value for kBeamTesh non linearity function | |
150 | Bool_t fReCalibCluster; // switch for Recalibrate clusters | |
acf53135 | 151 | Bool_t fUpdateCell; // Flag cell update |
766cc9de | 152 | TGeoHMatrix *fEMCALMatrix[10]; // geometry matrices with misalignments |
153 | Bool_t fRecalClusPos; // switch for applying missalignment | |
154 | Bool_t fFiducial; // switch for checking cells in the fiducial region | |
155 | Int_t fNCellsFromEMCALBorder; // number os cells from EMCAL border | |
156 | Bool_t fRecalDistToBadChannels; // switch for recalculation cluster position from bad channel | |
157 | TTree *fInputTree; //! input data tree | |
158 | TFile *fInputFile; //! input data file | |
159 | TString fFilepass; //! input data pass number | |
160 | Double_t fMass; // mass for track matching | |
161 | Double_t fStep; // step size during track matching | |
6b7df55d | 162 | Bool_t fCutEtaPhiSum; // swicth to apply residual cut together |
163 | Bool_t fCutEtaPhiSeparate; // swicth to apply residual cut separately | |
766cc9de | 164 | Float_t fRcut; // residual cut for track matching |
165 | Float_t fEtacut; // eta cut for track matching | |
166 | Float_t fPhicut; // phi cut for track matching | |
167 | TString fBasePath; // base folder path to get root files | |
6b7df55d | 168 | Bool_t fReClusterize; // switch for reclustering |
766cc9de | 169 | AliEMCALClusterizer *fClusterizer; //! clusterizer |
170 | Bool_t fGeomMatrixSet; // set geometry matrices only once, for the first event. | |
171 | Bool_t fLoadGeomMatrices; // matrices set from configuration, not get from geometry.root or from ESDs/AODs | |
172 | AliEMCALRecParam *fRecParam; // reconstruction parameters container | |
a0beb012 | 173 | Bool_t fDoTrackMatch; // do track matching |
174 | Bool_t fDoUpdateOnly; // do only update of cells | |
766cc9de | 175 | AliEMCALAfterBurnerUF *fUnfolder; //! unfolding procedure |
176 | TClonesArray *fDigitsArr; //! digits array | |
177 | TObjArray *fClusterArr; //! recpoints array | |
8b775c10 | 178 | Int_t fMisalignSurvey; //! misalignment matrix survey |
179 | ||
6d67b5a7 | 180 | AliEMCALTenderSupply(const AliEMCALTenderSupply&c); |
181 | AliEMCALTenderSupply& operator= (const AliEMCALTenderSupply&c); | |
182 | ||
a0beb012 | 183 | ClassDef(AliEMCALTenderSupply, 8); // EMCAL tender task |
6d67b5a7 | 184 | }; |
8b775c10 | 185 | |
6d67b5a7 | 186 | #endif |