]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALClusterizer.h
Coverity fixes.
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALClusterizer.h
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 // Modif: 
12 //  August 2002 Yves Schutz: clone PHOS as closely as possible and intoduction
13 //                           of new  IO (à la PHOS)
14 // --- ROOT system ---
15 #include "AliLog.h"
16 #include "TObject.h" 
17 class TTree;
18
19 // --- Standard library ---
20
21 // --- AliRoot header files ---
22 class AliEMCALGeometry ;
23 class AliEMCALCalibData ;
24 class AliCaloCalibPedestal ;
25 #include "AliEMCALUnfolding.h"
26
27 class AliEMCALClusterizer : public TObject {
28
29 public:
30
31   AliEMCALClusterizer() ;        // default ctor
32   virtual ~AliEMCALClusterizer() ; // dtorEM
33   AliEMCALClusterizer(AliEMCALGeometry* geometry);
34   AliEMCALClusterizer(AliEMCALGeometry* geometry, AliEMCALCalibData * calib, AliCaloCalibPedestal * pedestal);
35
36   virtual void    Digits2Clusters(Option_t *option) = 0;
37
38   virtual Float_t Calibrate(const Float_t amp, const Float_t time, const Int_t cellId) ;  // Tranforms Amp to energy 
39   virtual void    Init() ;
40   virtual void    InitParameters() ; //{ AliInfo("Overload this method."); }
41
42   //Get/Set reconstruction parameters
43   virtual void  GetCalibrationParameters(void) ;
44   virtual void  GetCaloCalibPedestal(void) ;
45   virtual void  SetCalibrationParameters(AliEMCALCalibData * calib)   { fCalibData = calib ; }
46   virtual void  SetCaloCalibPedestal(AliCaloCalibPedestal  * caloped) { fCaloPed   = caloped ; }
47   
48   virtual Float_t GetTimeMin()           const { return fTimeMin ; }
49   virtual Float_t GetTimeMax()           const { return fTimeMax ; }
50   virtual Float_t GetTimeCut()           const { return fTimeCut ; }
51   //virtual void    GetNumberOfClustersFound(int numb )const { numb = fNumberOfECAClusters ;} 
52   virtual Float_t GetECAClusteringThreshold()        const { return fECAClusteringThreshold;}  
53   virtual Float_t GetECALocalMaxCut()                const { return fECALocMaxCut;} 
54   virtual Float_t GetECALogWeight()                  const { return fECAW0;}
55   virtual Float_t GetMinECut()                       const { return fMinECut;}
56
57   virtual void SetTimeMin(Float_t t)                                            { fTimeMin = t ;}
58   virtual void SetTimeMax(Float_t t)                                            { fTimeMax = t ;}
59   virtual void SetTimeCut(Float_t t)                                            { fTimeCut = t ;}
60   virtual void SetECAClusteringThreshold(Float_t th)  { fECAClusteringThreshold = th ; }
61   virtual void SetMinECut(Float_t mine)               { fMinECut = mine; }
62   virtual void SetECALocalMaxCut(Float_t cut)         { fECALocMaxCut = cut ; }
63   virtual void SetECALogWeight(Float_t w)             { fECAW0 = w ; }
64   
65   //Unfolding
66   virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) { fToUnfold = toUnfold ;}  
67   virtual void SetSSPars   (Int_t ipar, Double_t par) { fSSPars[ipar] = par  ;}
68   virtual void SetPar5     (Int_t ipar, Double_t par) { fPar5  [ipar] = par  ;}
69   virtual void SetPar6     (Int_t ipar, Double_t par) { fPar6  [ipar] = par  ;}
70   virtual void InitClusterUnfolding() {
71     fClusterUnfolding=new AliEMCALUnfolding(fGeom,fECALocMaxCut,fSSPars,fPar5,fPar6);
72   }
73   
74   virtual void SetInput(TTree *digitsTree);
75   virtual void SetOutput(TTree *clustersTree);
76   
77   virtual void Print(Option_t * option)const ;
78   virtual void PrintRecPoints(Option_t * option);
79   virtual void PrintRecoInfo();                        //*MENU*
80
81   static void     SetInputCalibrated(Bool_t val);
82   
83   virtual const char * Version() const {Warning("Version", "Not Defined") ; return 0 ; } 
84
85 protected:
86
87   virtual void MakeClusters() = 0;
88   
89   static Bool_t fgkIsInputCalibrated; // to enable reclusterization from ESD cells
90   
91   TClonesArray *fDigitsArr; // Array with EMCAL digits
92   TTree *fTreeR;            // Tree with output clusters
93   TObjArray    *fRecPoints; // Array with EMCAL clusters
94   
95   AliEMCALGeometry     * fGeom;       //! pointer to geometry for utilities
96   AliEMCALCalibData    * fCalibData ; //! Calibration database if aval
97   AliCaloCalibPedestal * fCaloPed   ; //! Tower status map if aval
98   
99   Float_t fADCchannelECA ;           // width of one ADC channel for EC section (GeV)
100   Float_t fADCpedestalECA ;          // pedestal of ADC for EC section (GeV) 
101
102   Float_t fTimeMin ;                 // Minimum time of physical signal in a cell/digit
103   Float_t fTimeMax ;                 // Maximum time of physical signal in a cell/digit
104   Float_t fTimeCut ;                 // Maximum time difference between the digits inside EMC cluster
105
106   Bool_t  fDefaultInit;              //! Says if the task was created by defaut ctor (only parameters are initialized)
107   Bool_t  fToUnfold ;                // To perform unfolding 
108   Int_t   fNumberOfECAClusters ;     // number of clusters found in EC section
109   
110   Float_t fECAClusteringThreshold ;  // minimum energy to seed a EC digit in a cluster
111   Float_t fECALocMaxCut ;            // minimum energy difference to distinguish local maxima in a cluster
112   Float_t fECAW0 ;                   // logarithmic weight for the cluster center of gravity calculation
113   Float_t fMinECut;                  // Minimum energy for a digit to be a member of a cluster
114   
115   AliEMCALUnfolding * fClusterUnfolding ; //! pointer to unfolding object
116   Double_t fSSPars[8];// Shower shape parameters 
117   Double_t fPar5[3];  // Shower shape parameter 5
118   Double_t fPar6[3];  // Shower shape parameter 6
119
120 private:
121   AliEMCALClusterizer(const AliEMCALClusterizer &); //copy ctor
122   AliEMCALClusterizer & operator = (const AliEMCALClusterizer &);
123   
124   
125   
126   ClassDef(AliEMCALClusterizer,4)  // Clusterization algorithm class 
127 } ;
128
129 #endif // AliEMCALCLUSTERIZER_H