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.33 2005/05/28 14:19:04 schutz
12 * Compilation warnings fixed by T.P.
16 //_________________________________________________________________________
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!)
24 //*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
26 // --- ROOT system ---
28 //#include "TObject.h"
30 // --- Standard library ---
32 // --- AliRoot header files ---
34 #include "AliDigitNew.h"
36 class AliPHOSDigit : public AliDigitNew {
38 friend ostream& operator << ( ostream& , const 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() ;
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
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
75 ClassDef(AliPHOSDigit,4) // Digit in PHOS
79 #endif // ALIPHOSDIGIT_H