15 double *fitresults =
new double[3] {};
18 for (
int i=0;
i<digi.
size();
i++)
22 if (
adc[0] > 20) status = 14;
23 if (
adc[1] < 0 ||
adc[2] < 0) status = 10;
26 double r12 = (
adc[1] != 0) ?
adc[0]/
adc[1] : 99999;
27 double r23 = (
adc[2] != 0) ?
adc[1]/
adc[2] : 99999;
30 if (r23 < ratioCuts_->getR23Low()) status = 7;
32 if (
int(status) == 0) {
41 double aaa =
log(A2/A1)/
n;
42 double bbb = w/n*DeltaT;
43 double ccc=
exp(aaa+bbb);
46 double t0 = (2.-ccc)/(1.-ccc) * DeltaT - 5;
51 double A_1 =
pow(w/n*(t1),n) *
exp(n-w*(t1));
53 double AA1 = A1 / A_1;
59 if (
adc[1] > 2800 &&
adc[2] > 2800) status = 11;
60 else if (
adc[1] > 2800) status = 12;
61 else if (
adc[2] > 2800) status = 13;
86 double energy = results[0];
87 double t0 = results[1];
91 double mipCalib = (fabs(
cos(*it_ang)) != 0.) ? (*it_mip)/fabs(
cos(*it_ang)) : 0.;
92 energy *= (mipCalib != 0.) ?
MIPGeV_/mipCalib : 0.;
94 LogDebug(
"ESRecHitAnalyticAlgo") <<
"ESRecHitAnalyticAlgo : reconstructed energy "<<energy<<
" T0 "<<
t0;
98 if (it_status->getStatusCode() == 1) {
103 else if (status == 5)
105 else if (status == 6)
107 else if (status == 7)
109 else if (status == 8)
111 else if (status == 9)
113 else if (status == 10)
115 else if (status == 11)
117 else if (status == 12)
119 else if (status == 13)
121 else if (status == 14)
int adc(sample_type sample)
get the ADC sample (12 bits)
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
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)