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 //make data members which are initialised locally non streamable.
17 #include <AliTenderSupply.h>
23 class AliEMCALRecoUtils;
24 class AliEMCALGeometry;
29 class AliEMCALClusterizer;
30 class AliEMCALRecParam;
31 class AliEMCALAfterBurnerUF;
33 class AliEMCALTenderSupply: public AliTenderSupply {
36 AliEMCALTenderSupply();
37 AliEMCALTenderSupply(const char *name, const AliTender *tender=NULL);
38 virtual ~AliEMCALTenderSupply();
40 enum NonlinearityFunctions{kPi0MC=0,kPi0GammaGamma=1,kPi0GammaConversion=2,kNoCorrection=3,kBeamTest=4,kBeamTestCorrected=5};
43 virtual void ProcessEvent();
45 void SetEMCALGeometryName(TString name) { fEMCALGeoName = name ;}
46 TString EMCALGeometryName() const { return fEMCALGeoName ;}
48 void SetDebugLevel(Int_t level) {fDebugLevel=level ;}
50 void SetBasePath(const Char_t *basePath) { fBasePath = basePath; } // mfasel: add function to set a path where to find the root files
52 void SetConfigFileName(TString name) { fConfigName = name;}
54 void SetNonLinearityFunction(Int_t fun) { fNonLinearFunc = fun ;}
55 Int_t GetNonLinearityFunction() const { return fNonLinearFunc ;}
57 void SetNonLinearityThreshold(Int_t threshold) { fNonLinearThreshold = threshold ;} //only for Alexei's non linearity correction
58 Int_t GetNonLinearityThreshold() const { return fNonLinearThreshold ;}
60 void SwitchOnReCalibrateCluster() { fReCalibCluster = kTRUE ;}
61 void SwitchOffReCalibrateCluster() { fReCalibCluster = kFALSE ;}
63 void SwitchOnReCalibrateCell() { fReCalibCell = kTRUE ;}
64 void SwitchOffReCalibrateCell() { fReCalibCell = kFALSE ;}
66 void SwitchOnRecalculateClusPos() { fRecalClusPos = kTRUE ;}
67 void SwitchOffRecalculateClusPos() { fRecalClusPos = kFALSE ;}
69 void SwitchOnCellFiducialRegion() { fFiducial = kTRUE ;}
70 void SwitchOffCellFiducialRegion() { fFiducial = kFALSE ;}
72 void SetNumberOfcellsFromEMCALBorder(Int_t n) { fNCellsFromEMCALBorder = n ;}
73 Int_t GetNumberOfcellsFromEMCALBorder() const { return fNCellsFromEMCALBorder ;}
75 void SwitchOnRecalDistBadChannel() { fRecalDistToBadChannels = kTRUE ;}
76 void SwitchOffRecalDistBadChannel() { fRecalDistToBadChannels = kFALSE ;}
78 Float_t GetRCut() const { return fRcut ;}
79 void SetRCut(Float_t Rcut) { fRcut = Rcut ;}
81 Double_t GetMass() const { return fMass ;}
82 void SetMass(Double_t mass){ fMass=mass ;}
84 Double_t GetStep() const { return fStep ;}
85 void SetStep(Double_t step){ fStep=step ;}
87 void SwitchOnReclustering() {fReClusterize = kTRUE;}
88 void SwitchOffReclustering() {fReClusterize = kFALSE;}
90 void SwitchOnLoadOwnGeometryMatrices() { fLoadGeomMatrices = kTRUE ; }
91 void SwitchOffLoadOwnGeometryMatrices() { fLoadGeomMatrices = kFALSE ; }
92 void SetGeometryMatrixInSM(TGeoHMatrix* m, Int_t i) { fGeomMatrix[i] = m ; }
93 AliEMCALRecParam *GetRecParam() const { return fRecParam; }
95 void SetOCDBPath(const char *path) { fOCDBpath = path ; }
99 Bool_t InitBadChannels();
100 Bool_t InitRecalib();
101 Bool_t InitMisalignMatrix();
103 void SetClusterMatchedToTrack(AliESDEvent *event);
104 void SetTracksMatchedToCluster(AliESDEvent *event);
106 void RecalibrateCells(); //Recalibrate cells
108 void InitClusterization();
109 void FillDigitsArray();
111 void UpdateClusters();
112 void RecPoints2Clusters(TClonesArray *clus);
114 AliEMCALGeometry *fEMCALGeo; //! EMCAL geometry
115 TString fEMCALGeoName; // Name of geometry to use.
117 AliEMCALRecoUtils *fEMCALRecoUtils; //! Pointer to EMCAL utilities for clusterization
118 TString fConfigName; // Name of analysis configuration file
120 Int_t fDebugLevel; // debug level
122 Int_t fNonLinearFunc; // Non linearity function
123 Int_t fNonLinearThreshold; // Non linearity threshold value for kBeamTesh non linearity function
125 Bool_t fReCalibCluster; // switch for Recalibrate clusters
126 Bool_t fReCalibCell; // switch for Recalibrate cell
128 TGeoHMatrix *fEMCALMatrix[10]; //! Geometry matrices with misalignments
129 Bool_t fRecalClusPos; // switch for applying missalignment
131 Bool_t fFiducial; // switch for checking cells in the fiducial region
132 Int_t fNCellsFromEMCALBorder; // number os cells from EMCAL border
133 Bool_t fRecalDistToBadChannels; // switch for recalculation cluster position from bad channel
135 TTree *fInputTree; //! input data tree
136 TFile *fInputFile; //! input data file
137 TString fFilepass; // input data pass number
139 Double_t fMass; // mass for track matching
140 Double_t fStep; // step size during track matching
141 Float_t fRcut; // residual cut for track matching
143 TString fBasePath; // mfasel: Base Folder path to get root files
145 Bool_t fReClusterize; // switch for reclustering
146 AliEMCALClusterizer *fClusterizer; //!clusterizer
148 Bool_t fGeomMatrixSet; // set geometry matrices only once, for the first event.
149 TGeoHMatrix *fGeomMatrix[10]; //! geometry matrices with alignments
151 Bool_t fLoadGeomMatrices; // Matrices set from configuration, not get from geometry.root or from ESDs/AODs
153 AliEMCALRecParam *fRecParam; //! reconstruction parameters container
154 TString fOCDBpath; // Path with OCDB location
156 AliEMCALAfterBurnerUF *fUnfolder; //! Unfolding procedure
158 TClonesArray *fDigitsArr; //-> Digits array
159 TObjArray *fClusterArr; //-> Recpoints array
161 AliEMCALTenderSupply(const AliEMCALTenderSupply&c);
162 AliEMCALTenderSupply& operator= (const AliEMCALTenderSupply&c);
164 ClassDef(AliEMCALTenderSupply, 3); // TPC tender task