]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDSDigit.h
Bug fix in treatment of the vertex finder covariance matrix (Andrea)
[u/mrichter/AliRoot.git] / FMD / AliFMDSDigit.h
1 #ifndef ALIFMDSDIGIT_H
2 #define ALIFMDSDIGIT_H
3 /** @file    AliFMDSDigit.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 */
8 //___________________________________________________________________
9 //
10 //  Digits classes for the FMD
11 //  AliFMDBaseDigit - base class 
12 //  AliFMDDigit     - Normal (smeared) digit             
13 //  AliFMDSDigit    - Summable (non-smeared) digit             
14 //
15 #ifndef ALIFMDBASEDIGIT_H
16 # include <AliFMDBaseDigit.h>
17 #endif
18 //____________________________________________________________________
19 /** @class AliFMDSDigit AliFMDDigit.h <FMD/AliFMDDigit.h>
20     @brief class for summable digits 
21     @ingroup FMD_base
22  */
23 class AliFMDSDigit : public AliFMDBaseDigit
24 {
25 public:
26   /** CTOR */
27   AliFMDSDigit();
28   /** Constrctor 
29       @param detector Detector 
30       @param ring     Ring
31       @param sector   Sector
32       @param strip    Strip 
33       @param edep     Energy deposited 
34       @param count    ADC (first sample)
35       @param count2   ADC (second sample, or -1 if not used)
36       @param count3   ADC (third sample, or -1 if not used) */
37   AliFMDSDigit(UShort_t detector, 
38                Char_t   ring='\0', 
39                UShort_t sector=0, 
40                UShort_t strip=0, 
41                Float_t  edep=0,
42                UShort_t count=0, 
43                Short_t  count2=-1, 
44                Short_t  count3=-1);
45   /** DTOR */
46   virtual ~AliFMDSDigit() {}
47   /** @return ADC count (first sample) */
48   UShort_t Count1()                const { return fCount1;   }
49   /** @return ADC count (second sample, or -1 if not used) */
50   Short_t  Count2()                const { return fCount2;   }
51   /** @return ADC count (third sample, or -1 if not used) */
52   Short_t  Count3()                const { return fCount3;   }
53   /** @return Canonical ADC counts */
54   UShort_t Counts()                const;
55   /** @return Energy deposited */
56   Float_t  Edep()                  const { return fEdep;     }
57   /** Print info 
58       @param opt Not used */
59   void     Print(Option_t* opt="") const;
60 protected:
61   Float_t  fEdep;       // Energy deposited 
62   UShort_t fCount1;     // Digital signal 
63   Short_t  fCount2;     // Digital signal (-1 if not used)
64   Short_t  fCount3;     // Digital signal (-1 if not used)
65   ClassDef(AliFMDSDigit,1)     // Summable FMD digit
66 };
67   
68 inline UShort_t 
69 AliFMDSDigit::Counts() const 
70 {
71   return fCount1 
72     + (fCount2 >= 0 ? fCount2 : 0)
73     + (fCount3 >= 0 ? fCount3 : 0);
74 }
75
76
77 #endif
78 //____________________________________________________________________
79 //
80 // Local Variables:
81 //   mode: C++
82 // End:
83 //
84 //
85 // EOF
86 //