]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSEmcRecPoint.h
Coding convention obeyed
[u/mrichter/AliRoot.git] / PHOS / AliPHOSEmcRecPoint.h
index b7b0eac89d3030d4256afa35b6339c633a636acf..f61ab7c6642a060e06084e226cb2c702d77ccda5 100644 (file)
@@ -5,18 +5,17 @@
 
 /* $Id$ */
 
-//////////////////////////////////////////////////
-//  Rec Point in the EM calorimeter of PHOS     //
-//                                              //
-//  Author Dmitri Peressounko RRC KI            //
-//   comment: contains list of AliPHOSDigit's * //  
-//     and evaluates a few average values       //
-//////////////////////////////////////////////////
+//_________________________________________________________________________
+//  RecPoint implementation for PHOS-EMC 
+//  An EmcRecPoint is a cluster of digits   
+//           
+//*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
 
 // --- ROOT system ---
 
-#include "TObject.h"
-
+//#include "TObject.h"
+#include "TArrayI.h"
 // --- Standard library ---
 
 // --- AliRoot header files ---
@@ -28,41 +27,69 @@ class AliPHOSEmcRecPoint : public AliPHOSRecPoint  {
 
 public:
 
-  AliPHOSEmcRecPoint(){} ;                    
-  AliPHOSEmcRecPoint(Float_t W0, Float_t LocMaxCut) ;
-  virtual ~AliPHOSEmcRecPoint() ; 
-  void        AddDigit(AliDigitNew & digit, Float_t Energy) ;  // add a digit to the digits list  
-  Int_t       Compare(TObject * obj) ;                         // method for sorting  
-  
-  Float_t     GetDelta (){ return fDelta ; }    
-  Float_t     GetDispersion() ;                               // computes the dispersion of the shower
-  void        GetElipsAxis(Float_t * lambda) ;                // computes the axis of shower ellipsoide
-  Float_t *   GetEnergiesList(){return fEnergyList ;} 
-  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) ; 
-  Float_t     GetLocMaxCut () {return fLocMaxCut ; }
-  Float_t     GetLogWeightCut (){return fW0 ; }
-  Float_t     GetMaximalEnergy(void) ;                        // get the highest energy in the cluster
-  Int_t       GetMaximumMultiplicity() { return   fMaxDigit ; } 
-  Int_t       GetMultiplicity(void) const { return fMulDigit ; } 
-  Int_t       GetMultiplicityAtLevel(const Float_t level) ;   // computes multiplicity of digits with energy above relative level
-  Int_t       GetNumberOfLocalMax(Int_t *  maxAt, Float_t * maxAtEnergy) ; // searches for the local maxima 
+  AliPHOSEmcRecPoint() ;
+  AliPHOSEmcRecPoint(const char * opt) ;
+  AliPHOSEmcRecPoint(const AliPHOSEmcRecPoint & rp) {
+    // cpy ctor requested by Coding Convention 
+    // but not yet needed
+    assert(0==1) ; 
+  } 
  
