]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSClusterizerv1.h
Arrays with variable size created by new
[u/mrichter/AliRoot.git] / PHOS / AliPHOSClusterizerv1.h
index 508a99bf2f9170ec7150c2ef65f22e418d9f99dc..3e1cc860abb628b2f5908551228eee7315211c94 100644 (file)
 //  results are stored in TreeR#, branches PHOSEmcRP (EMC recPoints),
 //  PHOSCpvRP (CPV RecPoints) and AliPHOSClusterizer
 //
-//*-- Author: Yves Schutz (SUBATECH)
+//*-- Author: Dmitri Peressounko (SUBATECH)
 
 // --- ROOT system ---
-
+#include "TArrayS.h"
 // --- Standard library ---
 
 // --- AliRoot header files ---
@@ -25,14 +25,14 @@ class AliPHOSEmcRecPoint ;
 class AliPHOSDigit ;
 class AliPHOSDigitizer ;
 class AliPHOSGeometry ;
-
+class AliPHOSCalibrationData ;
 
 class AliPHOSClusterizerv1 : public AliPHOSClusterizer {
   
 public:
   
   AliPHOSClusterizerv1() ;         
-  AliPHOSClusterizerv1(const char * headerFile, const char * name = "Default", const char * from = 0);
+  AliPHOSClusterizerv1(const char * headerFile, const char * name = "Default", const Bool_t toSplit=kFALSE);
   virtual ~AliPHOSClusterizerv1()  ;
   
   virtual Int_t   AreNeighbours(AliPHOSDigit * d1, AliPHOSDigit * d2)const ; 
@@ -50,9 +50,9 @@ public:
   virtual Float_t GetCpvClusteringThreshold()const{ return fCpvClusteringThreshold;  } 
   virtual Float_t GetCpvLocalMaxCut()const        { return fCpvLocMaxCut;} 
   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 GetPurifyThreshold()const       {return fPurifyThreshold; }
+  virtual const char *  GetRecPointsBranch() const{ return GetName() ;}
+  virtual const Int_t GetRecPointsInRun() const   {return fRecPointsInRun ;} 
 
   void    Exec(Option_t *option);                // Does the job
 
@@ -61,13 +61,16 @@ 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 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 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 SetUnfolding(Bool_t toUnfold = kTRUE )    { fToUnfold = toUnfold ;}
+  virtual void SetPirifyThreshold(Float_t threshold)     {fPurifyThreshold = threshold ;}
+  void SetCalibrVersion(const char* version = "v1",Int_t run=1)  //Provides specification of calibrationData
+    {fCalibrVersion = version ; fCalibrRun = run ;} 
+  void SetPatterns(TArrayS * pats){if(fPatterns) delete fPatterns ; 
+                                  fPatterns = new TArrayS(*pats) ;} 
   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)  ;
@@ -84,12 +87,13 @@ protected:
   
 private:
 
-  const TString BranchName() const ; 
+  const   TString BranchName() const ; 
   void    GetCalibrationParameters(void) ;
   
   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    Init() ;
+  void    InitParameters() ;
 
   virtual void   MakeUnfolding() ;
   void           UnfoldCluster(AliPHOSEmcRecPoint * iniEmc,Int_t Nmax, 
@@ -98,10 +102,7 @@ private:
 
 private:
 
-  TString fFrom ;                    // name of Digits 
-  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
+  Bool_t  fDefaultInit;              //! Says if the task was created by defaut ctor (only parameters are initialized)
 
   Int_t   fEmcCrystals ;             // number of EMC cristalls in PHOS
 
@@ -110,11 +111,18 @@ private:
   Int_t   fNumberOfEmcClusters ;     // number of EMC clusters found 
   Int_t   fNumberOfCpvClusters ;     // number of CPV clusters found
  
+  //Calibration parameters
+  AliPHOSCalibrationData * fPedestals ; //!
+  AliPHOSCalibrationData * fGains ;    //!
+  TArrayS                * fPatterns ;// Array of trigger patterns of events to handle
+  TString fCalibrVersion ;          //Version of calibration Data  
+  Int_t   fCalibrRun ;              //Specification of Calibration data
   Float_t fADCchanelEmc ;           // width of one ADC channel in GeV
   Float_t fADCpedestalEmc ;         //
   Float_t fADCchanelCpv ;           // width of one ADC channel in CPV 'popugais'
   Float_t fADCpedestalCpv ;         // 
-
+  
+  Float_t fPurifyThreshold ;         // threshold for cell energies after unfolding
   Float_t fEmcClusteringThreshold ;  // minimum energy to include a EMC digit in a cluster
   Float_t fCpvClusteringThreshold ;  // minimum energy to include a CPV digit in a cluster
   Float_t fEmcLocMaxCut ;            // minimum energy difference to distinguish local maxima in a cluster