3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 /* History of cvs commits:
11 * Revision 1.34 2006/04/22 10:30:17 hristov
12 * Add fEnergy to AliPHOSDigit and operate with EMC amplitude in energy units (Yu.Kharlov)
14 * Revision 1.33 2005/05/28 14:19:04 schutz
15 * Compilation warnings fixed by T.P.
19 //_________________________________________________________________________
22 // 3 identifiers for the primary particle(s) at the origine of the digit
23 // The digits are made in FinishEvent() by summing all the hits in a single PHOS crystal or PPSD gas cell
24 // It would be nice to replace the 3 identifiers by an array, but, because digits are kept in a TClonesArray,
25 // it is not possible to stream such an array... (beyond my understqnding!)
27 //*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
29 // --- ROOT system ---
31 //#include "TObject.h"
33 // --- Standard library ---
35 // --- AliRoot header files ---
37 #include "AliDigitNew.h"
39 class AliPHOSDigit : public AliDigitNew {
41 friend ostream& operator << ( ostream& , const AliPHOSDigit&) ;
46 AliPHOSDigit(Int_t primary, Int_t id, Int_t DigEnergy, Float_t Time, Int_t index = -1) ;
47 AliPHOSDigit(Int_t primary, Int_t id, Float_t energy , Float_t Time, Int_t index = -1) ;
48 AliPHOSDigit(const AliPHOSDigit & digit) ;
49 virtual ~AliPHOSDigit() ;
51 Bool_t operator==(const AliPHOSDigit &rValue) const;
53 AliPHOSDigit& operator += (AliPHOSDigit const &rValue) ;
54 AliPHOSDigit& operator *= (Float_t factor) ;
58 AliPHOSDigit& operator=(const AliPHOSDigit) {
59 Fatal("operator = ", "not implemented") ; return *this ; }
60 Int_t Compare(const TObject * obj) const ;
61 Int_t GetNprimary() const { return fNprimary ; }
62 Int_t GetPrimary(Int_t index) const ;
63 Float_t GetEnergy(void) const {return fEnergy ;}
64 Float_t GetTime(void) const {return fTime ;}
65 Float_t GetTimeR(void) const {return fTimeR ;}
66 Bool_t IsSortable() const { return kTRUE ; }
67 void Print(const Option_t * = "") const;
68 void SetAmp(Int_t Amp) {fAmp = Amp ;}
69 void SetEnergy(Float_t E) {fEnergy= E ;}
70 void SetTime(Float_t time) {fTime = time ;}
71 void SetTimeR(Float_t time) {fTimeR = time ;}
72 void ShiftPrimary(Int_t shift); // shift to separate different TreeK in merging
76 Int_t fNprimary ; // Number of primaries
77 Int_t * fPrimary ; //[fNprimary] Array of primaries
78 Float_t fEnergy ; // Deposited energy in GeV
79 Float_t fTime ; // Calculcated time
80 Float_t fTimeR ; // Earliest time: to be used by Digits2Raw
82 ClassDef(AliPHOSDigit,4) // Digit in PHOS
86 #endif // ALIPHOSDIGIT_H