15 precisePresamples_(0) {
25 preciseSize_(presize),
26 precisePresamples_(0) {
52 bool addHighFidelityPreMix =
false;
55 addHighFidelityPreMix =
true;
57 edm::LogError(
"CaloHitResponse") <<
"Mismatched calo signals ";
60 if (addHighFidelityPreMix) {
74 if (!
other.preciseData_.empty()) {
87 int firstbin = floor(
t / 25.);
88 double f =
t / 25. - firstbin;
89 int nextbin = firstbin + 1;
90 double v1 = (firstbin < 0 || firstbin >=
size_) ? 0. :
data_[firstbin];
91 double v2 = (nextbin < 0 || nextbin >=
size_) ? 0. :
data_[nextbin];
92 data[
i] = (v1 * (1. -
f) + v2 *
f);
119 s <<
", " <<
samples.size() <<
" samples";
121 s <<
", " <<
samples.preciseSize() <<
" preciseSamples" 122 <<
", " << preciseStep <<
" preciseStep";
126 int precise_start(
i * preciseStep), precise_end(precise_start + preciseStep);
127 for (
int j(precise_start); ((
j < precise_end) && (
j <
samples.preciseSize())); ++
j)
CaloSamples & scale(double value)
multiply each item by this value
Log< level::Error, false > LogError
std::vector< float > preciseData_
std::ostream & operator<<(std::ostream &s, const CaloSamples &samples)
void setPresamples(int pre)
set presample information
std::vector< double > data_
CaloSamples & offsetTime(double offset)
shift all the samples by a time, in ns, interpolating
char data[epos_bytes_allocation]
CaloSamples & operator+=(double value)
add a value to all samples