]>
Commit | Line | Data |
---|---|---|
ef8e8623 | 1 | #ifndef ALIFMDHITDIGITIZER_H |
2 | #define ALIFMDHITDIGITIZER_H | |
3 | /* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights | |
4 | * reserved. | |
5 | * | |
6 | * See cxx source for full Copyright notice | |
7 | */ | |
8 | // Classses to make Hits into digits and summable digits | |
9 | // | |
10 | // Digits consists of | |
11 | // - Detector # | |
12 | // - Ring ID | |
13 | // - Sector # | |
14 | // - Strip # | |
15 | // - ADC count in this channel | |
16 | // | |
17 | /** @file AliFMDHitDigitizer.h | |
18 | @author Christian Holm Christensen <cholm@nbi.dk> | |
19 | @date Mon Mar 27 12:38:26 2006 | |
20 | @brief FMD Digitizers declaration | |
21 | @ingroup FMD_sim | |
22 | */ | |
23 | #ifndef ALIFMDBASEDIGITIZER_H | |
24 | # include <AliFMDBaseDigitizer.h> | |
25 | #endif | |
26 | ||
27 | //==================================================================== | |
28 | class TClonesArray; | |
29 | class AliFMD; | |
30 | class AliLoader; | |
31 | class AliRunLoader; | |
32 | class AliFMDDigit; | |
33 | ||
34 | ||
35 | ||
36 | //==================================================================== | |
37 | /** @class AliFMDHitDigitizer | |
38 | @brief Concrete digitizer to make digits from hits. See also | |
39 | AliFMDBaseDigitizer documentation. | |
40 | @ingroup FMD_sim | |
41 | */ | |
42 | class AliFMDHitDigitizer : public AliFMDBaseDigitizer | |
43 | { | |
44 | public: | |
45 | enum Output_t { | |
46 | kDigits, | |
47 | kSDigits | |
48 | }; | |
49 | ||
50 | /** CTOR */ | |
51 | AliFMDHitDigitizer() | |
52 | : AliFMDBaseDigitizer(), | |
53 | fOutput(kDigits) | |
54 | {} | |
55 | /** CTOR | |
56 | @param name Name */ | |
57 | AliFMDHitDigitizer(AliFMD* fmd, Output_t output); | |
58 | /** DTOR */ | |
59 | virtual ~AliFMDHitDigitizer() {} | |
60 | /** Run over the input events (retrieved via run loader) */ | |
61 | void Exec(Option_t* option=""); | |
62 | protected: | |
63 | /** Copy constructor | |
64 | @param o Object to copy from */ | |
65 | AliFMDHitDigitizer(const AliFMDHitDigitizer& o) | |
66 | : AliFMDBaseDigitizer(o), | |
67 | fOutput(o.fOutput) | |
68 | {} | |
69 | /** Assignment operator | |
70 | @param o Object to assign from | |
71 | @return Reference to this */ | |
72 | AliFMDHitDigitizer& operator=(const AliFMDHitDigitizer& o) | |
73 | { | |
74 | AliFMDBaseDigitizer::operator=(o); | |
75 | fOutput = o.fOutput; | |
76 | return *this; | |
77 | } | |
78 | /** Make the output tree using the passed loader | |
79 | @param loader | |
80 | @return The generated tree. */ | |
81 | TTree* MakeOutputTree(AliLoader* loader); | |
82 | /** Sum energy deposited contributions from each hit in a cache | |
83 | @param hitsBranch Branch in input tree */ | |
84 | void SumContributions(TBranch* hitsBranch); | |
85 | /** Make a pedestal | |
86 | @param detector Detector # | |
87 | @param ring Ring ID | |
88 | @param sector Sector # | |
89 | @param strip Strip # | |
90 | @return Pedestal value */ | |
91 | UShort_t MakePedestal(UShort_t detector, | |
92 | Char_t ring, | |
93 | UShort_t sector, | |
94 | UShort_t strip) const; | |
95 | /** Add a digit to output. | |
96 | @param fmd Pointer to detector object | |
97 | @param detector Detector # | |
98 | @param ring Ring ID | |
99 | @param sector Sector number | |
100 | @param strip Strip number | |
101 | @param edep Energy deposited (not used) | |
102 | @param count1 ADC count 1 | |
103 | @param count2 ADC count 2 (-1 if not used) | |
104 | @param count3 ADC count 3 (-1 if not used) | |
105 | @param count4 ADC count 4 (-1 if not used) */ | |
106 | void AddDigit(UShort_t detector, | |
107 | Char_t ring, | |
108 | UShort_t sector, | |
109 | UShort_t strip, | |
110 | Float_t edep, | |
111 | UShort_t count1, | |
112 | Short_t count2, | |
113 | Short_t count3, | |
114 | Short_t count4) const; | |
115 | /** Check that digit data is consistent | |
116 | @param digit Digit | |
117 | @param nhits Number of hits | |
118 | @param counts ADC counts */ | |
119 | void CheckDigit(AliFMDDigit* digit, | |
120 | UShort_t nhits, | |
121 | const TArrayI& counts); | |
122 | /** Store the data using the loader | |
123 | @param loader The loader */ | |
124 | void StoreDigits(AliLoader* loader); | |
125 | ||
126 | ||
127 | Output_t fOutput; // Output mode | |
128 | ||
129 | ClassDef(AliFMDHitDigitizer,1) // Make Digits from Hits | |
130 | }; | |
131 | ||
132 | ||
133 | #endif | |
134 | //____________________________________________________________________ | |
135 | // | |
136 | // Local Variables: | |
137 | // mode: C++ | |
138 | // End: | |
139 | // | |
140 | // | |
141 | // EOF | |
142 | // | |
143 |