]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSRecCpvManager.cxx
1. Adding a fit parameters as data member of the class
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRecCpvManager.cxx
index 17eb26682902db0b7a3853198a86c8a3b683c6b0..f393c18d6d6eb4b93bfa19aa3fb43e48c98d4c12 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
 
- //_________________________________________________________________________
+//_________________________________________________________________________
 // Class for the management by the CPV reconstruction.
-//                  
+////                  
 //*-- Author   : Boris Polichtchouk (IHEP, Protvino) 6 Mar 2001
 //
 // --- ROOT system ---
 
+#include <TMath.h>
+
 // --- Standard library ---
 
 // --- AliRoot header files ---
 
 #include "AliPHOSRecCpvManager.h"
-#include "AliPHOSGetter.h"
+#include "AliPHOSGeometry.h" 
 
 ClassImp(AliPHOSRecCpvManager) 
 
 //____________________________________________________________________________
-
-  AliPHOSRecCpvManager::AliPHOSRecCpvManager()
+AliPHOSRecCpvManager::AliPHOSRecCpvManager() :
+  fOneGamChisqCut(3.),
+  fOneGamInitialStep(0.00005),
+  fOneGamChisqMin(1.),
+  fOneGamStepMin(0.0005),
+  fOneGamNumOfIterations(50),
+  fTwoGamInitialStep(0.00005),
+  fTwoGamChisqMin(1.),
+  fTwoGamEmin(0.1),
+  fTwoGamStepMin(0.00005),
+  fTwoGamNumOfIterations(50),  
+  fThr0(0.),
+  fSqdCut(0.) 
 {
   // Put a comment here
-
-  fOneGamChisqCut = 3.; // If Chi2/dof > fOneGamChisqCut, split point.
-
-  fOneGamInitialStep = 0.00005;
-  fOneGamChisqMin = 1.;
-  fOneGamStepMin = 0.0005;
-  fOneGamNumOfIterations = 50;
-
-  fTwoGamInitialStep = 0.00005;
-  fTwoGamChisqMin = 1.;
-  fTwoGamEmin = 0.1;
-  fTwoGamStepMin = 0.00005;
-  fTwoGamNumOfIterations = 50;  
-
-//    fThr0 = 0.0285; // Min. energy of rec. point. If E<fThr0, point deleted.
-//    fSqdCut = 3.; // Min. distance (in cm) between two rec points.
-
-  fThr0 = 0.; 
-  fSqdCut = 0.; 
-  
   SetTitle("Cpv Reconstruction Manager");
 }
 
@@ -63,7 +57,7 @@ AliPHOSRecCpvManager::~AliPHOSRecCpvManager(void)
   // Put a comment here
 }
 
-Float_t AliPHOSRecCpvManager::Dispersion(Float_t etot, Float_t ai, Float_t ei) const
+Float_t AliPHOSRecCpvManager::Dispersion(Float_t etot, Float_t ai) const
 {
   //"Dispresion" of energy deposition in the cell.
   // etot is the total shower energy, ai is the
@@ -74,7 +68,7 @@ Float_t AliPHOSRecCpvManager::Dispersion(Float_t etot, Float_t ai, Float_t ei) c
   return kConst*ai*(1.-ai/etot);
 }
 
-Float_t AliPHOSRecCpvManager::OneGamChi2(Float_t ai, Float_t ei, Float_t etot, Float_t& Gi)
+Float_t AliPHOSRecCpvManager::OneGamChi2(Float_t ai, Float_t ei, Float_t etot, Float_t& Gi) const
 {
   //"Chi2" for one cell.
   // etot is the total "shower" energy, ai is the
@@ -118,8 +112,8 @@ void AliPHOSRecCpvManager::AG(Float_t ei, Float_t xi, Float_t yi, Float_t& ai, F
   //xi and yi are the distances along x and y from reference point 
   // to the pad center.
 
-  AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ; 
-  const AliPHOSGeometry* geom = gime->PHOSGeometry();
+  AliPHOSGeometry * geom =  AliPHOSGeometry::GetInstance() ;
+
   Float_t celZ = geom->GetPadSizeZ();
   Float_t celY = geom->GetPadSizePhi();
 
@@ -161,7 +155,7 @@ Float_t AliPHOSRecCpvManager::Fcml(Float_t x, Float_t y)
     - TMath::ATan(x*y/(7*kb*TMath::Sqrt((7*kb)*(7*kb) + x*x+y*y)))
     + TMath::ATan(x*y/(9*kb*TMath::Sqrt((9*kb)*(9*kb) + x*x+y*y))); 
   
-  Float_t fcml = ka*fff/6.2831853071796;
+  Float_t fcml = ka*fff/TMath::TwoPi();
 //    Info("Fcml", "fcml: %f", fcml) ;
   return fcml;
 
@@ -183,7 +177,7 @@ Float_t AliPHOSRecCpvManager::GradX(Float_t x, Float_t y)
     - y*(1.-x*x/skv)*7*kb*TMath::Sqrt(skv)/((7*kb)*(7*kb)*skv+x*x*y*y)
     + y*(1.-x*x/skv)*9*kb*TMath::Sqrt(skv)/((9*kb)*(9*kb)*skv+x*x*y*y);
       
-  Float_t grad    = ka*gradient/6.2831853071796;
+  Float_t grad    = ka*gradient/TMath::TwoPi();
   return grad;
 }
 
@@ -192,7 +186,7 @@ Float_t AliPHOSRecCpvManager::GradY(Float_t x, Float_t y)
 {
   // Put a comment here
   
-  const Float_t a = 1.0;
+  const Float_t ka = 1.0;
   const Float_t kb = 0.70;
  
   Float_t skv      = kb*kb + x*x + y*y;
@@ -202,7 +196,7 @@ Float_t AliPHOSRecCpvManager::GradY(Float_t x, Float_t y)
     - x*(1.-y*y/skv)*7*kb*TMath::Sqrt(skv)/((7*kb)*(7*kb)*skv+x*x*y*y)
     + x*(1.-y*y/skv)*9*kb*TMath::Sqrt(skv)/((9*kb)*(9*kb)*skv+x*x*y*y);
   
-  Float_t grad    = a*gradient/6.2831853071796;
+  Float_t grad    = ka*gradient/TMath::TwoPi();
   return grad;
 }