1 #ifndef RecoLocalCalo_EcalRecAlgos_EcalUncalibRecHitTimeWeightsAlgo_HH 2 #define RecoLocalCalo_EcalRecAlgos_EcalUncalibRecHitTimeWeightsAlgo_HH 40 double pulsenorm = 0.;
43 ROOT::Math::SVector<double,nsample> pedSubSamples;
44 for(
unsigned int iSample = 0; iSample < nsample; iSample++) {
52 double gainratio = 1.;
54 if (gainId==0 || gainId==3) {
70 amplitude = ((double)(sample.
adc()) - pedestal) * gainratio;
74 amplitude = (4095. -
pedestal) * gainratio;
79 if (amplitude>maxamplitude) {
82 pulsenorm += fullpulse(iSample);
85 std::vector<double>::const_iterator amplit;
86 for(amplit=amplitudes.begin(); amplit<amplitudes.end(); ++amplit) {
89 int firstsamplet =
std::max(0,bx + 3);
93 pulse.ResizeTo(nsample);
94 for (
unsigned int isample = firstsamplet; isample<nsample; ++isample) {
95 pulse(isample) = fullpulse(isample+offset);
96 pedSubSamples(isample) =
std::max(0., pedSubSamples(isample) - amplitudes[ipulse]*
pulse(isample)/pulsenorm);
101 double amplitude_(-1.), jitter_(-1.);
102 ROOT::Math::SVector <double,3> param = (*(weights[iGainSwitch])) * pedSubSamples;
int gainId(sample_type sample)
get the gainId (2 bits)
double time(const C &dataFrame, const std::vector< double > &litudes, const EcalPedestals::Item *aped, const EcalMGPAGainRatio *aGain, const FullSampleVector &fullpulse, const EcalWeightSet::EcalWeightMatrix **weights)
Compute time.
int gainId() const
get the gainId (2 bits)
Eigen::Matrix< double, FullSampleVectorSize, 1 > FullSampleVector
double pulse(double x, double y, double z, double t)
float gain12Over6() const
math::Matrix< 3, 10 >::type EcalWeightMatrix
static constexpr int MAXSAMPLES
int adc() const
get the ADC sample (12 bits)