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) {
69 for (i = 0; i <
size_; ++
i) {
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);
116 s <<
"DetId " << samples.
id();
119 s <<
", " << samples.
size() <<
" samples";
121 s <<
", " << samples.
preciseSize() <<
" preciseSamples"
122 <<
", " << preciseStep <<
" preciseStep";
124 for (
int i = 0;
i < samples.
size();
i++) {
125 s <<
i <<
":" << samples[
i] <<
" precise:";
126 int precise_start(
i * preciseStep), precise_end(precise_start + preciseStep);
127 for (
int j(precise_start); ((
j < precise_end) && (
j < samples.preciseSize())); ++
j)
128 s <<
" " << samples.preciseAt(
j);
CaloSamples & scale(double value)
multiply each item by this value
Log< level::Error, false > LogError
std::ostream & operator<<(std::ostream &out, const ALILine &li)
int preciseSize() const
get the size
std::vector< float > preciseData_
void setPresamples(int pre)
set presample information
std::vector< double > data_
void fill(std::map< std::string, TH1 * > &h, const std::string &s, double x)
int size() const
get the size
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
DetId id() const
get the (generic) id
tuple size
Write out results.