]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSClusterizerv1.h
fixing small memory leak
[u/mrichter/AliRoot.git] / PHOS / AliPHOSClusterizerv1.h
index 05207a9e1ab708871af93d8b76a5c7da0bea76bd..2892832e360346a6a47b295b29c9e947e408df57 100644 (file)
@@ -75,6 +75,8 @@ public:
   AliPHOSClusterizerv1() ;
   AliPHOSClusterizerv1(AliPHOSGeometry *geom);
   virtual ~AliPHOSClusterizerv1()  ;
+
+  void    InitParameters() ;
   
   virtual Int_t   AreNeighbours(AliPHOSDigit * d1, AliPHOSDigit * d2)const ; 
                                // Checks if digits are in neighbour cells 
@@ -85,10 +87,10 @@ public:
   virtual Float_t GetEmcClusteringThreshold()const{ return fEmcClusteringThreshold;}
   virtual Float_t GetEmcLocalMaxCut()const        { return fEmcLocMaxCut;} 
   virtual Float_t GetEmcLogWeight()const          { return fW0;}  
-  virtual Float_t GetEmcTimeGate() const          { return fEmcTimeGate ; }
   virtual Float_t GetCpvClusteringThreshold()const{ return fCpvClusteringThreshold;  } 
   virtual Float_t GetCpvLocalMaxCut()const        { return fCpvLocMaxCut;} 
   virtual Float_t GetCpvLogWeight()const          { return fW0CPV;}  
+  virtual Float_t GetEcoreRadius()const           { return fEcoreRadius;}  
   //  virtual const char *  GetRecPointsBranch() const{ return GetName() ;}
 
   virtual void    Digits2Clusters(Option_t *option);
@@ -98,11 +100,11 @@ public:
   virtual void SetEmcClusteringThreshold(Float_t cluth)  { fEmcClusteringThreshold = cluth ; }
   virtual void SetEmcLocalMaxCut(Float_t cut)            { fEmcLocMaxCut = cut ; }
   virtual void SetEmcLogWeight(Float_t w)                { fW0 = w ; }
-  virtual void SetEmcTimeGate(Float_t gate)              { fEmcTimeGate = gate ;}
   virtual void SetCpvClusteringThreshold(Float_t cluth)  { fCpvClusteringThreshold = cluth ; }
   virtual void SetCpvLocalMaxCut(Float_t cut)            { fCpvLocMaxCut = cut ; }
   virtual void SetCpvLogWeight(Float_t w)                { fW0CPV = w ; }
   virtual void SetUnfolding(Bool_t toUnfold = kTRUE )    { fToUnfold = toUnfold ;}
+  virtual void SetCoreRadius(Float_t coreRadius)         { fEcoreRadius = coreRadius ;}
   //Switch to "on flyght" mode, without writing to TreeR and file  
   void SetWriting(Bool_t toWrite = kFALSE){fWrite = toWrite;} 
   static Double_t ShowerShape(Double_t x, Double_t z) ; // Shape of EM shower used in unfolding; 
@@ -120,7 +122,10 @@ protected:
   virtual Bool_t IsInCpv (AliPHOSDigit * digit)const ;     // Tells if id digit is in CPV
   void           CleanDigits(TClonesArray * digits) ;
   void           SetDistancesToBadChannels();
-
+  virtual Float_t Calibrate(Float_t amp, Int_t absId) const ;  // Tranforms ADC counts to energy   
+  virtual Float_t CalibrateT(Float_t amp, Int_t absId) const ;  //Tranforms Sample counts to sec.
+  Bool_t CheckTimeGate(Float_t t1, Float_t amp1, Float_t t2, Float_t amp2)const ; //Checks if time difference is reasonable
+   
 private:
   AliPHOSClusterizerv1(const AliPHOSClusterizerv1 & clu) ;
   AliPHOSClusterizerv1 & operator = (const AliPHOSClusterizerv1 & obj);
@@ -128,7 +133,6 @@ private:
   Bool_t  FindFit(AliPHOSEmcRecPoint * emcRP, AliPHOSDigit ** MaxAt, Float_t * maxAtEnergy, 
                  Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit
   void    Init() ;
-  void    InitParameters() ;
 
   virtual void   MakeUnfolding() ;
   void           UnfoldCluster(AliPHOSEmcRecPoint * iniEmc,Int_t Nmax, 
@@ -142,6 +146,7 @@ private:
 
   Bool_t  fToUnfold ;                // To perform unfolding 
   Bool_t  fWrite ;                   // Write RecPoints to TreeR  
+  Bool_t  fDigitsUsed[53760];        //Mark digits as already used in cluster (EMC:5*56*64 ; CPV: 5*56*128)
  
   Int_t   fNumberOfEmcClusters ;     // number of EMC clusters found
   Int_t   fNumberOfCpvClusters ;     // number of CPV clusters found
@@ -152,11 +157,13 @@ private:
   Float_t fW0 ;                      // logarithmic weight for the cluster center of gravity calculation
   Float_t fCpvLocMaxCut ;            // 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 fEmcTimeGate ;             // Maximum time difference between the digits in ont EMC cluster
-
+  Float_t fTimeGateLowAmp ;          // Threshold for good/bad time measurement
+  Float_t fTimeGateLow ;             // Time difference between cells with low amplitude
+  Float_t fTimeGateHigh ;            // Time difference between cells with good time measurement
+  Float_t fEcoreRadius ;             // Radius within which the core energy is calculated, in cm
 
-  ClassDef(AliPHOSClusterizerv1,6)   // Clusterizer implementation version 1
+  ClassDef(AliPHOSClusterizerv1,8)   // Clusterizer implementation version 1
 
 };