1 #ifndef RecoLocalCalo_EcalRecAlgos_EcalUncalibRecHitRecWeightsAlgo_HH
2 #define RecoLocalCalo_EcalRecAlgos_EcalUncalibRecHitRecWeightsAlgo_HH
15 #include "Math/SVector.h"
16 #include "Math/SMatrix.h"
31 const double* pedestals,
32 const double* pedestalsRMS,
33 const double* gainRatios,
36 double amplitude_(-1.), pedestal_(-1.), jitter_(-1.), chi2_(-1.);
40 ROOT::Math::SVector<double, C::MAXSAMPLES>
frame;
44 for (
int iSample = 0; iSample < C::MAXSAMPLES; iSample++) {
45 int gainId = dataFrame.sample(iSample).gainId();
52 if (iSample == 4 || iSample == 5 || iSample == 6)
59 if ((
gainId != gainId0) && (iSample == 4 || iSample == 5 || iSample == 6))
62 frame(iSample) = double(dataFrame.sample(iSample).adc());
65 double(((
double)(dataFrame.sample(iSample).adc()) - pedestals[
gainId - 1]) * gainRatios[
gainId - 1]);
69 ROOT::Math::SVector<double, 3> param = (*(
weights[iGainSwitch])) *
frame;
80 amplitude_ = double((4095. - pedestals[2]) * gainRatios[2]);