22Digit::Digit(Short_t tower, uint16_t noiseLG, uint16_t noiseHG, Double_t
time)
23 :
DigitBase(
time), mNoiseLG(noiseLG), mNoiseHG(noiseHG), mTower(tower)
30 mAmplitudeGeV +=
other.mAmplitudeGeV;
31 mNoiseHG +=
other.mNoiseHG;
32 mNoiseLG +=
other.mNoiseLG;
41 if (amplitude >= constants::MAX_RANGE_ADC) {
42 amplitude = constants::MAX_RANGE_ADC;
47 mAmplitudeGeV = amplitude * constants::EMCAL_ADCENERGY;
51 mAmplitudeGeV = amplitude * (constants::EMCAL_ADCENERGY * constants::EMCAL_HGLGFACTOR);
55 mAmplitudeGeV = amplitude * constants::EMCAL_TRU_ADCENERGY;
71 int ampADC = std::floor(mAmplitudeGeV / constants::EMCAL_ADCENERGY);
73 if (ampADC >= constants::MAX_RANGE_ADC) {
74 return constants::MAX_RANGE_ADC;
76 return ampADC + mNoiseHG;
79 int ampADC = std::floor(mAmplitudeGeV / (constants::EMCAL_ADCENERGY * constants::EMCAL_HGLGFACTOR));
81 if (ampADC >= constants::MAX_RANGE_ADC) {
82 return constants::MAX_RANGE_ADC;
84 return ampADC + mNoiseLG;
87 int ampADC = std::floor(mAmplitudeGeV / constants::EMCAL_TRU_ADCENERGY);
89 if (ampADC >= constants::MAX_RANGE_ADC) {
90 return constants::MAX_RANGE_ADC;
107 noise = mNoiseHG * constants::EMCAL_ADCENERGY;
108 return mAmplitudeGeV + noise;
111 noise = mNoiseLG * (constants::EMCAL_ADCENERGY * constants::EMCAL_HGLGFACTOR);
112 return mAmplitudeGeV + noise;
115 noise = mNoiseHG * constants::EMCAL_TRU_ADCENERGY;
116 return mAmplitudeGeV + noise;
131 constexpr double ENERGYHGLGTRANISITION = (constants::EMCAL_HGLGTRANSITION * constants::EMCAL_ADCENERGY);
133 if (mAmplitudeGeV < ENERGYHGLGTRANISITION) {
EMCAL digit implementation.
Int_t getAmplitudeADC() const
bool canAdd(const Digit other)
Digit & operator+=(const Digit &other)
Double_t getAmplitude() const
ChannelType_t getType() const
void PrintStream(std::ostream &stream) const
void setAmplitudeADC(Short_t amplitude, ChannelType_t ctype=ChannelType_t::HIGH_GAIN)
std::ostream & operator<<(std::ostream &stream, const Cell &cell)
Stream operator for EMCAL cell.
std::string channelTypeToString(ChannelType_t chantype)
Create string representation of the channel type object.
ChannelType_t
Type of a raw data channel.
@ HIGH_GAIN
High gain channel.
@ LOW_GAIN
Low gain channel.
VectorOfTObjectPtrs other