89 int ifirst = mySignalTS[0];
91 double ampl=0;
int maxI = -1;
double maxA = -1e10;
double ta=0;
98 for(
unsigned int iv = 0; iv<myNoiseTS.size(); ++iv)
100 CurrentTS = myNoiseTS[iv];
101 Allnoise += tool[CurrentTS];
104 if(noiseslices != 0) {
105 noise = (Allnoise)/
double(noiseslices);
110 double noisefactor=1.;
111 for(
unsigned int ivs = 0; ivs<mySignalTS.size(); ++ivs)
118 CurrentTS = mySignalTS[ivs];
119 int capid=digi[CurrentTS].capid();
125 ta = tool[CurrentTS]-noisefactor*noise;
141 if(maxI==0 || maxI==(tool.
size()-1)) {
142 LogDebug(
"HCAL Pulse") <<
"ZdcSimpleRecAlgo::reco2 :"
143 <<
" Invalid max amplitude position, "
144 <<
" max Amplitude: "<< maxI
145 <<
" first: "<<ifirst
146 <<
" last: "<<(tool.
size()-1)
149 int capid=digi[maxI-1].capid();
150 double Energy0 = ((tool[maxI-1])*calibs.
respcorrgain(capid) );
153 if(Energy0<0){Energy0=0.;}
154 capid=digi[
maxI].capid();
156 if(Energy1<0){Energy1=0.;}
157 capid=digi[maxI+1].capid();
158 double Energy2 = ((tool[maxI+1])*calibs.
respcorrgain(capid) );
159 if(Energy2<0){Energy2=0.;}
161 double TSWeightEnergy = ((maxI-1)*Energy0 + maxI*Energy1 + (maxI+1)*Energy2);
162 double EnergySum=Energy0+Energy1+Energy2;
164 if (EnergySum!=0) AvgTSPos=TSWeightEnergy/ EnergySum;
170 time = (AvgTSPos*25.0);
177 return RecHit(digi.id(),ampl,
time);
double respcorrgain(int fCapId) const
get response corrected gain for capid=0..3
double getCorrection(double fc_ampl) const
int size() const
get the size
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const =0