]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALDigit.h
4801b3186073a89bfabdfd6fdc5138b589b48341
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALDigit.h
1 #ifndef ALIEMCALDIGIT_H
2 #define ALIEMCALDIGIT_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 //_________________________________________________________________________
9 //  EMCAL digit: 
10 // 
11 //  A  Digit is the sum of energy in a Tower (Hit sum) and stores information, about primaries
12 //  and entering particle contributing to a Digit
13 //
14 //*-- Author: Sahal Yacoob (LBL)
15 // based on : AliPHOSDigit
16 //___________________________________________________________________________
17
18 // --- ROOT system ---
19
20 #include "TObject.h" 
21
22 // --- Standard library ---
23
24 // --- AliRoot header files ---
25 #include "AliDigitNew.h"
26
27 class AliEMCALDigit : public AliDigitNew {
28
29   friend ostream& operator << ( ostream& , const AliEMCALDigit&) ;
30
31  public:
32   
33   AliEMCALDigit() ;
34   AliEMCALDigit(Int_t primary, Int_t iparent, Int_t id, Int_t DigEnergy, Float_t Time, Int_t index = -1) ;
35   AliEMCALDigit(const AliEMCALDigit & digit) ;
36   virtual ~AliEMCALDigit() ;
37
38   Bool_t operator==(const AliEMCALDigit &rValue) const;
39   AliEMCALDigit& operator+(AliEMCALDigit const &rValue) ;
40   AliEMCALDigit& operator*(Float_t factor) ; 
41   const AliEMCALDigit& operator = (const AliEMCALDigit &) {return *this;}
42
43   Int_t   Compare(const TObject * obj) const ;  
44   Float_t GetEta() const ; 
45   Int_t   GetNprimary() const { return fNprimary ; }
46   Int_t   GetPrimary(Int_t index) const ; 
47   Int_t   GetNiparent() const {return fNiparent;}
48   Int_t   GetIparent(Int_t index) const ;
49   Float_t GetPhi() const;
50   Float_t GetTime(void) const {return fTime ;}
51   Float_t GetTimeR(void) const {return fTimeR ;}
52   Bool_t  IsSortable() const { return kTRUE ; }
53   void    SetAmp(Int_t amp) { fAmp= amp ; } 
54   void    SetId(Int_t id) {fId = id ;}
55   void    SetTime(Float_t time) {fTime = time ;}
56   void    SetTimeR(Float_t time) {fTimeR = time ;}
57   void    ShiftPrimary(Int_t shift); // shift to separate different TreeK in merging
58  
59  private: 
60
61   Int_t fNprimary ;     // Number of primaries
62   Int_t fNMaxPrimary ;  // Max Number of primaries
63   Int_t *fPrimary ;     //[fNMaxPrimary]  Array of primaries       
64     
65   Int_t fNiparent ;     // Number of initial parents 
66   Int_t fNMaxiparent ;  // Max Number of parents 
67   Int_t *fIparent ;     //[fNMaxiparent] Array of parents       
68   Int_t fMaxIter  ;     // Number to Increment Maxiparent, and MaxPrimary if default is not sufficient
69   Float_t fTime ;       // Calculated time  
70   Float_t fTimeR ;      // Earliest time: to be used by Digits2Raw
71  
72   ClassDef(AliEMCALDigit,2)   // Digit in EMCAL 
73
74 } ;
75
76 #endif //  ALIEMCALDIGIT_H