LCOV - code coverage report
Current view: top level - EMCAL/EMCALrec - AliEMCALUnfolding.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 16 6.2 %
Date: 2016-06-14 17:26:59 Functions: 1 20 5.0 %

          Line data    Source code
       1             : #ifndef ALIEMCALUNFOLDING_H 
       2             : #define ALIEMCALUNFOLDING_H 
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * 
       4             :  * See cxx source for full Copyright notice                               */ 
       5             :       
       6             : //_________________________________________________________________________ 
       7             : //  Base class for the cluster unfolding algorithm  
       8             : //*-- Author: Adam Matyja (SUBATECH) 
       9             :  
      10             : // --- ROOT system --- 
      11             : //#include "AliLog.h" 
      12             : #include "TObject.h"  
      13             : //class TTree; 
      14             : class AliLog ; 
      15             : 
      16             :  
      17             : // --- Standard library --- 
      18             :  
      19             : // --- AliRoot header files --- 
      20             : class AliEMCALGeometry ; 
      21             : //class AliEMCALCalibData ; 
      22             : //class AliCaloCalibPedestal ; 
      23             : class AliEMCALRecPoint ;  
      24             : class AliEMCALDigit ; 
      25             :  
      26             :  
      27             : class AliEMCALUnfolding : public TObject { 
      28             :  
      29             : public: 
      30             :  
      31             :   AliEMCALUnfolding() ;        // default ctor 
      32             :   virtual ~AliEMCALUnfolding() ; // dtorEM 
      33             :   AliEMCALUnfolding(AliEMCALGeometry* geometry);// constructor 
      34             :   AliEMCALUnfolding(AliEMCALGeometry* geometry,Float_t ECALocMaxCut,Double_t *SSPars,Double_t *Par5,Double_t *Par6);// constructor 
      35             :  
      36             :   virtual void Init() ; 
      37             :   virtual void SetInput(Int_t numberOfECAClusters,TObjArray *recPoints,TClonesArray *digitsArr); 
      38             :  
      39             :   //setters and getters 
      40           0 :   virtual void SetNumberOfECAClusters(Int_t n) { fNumberOfECAClusters = n; } 
      41           0 :   virtual Int_t GetNumberOfECAClusters() const { return fNumberOfECAClusters; } 
      42           0 :   virtual void SetRecPoints(TObjArray *rec) { fRecPoints = rec; } 
      43           0 :   virtual TObjArray * GetRecPoints() const { return fRecPoints; } 
      44           0 :   virtual void SetDigitsArr(TClonesArray *digit) { fDigitsArr = digit; } 
      45           0 :   virtual TClonesArray * GetDigitsArr() const { return fDigitsArr; } 
      46           0 :   virtual void SetECALocalMaxCut(Float_t cut) { fECALocMaxCut = cut ; } 
      47           0 :   virtual Float_t GetECALocalMaxCut() const { return fECALocMaxCut; } 
      48           0 :   virtual void SetThreshold(Float_t energy) { fThreshold = energy; } 
      49           0 :   virtual Float_t GetThreshold() const { return fThreshold; } 
      50           0 :   virtual void SetRejectBelowThreshold(Bool_t reject) { fRejectBelowThreshold = reject; }
      51           0 :   virtual Bool_t GetRejectBelowThreshold() const { return fRejectBelowThreshold; }
      52             : 
      53             :   //unfolding main methods 
      54             :   virtual void   MakeUnfolding(); 
      55             :   static Double_t ShowerShapeV2(Double_t x, Double_t y) ; // Shape of EM shower used in unfolding;  
      56             :                                               //class member function (not object member function) 
      57             :   static void UnfoldingChiSquareV2(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag)  ; 
      58             :                                               // Chi^2 of the fit. Should be static to be passes to MINUIT 
      59             :   virtual void SetShowerShapeParams(Double_t *pars) ; 
      60           0 :   virtual Double_t* GetShowerShapeParams() const { return fgSSPars ; } 
      61             :   virtual void SetPar5(Double_t *pars) ; 
      62           0 :   virtual Double_t* GetPar5() const { return fgPar5 ; } 
      63             :   virtual void SetPar6(Double_t *pars) ; 
      64           0 :   virtual Double_t* GetPar6() const { return fgPar6 ; } 
      65             : 
      66             :   virtual Int_t UnfoldOneCluster(AliEMCALRecPoint * iniTower, 
      67             :                                  Int_t nMax, 
      68             :                                  AliEMCALDigit ** maxAt, 
      69             :                                  Float_t * maxAtEnergy,
      70             :                                  TObjArray *list);//input one cluster -> output list
      71             :  
      72             : protected:
      73             :   Int_t              fNumberOfECAClusters ;   // number of clusters found in EC section
      74             :   Float_t            fECALocMaxCut ;          // minimum energy difference to distinguish local maxima in a cluster
      75             :   Float_t            fThreshold ;             // minimum energy for cell to be joined to a cluster
      76             :   Bool_t             fRejectBelowThreshold ;  // split (false) or reject (true) cell energy below threshold after UF
      77             :   AliEMCALGeometry * fGeom;                   //! pointer to geometry for utilities
      78             :   TObjArray        * fRecPoints;              // Array with EMCAL clusters
      79             :   TClonesArray     * fDigitsArr;              // Array with EMCAL digits
      80             :   
      81             : private:
      82             :   AliEMCALUnfolding(const AliEMCALUnfolding &); //copy ctor
      83             :   AliEMCALUnfolding & operator = (const AliEMCALUnfolding &);
      84             :   
      85             :   Bool_t  UnfoldClusterV2(AliEMCALRecPoint * iniEmc, Int_t Nmax,
      86             :                           AliEMCALDigit ** maxAt,
      87             :                           Float_t * maxAtEnergy ); //Unfolds cluster using TMinuit package
      88             :   Bool_t  UnfoldClusterV2old(AliEMCALRecPoint * iniEmc, Int_t Nmax,
      89             :                              AliEMCALDigit ** maxAt,
      90             :                              Float_t * maxAtEnergy ); //Unfolds cluster using TMinuit package
      91             :   Bool_t  FindFitV2(AliEMCALRecPoint * emcRP, AliEMCALDigit ** MaxAt, const Float_t * maxAtEnergy,
      92             :                     Int_t NPar, Float_t * FitParametres) const; //Used in UnfoldClusters, calls TMinuit 
      93             :   
      94             :   static Double_t fgSSPars[8];//! Unfolding shower shape parameters 
      95             :   // function: 
      96             :   // f(r)=exp(-(p0*r)^p1 * (1/(p2+p3*(p0*r)^p1)+p4/(1+p6*(p0*r)^p5) ) ) 
      97             :   // p0,p1,p2,p3,p4 are fixed 
      98             :   // params p5 and p6 are phi-dependent and set in ShowerShapeV2 
      99             :   static Double_t fgPar5[3];//! UF SSPar nr 5 = p0 + phi*p1 + phi^2 *p2 
     100             :   static Double_t fgPar6[3];//! UF SSPar nr 6 = p0 + phi*p1 + phi^2 *p2 
     101             :   static void EvalPar5(Double_t phi); 
     102             :   static void EvalPar6(Double_t phi); 
     103             :   static void EvalParsPhiDependence(Int_t absId, const AliEMCALGeometry *geom); 
     104             :  
     105          42 :   ClassDef(AliEMCALUnfolding,3)  // Unfolding algorithm class
     106             : } ; 
     107             :  
     108             : #endif // AliEMCALUNFOLDING_H 

Generated by: LCOV version 1.11