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 */
8 //_________________________________________________________________________
9 // Base class for the clusterization algorithm (pure abstract)
10 //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (SUBATECH & Kurchatov Institute)
12 // Clusterization mother class. Contains common methods/data members of different
13 // clusterizers. GCB 2010
14 //_________________________________________________________________________
16 // --- ROOT system ---
18 #include <TClonesArray.h>
21 // --- AliRoot header files ---
23 class AliEMCALGeometry;
24 class AliEMCALCalibData;
25 class AliCaloCalibPedestal;
26 class AliEMCALRecParam;
27 #include "AliEMCALUnfolding.h"
29 class AliEMCALClusterizer : public TObject {
33 AliEMCALClusterizer();
34 AliEMCALClusterizer(AliEMCALGeometry *geometry);
35 AliEMCALClusterizer(AliEMCALGeometry *geometry, AliEMCALCalibData *calib, AliCaloCalibPedestal *pedestal);
36 virtual ~AliEMCALClusterizer();
40 virtual void DeleteDigits();
41 virtual void DeleteRecPoints();
43 virtual void Digits2Clusters(Option_t *option) = 0;
45 virtual void Calibrate(Float_t & amp, Float_t & time, const Int_t cellId);
47 virtual void InitParameters();
48 virtual void InitParameters(const AliEMCALRecParam* recParam);
50 virtual void Print (Option_t *option) const ;
51 virtual void PrintRecPoints(Option_t *option);
52 virtual void PrintRecoInfo();
54 virtual const char *Version() const { Warning("Version", "Not Defined");
59 virtual void SetInput (TTree *digitsTree );
60 virtual void SetOutput(TTree *clustersTree);
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; }
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; }
75 virtual void SetTimeMin(Float_t t) { fTimeMin = t; }
76 virtual void SetTimeMax(Float_t t) { fTimeMax = t; }
77 virtual void SetTimeCut(Float_t t) { fTimeCut = t; }
78 virtual void SetECAClusteringThreshold(Float_t th) { fECAClusteringThreshold = th; }
79 virtual void SetMinECut(Float_t mine) { fMinECut = mine; }
80 virtual void SetECALocalMaxCut(Float_t cut) { fECALocMaxCut = cut; }
81 virtual void SetECALogWeight(Float_t w) { fECAW0 = w; }
85 virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) { fToUnfold = toUnfold; }
86 virtual void SetSSPars (Int_t ipar, Double_t par) { fSSPars[ipar] = par; }
87 virtual void SetPar5 (Int_t ipar, Double_t par) { fPar5 [ipar] = par; }
88 virtual void SetPar6 (Int_t ipar, Double_t par) { fPar6 [ipar] = par; }
89 virtual void InitClusterUnfolding() {
90 fClusterUnfolding=new AliEMCALUnfolding(fGeom,fECALocMaxCut,fSSPars,fPar5,fPar6);
91 fClusterUnfolding->SetThreshold(fMinECut); }
93 //NxN (only used in NxN clusterizer)
95 virtual void SetNRowDiff(Int_t ) { ; }
96 virtual void SetNColDiff(Int_t ) { ; }
97 virtual void SetEnergyGrad(Bool_t ) { ; }
99 virtual Int_t GetNRowDiff() const { return -1 ; }
100 virtual Int_t GetNColDiff() const { return -1 ; }
101 virtual Bool_t GetEnergyGrad() const { return -1 ; }
103 // add for clusterizing task
105 virtual void SetDigitsArr(TClonesArray *arr) { fDigitsArr = arr ; }
106 virtual TClonesArray *GetDigits() { if (!fDigitsArr)
107 fDigitsArr = new TClonesArray("AliEMCALDigit",12000);
108 return fDigitsArr ; }
109 virtual const TObjArray *GetRecPoints() const { return fRecPoints ; }
110 void SetInputCalibrated(Bool_t val);
111 void SetJustClusters (Bool_t val);
116 virtual void MakeClusters() = 0;
118 Bool_t fIsInputCalibrated; // to enable reclusterization from ESD cells
119 Bool_t fJustClusters; // false for standard reco
120 TClonesArray *fDigitsArr; // array with EMCAL digits
121 TTree *fTreeR; // tree with output clusters
122 TObjArray *fRecPoints; // array with EMCAL clusters
124 AliEMCALGeometry *fGeom; //!pointer to geometry for utilities
125 AliEMCALCalibData *fCalibData; //!calibration database if aval
126 AliCaloCalibPedestal *fCaloPed; //!tower status map if aval
128 Float_t fADCchannelECA; // width of one ADC channel for EC section (GeV)
129 Float_t fADCpedestalECA; // pedestal of ADC for EC section (GeV)
130 Float_t fTimeECA; // calibration parameter for channels time
132 Float_t fTimeMin; // minimum time of physical signal in a cell/digit
133 Float_t fTimeMax; // maximum time of physical signal in a cell/digit
134 Float_t fTimeCut; // maximum time difference between the digits inside EMC cluster
136 Bool_t fDefaultInit; //!says if the task was created by defaut ctor (only parameters are initialized)
137 Bool_t fToUnfold; // says if unfolding should be performed
138 Int_t fNumberOfECAClusters; // number of clusters found in EC section
140 Float_t fECAClusteringThreshold; // minimum energy to seed a EC digit in a cluster
141 Float_t fECALocMaxCut; // minimum energy difference to distinguish local maxima in a cluster
142 Float_t fECAW0; // logarithmic weight for the cluster center of gravity calculation
143 Float_t fMinECut; // minimum energy for a digit to be a member of a cluster
145 AliEMCALUnfolding *fClusterUnfolding; //!pointer to unfolding object
146 Double_t fSSPars[8]; // shower shape parameters
147 Double_t fPar5[3]; // shower shape parameter 5
148 Double_t fPar6[3]; // shower shape parameter 6
151 AliEMCALClusterizer( const AliEMCALClusterizer &);
152 AliEMCALClusterizer & operator = (const AliEMCALClusterizer &);
154 ClassDef(AliEMCALClusterizer,7) // Clusterization algorithm class
157 #endif // AliEMCALCLUSTERIZER_H