]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSRecPoint.h
Corrected treatment of signals with multiple banches
[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   AddDigit(AliDigitNew &){
37 //   Fatal("AddDigit", "use AddDigit(AliPHOSDigit & digit, Float_t Energy)") ; 
38 //  }
39   virtual  void   AddDigit(AliPHOSDigit & digit, Float_t Energy, Float_t time=0) = 0 ; 
40   virtual Int_t   Compare(const TObject * obj) const = 0 ;   
41   virtual Int_t   DistancetoPrimitive(Int_t px, Int_t py);
42   virtual void    Draw(Option_t * option="") ;
43   virtual void    ExecuteEvent(Int_t event, Int_t px, Int_t py) ;
44   virtual void    EvalAll(TClonesArray * digits) ;  
45   void            EvalLocal2TrackingCSTransform();
46   virtual void    EvalPHOSMod(AliPHOSDigit * digit) ;  
47   virtual int *   GetDigitsList(void) const { return fDigitsList ; }  
48   virtual Float_t GetEnergy() const {return fAmp; }
49   virtual void    GetLocalPosition(TVector3 & pos) const ;   
50   virtual void    GetGlobalPosition(TVector3 & gpos, TMatrixF & gmat) const ; // return global position in ALICE
51   virtual Int_t   GetPHOSMod(void) const {return fPHOSMod ; }
52   virtual Int_t * GetPrimaries(Int_t & number) const {number = fMulTrack ; 
53                                                       return fTracksList ; }
54   virtual Int_t   GetDigitsMultiplicity(void) const { return fMulDigit ; }
55   Int_t           GetIndexInList() const { return fIndexInList ; }
56   virtual Bool_t  IsEmc(void)const { return kTRUE ;  } 
57   virtual Bool_t  IsSortable() const { 
58     // tells that this is a sortable object
59     return kTRUE ; 
60   }  
61   void            SetIndexInList(Int_t val) { fIndexInList = val ; }
62   virtual void    Paint(Option_t * option="");
63   virtual void    Print(Option_t *) const {
64     // Print prototype
65   } 
66
67 protected:
68   
69   Int_t     fPHOSMod ;    // PHOS Module number in which the RecPoint is found
70   Int_t     fMulTrack ;   // total multiplicity of tracks to which the point was assigned
71   Int_t     fMaxDigit ;   //! max initial size of digits array (not saved)
72   Int_t     fMulDigit ;   // total multiplicity of digits
73   Int_t     fMaxTrack ;   //! max initial size of tracks array (not saved)
74   Int_t*    fDigitsList ; //[fMulDigit] list of digit's indexes from which the point was reconstructed 
75   Int_t*    fTracksList ; //[fMulTrack] list of tracks to which the point was assigned 
76   Float_t   fAmp ;        // summed amplitude of digits 
77   Int_t     fIndexInList ;// the index of this RecPoint in the list stored in TreeR (to be set by analysis)  
78   TVector3  fLocPos ;     // local position in the sub-detector coordinate
79
80
81   ClassDef(AliPHOSRecPoint,3) // RecPoint for PHOS (Base Class)
82  
83 };
84
85 #endif // AliPHOSRECPOINT_H