]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALClusterizer.h
4aa0956328ae4a78ac1d2ba122615f2551011e6c
[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 class AliEMCALUnfolding ;
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   virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) {fToUnfold = toUnfold ;}  
65
66   virtual void SetInput(TTree *digitsTree);
67   virtual void SetOutput(TTree *clustersTree);
68   
69   virtual void Print(Option_t * option)const ;
70   virtual void PrintRecPoints(Option_t * option);
71   virtual void PrintRecoInfo();                        //*MENU*
72
73   static void     SetInputCalibrated(Bool_t val);
74   
75   virtual const char * Version() const {Warning("Version", "Not Defined") ; return 0 ; } 
76
77 protected:
78
79   virtual void MakeClusters() = 0;
80   
81   static Bool_t fgkIsInputCalibrated; // to enable reclusterization from ESD cells
82   
83   TClonesArray *fDigitsArr; // Array with EMCAL digits
84   TTree *fTreeR;            // Tree with output clusters
85   TObjArray    *fRecPoints; // Array with EMCAL clusters
86   
87   AliEMCALGeometry     * fGeom;       //! pointer to geometry for utilities
88   AliEMCALCalibData    * fCalibData ; //! Calibration database if aval
89   AliCaloCalibPedestal * fCaloPed   ; //! Tower status map if aval
90   
91   Float_t fADCchannelECA ;           // width of one ADC channel for EC section (GeV)
92   Float_t fADCpedestalECA ;          // pedestal of ADC for EC section (GeV) 
93
94   Float_t fTimeMin ;                 // Minimum time of physical signal in a cell/digit
95   Float_t fTimeMax ;                 // Maximum time of physical signal in a cell/digit
96   Float_t fTimeCut ;                 // Maximum time difference between the digits inside EMC cluster
97
98   Bool_t  fDefaultInit;              //! Says if the task was created by defaut ctor (only parameters are initialized)
99   Bool_t  fToUnfold ;                // To perform unfolding 
100   Int_t   fNumberOfECAClusters ;     // number of clusters found in EC section
101   
102   Float_t fECAClusteringThreshold ;  // minimum energy to seed a EC digit in a cluster
103   Float_t fECALocMaxCut ;            // minimum energy difference to distinguish local maxima in a cluster
104   Float_t fECAW0 ;                   // logarithmic weight for the cluster center of gravity calculation
105   Float_t fMinECut;                  // Minimum energy for a digit to be a member of a cluster
106   
107   AliEMCALUnfolding * fClusterUnfolding ; //! pointer to unfolding object
108   Double_t fSSPars[8];// Shower shape parameters 
109   Double_t fPar5[3];  // Shower shape parameter 5
110   Double_t fPar6[3];  // Shower shape parameter 6
111
112 private:
113   AliEMCALClusterizer(const AliEMCALClusterizer &); //copy ctor
114   AliEMCALClusterizer & operator = (const AliEMCALClusterizer &);
115   
116   
117   
118   ClassDef(AliEMCALClusterizer,4)  // Clusterization algorithm class 
119 } ;
120
121 #endif // AliEMCALCLUSTERIZER_H