]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ANALYSIS/TenderSupplies/AliEMCALTenderSupply.h
Several corrections from Constantin, some cosmetics
[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;
28class AliEMCALRecParam;
29class AliEMCALAfterBurnerUF;
6d67b5a7 30
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};
39
766cc9de 40 virtual void Init();
41 virtual void ProcessEvent();
6d67b5a7 42
766cc9de 43 void SetEMCALGeometryName(TString name) { fEMCALGeoName = name ;}
44 TString EMCALGeometryName() const { return fEMCALGeoName ;}
6d67b5a7 45
766cc9de 46 void SetDebugLevel(Int_t level) { fDebugLevel=level ;}
6d67b5a7 47
766cc9de 48 void SetBasePath(const Char_t *basePath) { fBasePath = basePath ;}
b20bc239 49
766cc9de 50 void SetConfigFileName(TString name) { fConfigName = name ;}
413a7463 51
766cc9de 52 void SetNonLinearityFunction(Int_t fun) { fNonLinearFunc = fun ;}
53 Int_t GetNonLinearityFunction() const { return fNonLinearFunc ;}
6d67b5a7 54
766cc9de 55 void SetNonLinearityThreshold(Int_t threshold) { fNonLinearThreshold = threshold ;} //only for Alexei's non linearity correction
56 Int_t GetNonLinearityThreshold() const { return fNonLinearThreshold ;}
6d67b5a7 57
766cc9de 58 void SwitchOnReCalibrateCluster() { fReCalibCluster = kTRUE ;}
59 void SwitchOffReCalibrateCluster() { fReCalibCluster = kFALSE ;}
c958a2f7 60
766cc9de 61 void SwitchOnReCalibrateCell() { fReCalibCell = kTRUE ;}
62 void SwitchOffReCalibrateCell() { fReCalibCell = kFALSE ;}
6d67b5a7 63
766cc9de 64 void SwitchOnRecalculateClusPos() { fRecalClusPos = kTRUE ;}
65 void SwitchOffRecalculateClusPos() { fRecalClusPos = kFALSE ;}
6d67b5a7 66
766cc9de 67 void SwitchOnCellFiducialRegion() { fFiducial = kTRUE ;}
68 void SwitchOffCellFiducialRegion() { fFiducial = kFALSE ;}
6d67b5a7 69
766cc9de 70 void SetNumberOfcellsFromEMCALBorder(Int_t n) { fNCellsFromEMCALBorder = n ;}
71 Int_t GetNumberOfcellsFromEMCALBorder() const { return fNCellsFromEMCALBorder ;}
6d67b5a7 72
766cc9de 73 void SwitchOnRecalDistBadChannel() { fRecalDistToBadChannels = kTRUE ;}
74 void SwitchOffRecalDistBadChannel() { fRecalDistToBadChannels = kFALSE ;}
6d67b5a7 75
766cc9de 76 Float_t GetRCut() const { return fRcut ;}
77 void SetRCut(Float_t rcut) { fRcut = rcut ;}
6d67b5a7 78
766cc9de 79 Double_t GetMass() const { return fMass ;}
80 void SetMass(Double_t mass) { fMass = mass ;}
6d67b5a7 81
766cc9de 82 Double_t GetStep() const { return fStep ;}
83 void SetStep(Double_t step) { fStep = step ;}
6d67b5a7 84
766cc9de 85 Double_t GetEtaCut() const { return fEtacut ;}
86 void SetEtaCut(Double_t eta) { fEtacut = eta ;}
428f69ce 87
766cc9de 88 Double_t GetPhiCut() const { return fPhicut ;}
89 void SetPhiCut(Double_t phi) { fPhicut = phi ;}
428f69ce 90
766cc9de 91 void SwitchOnReclustering() { fReClusterize = kTRUE ;}
92 void SwitchOffReclustering() { fReClusterize = kFALSE ;}
428f69ce 93
766cc9de 94 void SwitchOnCutEtaPhiSum() { fCutEtaPhiSum=kTRUE; fCutEtaPhiSeparate=kFALSE ;}
95 void SwitchOnCutEtaPhiSeparate() { fCutEtaPhiSeparate=kTRUE; fCutEtaPhiSum=kFALSE ;}
b20bc239 96
766cc9de 97 void SwitchOnLoadOwnGeometryMatrices() { fLoadGeomMatrices = kTRUE ;}
98 void SwitchOffLoadOwnGeometryMatrices() { fLoadGeomMatrices = kFALSE ;}
99 void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fEMCALMatrix[i] = m ;}
428f69ce 100
766cc9de 101 AliEMCALRecParam *GetRecParam() const { return fRecParam ;}
3b233502 102
766cc9de 103 AliEMCALRecoUtils *GetRecoUtils() const { return fEMCALRecoUtils ;}
b20bc239 104
766cc9de 105 void SetOCDBPath(const char *path) { fOCDBpath = path ;}
6d67b5a7 106
107private:
108
766cc9de 109 Bool_t InitBadChannels();
110
111 Bool_t InitClusterization();
112
113 Bool_t InitMisalignMatrix();
114
115 Bool_t InitRecalib();
116
117 void Clusterize();
118
119 void FillDigitsArray();
120
121 void GetPass();
122
123 void RecPoints2Clusters(TClonesArray *clus);
124
125 void RecalibrateCells();
126
127 void SetClusterMatchedToTrack (AliESDEvent *event);
128
129 void SetTracksMatchedToCluster(AliESDEvent *event);
130
131 void UpdateClusters();
132
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
6d67b5a7 167
6d67b5a7 168 AliEMCALTenderSupply(const AliEMCALTenderSupply&c);
169 AliEMCALTenderSupply& operator= (const AliEMCALTenderSupply&c);
170
766cc9de 171 ClassDef(AliEMCALTenderSupply, 5); // EMCAL tender task
6d67b5a7 172};
6d67b5a7 173#endif
174