]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIEMCALCLUSTERIZER_H | |
2 | #define ALIEMCALCLUSTERIZER_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //_________________________________________________________________________ | |
9 | // Base class for the clusterization algorithm (pure abstract) | |
10 | //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (SUBATECH & Kurchatov Institute) | |
11 | // | |
12 | // Clusterization mother class. Contains common methods/data members of different | |
13 | // clusterizers. GCB 2010 | |
14 | //_________________________________________________________________________ | |
15 | ||
16 | // --- ROOT system --- | |
17 | #include <TObject.h> | |
18 | #include <TClonesArray.h> | |
19 | class TTree; | |
20 | ||
21 | // --- AliRoot header files --- | |
22 | #include "AliLog.h" | |
23 | class AliEMCALGeometry; | |
24 | class AliEMCALCalibData; | |
25 | class AliCaloCalibPedestal; | |
26 | class AliEMCALRecParam; | |
27 | #include "AliEMCALUnfolding.h" | |
28 | ||
29 | class AliEMCALClusterizer : public TObject { | |
30 | ||
31 | public: | |
32 | ||
33 | AliEMCALClusterizer(); | |
34 | AliEMCALClusterizer(AliEMCALGeometry *geometry); | |
35 | AliEMCALClusterizer(AliEMCALGeometry *geometry, AliEMCALCalibData *calib, AliCaloCalibPedestal *pedestal); | |
36 | virtual ~AliEMCALClusterizer(); | |
37 | ||
38 | // main methods | |
39 | ||
40 | virtual void DeleteDigits(); | |
41 | virtual void DeleteRecPoints(); | |
42 | ||
43 | virtual void Digits2Clusters(Option_t *option) = 0; | |
44 | ||
45 | virtual void Calibrate(Float_t & amp, Float_t & time, const Int_t cellId); | |
46 | virtual void Init(); | |
47 | virtual void InitParameters(); | |
48 | virtual void InitParameters(const AliEMCALRecParam* recParam); | |
49 | ||
50 | virtual void Print (Option_t *option) const ; | |
51 | virtual void PrintRecPoints(Option_t *option); | |
52 | virtual void PrintRecoInfo(); | |
53 | ||
54 | virtual const char *Version() const { Warning("Version", "Not Defined"); | |
55 | return 0 ; } | |
56 | ||
57 | //Getters-Setters | |
58 | ||
59 | virtual void SetInput (TTree *digitsTree ); | |
60 | virtual void SetOutput(TTree *clustersTree); | |
61 | ||
62 | virtual void GetCalibrationParameters(void); | |
63 | virtual void GetCaloCalibPedestal(void); | |
64 | virtual void SetCalibrationParameters(AliEMCALCalibData *calib) { fCalibData = calib; } | |
65 | virtual void SetCaloCalibPedestal(AliCaloCalibPedestal *caped) { fCaloPed = caped; } | |
66 | ||
67 | virtual Float_t GetTimeMin() const { return fTimeMin; } | |
68 | virtual Float_t GetTimeMax() const { return fTimeMax; } | |
69 | virtual Float_t GetTimeCut() const { return fTimeCut; } | |
70 | virtual Float_t GetECAClusteringThreshold() const { return fECAClusteringThreshold; } | |
71 | virtual Float_t GetECALocalMaxCut() const { return fECALocMaxCut; } | |
72 | virtual Float_t GetECALogWeight() const { return fECAW0; } | |
73 | virtual Float_t GetMinECut() const { return fMinECut; } | |
74 | virtual Bool_t GetRejectBelowThreshold() const { return fRejectBelowThreshold; } | |
75 | ||
76 | virtual void SetTimeMin(Float_t t) { fTimeMin = t; } | |
77 | virtual void SetTimeMax(Float_t t) { fTimeMax = t; } | |
78 | virtual void SetTimeCut(Float_t t) { fTimeCut = t; } | |
79 | virtual void SetECAClusteringThreshold(Float_t th) { fECAClusteringThreshold = th; } | |
80 | virtual void SetMinECut(Float_t mine) { fMinECut = mine; } | |
81 | virtual void SetECALocalMaxCut(Float_t cut) { fECALocMaxCut = cut; } | |
82 | virtual void SetECALogWeight(Float_t w) { fECAW0 = w; } | |
83 | virtual void SetRejectBelowThreshold(Bool_t reject) { fRejectBelowThreshold = reject; } | |
84 | ||
85 | //Unfolding | |
86 | ||
87 | virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) { fToUnfold = toUnfold; } | |
88 | virtual void SetSSPars (Int_t ipar, Double_t par) { fSSPars[ipar] = par; } | |
89 | virtual void SetPar5 (Int_t ipar, Double_t par) { fPar5 [ipar] = par; } | |
90 | virtual void SetPar6 (Int_t ipar, Double_t par) { fPar6 [ipar] = par; } | |
91 | virtual void InitClusterUnfolding() { | |
92 | fClusterUnfolding=new AliEMCALUnfolding(fGeom,fECALocMaxCut,fSSPars,fPar5,fPar6); | |
93 | fClusterUnfolding->SetThreshold(fMinECut); | |
94 | fClusterUnfolding->SetRejectBelowThreshold(fRejectBelowThreshold); } | |
95 | ||
96 | //NxN (only used in NxN clusterizer) | |
97 | ||
98 | virtual void SetNRowDiff(Int_t ) { ; } | |
99 | virtual void SetNColDiff(Int_t ) { ; } | |
100 | virtual void SetEnergyGrad(Bool_t ) { ; } | |
101 | ||
102 | virtual Int_t GetNRowDiff() const { return -1 ; } | |
103 | virtual Int_t GetNColDiff() const { return -1 ; } | |
104 | virtual Bool_t GetEnergyGrad() const { return -1 ; } | |
105 | ||
106 | // add for clusterizing task | |
107 | ||
108 | virtual void SetDigitsArr(TClonesArray *arr) { fDigitsArr = arr ; } | |
109 | virtual TClonesArray *GetDigits() { if (!fDigitsArr) | |
110 | fDigitsArr = new TClonesArray("AliEMCALDigit",12000); | |
111 | return fDigitsArr ; } | |
112 | virtual const TObjArray *GetRecPoints() const { return fRecPoints ; } | |
113 | void SetInputCalibrated(Bool_t val); | |
114 | void SetJustClusters (Bool_t val); | |
115 | ||
116 | ||
117 | protected: | |
118 | ||
119 | virtual void MakeClusters() = 0; | |
120 | ||
121 | Bool_t fIsInputCalibrated; // to enable reclusterization from ESD cells | |
122 | Bool_t fJustClusters; // false for standard reco | |
123 | TClonesArray *fDigitsArr; // array with EMCAL digits | |
124 | TTree *fTreeR; // tree with output clusters | |
125 | TObjArray *fRecPoints; // array with EMCAL clusters | |
126 | ||
127 | AliEMCALGeometry *fGeom; //!pointer to geometry for utilities | |
128 | AliEMCALCalibData *fCalibData; //!calibration database if aval | |
129 | AliCaloCalibPedestal *fCaloPed; //!tower status map if aval | |
130 | ||
131 | Float_t fADCchannelECA; // width of one ADC channel for EC section (GeV) | |
132 | Float_t fADCpedestalECA; // pedestal of ADC for EC section (GeV) | |
133 | Float_t fTimeECA; // calibration parameter for channels time | |
134 | ||
135 | Float_t fTimeMin; // minimum time of physical signal in a cell/digit | |
136 | Float_t fTimeMax; // maximum time of physical signal in a cell/digit | |
137 | Float_t fTimeCut; // maximum time difference between the digits inside EMC cluster | |
138 | ||
139 | Bool_t fDefaultInit; //!says if the task was created by defaut ctor (only parameters are initialized) | |
140 | Bool_t fToUnfold; // says if unfolding should be performed | |
141 | Int_t fNumberOfECAClusters; // number of clusters found in EC section | |
142 | ||
143 | Float_t fECAClusteringThreshold; // minimum energy to seed a EC digit in a cluster | |
144 | Float_t fECALocMaxCut; // minimum energy difference to distinguish local maxima in a cluster | |
145 | Float_t fECAW0; // logarithmic weight for the cluster center of gravity calculation | |
146 | Float_t fMinECut; // minimum energy for a digit to be a member of a cluster | |
147 | Bool_t fRejectBelowThreshold; // split (false-default) or reject (true) cell energy below threshold after UF | |
148 | ||
149 | AliEMCALUnfolding *fClusterUnfolding; //!pointer to unfolding object | |
150 | Double_t fSSPars[8]; // shower shape parameters | |
151 | Double_t fPar5[3]; // shower shape parameter 5 | |
152 | Double_t fPar6[3]; // shower shape parameter 6 | |
153 | ||
154 | private: | |
155 | AliEMCALClusterizer( const AliEMCALClusterizer &); | |
156 | AliEMCALClusterizer & operator = (const AliEMCALClusterizer &); | |
157 | ||
158 | ClassDef(AliEMCALClusterizer,8) // Clusterization algorithm class | |
159 | ||
160 | }; | |
161 | #endif // AliEMCALCLUSTERIZER_H |