25 for(
unsigned int iSample = 0; iSample < nsample; iSample++) {
29 double amplitude = 0.;
34 double gainratio = 1.;
36 if (gainId==0 || gainId==3) {
52 amplitude = ((double)(sample.
adc()) - pedestal) * gainratio;
56 amplitude = (4095. -
pedestal) * gainratio;
59 amplitudes[iSample] = amplitude;
61 if (amplitude>maxamplitude) {
63 maxamplitude = amplitude;
65 pedrms = pederr*gainratio;
75 edm::LogWarning(
"EcalUncalibRecHitMultiFitAlgo::makeRecHit") <<
"Failed Fit" << std::endl;
78 unsigned int ipulseintime = 0;
79 for (
unsigned int ipulse=0; ipulse<
_pulsefunc.
BXs().rows(); ++ipulse) {
81 ipulseintime = ipulse;
86 double amplitude = status ?
_pulsefunc.
X()[ipulseintime] : 0.;
97 for (
unsigned int ipulse=0; ipulse<
_pulsefunc.
BXs().rows(); ++ipulse) {
100 rh.setOutOfTimeAmplitude(bx+5, status ?
_pulsefunc.
X().coeff(ipulse) : 0.);
int gainId(sample_type sample)
get the gainId (2 bits)
void disableErrorCalculation()
EcalUncalibratedRecHit makeRecHit(const EcalDataFrame &dataFrame, const EcalPedestals::Item *aped, const EcalMGPAGainRatio *aGain, const SampleMatrix &noisecor, const FullSampleVector &fullpulse, const FullSampleMatrix &fullpulsecov, const BXVector &activeBX)
compute rechits
const PulseVector & Errors() const
Eigen::Matrix< double, 10, 1 > SampleVector
EcalMGPASample sample(int i) const
std::vector< Variable::Flags > flags
Eigen::Matrix< double, 19, 19 > FullSampleMatrix
int gainId() const
get the gainId (2 bits)
EcalUncalibRecHitMultiFitAlgo()
const PulseVector & X() const
const T & max(const T &a, const T &b)
void setAmplitudeError(float amplitudeerror)
Eigen::Matrix< double, 19, 1 > FullSampleVector
float gain12Over6() const
const BXVector & BXs() const
PulseChiSqSNNLS _pulsefunc
Eigen::Matrix< double, 10, 10 > SampleMatrix
static const int MAXSAMPLES
bool DoFit(const SampleVector &samples, const SampleMatrix &samplecor, double pederr, const BXVector &bxs, const FullSampleVector &fullpulse, const FullSampleMatrix &fullpulsecov)
int adc() const
get the ADC sample (12 bits)