X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=FMD%2FAliFMDDigit.h;h=edb273a6b439f5c13c6113d130832758b83251ec;hp=7994207235fa1a59f9dfdca414d40eeffc175b95;hb=af885e0fc45eeab1177d3d34f858ccd8836787fb;hpb=c2fc12580f7bb903a1f061ae3d60882098e8a988 diff --git a/FMD/AliFMDDigit.h b/FMD/AliFMDDigit.h index 7994207235f..edb273a6b43 100644 --- a/FMD/AliFMDDigit.h +++ b/FMD/AliFMDDigit.h @@ -12,52 +12,10 @@ // AliFMDDigit - Normal (smeared) digit // AliFMDSDigit - Summable (non-smeared) digit // -#ifndef ROOT_TObject -# include +#ifndef ALIFMDBASEDIGIT_H +# include #endif -//____________________________________________________________________ -/** @class AliFMDBaseDigit AliFMDDigit.h - @brief base class for digits - @ingroup FMD_base - */ -class AliFMDBaseDigit : public TObject -{ -public: - /** CTOR */ - AliFMDBaseDigit(); - /** Constrctor - @param detector Detector - @param ring Ring - @param sector Sector - @param strip Strip */ - AliFMDBaseDigit(UShort_t detector, - Char_t ring='\0', - UShort_t sector=0, - UShort_t strip=0); - /** DTOR */ - virtual ~AliFMDBaseDigit() {} - /** @return Detector # */ - UShort_t Detector() const { return fDetector; } - /** @return Ring ID */ - Char_t Ring() const { return fRing; } - /** @return sector # */ - UShort_t Sector() const { return fSector; } - /** @return strip # */ - UShort_t Strip() const { return fStrip; } - /** Print information - @param opt Not used */ - virtual void Print(Option_t* opt="") const; - /** @return Name */ - const char* GetName() const; -protected: - UShort_t fDetector; // (Sub) Detector # (1,2, or 3) - Char_t fRing; // Ring ID ('I' or 'O') - UShort_t fSector; // Sector # (phi division) - UShort_t fStrip; // Strip # (radial division) - ClassDef(AliFMDBaseDigit, 1) // Base class for FMD digits -}; - //____________________________________________________________________ /** @class AliFMDDigit AliFMDDigit.h @brief class for digits @@ -87,7 +45,7 @@ public: virtual ~AliFMDDigit() {} /** @param i # of sample to get @return sample # @a i */ - Int_t Count(size_t i=0) const; + Int_t Count(UShort_t i=0) const; /** @return ADC count (first sample) */ UShort_t Count1() const { return fCount1; } /** @return ADC count (second sample, or -1 if not used) */ @@ -117,7 +75,7 @@ AliFMDDigit::Counts() const } inline Int_t -AliFMDDigit::Count(size_t i) const +AliFMDDigit::Count(UShort_t i) const { switch (i) { case 0: return fCount1; @@ -127,65 +85,6 @@ AliFMDDigit::Count(size_t i) const return -1; } -//____________________________________________________________________ -/** @class AliFMDSDigit AliFMDDigit.h - @brief class for summable digits - @ingroup FMD_base - */ -class AliFMDSDigit : public AliFMDBaseDigit -{ -public: - /** CTOR */ - AliFMDSDigit(); - /** Constrctor - @param detector Detector - @param ring Ring - @param sector Sector - @param strip Strip - @param edep Energy deposited - @param count ADC (first sample) - @param count2 ADC (second sample, or -1 if not used) - @param count3 ADC (third sample, or -1 if not used) */ - AliFMDSDigit(UShort_t detector, - Char_t ring='\0', - UShort_t sector=0, - UShort_t strip=0, - Float_t edep=0, - UShort_t count=0, - Short_t count2=-1, - Short_t count3=-1); - /** DTOR */ - virtual ~AliFMDSDigit() {} - /** @return ADC count (first sample) */ - UShort_t Count1() const { return fCount1; } - /** @return ADC count (second sample, or -1 if not used) */ - Short_t Count2() const { return fCount2; } - /** @return ADC count (third sample, or -1 if not used) */ - Short_t Count3() const { return fCount3; } - /** @return Canonical ADC counts */ - UShort_t Counts() const; - /** @return Energy deposited */ - Float_t Edep() const { return fEdep; } - /** Print info - @param opt Not used */ - void Print(Option_t* opt="") const; -protected: - Float_t fEdep; // Energy deposited - UShort_t fCount1; // Digital signal - Short_t fCount2; // Digital signal (-1 if not used) - Short_t fCount3; // Digital signal (-1 if not used) - ClassDef(AliFMDSDigit,1) // Summable FMD digit -}; - -inline UShort_t -AliFMDSDigit::Counts() const -{ - return fCount1 - + (fCount2 >= 0 ? fCount2 : 0) - + (fCount3 >= 0 ? fCount3 : 0); -} - - #endif //____________________________________________________________________ //