]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALClusterizerv1.h
Correction in Binaries().
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALClusterizerv1.h
index 8fa76004bd96f1f16b52d756bcebfa388601a2ef..6b3630da6f240393fc48e92cc6d452487c340a1d 100644 (file)
@@ -13,6 +13,9 @@
 //  PHOSCpvRP (CPV RecPoints) and AliPHOSClusterizer
 //
 //*-- Author: Yves Schutz (SUBATECH)
+// Modif: 
+//  August 2002 Yves Schutz: clone PHOS as closely as possible and intoduction
+//                           of new  IO (à la PHOS)
 
 // --- ROOT system ---
 
@@ -32,43 +35,48 @@ class AliEMCALClusterizerv1 : public AliEMCALClusterizer {
 public:
   
   AliEMCALClusterizerv1() ;         
-  AliEMCALClusterizerv1(const char * headerFile, const char * name = "Default");
+  AliEMCALClusterizerv1(const char * headerFile, const char * name = "Default", const Bool_t toSplit=kFALSE);
   virtual ~AliEMCALClusterizerv1()  ;
   
   virtual Int_t   AreNeighbours(AliEMCALDigit * d1, AliEMCALDigit * d2)const ; 
                                // Checks if digits are in neighbour cells 
 
-  const TString BranchName() const ; 
-  virtual Float_t Calibrate(Int_t amp, Bool_t inpresho)const ;  // Tranforms Amp to energy 
-
-  virtual void    GetNumberOfClustersFound(int * numb )const{  numb[0] = fNumberOfTowerClusters ; 
-                                                               numb[1] = fNumberOfPreShoClusters ; }
-
-  virtual Float_t GetEmcClusteringThreshold()const{ return fTowerClusteringThreshold;}
-  virtual Float_t GetEmcLocalMaxCut()const        { return fTowerLocMaxCut;} 
-  virtual Float_t GetEmcLogWeight()const          { return fW0;}  
-  virtual Float_t GetTimeGate() const             { return fTimeGate ; }
-  virtual Float_t GetCpvClusteringThreshold()const{ return fPreShoClusteringThreshold;  } 
-  virtual Float_t GetCpvLocalMaxCut()const        { return fPreShoLocMaxCut;} 
-  virtual Float_t GetCpvLogWeight()const          { return fW0CPV;}  
-  virtual char *  GetRecPointsBranch() const      { return (char*) fRecPointsBranchTitle.Data() ;}
-  virtual const Int_t GetRecPointsInRun() const  {return fRecPointsInRun ;} 
-  virtual char *  GetDigitsBranch() const         { return (char*) fDigitsBranchTitle.Data() ;}
+  virtual Float_t Calibrate(Int_t amp, Int_t where)const ;  // Tranforms Amp to energy 
+
+  virtual void    GetNumberOfClustersFound(int * numb )const{ numb[0] = fNumberOfPREClusters ; 
+                                                              numb[1] = fNumberOfECClusters ; 
+                                                              numb[2] = fNumberOfHCClusters ; }
+
+  virtual Float_t GetPREClusteringThreshold()const{ return fPREClusteringThreshold;  } 
+  virtual Float_t GetECClusteringThreshold()const{ return fECClusteringThreshold;}
+  virtual Float_t GetHCClusteringThreshold()const{ return fHCClusteringThreshold;}
+
+  virtual Float_t GetPRELocalMaxCut()const       { return fPRELocMaxCut;} 
+  virtual Float_t GetPREShoLogWeight()const      { return fPREW0;}  
+  virtual Float_t GetECLocalMaxCut()const        { return fECLocMaxCut;} 
+  virtual Float_t GetECLogWeight()const          { return fECW0;}  
+  virtual Float_t GetHCLocalMaxCut()const        { return fHCLocMaxCut;} 
+  virtual Float_t GetHCLogWeight()const          { return fHCW0;}  
+
+  virtual Float_t GetTimeGate() const            { return fTimeGate ; }
+  virtual const char *  GetRecPointsBranch() const{ return GetName() ;}
+  virtual const Int_t GetRecPointsInRun() const   {return fRecPointsInRun ;} 
 
   void    Exec(Option_t *option);                // Does the job
 
   virtual void Print(Option_t * option)const ;
 
-  virtual void SetTowerClusteringThreshold(Float_t cluth)  { fTowerClusteringThreshold = cluth ; }
-  virtual void SetTowerLocalMaxCut(Float_t cut)            { fTowerLocMaxCut = cut ; }
-  virtual void SetTowerLogWeight(Float_t w)                { fW0 = w ; }
-  virtual void SetTimeGate(Float_t gate)                   { fTimeGate = gate ;}
-  virtual void SetPreShoClusteringThreshold(Float_t cluth) { fPreShoClusteringThreshold = cluth ; }
-  virtual void SetPreShoLocalMaxCut(Float_t cut)           { fPreShoLocMaxCut = cut ; }
-  virtual void SetPreShoLogWeight(Float_t w)               { fW0CPV = w ; }
-  virtual void SetDigitsBranch(const char * title) { fDigitsBranchTitle = title  ;}
-  virtual void SetRecPointsBranch(const char *title){fRecPointsBranchTitle = title; }
-  virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) {fToUnfold = toUnfold ;}  
+  virtual void SetECClusteringThreshold(Float_t cluth)  { fECClusteringThreshold = cluth ; }
+  virtual void SetECLocalMaxCut(Float_t cut)            { fECLocMaxCut = cut ; }
+  virtual void SetECLogWeight(Float_t w)                { fECW0 = w ; }
+  virtual void SetHCClusteringThreshold(Float_t cluth)  { fHCClusteringThreshold = cluth ; }
+  virtual void SetHCLocalMaxCut(Float_t cut)            { fHCLocMaxCut = cut ; }
+  virtual void SetHCLogWeight(Float_t w)                { fHCW0 = w ; }
+  virtual void SetTimeGate(Float_t gate)                { fTimeGate = gate ;}
+  virtual void SetPREClusteringThreshold(Float_t cluth) { fPREClusteringThreshold = cluth ; }
+  virtual void SetPRELocalMaxCut(Float_t cut)           { fPRELocMaxCut = cut ; }
+  virtual void SetPRELogWeight(Float_t w)               { fPREW0 = w ; }
+  virtual void SetUnfolding(Bool_t toUnfold = kTRUE )      {fToUnfold = toUnfold ;}  
   static Double_t ShowerShape(Double_t r) ; // Shape of EM shower used in unfolding; 
                                             //class member function (not object member function)
   static void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag)  ;
