]>
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; | |
83ad576a | 33 | class AliStack; |
ef8e8623 | 34 | |
35 | ||
36 | ||
37 | //==================================================================== | |
38 | /** @class AliFMDHitDigitizer | |
39 | @brief Concrete digitizer to make digits from hits. See also | |
40 | AliFMDBaseDigitizer documentation. | |
41 | @ingroup FMD_sim | |
42 | */ | |
43 | class AliFMDHitDigitizer : public AliFMDBaseDigitizer | |
44 | { | |
45 | public: | |
46 | enum Output_t { | |
47 | kDigits, | |
48 | kSDigits | |
49 | }; | |
50 | ||
51 | /** CTOR */ | |
52 | AliFMDHitDigitizer() | |
53 | : AliFMDBaseDigitizer(), | |
83ad576a | 54 | fOutput(kDigits), |
b2e6f0b0 | 55 | fHoldTime(2e-6), |
83ad576a | 56 | fStack(0) |
ef8e8623 | 57 | {} |
58 | /** CTOR | |
59 | @param name Name */ | |
60 | AliFMDHitDigitizer(AliFMD* fmd, Output_t output); | |
61 | /** DTOR */ | |
62 | virtual ~AliFMDHitDigitizer() {} | |
63 | /** Run over the input events (retrieved via run loader) */ | |
f21fc003 | 64 | void Digitize(Option_t* option=""); |
b2e6f0b0 | 65 | /** |
66 | * Set the end of integration | |
67 | * | |
68 | * @param holdT Time when integration ends (nominally @f$ | |
69 | * 2\mu{}s@f$) | |
70 | */ | |
71 | void SetHoldTime(Double_t holdT=2e-6) { fHoldTime = holdT; } | |
09b6c804 | 72 | /** |
73 | * Get the hold time | |
74 | * | |
75 | * @return Hold time in seconds | |
76 | */ | |
b2e6f0b0 | 77 | Double_t GetHoldTime() const { return fHoldTime; } |
ef8e8623 | 78 | protected: |
79 | /** Copy constructor | |
80 | @param o Object to copy from */ | |
81 | AliFMDHitDigitizer(const AliFMDHitDigitizer& o) | |
82 | : AliFMDBaseDigitizer(o), | |
83ad576a | 83 | fOutput(o.fOutput), |
b2e6f0b0 | 84 | fHoldTime(2e-6), |
83ad576a | 85 | fStack(o.fStack) |
ef8e8623 | 86 | {} |
09b6c804 | 87 | /** |
88 | * Assignment operator | |
89 | * | |
90 | * @param o Object to assign from | |
91 | * @return Reference to this | |
92 | */ | |
93 | AliFMDHitDigitizer& operator=(const AliFMDHitDigitizer& o); | |
94 | /** | |
95 | * Make the output tree using the passed loader | |
96 | * | |
97 | * @param loader | |
98 | * @return The generated tree. | |
99 | */ | |
ef8e8623 | 100 | TTree* MakeOutputTree(AliLoader* loader); |
101 | /** Sum energy deposited contributions from each hit in a cache | |
102 | @param hitsBranch Branch in input tree */ | |
103 | void SumContributions(TBranch* hitsBranch); | |
104 | /** Make a pedestal | |
105 | @param detector Detector # | |
106 | @param ring Ring ID | |
107 | @param sector Sector # | |
108 | @param strip Strip # | |
109 | @return Pedestal value */ | |
110 | UShort_t MakePedestal(UShort_t detector, | |
111 | Char_t ring, | |
112 | UShort_t sector, | |
113 | UShort_t strip) const; | |
114 | /** Add a digit to output. | |
115 | @param fmd Pointer to detector object | |
116 | @param detector Detector # | |
117 | @param ring Ring ID | |
118 | @param sector Sector number | |
119 | @param strip Strip number | |
120 | @param edep Energy deposited (not used) | |
121 | @param count1 ADC count 1 | |
122 | @param count2 ADC count 2 (-1 if not used) | |
123 | @param count3 ADC count 3 (-1 if not used) | |
124 | @param count4 ADC count 4 (-1 if not used) */ | |
b2e6f0b0 | 125 | void AddDigit(UShort_t detector, |
126 | Char_t ring, | |
127 | UShort_t sector, | |
128 | UShort_t strip, | |
129 | Float_t edep, | |
130 | UShort_t count1, | |
131 | Short_t count2, | |
132 | Short_t count3, | |
133 | Short_t count4, | |
134 | UShort_t ntot, | |
135 | UShort_t nprim, | |
136 | const TArrayI& trackrefs) const; | |
ef8e8623 | 137 | /** Check that digit data is consistent |
138 | @param digit Digit | |
139 | @param nhits Number of hits | |
140 | @param counts ADC counts */ | |
141 | void CheckDigit(AliFMDDigit* digit, | |
142 | UShort_t nhits, | |
143 | const TArrayI& counts); | |
09b6c804 | 144 | /** |
145 | * Store the data using the loader | |
146 | * | |
147 | * @param loader The loader | |
148 | */ | |
8523a543 | 149 | void StoreDigits(const AliLoader* loader); |
ef8e8623 | 150 | |
151 | ||
152 | Output_t fOutput; // Output mode | |
b2e6f0b0 | 153 | Double_t fHoldTime; // Stop of integration |
83ad576a | 154 | AliStack* fStack; // Kinematics |
ef8e8623 | 155 | |
156 | ClassDef(AliFMDHitDigitizer,1) // Make Digits from Hits | |
157 | }; | |
158 | ||
159 | ||
160 | #endif | |
161 | //____________________________________________________________________ | |
162 | // | |
163 | // Local Variables: | |
164 | // mode: C++ | |
165 | // End: | |
166 | // | |
167 | // | |
168 | // EOF | |
169 | // | |
170 |