3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 //_________________________________________________________________________
11 // 3 identifiers for the primary particle(s) at the origine of the digit
12 // The digits are made in FinishEvent() by summing all the hits in a single PHOS crystal or PPSD gas cell
13 // It would be nice to replace the 3 identifiers by an array, but, because digits are kept in a TClonesQArray,
14 // it is not possible to stream such an array... (beyond my understqnding!)
16 //*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
18 // --- ROOT system ---
22 // --- Standard library ---
24 // --- AliRoot header files ---
26 #include "AliDigitNew.h"
28 class AliPHOSDigit : public AliDigitNew {
30 friend ostream& operator << ( ostream& , const AliPHOSDigit&) ;
35 AliPHOSDigit(Int_t primary, Int_t id, Int_t DigEnergy, Float_t Time, Int_t index = -1) ;
36 AliPHOSDigit(const AliPHOSDigit & digit) ;
37 virtual ~AliPHOSDigit() ;
39 Bool_t operator==(const AliPHOSDigit &rValue) const;
40 AliPHOSDigit& operator+(AliPHOSDigit const &rValue) ;
42 Int_t Compare(const TObject * obj) const ;
43 Int_t GetNprimary() const {
44 // returns the number of primaries
46 Int_t GetPrimary(Int_t index) const ;
47 Float_t GetTime(void) const {return fTime ;}
48 Bool_t IsSortable() const {
49 // says that AliPHOSDigits are sortable (needed for Sort method
51 void Print(Option_t *option) const;
52 void SetAmp(Int_t Amp) {
53 // sets the amplitude data member
55 void SetTime(Float_t Time) {fTime = Time ;}
56 void ShiftPrimary(Int_t shift); // shift to separate different TreeK in merging
60 Int_t fNprimary ; // Number of primaries
61 Int_t fNMaxPrimary ; //! Max Number of primaries
62 Int_t fPrimary[5] ; // Array of primaries
63 Float_t fTime ; // Calculcated time
65 ClassDef(AliPHOSDigit,1) // Digit in PHOS
69 #endif // ALIPHOSDIGIT_H