@@ -79,12 +87,10 @@ protected:
 
   void           WriteRecPoints(Int_t event) ;
   virtual void   MakeClusters( ) ;            
-  virtual Bool_t IsInTower (AliEMCALDigit * digit)const ;     // Tells if id digit is in Tower
-  virtual Bool_t IsInPreShower (AliEMCALDigit * digit)const ;     // Tells if id digit is in PreShower
-
   
 private:
 
+  const TString BranchName() const ; 
   void    GetCalibrationParameters(void) ;
   
   Bool_t  FindFit(AliEMCALTowerRecPoint * emcRP, AliEMCALDigit ** MaxAt, Float_t * maxAtEnergy, 
@@ -100,32 +106,36 @@ private:
 private:
 
   Bool_t  fDefaultInit;              //! Says if the task was created by defaut ctor (only parameters are initialized)
-  TString fHeaderFileName ;          // name of the file which contains gAlice, Tree headers etc.
-  TString fDigitsBranchTitle ;       // name of the file, where digits branch is stored
-  TString fRecPointsBranchTitle ;    // name of the file, where RecPoints branchs are stored
 
   Int_t   fNTowers ;                 // number of Towers in EMCAL
 
   Bool_t  fToUnfold ;                // To perform unfolding 
 
-  Int_t   fNumberOfTowerClusters ;     // number of Tower clusters found 
-  Int_t   fNumberOfPreShoClusters ;    // number of PreShower clusters found
+  Int_t   fNumberOfPREClusters ;     // number of clusters found in PRE section 
+  Int_t   fNumberOfECClusters ;      // number of clusters found in EC section
+  Int_t   fNumberOfHCClusters ;      // number of clusters found in HC section
+  
+  //Calibration parameters... to be replaced by database 
+  Float_t fADCchannelPRE ;          // width of one ADC channel for PRE section (GeV)
+  Float_t fADCpedestalPRE ;         // pedestal of ADC for PRE section (GeV)
+  Float_t fADCchannelEC ;           // width of one ADC channel for EC section (GeV)
+  Float_t fADCpedestalEC ;          // pedestal of ADC for EC section (GeV) 
+  Float_t fADCchannelHC ;           // width of one ADC channel for HC section (GeV)
+  Float_t fADCpedestalHC ;          // pedestal of ADC for HC section (GeV) 
  
-  Float_t fADCchannelTower ;           // width of one ADC channel for Tower (GeV)
-  Float_t fADCpedestalTower ;          // pedestal of ADC for Tower (GeV) 
-  Float_t fADCchannelPreSho ;          // width of one ADC channel for Pre Shower (GeV)
-  Float_t fADCpedestalPreSho ;         // pedestal of ADC for PreShower (GeV)
-
-  Float_t fTowerClusteringThreshold ;  // minimum energy to include a EMC digit in a cluster
-  Float_t fPreShoClusteringThreshold ; // minimum energy to include a CPV digit in a cluster
-  Float_t fTowerLocMaxCut ;            // minimum energy difference to distinguish local maxima in a cluster
-  Float_t fW0 ;                        // logarithmic weight for the cluster center of gravity calculation
-  Float_t fPreShoLocMaxCut ;           //  minimum energy difference to distinguish local maxima in a CPV cluster
-  Float_t fW0CPV ;                   // logarithmic weight for the CPV cluster center of gravity calculation
-  Int_t fRecPointsInRun ;            //! Total number of recpoints in one run
-  Float_t fTimeGate ;                // Maximum time difference between the digits in ont EMC cluster
+  Float_t fECClusteringThreshold ;  // minimum energy to include a EC digit in a cluster
+  Float_t fHCClusteringThreshold ;  // minimum energy to include a HC digit in a cluster
+  Float_t fPREClusteringThreshold ; // minimum energy to include a PRE digit in a cluster
+  Float_t fECLocMaxCut ;            // minimum energy difference to distinguish local maxima in a cluster
+  Float_t fECW0 ;                   // logarithmic weight for the cluster center of gravity calculation
+  Float_t fHCLocMaxCut ;            // minimum energy difference to distinguish local maxima in a cluster
+  Float_t fHCW0 ;                   // logarithmic weight for the cluster center of gravity calculation
+  Float_t fPRELocMaxCut ;           //  minimum energy difference to distinguish local maxima in a CPV cluster
+  Float_t fPREW0 ;                  // logarithmic weight for the CPV cluster center of gravity calculation
+  Int_t fRecPointsInRun ;           //! Total number of recpoints in one run
+  Float_t fTimeGate ;               // Maximum time difference between the digits in ont EMC cluster
     
-  ClassDef(AliEMCALClusterizerv1,1)   // Clusterizer implementation version 1
+  ClassDef(AliEMCALClusterizerv1,2)   // Clusterizer implementation version 1
 
 };