147 int ifirst = mySignalTS[0];
154 double lowGEnergy = 0;
155 double TempLGAmp = 0;
167 for (
unsigned int iv = 0;
iv < myNoiseTS.size(); ++
iv) {
168 CurrentTS = myNoiseTS[
iv];
169 if (CurrentTS >= digi.size())
171 Allnoise += tool[CurrentTS];
174 if (noiseslices != 0) {
175 noise = (Allnoise) /
double(noiseslices);
179 for (
unsigned int ivs = 0; ivs < mySignalTS.size(); ++ivs) {
180 CurrentTS = mySignalTS[ivs];
181 if (CurrentTS >= digi.size())
183 int capid = digi[CurrentTS].capid();
189 ta = tool[CurrentTS] -
noise;
199 for (
unsigned int iLGvs = 0; iLGvs < mySignalTS.size(); ++iLGvs) {
201 if (CurrentTS >= digi.size())
203 int capid = digi[CurrentTS].capid();
204 TempLGAmp = tool[CurrentTS] -
noise;
207 lowGEnergy += TempLGAmp;
217 LogDebug(
"HCAL Pulse") <<
"ZdcSimpleRecAlgo::reco2 :" 218 <<
" Invalid max amplitude position, " 219 <<
" max Amplitude: " <<
maxI <<
" first: " << ifirst <<
" last: " << (tool.
size() - 1)
222 int capid = digi[
maxI - 1].capid();
229 capid = digi[
maxI].capid();
234 capid = digi[
maxI + 1].capid();
240 double TSWeightEnergy = ((
maxI - 1) * Energy0 +
maxI * Energy1 + (
maxI + 1) * Energy2);
241 double EnergySum = Energy0 + Energy1 + Energy2;
242 double AvgTSPos = 0.;
244 AvgTSPos = TSWeightEnergy / EnergySum;
250 time = (AvgTSPos * 25.0);
252 if (
corr !=
nullptr) {
254 ampl *=
corr->getCorrection(fc_ampl);
257 return RecHit(digi.id(), ampl,
time, lowGEnergy);
int size() const
get the size
constexpr double respcorrgain(int fCapId) const
get response corrected gain for capid=0..3
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const =0