12 double* fitresults =
new double[3]{};
15 for (
int i = 0;
i < digi.
size();
i++)
21 if (
adc[1] < 0 ||
adc[2] < 0)
27 double r12 = (
adc[1] != 0) ?
adc[0] /
adc[1] : 99999;
28 double r23 = (
adc[2] != 0) ?
adc[1] /
adc[2] : 99999;
33 if (r23 < ratioCuts_->getR23Low())
36 if (
int(status) == 0) {
44 double aaa =
log(A2 / A1) /
n;
45 double bbb = w / n * DeltaT;
46 double ccc =
exp(aaa + bbb);
49 double t0 = (2. - ccc) / (1. - ccc) * DeltaT - 5;
54 double A_1 =
pow(w / n * (t1), n) *
exp(n - w * (t1));
56 double AA1 = A1 / A_1;
62 if (
adc[1] > 2800 &&
adc[2] > 2800)
64 else if (
adc[1] > 2800)
66 else if (
adc[2] > 2800)
91 double energy = results[0];
92 double t0 = results[1];
96 double mipCalib = (fabs(
cos(*it_ang)) != 0.) ? (*it_mip) / fabs(
cos(*it_ang)) : 0.;
97 energy *= (mipCalib != 0.) ?
MIPGeV_ / mipCalib : 0.;
99 LogDebug(
"ESRecHitAnalyticAlgo") <<
"ESRecHitAnalyticAlgo : reconstructed energy " << energy <<
" T0 " <<
t0;
103 if (it_status->getStatusCode() == 1) {
108 else if (status == 5)
110 else if (status == 6)
112 else if (status == 7)
114 else if (status == 8)
116 else if (status == 9)
118 else if (status == 10)
120 else if (status == 11)
122 else if (status == 12)
124 else if (status == 13)
126 else if (status == 14)
const ESDetId & id() const
const self & getMap() const
const ESIntercalibConstants * mips_
void setFlag(int flag)
set the flags (from Flags or ESFlags)
const ESRecHitRatioCuts * ratioCuts_
double * EvalAmplitude(const ESDataFrame &digi, double ped) const
Cos< T >::type cos(const T &t)
EcalRecHit reconstruct(const ESDataFrame &digi) const
const_iterator find(uint32_t rawId) const
const ESSample & sample(int i) const
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
const ESPedestals * peds_
const ESChannelStatus * channelStatus_
const ESAngleCorrectionFactors * ang_
std::vector< Item >::const_iterator const_iterator
int adc() const
get the ADC sample (singed 16 bits)
Power< A, B >::type pow(const A &a, const B &b)