1 #ifndef ALIFMDHITDIGITIZER_H
2 #define ALIFMDHITDIGITIZER_H
3 /* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights
6 * See cxx source for full Copyright notice
8 // Classses to make Hits into digits and summable digits
15 // - ADC count in this channel
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
23 #ifndef ALIFMDBASEDIGITIZER_H
24 # include <AliFMDBaseDigitizer.h>
27 //====================================================================
37 //====================================================================
38 /** @class AliFMDHitDigitizer
39 @brief Concrete digitizer to make digits from hits. See also
40 AliFMDBaseDigitizer documentation.
43 class AliFMDHitDigitizer : public AliFMDBaseDigitizer
53 : AliFMDBaseDigitizer(),
60 AliFMDHitDigitizer(AliFMD* fmd, Output_t output);
62 virtual ~AliFMDHitDigitizer() {}
63 /** Run over the input events (retrieved via run loader) */
64 void Exec(Option_t* option="");
66 * Set the end of integration
68 * @param holdT Time when integration ends (nominally @f$
71 void SetHoldTime(Double_t holdT=2e-6) { fHoldTime = holdT; }
72 Double_t GetHoldTime() const { return fHoldTime; }
75 @param o Object to copy from */
76 AliFMDHitDigitizer(const AliFMDHitDigitizer& o)
77 : AliFMDBaseDigitizer(o),
82 /** Assignment operator
83 @param o Object to assign from
84 @return Reference to this */
85 AliFMDHitDigitizer& operator=(const AliFMDHitDigitizer& o)
87 AliFMDBaseDigitizer::operator=(o);
88 fHoldTime = o.fHoldTime;
93 /** Make the output tree using the passed loader
95 @return The generated tree. */
96 TTree* MakeOutputTree(AliLoader* loader);
97 /** Sum energy deposited contributions from each hit in a cache
98 @param hitsBranch Branch in input tree */
99 void SumContributions(TBranch* hitsBranch);
101 @param detector Detector #
103 @param sector Sector #
105 @return Pedestal value */
106 UShort_t MakePedestal(UShort_t detector,
109 UShort_t strip) const;
110 /** Add a digit to output.
111 @param fmd Pointer to detector object
112 @param detector Detector #
114 @param sector Sector number
115 @param strip Strip number
116 @param edep Energy deposited (not used)
117 @param count1 ADC count 1
118 @param count2 ADC count 2 (-1 if not used)
119 @param count3 ADC count 3 (-1 if not used)
120 @param count4 ADC count 4 (-1 if not used) */
121 void AddDigit(UShort_t detector,
132 const TArrayI& trackrefs) const;
133 /** Check that digit data is consistent
135 @param nhits Number of hits
136 @param counts ADC counts */
137 void CheckDigit(AliFMDDigit* digit,
139 const TArrayI& counts);
140 /** Store the data using the loader
141 @param loader The loader */
142 void StoreDigits(AliLoader* loader);
145 Output_t fOutput; // Output mode
146 Double_t fHoldTime; // Stop of integration
147 AliStack* fStack; // Kinematics
149 ClassDef(AliFMDHitDigitizer,1) // Make Digits from Hits
154 //____________________________________________________________________