]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSRecPoint.h
ZDC automatic scripts updates (Marco Leoncino) + updates in QA config
[u/mrichter/AliRoot.git] / PHOS / AliPHOSRecPoint.h
1 #ifndef ALIPHOSRECPOINT_H
2 #define ALIPHOSRECPOINT_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5 //_________________________________________________________________________
6 //  Base Class for PHOS Reconstructed Points  
7 //  A recpoint being equivalent to a cluster in encal terminology                 
8 //*-- Author: Gines Martinez (SUBATECH)
9
10 // --- ROOT system ---
11 #include <TVector3.h>
12
13 // --- AliRoot header files ---
14 #include "AliCluster.h"
15
16 class TClonesArray ;
17 class AliPHOSDigit ;
18 class AliDigitNew;
19 class TMAtrixF; 
20
21 class AliPHOSRecPoint : public AliCluster {
22
23  public:
24   
25   typedef TObjArray RecPointsList ; 
26
27   AliPHOSRecPoint() ;                   // ctor         
28   AliPHOSRecPoint(const char * opt) ;   // ctor 
29
30   AliPHOSRecPoint(const AliPHOSRecPoint &rp);
31   AliPHOSRecPoint& operator= (const AliPHOSRecPoint &rp);
32
33   
34   virtual ~AliPHOSRecPoint();
35
36   virtual void Clear(const Option_t* /*option*/ ="") { delete[] fDigitsList; fDigitsList=0; delete[] fTracksList; fTracksList=0; }
37
38 //  virtual  void   AddDigit(AliDigitNew &){
39 //   Fatal("AddDigit", "use AddDigit(AliPHOSDigit & digit, Float_t Energy)") ; 
40 //  }
41   virtual  void   AddDigit(AliPHOSDigit & digit, Float_t Energy, Float_t time=0) = 0 ; 
42   virtual Int_t   Compare(const TObject * obj) const = 0 ;   
43   virtual Int_t   DistancetoPrimitive(Int_t px, Int_t py);
44   virtual void    Draw(Option_t * option="") ;
45   virtual void    ExecuteEvent(Int_t event, Int_t px, Int_t py) ;
46   virtual void    EvalAll(TClonesArray * digits) ;  
47   void            EvalLocal2TrackingCSTransform();
48   virtual void    EvalPHOSMod(AliPHOSDigit * digit) ;  
49   virtual int *   GetDigitsList(void) const { return fDigitsList ; }  
50   virtual Float_t GetEnergy() const {return fAmp; }
51   virtual void    GetLocalPosition(TVector3 & pos) const ;   
52   virtual void    GetGlobalPosition(TVector3 & gpos, TMatrixF & gmat) const ; // return global position in ALICE
53   virtual Int_t   GetPHOSMod(void) const {return fPHOSMod ; }
54   virtual Int_t * GetPrimaries(Int_t & number) const {number = fMulTrack ; 
55                                                       return fTracksList ; }
56   virtual Int_t   GetDigitsMultiplicity(void) const { return fMulDigit ; }
57   Int_t           GetIndexInList() const { return fIndexInList ; }
58   virtual Bool_t  IsEmc(void)const { return kTRUE ;  } 
59   virtual Bool_t  IsSortable() const { 
60     // tells that this is a sortable object
61     return kTRUE ; 
62   }  
63   void            SetIndexInList(Int_t val) { fIndexInList = val ; }
64   virtual void    Paint(Option_t * option="");
65   virtual void    Print(Option_t *) const {
66     // Print prototype
67   } 
68
69 protected:
70   
71   Int_t     fPHOSMod ;    // PHOS Module number in which the RecPoint is found
72   Int_t     fMulTrack ;   // total multiplicity of tracks to which the point was assigned
73   Int_t     fMaxDigit ;   //! max initial size of digits array (not saved)
74   Int_t     fMulDigit ;   // total multiplicity of digits
75   Int_t     fMaxTrack ;   //! max initial size of tracks array (not saved)
76   Int_t*    fDigitsList ; //[fMulDigit] list of digit's indexes from which the point was reconstructed 
77   Int_t*    fTracksList ; //[fMulTrack] list of tracks to which the point was assigned 
78   Float_t   fAmp ;        // summed amplitude of digits 
79   Int_t     fIndexInList ;// the index of this RecPoint in the list stored in TreeR (to be set by analysis)  
80   TVector3  fLocPos ;     // local position in the sub-detector coordinate
81
82
83   ClassDef(AliPHOSRecPoint,3) // RecPoint for PHOS (Base Class)
84  
85 };
86
87 #endif // AliPHOSRECPOINT_H