22 double icalconst = 1.;
26 if (icalit != icalMap.
end()) {
27 icalconst = (*icalit);
34 for (
unsigned int igain(0); igain <=
NGAINS; ++igain) {
37 LSB[igain] = Emax / (
MAXADC * gainRatios[igain]);
45 double correction_factor_for_premixed_sample_transparency = 1.0;
51 value_LC =
cache->second;
59 double value_LC_prime = 1.;
65 value_LC_prime =
cache->second;
73 correction_factor_for_premixed_sample_transparency = value_LC_prime / value_LC;
78 for (
int isample = 0; isample < digi.
size(); ++isample) {
79 int gainId = digi[isample].gainId();
83 result[isample] = float(digi[isample].
adc()) / 1000. / peToA *
84 correction_factor_for_premixed_sample_transparency;
85 }
else if (gainId > 1) {
87 float(digi[isample].
adc()) * LSB[gainId - 1] * icalconst / peToA *
88 correction_factor_for_premixed_sample_transparency;
92 float(digi[isample].
adc()) * LSB[
gainId] * icalconst / peToA *
93 correction_factor_for_premixed_sample_transparency;
129 double icalconst = 1.;
133 if (icalit != icalMap.
end()) {
134 icalconst = (*icalit);
141 for (
unsigned int igain(0); igain <=
NGAINS; ++igain) {
144 LSB[igain] = Emax / (
MAXADC * gainRatios[igain]);
152 double correction_factor_for_premixed_sample_transparency = 1.0;
153 double value_LC = 1.;
159 value_LC =
cache->second;
167 double value_LC_prime = 1.;
172 value_LC_prime =
cache->second;
180 correction_factor_for_premixed_sample_transparency = value_LC_prime / value_LC;
185 for (
int isample = 0; isample < digi.
size(); ++isample) {
186 int gainId = digi[isample].gainId();
190 result[isample] = float(digi[isample].
adc()) / 1000. / peToA *
191 correction_factor_for_premixed_sample_transparency;
192 }
else if (gainId > 1) {
193 result[isample] = float(digi[isample].
adc()) * LSB[gainId - 1] * icalconst / peToA *
194 correction_factor_for_premixed_sample_transparency;
197 result[isample] = float(digi[isample].
adc()) * LSB[
gainId] * icalconst / peToA *
198 correction_factor_for_premixed_sample_transparency;
230 double icalconst = 1.;
234 if (icalit != icalMap.
end()) {
235 icalconst = double(*icalit);
240 for (
int isample = 0; isample < digi.
size(); ++isample) {
CalibCache m_valueLCCache_LC_prime
const bool m_timeDependent
const self & getMap() const
CalibCache m_valueLCCache_LC
const ESDetId & id() const
const_iterator end() const
const self & getMap() const
const std::vector< float > GetGainRatios(const DetId &detid)
double fullScaleEnergy(const DetId &detId) const
const EcalIntercalibConstantsMC * ical
const_iterator find(uint32_t rawId) const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
CaloSamples samplesInPE(const DIGI &digi)
std::vector< Item >::const_iterator const_iterator
std::vector< Item >::const_iterator const_iterator
double peToAConversion(const DetId &detId) const
double findLaserConstant_LC(const DetId &detId) const
const_iterator find(uint32_t rawId) const
const_iterator end() const
const ESIntercalibConstants * esmips
double findLaserConstant_LC_prime(const DetId &detId) const
uint16_t *__restrict__ uint16_t const *__restrict__ adc