-  Float_t     GetTotalEnergy(void) const { return fAmp ; }    // in EMC RecPoint Amp = Energy
-  void        GetLocalPosition(TVector3 &Lpos) ;              // computes the position in the PHOS module 
-  Bool_t      IsEmc(void) {return kTRUE ; } 
-  Bool_t IsSortable() const { return kTRUE ; } 
-  void Print(Option_t * opt = "void") ; 
-
-private:
-
-  Bool_t AreNeighbours(AliPHOSDigit * digit1, AliPHOSDigit * digit2 ) ;
-
-  Float_t  fDelta ;        // parameter used to sort the clusters   
-  Float_t  fLocMaxCut ;    // parameter used for local maximum searc
-  Float_t * fEnergyList ;  // energy of digits
-  Float_t fW0 ;            // logarithmic weight factor for center of gravity calculation
-
-  ClassDef(AliPHOSEmcRecPoint,1)  // EMC RecPoint, version 1
+  virtual ~AliPHOSEmcRecPoint() ;  
+
+  virtual void  AddDigit(AliPHOSDigit & digit, Float_t Energy) ;          // add a digit to the digits list  
+  Int_t       Compare(const TObject * obj) const;                         // method for sorting  
+
+  virtual void  EvalAll(Float_t logWeight,TClonesArray * digits) ;
+
+  virtual void  ExecuteEvent(Int_t event, Int_t px, Int_t py) const; 
+
+  Float_t         GetCoreEnergy()const {return fCoreEnergy ;}
+  virtual Float_t GetDispersion()const {return fDispersion ;}
+  virtual void    GetElipsAxis(Float_t * lambda)const { lambda[0] = fLambda[0] ;
+                                                        lambda[1] = fLambda[1] ; }
+  Float_t *   GetEnergiesList() const {return fEnergyList ;}       // gets the list of energies making this recpoint
+  Float_t     GetMaximalEnergy(void) const ;                       // get the highest energy in the cluster
+  Int_t       GetMaximumMultiplicity() const {return fMaxDigit ;}  // gets the maximum number of digits allowed
+  Int_t       GetMultiplicity(void) const { return fMulDigit ; }   // gets the number of digits making this recpoint
+  Int_t       GetMultiplicityAtLevel(const Float_t level) const ;  // computes multiplicity of digits with 
+                                                                   // energy above relative level
+  Short_t     GetNExMax(void) const {return fNExMax ;}             // Number of maxima found in cluster in unfolding:
+                                                                   // 0: was no unfolging
+                                                                   //-1: unfolding failed
+  void        SetNExMax(Int_t nmax){fNExMax = static_cast<Short_t>(nmax) ;}
+  virtual Int_t GetNumberOfLocalMax(AliPHOSDigit **  maxAt, Float_t * maxAtEnergy,
+                                    Float_t locMaxCut,TClonesArray * digits ) const ; 
+                                                                   // searches for the local maxima 
+  //returns number of local maxima in parent cluster or -2 if unfolding failed
+  Float_t     GetTime(void) const{return  fTime ; } 
+  Bool_t      IsEmc(void) const { return kTRUE ; }                 // true if the recpoint is in EMC
+  Bool_t      IsSortable() const {return kTRUE ; }                 // says that emcrecpoints are sortable objects 
+  void        Print(Option_t * opt = "void")const ; 
+  void        Purify(Float_t threshold) ;                          //Removes digits below threshold
+
+  AliPHOSEmcRecPoint & operator = (const AliPHOSEmcRecPoint & rvalue)  {
+    // assignement operator requested by coding convention but not needed
+    assert(0==1) ;
+    return *this ; 
+  }
+
+ protected:
+          void  EvalCoreEnergy(Float_t logWeight,TClonesArray * digits) ;             
+  virtual void  EvalLocalPosition(Float_t logWeight,TClonesArray * digits) ;// computes the position in the PHOS module 
+  virtual void  EvalDispersion(Float_t logWeight,TClonesArray * digits) ;   // computes the dispersion of the shower
+  virtual void  EvalElipsAxis(Float_t logWeight, TClonesArray * digits );   // computes the axis of shower ellipsoide
+          void  EvalTime( TClonesArray * digits );
+  virtual Bool_t AreNeighbours(AliPHOSDigit * digit1, AliPHOSDigit * digit2 ) const ;
+
+  Float_t fCoreEnergy ;       // energy in a shower core 
+  Float_t fLambda[2] ;        // shower ellipse axes
+  Float_t fDispersion ;       // shower dispersion
+  Float_t *fEnergyList ;      //[fMulDigit] energy of digits
+  Float_t fTime ;             // Time of the digit with maximal energy deposition
+  Short_t fNExMax ;           //number of (Ex-)maxima before unfolding
+  
+  ClassDef(AliPHOSEmcRecPoint,1)  // EMC RecPoint (cluster)
 
 };