LCOV - code coverage report
Current view: top level - EMCAL/EMCALbase - AliEMCALRecPoint.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 23 40 57.5 %
Date: 2016-06-14 17:26:59 Functions: 21 37 56.8 %

          Line data    Source code
       1             : #ifndef ALIEMCALRECPOINT_H
       2             : #define ALIEMCALRECPOINT_H
       3             : /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : //_________________________________________________________________________
       6             : //  Base Class for EMCAL Reconstructed Points  
       7             : //  A recpoint being equivalent to a cluster in EMCAL terminology
       8             : //  
       9             : //  
      10             : //*-- Author: Yves Schutz (SUBATECH)
      11             : //*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
      12             : //*-- Author: Heather Gray (LBL): merged AliEMCALRecPoint and AliEMCALTowerRecPoint 02/04
      13             : 
      14             : // --- ROOT system ---
      15             : #include <TVector3.h>
      16             : class TGeoManager;
      17             : class TGeoPhysicalNode;
      18             : class TPad;
      19             : class TPaveText;
      20             : class TGraph;
      21             : class Riostream;
      22             : // --- Standard library ---
      23             : 
      24             : // --- AliRoot header files ---
      25             : 
      26             : #include "AliCluster.h"
      27             : class AliEMCALDigit;
      28             : class AliDigitNew;
      29             : class AliEMCALGeometry;
      30             : class AliEMCALHit;
      31             : class AliCaloCalibPedestal;
      32             : 
      33             : class AliEMCALRecPoint : public AliCluster {
      34             : 
      35             :  public:
      36             :   
      37             :   typedef TObjArray RecPointsList ; 
      38             : 
      39             :   AliEMCALRecPoint() ;                   // ctor         
      40             :   AliEMCALRecPoint(const char * opt) ;   // ctor 
      41             :   AliEMCALRecPoint(const AliEMCALRecPoint & rp);
      42             : 
      43             :   AliEMCALRecPoint& operator= (const AliEMCALRecPoint &rp);
      44             : 
      45             :   virtual ~AliEMCALRecPoint();
      46             : 
      47             :   virtual void    AddDigit(AliEMCALDigit & digit, const Float_t energy, const Bool_t shared); 
      48             :   virtual Int_t   Compare(const TObject * obj) const;  
      49             :   virtual void    Draw(Option_t * option="") ;
      50             : 
      51          66 :   virtual void    SetClusterType(Int_t ver) { fClusterType = ver ; }
      52           0 :   virtual Int_t   GetClusterType()    const { return fClusterType; }
      53             : 
      54             :   virtual void    EvalAll           (Float_t logWeight, TClonesArray * digits, const Bool_t justClusters);
      55             :   virtual void    EvalLocalPosition (Float_t logWeight, TClonesArray * digits);
      56             :   virtual void    EvalGlobalPosition(Float_t logWeight, TClonesArray * digits);
      57             : 
      58             :   virtual void    EvalPrimaries(TClonesArray * digits) ;
      59             :   virtual void    EvalParents  (TClonesArray * digits) ;
      60             : 
      61             :   void            EvalLocal2TrackingCSTransform();
      62             :   void            EvalLocalPositionFit(Double_t deff, Double_t w0, Double_t phiSlope,TClonesArray * digits);
      63             :   Bool_t          EvalLocalPosition2(TClonesArray *digits, TArrayD &ed);
      64             :   Bool_t          EvalLocalPositionFromDigits(const Double_t esum, const Double_t deff, const Double_t w0, 
      65             :                                               TClonesArray *digits, TArrayD &ed, TVector3 &locPos);
      66             :   Bool_t          EvalLocalPositionFromDigits(TClonesArray *digits, TArrayD &ed, TVector3 &locPos);
      67             :   static  void    GetDeffW0(const Double_t esum, Double_t &deff,  Double_t &w0);
      68             : 
      69             :   virtual void    GetGlobalPosition(TVector3 & gpos) const; // return global position (x, y, z) in ALICE
      70             :   virtual void    GetLocalPosition (TVector3 & lpos) const; // return local position  (x, y, z) in EMCAL SM
      71             :   
      72           0 :   virtual Int_t * GetPrimaries(Int_t & number)       const { number = fMulTrack  ; 
      73           0 :                                                              return fTracksList  ; }
      74          66 :   virtual Int_t * GetParents  (Int_t & number)       const { number = fMulParent ; 
      75          33 :                                                              return fParentsList ; }
      76          66 :   virtual Float_t * GetParentsDE()                   const { return fDEParentsList ; }
      77             : 
      78             :   virtual void    SetParents  (Int_t nParents, Int_t* parents) { // Needed in particular case in tender
      79           0 :     fMulParent = nParents;
      80           0 :     if(fParentsList) delete [] fParentsList ;
      81           0 :     fParentsList = parents ;                                   }
      82             : 
      83             :   virtual void    SetParentsDE (Float_t* parentsde) { // Needed in particular case in tender
      84           0 :     if(fDEParentsList) delete [] fDEParentsList ;
      85           0 :     fDEParentsList = parentsde ;                               }
      86             :   
      87         520 :   virtual Int_t   GetDigitsMultiplicity(void)  const { return fMulDigit    ; }
      88           0 :   Int_t           GetIndexInList()             const { return fIndexInList ; }
      89           0 :   virtual int *   GetDigitsList(void)          const { return fDigitsList  ; }
      90          66 :   virtual Float_t GetEnergy()                  const { return fAmp         ; }
      91           0 :   Float_t         GetCoreEnergy()              const { return fCoreEnergy  ; }
      92          66 :   virtual Float_t GetDispersion()              const { return fDispersion  ; }
      93          66 :   virtual void    GetElipsAxis(Float_t * lambda) const {lambda[0] = fLambda[0]; lambda[1] = fLambda[1];};
      94          66 :   Float_t *       GetEnergiesList()            const { return fEnergyList  ; } // gets the list of energies making this recpoint
      95             :   Double_t        GetPointEnergy()             const;                          // gets point energy (sum of energy list)
      96             :   Float_t         GetMaximalEnergy(void)       const ;                         // get the highest energy in the cluster
      97             :   Int_t           GetMaximalEnergyIndex(void)  const ;                         // get the index of highest energy digit
      98           0 :   Int_t           GetMaximumMultiplicity()     const { return fMaxDigit    ; } // gets the maximum number of digits allowed
      99         132 :   Int_t           GetMultiplicity(void)        const { return fMulDigit    ; } // gets the number of digits making this recpoint
     100             :   Int_t           GetMultiplicityAtLevel(Float_t level) const ;                // computes multiplicity of digits with 
     101          66 :   Int_t *         GetAbsId()                   const { return fAbsIdList   ; }
     102          99 :   Int_t           GetAbsId(Int_t i)            const { if(i>=0 && i<fMulDigit)
     103          33 :                                                         return fAbsIdList[i]; 
     104          33 :                                                         else return -1     ; }
     105          66 :   Int_t           GetAbsIdMaxDigit()           const { return GetAbsId(fDigitIndMax) ; }
     106           0 :   Int_t           GetIndMaxDigit()             const { return fDigitIndMax ; }
     107           0 :   void            SetIndMaxDigit(const Int_t ind)    { fDigitIndMax = ind  ; }
     108          66 :   void            SetIndexInList(Int_t val)          { fIndexInList = val  ; }
     109             : 
     110          66 :   virtual Int_t   GetSuperModuleNumber(void)   const { return fSuperModuleNumber;}
     111             : 
     112             :   // searches for the local maxima 
     113             :   // energy above relative level
     114             :   virtual Int_t   GetNumberOfLocalMax(Int_t nDigitMult,
     115             :                                       Float_t locMaxCut,TClonesArray * digits ) const ; 
     116             : 
     117             :   virtual Int_t   GetNumberOfLocalMax(AliEMCALDigit **  maxAt, Float_t * maxAtEnergy,
     118             :                                       Float_t locMaxCut,TClonesArray * digits ) const ; 
     119             : 
     120             :   /// Number of local maxima found in cluster, set for V1 and V1+unfolding 
     121             :   /// in unfolding case:
     122             :   ///  * 0: no unfolding
     123             :   ///  *-1: unfolding failed
     124          66 :   Short_t         GetNExMax(void)              const { return fNExMax       ; }  
     125          66 :   void            SetNExMax(Int_t nmax=1)            { fNExMax = static_cast<Short_t>(nmax) ;}
     126             :         
     127             :   Int_t           GetPrimaryIndex()            const  ;
     128             :         
     129          66 :   Float_t         GetTime(void)                const { return  fTime        ; }
     130             :         
     131           0 :   Bool_t          SharedCluster(void)          const { return  fSharedCluster ; }
     132           0 :   void            SetSharedCluster(Bool_t s)         { fSharedCluster = s     ; }
     133             :         
     134           0 :   virtual Bool_t  IsEmc(void)                  const { return kTRUE         ; }
     135          66 :   virtual Bool_t  IsSortable()                 const { return kTRUE         ; }  
     136             :   virtual void    Paint(Option_t * option="");
     137             :   virtual void    Print(Option_t * option="") const ; 
     138             :   
     139             :   Double_t        TmaxInCm(const Double_t e=0.0, const Int_t key=0);
     140             : 
     141          66 :   Float_t         GetDistanceToBadTower() const {return fDistToBadTower;}
     142             :   void            EvalDistanceToBadChannels(AliCaloCalibPedestal* caloped);
     143             : 
     144             : protected:
     145             :           void           EvalCoreEnergy(Float_t logWeight, TClonesArray * digits) ;             
     146             :           virtual void   EvalDispersion(Float_t logWeight, TClonesArray * digits) ;  // computes the dispersion of the shower
     147             :           virtual void   EvalElipsAxis (Float_t logWeight, TClonesArray * digits );  // computes the axis of shower ellipsoide
     148             :           void           EvalTime( TClonesArray * digits );
     149             :           virtual Bool_t AreNeighbours(AliEMCALDigit * digit1, AliEMCALDigit * digit2 ) const;
     150             :           Float_t        ThetaToEta(Float_t arg) const;  //Converts Theta (Radians) to Eta(Radians)
     151             :           Float_t        EtaToTheta(Float_t arg) const;  //Converts Eta (Radians) to Theta(Radians)
     152             : 
     153             : private:
     154             : 
     155             :           AliEMCALGeometry* fGeomPtr;  //! Pointer to geometry for utilities
     156             : 
     157             :           Float_t  fAmp ;              // summed amplitude of digits   
     158             :           Int_t    fIndexInList ;      // the index of this RecPoint in the
     159             :                                  // list stored in TreeR (to be set by analysis)
     160             :           TVector3 fGlobPos ;          // global position
     161             :           TVector3 fLocPos ;           // local  position in the sub-detector coordinate
     162             :           Int_t    fMaxDigit ;         //! max initial size of digits array (not saved)
     163             :           Int_t    fMulDigit ;         // total multiplicity of digits       
     164             :           Int_t    fMaxTrack ;         //! max initial size of tracks array (not saved)
     165             :           Int_t    fMulTrack ;         // total multiplicity of tracks
     166             :           Int_t   *fDigitsList ;       //[fMulDigit] list of digit's indexes from which the point was reconstructed
     167             :           Int_t   *fTracksList ;       //[fMulTrack] list of tracks to which the point was assigned
     168             : 
     169             :           Int_t    fClusterType;       // type of cluster stored: v1
     170             :           Float_t  fCoreEnergy ;       // energy in a shower core 
     171             :           Float_t  fLambda[2] ;        // shower ellipse axes
     172             :           Float_t  fDispersion ;       // shower dispersion
     173             :           Float_t *fEnergyList ;       //[fMulDigit] energy of digits
     174             :           Int_t   *fAbsIdList;         //[fMulDigit] absId  of digits
     175             :           Float_t  fTime ;             // Time of the digit with maximal energy deposition
     176             :           Short_t  fNExMax ;           // number of (Ex-)maxima before unfolding
     177             :           Float_t  fCoreRadius;        // The radius in which the core energy is evaluated
     178             :           Float_t *fDETracksList ;     //[fMulTrack] list of tracks to which the point was assigned
     179             :           Int_t    fMulParent;         // Multiplicity of the parents
     180             :           Int_t    fMaxParent;         // Maximum number of parents allowed
     181             :           Int_t   *fParentsList;       // [fMulParent] list of the parents of the digits
     182             :           Float_t *fDEParentsList;     // [fMulParent] list of the parents of the digits
     183             :           Int_t    fSuperModuleNumber; // number identifying supermodule containing recpoint, reference is cell with maximum energy.
     184             :           Int_t    fDigitIndMax;       // Index of digit with max energy in array fAbsIdList
     185             :           Float_t  fDistToBadTower;    // Distance to nearest bad tower
     186             :           Bool_t   fSharedCluster;     // States if cluster is shared by 2 SuperModules in same phi rack (0,1), (2,3) ... (10,11).
     187             :         
     188         442 :   ClassDef(AliEMCALRecPoint,13) // RecPoint for EMCAL (Base Class)
     189             :  
     190             : };
     191             : 
     192             : #endif // AliEMCALRECPOINT_H

Generated by: LCOV version 1.11