]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALClusterizer.h
deleting unused class AliEMCALCalibHistoProducer and adding new class AliEMCALCalibTe...
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALClusterizer.h
index 598791f3936988fa47285881831f2015e811f966..4aa0956328ae4a78ac1d2ba122615f2551011e6c 100644 (file)
 //  August 2002 Yves Schutz: clone PHOS as closely as possible and intoduction
 //                           of new  IO (à la PHOS)
 // --- ROOT system ---
-
-#include "TTask.h" 
+#include "AliLog.h"
+#include "TObject.h" 
+class TTree;
 
 // --- Standard library ---
 
 // --- AliRoot header files ---
+class AliEMCALGeometry ;
+class AliEMCALCalibData ;
+class AliCaloCalibPedestal ;
+class AliEMCALUnfolding ;
 
-//#include "AliEMCALDigit.h"
-
-class AliEMCALClusterizer : public TTask {
+class AliEMCALClusterizer : public TObject {
 
 public:
 
   AliEMCALClusterizer() ;        // default ctor
-  AliEMCALClusterizer(const char * headerFile, const char * name, const Bool_t toSplit) ;
-  virtual ~AliEMCALClusterizer() ; // dtor
-
-  virtual Float_t GetTowerClusteringThreshold()const {Warning("GetTowerClusteringThreshold", "Not Defined") ; return 0. ; }
-  virtual Float_t GetTowerLocalMaxCut()const {Warning("GetTowerLocalMaxCut", "Not Defined") ; return 0. ; }
-  virtual Float_t GetTowerLogWeight()const {Warning("GetTowerLogWeight", "Not Defined") ; return 0. ; }
-  virtual Float_t GetTimeGate() const {Warning("GetTimeGate", "Not Defined") ; return 0. ; }
-  virtual Float_t GetPreShoClusteringThreshold()const {Warning("GetPreShoClusteringThreshold", "Not Defined") ; return 0. ; }
-  virtual Float_t GetPreShoLocalMaxCut()const {Warning("GetPreShoLocalMaxCut", "Not Defined") ; return 0. ; }
-  virtual Float_t GetPreShoLogWeight()const {Warning("GetPreShoLogWeight", "Not Defined") ; return 0. ; }
-  virtual const char *  GetRecPointsBranch() const {Warning("GetRecPointsBranch", "Not Defined") ; return 0 ; }
-  virtual const Int_t GetRecPointsInRun()  const {Warning("GetRecPointsInRun", "Not Defined") ; return 0 ; }
-  virtual const char *  GetDigitsBranch() const  {Warning("GetDigitsBranch", "Not Defined") ; return 0 ; }
-
-  virtual void MakeClusters() {Warning("MakeClusters", "Not Defined") ; }
-  virtual void Print(Option_t * option)const {Warning("Print", "Not Defined") ; }
-
-  virtual void SetTowerClusteringThreshold(Float_t cluth) {Warning("SetTowerClusteringThreshold", "Not Defined") ; }
-  virtual void SetTowerLocalMaxCut(Float_t cut) {Warning("SetTowerLocalMaxCut", "Not Defined") ; }
-  virtual void SetTowerLogWeight(Float_t w) {Warning("SetTowerLogWeight", "Not Defined") ; }
-  virtual void SetTimeGate(Float_t gate) {Warning("SetTimeGate", "Not Defined") ; }
-  virtual void SetPreShoClusteringThreshold(Float_t cluth) {Warning("SetPreShoClusteringThreshold", "Not Defined") ; }
-  virtual void SetPreShoLocalMaxCut(Float_t cut) {Warning("SetPreShoLocalMaxCut", "Not Defined") ; }
-  virtual void SetPreShoLogWeight(Float_t w) {Warning("SetPreShoLogWeight", "Not Defined") ; }
-  virtual void SetDigitsBranch(const char * title) {Warning("SetDigitsBranch", "Not Defined") ; }
-  virtual void SetRecPointsBranch(const char *title) {Warning("SetRecPointsBranch", "Not Defined") ; } 
-  virtual void SetUnfolding(Bool_t toUnfold ) {Warning("SetUnfolding", "Not Defined") ; }
+  virtual ~AliEMCALClusterizer() ; // dtorEM
+  AliEMCALClusterizer(AliEMCALGeometry* geometry);
+  AliEMCALClusterizer(AliEMCALGeometry* geometry, AliEMCALCalibData * calib, AliCaloCalibPedestal * pedestal);
+
+  virtual void    Digits2Clusters(Option_t *option) = 0;
+
+  virtual Float_t Calibrate(const Float_t amp, const Float_t time, const Int_t cellId) ;  // Tranforms Amp to energy 
+  virtual void    Init() ;
+  virtual void    InitParameters() ; //{ AliInfo("Overload this method."); }
+
+  //Get/Set reconstruction parameters
+  virtual void  GetCalibrationParameters(void) ;
+  virtual void  GetCaloCalibPedestal(void) ;
+  virtual void  SetCalibrationParameters(AliEMCALCalibData * calib)   { fCalibData = calib ; }
+  virtual void  SetCaloCalibPedestal(AliCaloCalibPedestal  * caloped) { fCaloPed   = caloped ; }
+  
+  virtual Float_t GetTimeMin()           const { return fTimeMin ; }
+  virtual Float_t GetTimeMax()           const { return fTimeMax ; }
+  virtual Float_t GetTimeCut()           const { return fTimeCut ; }
+  //virtual void    GetNumberOfClustersFound(int numb )const { numb = fNumberOfECAClusters ;} 
+  virtual Float_t GetECAClusteringThreshold()        const { return fECAClusteringThreshold;}  
+  virtual Float_t GetECALocalMaxCut()                const { return fECALocMaxCut;} 
+  virtual Float_t GetECALogWeight()                  const { return fECAW0;}
+  virtual Float_t GetMinECut()                       const { return fMinECut;}
+
+  virtual void SetTimeMin(Float_t t)                                           { fTimeMin = t ;}
+  virtual void SetTimeMax(Float_t t)                                           { fTimeMax = t ;}
+  virtual void SetTimeCut(Float_t t)                                           { fTimeCut = t ;}
+  virtual void SetECAClusteringThreshold(Float_t th)  { fECAClusteringThreshold = th ; }
+  virtual void SetMinECut(Float_t mine)               { fMinECut = mine; }
+  virtual void SetECALocalMaxCut(Float_t cut)         { fECALocMaxCut = cut ; }
+  virtual void SetECALogWeight(Float_t w)             { fECAW0 = w ; }
+  virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) {fToUnfold = toUnfold ;}  
+
+  virtual void SetInput(TTree *digitsTree);
+  virtual void SetOutput(TTree *clustersTree);
+  
+  virtual void Print(Option_t * option)const ;
+  virtual void PrintRecPoints(Option_t * option);
+  virtual void PrintRecoInfo();                        //*MENU*
+
+  static void     SetInputCalibrated(Bool_t val);
+  
   virtual const char * Version() const {Warning("Version", "Not Defined") ; return 0 ; } 
 
 protected:
+
+  virtual void MakeClusters() = 0;
+  
+  static Bool_t fgkIsInputCalibrated; // to enable reclusterization from ESD cells
+  
+  TClonesArray *fDigitsArr; // Array with EMCAL digits
+  TTree *fTreeR;            // Tree with output clusters
+  TObjArray    *fRecPoints; // Array with EMCAL clusters
   
-  TFile * fSplitFile ;             //! file in which RecPoints will eventually be stored
-  Bool_t  fToSplit ;               //! Should we write to splitted file
+  AliEMCALGeometry     * fGeom;       //! pointer to geometry for utilities
+  AliEMCALCalibData    * fCalibData ; //! Calibration database if aval
+  AliCaloCalibPedestal * fCaloPed   ; //! Tower status map if aval
+  
+  Float_t fADCchannelECA ;           // width of one ADC channel for EC section (GeV)
+  Float_t fADCpedestalECA ;          // pedestal of ADC for EC section (GeV) 
+
+  Float_t fTimeMin ;                 // Minimum time of physical signal in a cell/digit
+  Float_t fTimeMax ;                 // Maximum time of physical signal in a cell/digit
+  Float_t fTimeCut ;                 // Maximum time difference between the digits inside EMC cluster
 
-  ClassDef(AliEMCALClusterizer,2)  // Clusterization algorithm class 
+  Bool_t  fDefaultInit;              //! Says if the task was created by defaut ctor (only parameters are initialized)
+  Bool_t  fToUnfold ;                // To perform unfolding 
+  Int_t   fNumberOfECAClusters ;     // number of clusters found in EC section
+  
+  Float_t fECAClusteringThreshold ;  // minimum energy to seed a EC digit in a cluster
+  Float_t fECALocMaxCut ;            // minimum energy difference to distinguish local maxima in a cluster
+  Float_t fECAW0 ;                   // logarithmic weight for the cluster center of gravity calculation
+  Float_t fMinECut;                  // Minimum energy for a digit to be a member of a cluster
+  
+  AliEMCALUnfolding * fClusterUnfolding ; //! pointer to unfolding object
+  Double_t fSSPars[8];// Shower shape parameters 
+  Double_t fPar5[3];  // Shower shape parameter 5
+  Double_t fPar6[3];  // Shower shape parameter 6
 
+private:
+  AliEMCALClusterizer(const AliEMCALClusterizer &); //copy ctor
+  AliEMCALClusterizer & operator = (const AliEMCALClusterizer &);
+  
+  
+  
+  ClassDef(AliEMCALClusterizer,4)  // Clusterization algorithm class 
 } ;
 
 #endif // AliEMCALCLUSTERIZER_H