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;
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]);
math::Matrix< 3, 10 >::type EcalWeightMatrix
virtual ~EcalUncalibRecHitRecWeightsAlgo()
virtual EcalUncalibratedRecHit makeRecHit(const C &dataFrame, const double *pedestals, const double *pedestalsRMS, const double *gainRatios, const EcalWeightSet::EcalWeightMatrix **weights, const EcalShapeBase &testbeamPulseShape)
Compute parameters.
static constexpr int MAXSAMPLES
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
bool isSaturated(const Digi &digi, const int &maxADCvalue, int ifirst, int n)