53 edm::LogError(
"CaloHitResponse") <<
"Mismatched calo signals ";
56 for(i = 0; i <
size_; ++
i) {
72 for(
int i ( 0 ) ;
i !=
size_ ; ++
i )
75 int firstbin = floor(t/25.);
76 double f = t/25. - firstbin;
77 int nextbin = firstbin + 1;
78 double v1 = (firstbin < 0 || firstbin >=
size_) ? 0. :
data_[firstbin];
79 double v2 = (nextbin < 0 || nextbin >=
size_) ? 0. :
data_[nextbin];
80 data[
i] = (v1*(1.-
f)+v2*f);
82 for(
int i ( 0 ) ;
i !=
size_ ; ++
i )
92 for(
int i ( 0 ) ;
i !=
size_ ; ++
i )
107 s <<
"DetId " << samples.
id();
110 s <<
", "<< samples.
size() <<
" samples";
112 s <<
", " << samples.
preciseSize() <<
" preciseSamples" 113 <<
", " << preciseStep <<
" preciseStep";
115 for (
int i=0;
i<samples.
size();
i++) {
116 s <<
i <<
":" << samples[
i] <<
" precise:";
117 int precise_start(
i*preciseStep), precise_end(precise_start + preciseStep);
118 for (
int j(precise_start); ((j<precise_end) && (j< samples.preciseSize()));
120 s <<
" " << samples.preciseAt(j);
CaloSamples & scale(double value)
multiply each item by this value
int preciseSize() const
get the size
std::vector< float > preciseData_
std::ostream & operator<<(std::ostream &s, const CaloSamples &samples)
void setPresamples(int pre)
set presample information
std::vector< double > data_
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