]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSDigit.h
Add fEnergy to AliPHOSDigit and operate with EMC amplitude in energy units (Yu.Kharlov)
[u/mrichter/AliRoot.git] / PHOS / AliPHOSDigit.h
1 #ifndef ALIPHOSDIGIT_H
2 #define ALIPHOSDIGIT_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 /* History of cvs commits:
9  *
10  * $Log$
11  * Revision 1.33  2005/05/28 14:19:04  schutz
12  * Compilation warnings fixed by T.P.
13  *
14  */
15
16 //_________________________________________________________________________
17 //  PHOS digit: Id
18 //              energy
19 //              3 identifiers for the primary particle(s) at the origine of the digit
20 //  The digits are made in FinishEvent() by summing all the hits in a single PHOS crystal or PPSD gas cell
21 //  It would be nice to replace the 3 identifiers by an array, but, because digits are kept in a TClonesArray,
22 //   it is not possible to stream such an array... (beyond my understqnding!)
23 //
24 //*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
25
26 // --- ROOT system ---
27
28 //#include "TObject.h" 
29
30 // --- Standard library ---
31
32 // --- AliRoot header files ---
33
34 #include "AliDigitNew.h"
35
36 class AliPHOSDigit : public AliDigitNew {
37
38   friend ostream& operator << ( ostream& , const AliPHOSDigit&) ;
39
40  public:
41   
42   AliPHOSDigit() ;
43   AliPHOSDigit(Int_t primary, Int_t id, Int_t DigEnergy, Float_t Time, Int_t index = -1) ;
44   AliPHOSDigit(Int_t primary, Int_t id, Float_t energy , Float_t Time, Int_t index = -1) ;
45   AliPHOSDigit(const AliPHOSDigit & digit) ;
46   virtual ~AliPHOSDigit() ;
47
48   Bool_t operator==(const AliPHOSDigit &rValue) const;
49   AliPHOSDigit& operator+(AliPHOSDigit const &rValue) ;
50   AliPHOSDigit& operator*(Float_t factor) ; 
51   //  AliPHOSDigit& operator=(const AliPHOSDigit) {
52   //  Fatal("operator = ", "not implemented") ; return *this ; } 
53   Int_t   Compare(const TObject * obj) const ;  
54   Int_t   GetNprimary()           const { return fNprimary ; }
55   Int_t   GetPrimary(Int_t index) const ; 
56   Float_t GetEnergy(void)         const {return fEnergy ;}
57   Float_t GetTime(void)           const {return fTime ;}
58   Float_t GetTimeR(void)          const {return fTimeR ;}
59   Bool_t  IsSortable()            const { return kTRUE ; }
60   void    Print(const Option_t * = "") const;
61   void    SetAmp(Int_t Amp)      {fAmp   = Amp  ;} 
62   void    SetEnergy(Float_t E)   {fEnergy= E    ;} 
63   void    SetTime(Float_t time)  {fTime  = time ;}
64   void    SetTimeR(Float_t time) {fTimeR = time ;}
65   void    ShiftPrimary(Int_t shift); // shift to separate different TreeK in merging
66
67  private:
68
69   Int_t   fNprimary ;      // Number of primaries
70   Int_t * fPrimary ;       //[fNprimary] Array of primaries      
71   Float_t fEnergy ;        // Deposited energy in GeV
72   Float_t fTime ;          // Calculcated time 
73   Float_t fTimeR ;         // Earliest time: to be used by Digits2Raw
74     
75   ClassDef(AliPHOSDigit,4) // Digit in PHOS 
76
77 } ;
78
79 #endif //  ALIPHOSDIGIT_H