128 int ifirst = mySignalTS[0];
130 double ampl=0;
int maxI = -1;
double maxA = -1e10;
double ta=0;
132 double lowGEnergy=0;
double lowGfc_ampl=0;
double TempLGAmp=0;
144 for(
unsigned int iv = 0; iv<myNoiseTS.size(); ++iv)
146 CurrentTS = myNoiseTS[iv];
147 Allnoise += tool[CurrentTS];
150 if(noiseslices != 0) {
151 noise = (Allnoise)/
double(noiseslices);
155 for(
unsigned int ivs = 0; ivs<mySignalTS.size(); ++ivs)
157 CurrentTS = mySignalTS[ivs];
158 int capid=digi[CurrentTS].capid();
164 ta = tool[CurrentTS]-noise;
174 for(
unsigned int iLGvs = 0; iLGvs<mySignalTS.size(); ++iLGvs)
177 int capid=digi[CurrentTS].capid();
178 TempLGAmp = tool[CurrentTS]-noise;
179 lowGfc_ampl+=TempLGAmp;
182 lowGEnergy+=TempLGAmp;
191 if(maxI==0 || maxI==(tool.
size()-1)) {
192 LogDebug(
"HCAL Pulse") <<
"ZdcSimpleRecAlgo::reco2 :" 193 <<
" Invalid max amplitude position, " 194 <<
" max Amplitude: "<< maxI
195 <<
" first: "<<ifirst
196 <<
" last: "<<(tool.
size()-1)
199 int capid=digi[maxI-1].capid();
200 double Energy0 = ((tool[maxI-1])*calibs.
respcorrgain(capid) );
203 if(Energy0<0){Energy0=0.;}
204 capid=digi[
maxI].capid();
206 if(Energy1<0){Energy1=0.;}
207 capid=digi[maxI+1].capid();
208 double Energy2 = ((tool[maxI+1])*calibs.
respcorrgain(capid) );
209 if(Energy2<0){Energy2=0.;}
211 double TSWeightEnergy = ((maxI-1)*Energy0 + maxI*Energy1 + (maxI+1)*Energy2);
212 double EnergySum=Energy0+Energy1+Energy2;
214 if (EnergySum!=0) AvgTSPos=TSWeightEnergy/ EnergySum;
220 time = (AvgTSPos*25.0);
227 return RecHit(digi.id(),ampl,
time,lowGEnergy);
double respcorrgain(int fCapId) const
get response corrected gain for capid=0..3
double getCorrection(double fc_ampl) const
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const =0
int size() const
get the size