11#include <fairlogger/Logger.h>
26 :
DigitBase(
time), mIsHighGain(true), mAbsId(truId), mLabel(-1), mAmplitude(amplitude), mTime(
time)
30Digit::Digit(
const Hit& hit,
int label) : mIsHighGain(true), mAbsId(hit.GetDetectorID()), mLabel(
label), mAmplitude(hit.GetEnergyLoss()), mTime(hit.GetTime())
42 return (mAbsId ==
other.getAbsId() && fabs(getTimeStamp() -
other.getTimeStamp()) <=
kTimeGate);
50 if (mAmplitude <
other.mAmplitude) {
55 mLabel =
other.mLabel;
57 if (mLabel !=
other.mLabel &&
other.mLabel != -1) {
59 LOG(error) <<
"Adding digits with different references to Labels:" << mLabel <<
" and " <<
other.mLabel;
63 mAmplitude +=
other.mAmplitude;
71 if (mAmplitude < energy) {
79 stream <<
"PHOS Digit: cell absId " << mAbsId <<
", Time " << getTimeStamp() <<
" with amplitude " << mAmplitude;
short GetDetectorID() const
static constexpr int kTimeGate
void fillFromHit(const Hit &hit)
Replace content of this digit with new one, from hit.
bool canAdd(const Digit other) const
Check, if one can add two digits.
void setHighGain(Bool_t isHG)
Digit & operator+=(const Digit &other)
if addable, adds energy and list of primaries.
void addEnergyTime(float energy, float time)
void PrintStream(std::ostream &stream) const
PHOS simulation hit information.
GLuint GLsizei const GLchar * label
std::ostream & operator<<(std::ostream &in, const BadChannelsMap &bcm)
Printing bad channel map on the stream.
VectorOfTObjectPtrs other
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"