]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMDDigit.h
No need to liknk with lhapdf, pythia6 and microcern libraries
[u/mrichter/AliRoot.git] / FMD / AliFMDDigit.h
CommitLineData
4347b38f 1#ifndef ALIFMDDIGIT_H
2#define ALIFMDDIGIT_H
c2fc1258 3/** @file AliFMDDigit.h
4 @author Christian Holm Christensen <cholm@nbi.dk>
5 @date Mon Mar 27 12:37:41 2006
6 @brief Digits for the FMD
7*/
56b1929b 8//___________________________________________________________________
4347b38f 9//
088f8e79 10// Digits classes for the FMD
11// AliFMDBaseDigit - base class
12// AliFMDDigit - Normal (smeared) digit
13// AliFMDSDigit - Summable (non-smeared) digit
4347b38f 14//
02a27b50 15#ifndef ALIFMDBASEDIGIT_H
16# include <AliFMDBaseDigit.h>
4347b38f 17#endif
18
4347b38f 19//____________________________________________________________________
9f662337 20/** @class AliFMDDigit AliFMDDigit.h <FMD/AliFMDDigit.h>
21 @brief class for digits
22 @ingroup FMD_base
23 */
4347b38f 24class AliFMDDigit : public AliFMDBaseDigit
25{
4347b38f 26public:
9f662337 27 /** CTOR */
4347b38f 28 AliFMDDigit();
9f662337 29 /** Constrctor
30 @param detector Detector
31 @param ring Ring
32 @param sector Sector
33 @param strip Strip
f8616692 34 @param count ADC (first sample)
9f662337 35 @param count2 ADC (second sample, or -1 if not used)
36 @param count3 ADC (third sample, or -1 if not used) */
4347b38f 37 AliFMDDigit(UShort_t detector,
38 Char_t ring='\0',
39 UShort_t sector=0,
40 UShort_t strip=0,
41 UShort_t count=0,
42 Short_t count2=-1,
2aeec17d 43 Short_t count3=-1,
44 Short_t count4=-1);
9f662337 45 /** DTOR */
4347b38f 46 virtual ~AliFMDDigit() {}
c2fc1258 47 /** @param i # of sample to get
48 @return sample # @a i */
6e79feeb 49 Int_t Count(UShort_t i=0) const;
9f662337 50 /** @return ADC count (first sample) */
4347b38f 51 UShort_t Count1() const { return fCount1; }
9f662337 52 /** @return ADC count (second sample, or -1 if not used) */
4347b38f 53 Short_t Count2() const { return fCount2; }
9f662337 54 /** @return ADC count (third sample, or -1 if not used) */
4347b38f 55 Short_t Count3() const { return fCount3; }
2aeec17d 56 /** @return ADC count (third sample, or -1 if not used) */
57 Short_t Count4() const { return fCount4; }
9f662337 58 /** @return Canonical ADC counts */
4347b38f 59 UShort_t Counts() const;
9f662337 60 /** Print info
61 @param opt Not used */
4347b38f 62 void Print(Option_t* opt="") const;
9f662337 63 /** @return Title */
bf000c32 64 const char* GetTitle() const;
f38b1653 65 /** Set the count value
66 @param s Sample number
67 @param c Counts */
68 void SetCount(UShort_t s, Short_t c);
088f8e79 69protected:
70 UShort_t fCount1; // Digital signal
71 Short_t fCount2; // Digital signal (-1 if not used)
72 Short_t fCount3; // Digital signal (-1 if not used)
2aeec17d 73 Short_t fCount4; // Digital signal (-1 if not used)
74 ClassDef(AliFMDDigit,2) // Normal FMD digit
4347b38f 75};
76
77inline UShort_t
78AliFMDDigit::Counts() const
79{
2aeec17d 80 if (fCount4 >= 0) return fCount3;
81 if (fCount3 >= 0) return fCount2;
82 if (fCount2 >= 0) return fCount2;
83 return fCount1;
4347b38f 84}
85
c2fc1258 86inline Int_t
6e79feeb 87AliFMDDigit::Count(UShort_t i) const
c2fc1258 88{
89 switch (i) {
90 case 0: return fCount1;
91 case 1: return fCount2;
92 case 2: return fCount3;
2aeec17d 93 case 3: return fCount4;
c2fc1258 94 }
95 return -1;
96}
f38b1653 97inline void
98AliFMDDigit::SetCount(UShort_t i, Short_t c)
99{
100 switch (i) {
101 case 0: fCount1 = c; break;
102 case 1: fCount2 = c; break;
103 case 2: fCount3 = c; break;
104 case 3: fCount4 = c; break;
105 }
106}
c2fc1258 107
4347b38f 108#endif
109//____________________________________________________________________
110//
0d0e6995 111// Local Variables:
112// mode: C++
113// End:
114//
115//
4347b38f 116// EOF
117//