11 Double_t
fitf(Double_t*
x, Double_t* par) {
12 Double_t wc = 0.07291;
14 Double_t v1 =
pow(wc /
n * (
x[0] - par[1]),
n);
15 Double_t v2 = TMath::Exp(
n - wc * (
x[0] - par[1]));
16 Double_t
v = par[0] * v1 * v2;
25 fit_ =
new TF1(
"fit",
fitf, -200, 200, 2);
26 fit_->SetParameters(50, 10);
32 double* fitresults =
new double[3]{};
39 for (
int i = 0;
i < digi.
size();
i++)
45 if (
adc[1] < 0 ||
adc[2] < 0)
51 double r12 = (
adc[1] != 0) ?
adc[0] /
adc[1] : 99999;
52 double r23 = (
adc[2] != 0) ?
adc[1] /
adc[2] : 99999;
57 if (r23 < ratioCuts_->getR23Low())
62 TGraph* gr =
new TGraph(3, tx,
adc);
63 fit_->SetParameters(50, 10);
65 fit_->GetParameters(para);
66 fitresults[0] = para[0];
67 fitresults[1] = para[1];
70 if (
adc[1] > 2800 &&
adc[2] > 2800)
72 else if (
adc[1] > 2800)
74 else if (
adc[2] > 2800)
104 double mipCalib = (std::fabs(
cos(*it_ang)) != 0.) ? (*it_mip) / fabs(
cos(*it_ang)) : 0.;
107 LogDebug(
"ESRecHitFitAlgo") <<
"ESRecHitFitAlgo : reconstructed energy " <<
energy <<
" T0 " <<
t0;
111 if (it_status->getStatusCode() == 1) {
const ESDetId & id() const
const ESChannelStatus * channelStatus_
double * EvalAmplitude(const ESDataFrame &digi, double ped) const
void setFlag(int flag)
set the flags (from Flags or ESFlags)
Double_t fitf(Double_t *x, Double_t *par)
const_iterator find(uint32_t rawId) const
const ESRecHitRatioCuts * ratioCuts_
int adc() const
get the ADC sample (singed 16 bits)
const ESSample & sample(int i) const
const ESAngleCorrectionFactors * ang_
Cos< T >::type cos(const T &t)
EcalRecHit reconstruct(const ESDataFrame &digi) const
std::vector< Item >::const_iterator const_iterator
const self & getMap() const
const ESIntercalibConstants * mips_
uint16_t *__restrict__ uint16_t const *__restrict__ adc
const ESPedestals * peds_