X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PHOS%2FAliPHOSDigit.h;h=c32959eb5400d0ced58ffe7971cac3c52daa3dcf;hb=defd951885ee71623935defb75437af7c947bced;hp=e4aa8351f502f79960ec2b78e92772f9cbf0ccbd;hpb=702ab87e845509d9379dca12e47c7e8a37eba7f6;p=u%2Fmrichter%2FAliRoot.git diff --git a/PHOS/AliPHOSDigit.h b/PHOS/AliPHOSDigit.h index e4aa8351f50..c32959eb540 100644 --- a/PHOS/AliPHOSDigit.h +++ b/PHOS/AliPHOSDigit.h @@ -8,6 +8,12 @@ /* History of cvs commits: * * $Log$ + * Revision 1.34 2006/04/22 10:30:17 hristov + * Add fEnergy to AliPHOSDigit and operate with EMC amplitude in energy units (Yu.Kharlov) + * + * Revision 1.33 2005/05/28 14:19:04 schutz + * Compilation warnings fixed by T.P. + * */ //_________________________________________________________________________ @@ -29,6 +35,7 @@ // --- AliRoot header files --- #include "AliDigitNew.h" +using std::ostream; class AliPHOSDigit : public AliDigitNew { @@ -38,34 +45,54 @@ class AliPHOSDigit : public AliDigitNew { AliPHOSDigit() ; AliPHOSDigit(Int_t primary, Int_t id, Int_t DigEnergy, Float_t Time, Int_t index = -1) ; + AliPHOSDigit(Int_t primary, Int_t id, Float_t energy , Float_t Time, Int_t index = -1) ; AliPHOSDigit(const AliPHOSDigit & digit) ; virtual ~AliPHOSDigit() ; - + void Clear(const Option_t*); Bool_t operator==(const AliPHOSDigit &rValue) const; - AliPHOSDigit& operator+(AliPHOSDigit const &rValue) ; - AliPHOSDigit& operator*(Float_t factor) ; - // AliPHOSDigit& operator=(const AliPHOSDigit) { - // Fatal("operator = ", "not implemented") ; return *this ; } - Int_t Compare(const TObject * obj) const ; - Int_t GetNprimary() const { return fNprimary ; } - Int_t GetPrimary(Int_t index) const ; - Float_t GetTime(void) const {return fTime ;} - Float_t GetTimeR(void) const {return fTimeR ;} - Bool_t IsSortable() const { return kTRUE ; } - void Print(const Option_t * = "") const; - void SetAmp(Int_t Amp) { fAmp=Amp ; } - void SetTime(Float_t time) {fTime = time ;} - void SetTimeR(Float_t time) {fTimeR = time ;} - void ShiftPrimary(Int_t shift); // shift to separate different TreeK in merging - - private: - - Int_t fNprimary ; // Number of primaries - Int_t * fPrimary ; //[fNprimary] Array of primaries - Float_t fTime ; // Calculcated time - Float_t fTimeR ; // Earliest time: to be used by Digits2Raw - - ClassDef(AliPHOSDigit,3) // Digit in PHOS + + AliPHOSDigit& operator += (AliPHOSDigit const &rValue) ; + AliPHOSDigit& operator *= (Float_t factor) ; + +public: + + Int_t Compare(const TObject * obj) const ; + Int_t GetNprimary() const { return fNprimary ; } + Int_t GetPrimary(Int_t index) const ; + Float_t GetEnergy(void) const {return fEnergy ;} + Float_t GetTime(void) const {return fTime ;} + Float_t GetTimeR(void) const {return fTimeR ;} + Int_t GetNSamplesHG() const {return fNSamplesHG;} + Int_t GetNSamplesLG() const {return fNSamplesLG;} + UShort_t *GetSamplesHG() const {return fSamplesHG;} + UShort_t *GetSamplesLG() const {return fSamplesLG;} + Bool_t IsSortable() const { return kTRUE ; } + Bool_t IsLG() const {return fIsLG ;} + void Print(const Option_t * = "") const; + void SetAmp(Int_t Amp) {fAmp = Amp ;} + void SetEnergy(Float_t E) {fEnergy= E ;} + void SetTime(Float_t time) {fTime = time ;} + void SetTimeR(Float_t time) {fTimeR = time ;} + void SetALTROSamplesHG(Int_t nSamplesHG, Int_t *samplesHG); + void SetALTROSamplesLG(Int_t nSamplesLG, Int_t *samplesLG); + void ShiftPrimary(Int_t shift); // shift to separate different TreeK in merging + void SetLG(Bool_t inLG){fIsLG=inLG;} //mark digits produced from LG when HG in overflow +private: + AliPHOSDigit & operator = (const AliPHOSDigit & /*digit*/); + +private: + Bool_t fIsLG; //If this digit created from HG or LG channels + Int_t fNprimary ; // Number of primaries + Int_t * fPrimary ; //[fNprimary] Array of primaries + Float_t fEnergy ; // Deposited energy in ADC counts + Float_t fTime ; // Calculcated time + Float_t fTimeR ; // Earliest time: to be used by Digits2Raw + Int_t fNSamplesHG; // Number of high-gain ALTRO samples + Int_t fNSamplesLG; // Number of low-gain ALTRO samples + UShort_t *fSamplesHG; //[fNSamplesHG] Array of high-gain ALTRO samples + UShort_t *fSamplesLG; //[fNSamplesLG] Array of low-gain ALTRO samples + + ClassDef(AliPHOSDigit,7) // Digit in PHOS } ;