149 int ifirst = mySignalTS[0];
156 double lowGEnergy = 0;
157 double lowGfc_ampl = 0;
158 double TempLGAmp = 0;
170 for (
unsigned int iv = 0;
iv < myNoiseTS.size(); ++
iv) {
171 CurrentTS = myNoiseTS[
iv];
172 if (CurrentTS >= digi.size())
174 Allnoise += tool[CurrentTS];
177 if (noiseslices != 0) {
178 noise = (Allnoise) /
double(noiseslices);
182 for (
unsigned int ivs = 0; ivs < mySignalTS.size(); ++ivs) {
183 CurrentTS = mySignalTS[ivs];
184 if (CurrentTS >= digi.size())
186 int capid = digi[CurrentTS].capid();
192 ta = tool[CurrentTS] -
noise;
202 for (
unsigned int iLGvs = 0; iLGvs < mySignalTS.size(); ++iLGvs) {
204 if (CurrentTS >= digi.size())
206 int capid = digi[CurrentTS].capid();
207 TempLGAmp = tool[CurrentTS] -
noise;
208 lowGfc_ampl += TempLGAmp;
211 lowGEnergy += TempLGAmp;
221 LogDebug(
"HCAL Pulse") <<
"ZdcSimpleRecAlgo::reco2 :"
222 <<
" Invalid max amplitude position, "
223 <<
" max Amplitude: " <<
maxI <<
" first: " << ifirst <<
" last: " << (tool.
size() - 1)
226 int capid = digi[
maxI - 1].capid();
233 capid = digi[
maxI].capid();
238 capid = digi[
maxI + 1].capid();
244 double TSWeightEnergy = ((
maxI - 1) * Energy0 +
maxI * Energy1 + (
maxI + 1) * Energy2);
245 double EnergySum = Energy0 + Energy1 + Energy2;
246 double AvgTSPos = 0.;
248 AvgTSPos = TSWeightEnergy / EnergySum;
254 time = (AvgTSPos * 25.0);
256 if (
corr !=
nullptr) {
258 ampl *=
corr->getCorrection(fc_ampl);
261 return RecHit(digi.id(), ampl,
time, lowGEnergy);