coverity and coding violations
[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};
acf53135 39 enum MisalignSettngs{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 ;}
103
acf53135 104 AliEMCALRecoUtils *GetRecoUtils() const { return fEMCALRecoUtils ;}
b20bc239 105
766cc9de 106 void SetOCDBPath(const char *path) { fOCDBpath = path ;}
acf53135 107
8b775c10 108 //Will update cell list by removing bad channels and recalibration + reclusterize
109 void SwitchOnUpdateCell() { fUpdateCell = kTRUE ;}
110 void SwitchOffUpdateCell() { fUpdateCell = kFALSE ;}
6d67b5a7 111
112private:
113
acf53135 114 Int_t InitBadChannels();
766cc9de 115
116 Bool_t InitClusterization();
117
acf53135 118 void InitRecParam();
119
766cc9de 120 Bool_t InitMisalignMatrix();
121
acf53135 122 Int_t InitRecalib();
766cc9de 123
124 void Clusterize();
125
126 void FillDigitsArray();
127
128 void GetPass();
129
130 void RecPoints2Clusters(TClonesArray *clus);
131
132 void RecalibrateCells();
133
acf53135 134 void UpdateCells();
135
766cc9de 136 void UpdateClusters();
137
138 AliEMCALGeometry *fEMCALGeo; //! EMCAL geometry
139 TString fEMCALGeoName; // name of geometry to use.
140 AliEMCALRecoUtils *fEMCALRecoUtils; // pointer to EMCAL utilities for clusterization
141 TString fConfigName; // name of analysis configuration file
142 Int_t fDebugLevel; // debug level
143 Int_t fNonLinearFunc; // non linearity function
144 Int_t fNonLinearThreshold; // non linearity threshold value for kBeamTesh non linearity function
145 Bool_t fReCalibCluster; // switch for Recalibrate clusters
acf53135 146 Bool_t fUpdateCell; // Flag cell update
766cc9de 147 TGeoHMatrix *fEMCALMatrix[10]; // geometry matrices with misalignments
148 Bool_t fRecalClusPos; // switch for applying missalignment
149 Bool_t fFiducial; // switch for checking cells in the fiducial region
150 Int_t fNCellsFromEMCALBorder; // number os cells from EMCAL border
151 Bool_t fRecalDistToBadChannels; // switch for recalculation cluster position from bad channel
152 TTree *fInputTree; //! input data tree
153 TFile *fInputFile; //! input data file
154 TString fFilepass; //! input data pass number
155 Double_t fMass; // mass for track matching
156 Double_t fStep; // step size during track matching
6b7df55d 157 Bool_t fCutEtaPhiSum; // swicth to apply residual cut together
158 Bool_t fCutEtaPhiSeparate; // swicth to apply residual cut separately
766cc9de 159 Float_t fRcut; // residual cut for track matching
160 Float_t fEtacut; // eta cut for track matching
161 Float_t fPhicut; // phi cut for track matching
162 TString fBasePath; // base folder path to get root files
6b7df55d 163 Bool_t fReClusterize; // switch for reclustering
766cc9de 164 AliEMCALClusterizer *fClusterizer; //! clusterizer
165 Bool_t fGeomMatrixSet; // set geometry matrices only once, for the first event.
166 Bool_t fLoadGeomMatrices; // matrices set from configuration, not get from geometry.root or from ESDs/AODs
167 AliEMCALRecParam *fRecParam; // reconstruction parameters container
8b775c10 168 Bool_t fRecParamSet; // Flag if rec param already set
766cc9de 169 TString fOCDBpath; // path with OCDB location
170 AliEMCALAfterBurnerUF *fUnfolder; //! unfolding procedure
171 TClonesArray *fDigitsArr; //! digits array
172 TObjArray *fClusterArr; //! recpoints array
8b775c10 173 Int_t fMisalignSurvey; //! misalignment matrix survey
174
6d67b5a7 175 AliEMCALTenderSupply(const AliEMCALTenderSupply&c);
176 AliEMCALTenderSupply& operator= (const AliEMCALTenderSupply&c);
177
8b775c10 178 ClassDef(AliEMCALTenderSupply, 7); // EMCAL tender task
6d67b5a7 179};
8b775c10 180
6d67b5a7 181#endif
182