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 */
8 //_________________________________________________________________________
11 // A Digit is the sum of energy in a Tower (Hit sum) and stores information, about primaries
12 // and enterring particle contributing to a Digit
14 //*-- Author: Sahal Yacoob (LBL)
15 // based on : AliPHOSDigit
16 //___________________________________________________________________________
18 // --- ROOT system ---
22 // --- Standard library ---
24 // --- AliRoot header files ---
25 #include "AliDigitNew.h"
27 class AliEMCALDigit : public AliDigitNew {
29 friend ostream& operator << ( ostream& , const 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() ;
38 Bool_t operator==(const AliEMCALDigit &rValue) const;
39 AliEMCALDigit& operator+(AliEMCALDigit const &rValue) ;
40 AliEMCALDigit& operator*(Float_t factor) ;
42 Int_t Compare(const TObject * obj) const ;
43 const Float_t GetEta() const ;
44 Int_t GetNprimary() const {
45 // returns the number of primaries
47 Int_t GetPrimary(Int_t index) const ;
48 Int_t GetNiparent() const {return fNiparent;}
49 Int_t GetIparent(Int_t index) const ;
50 const Float_t GetPhi() const;
51 Float_t GetTime(void) const {return fTime ;}
52 const Bool_t IsInPreShower() const ;
53 Bool_t IsSortable() const {
54 // says that AliEMCALDigits are sortable (needed for Sort method
56 void SetAmp(Int_t amp) {
57 // sets the amplitude data member
59 void SetId(Int_t id) {fId = id ;}
60 void SetTime(Float_t time) {fTime = time ;}
61 void ShiftPrimary(Int_t shift); // shift to semarate different TreeK in merging
64 Int_t fNprimary ; // Number of primaries
65 Int_t fNMaxPrimary ; // Max Number of primaries
66 Int_t *fPrimary ; //[fNMaxPrimary] Array of primaries
68 Int_t fNiparent ; // Number of initial parents
69 Int_t fNMaxiparent ; // Max Number of parents
70 Int_t *fIparent ; //[fNMaxiparent] Array of parents
71 Int_t fMaxIter ; // Number to Increment Maxiparent, and MaxPrimary if default is not sufficient
72 Float_t fTime ; // Calculated time
74 ClassDef(AliEMCALDigit,1) // Digit in EMCAL
78 #endif // ALIEMCALDIGIT_H