79 double ampl=0;
int maxI = -1;
double maxA = -1e10;
float ta=0;
81 for (
int i=ifirst;
i<tool.
size() &&
i<
n+ifirst;
i++) {
82 int capid=digi[
i].capid();
95 if(maxI==0 || maxI==(tool.
size()-1)) {
96 LogDebug(
"HCAL Pulse") <<
"HcalSimpleRecAlgo::reconstruct :"
97 <<
" Invalid max amplitude position, "
98 <<
" max Amplitude: "<< maxI
100 <<
" last: "<<(tool.
size()-1)
103 int capid=digi[maxI-1].capid();
105 capid=digi[maxI+1].capid();
110 if (maxA<minA) minA=maxA;
111 if (t2<minA) minA=
t2;
112 if (minA<0) { maxA-=minA; t0-=minA; t2-=minA; }
114 float wpksamp = (t0 + maxA +
t2);
115 if (wpksamp!=0) wpksamp=(maxA + 2.0*
t2) / wpksamp;
117 if (corr!=0 && pulseCorrect ) {
147 int ieta = cell.
ieta();
148 int iphi = cell.iphi();
149 if( cell.subdet() ==
HcalBarrel) ampl *=
eCorr(ieta,iphi,ampl,runnum_);
158 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
double pedestal(int fCapId) const
get pedestal for capid=0..3
const T & max(const T &a, const T &b)
auto const T2 &decltype(t1.eta()) t2
int ieta() const
get the cell ieta
static float leakCorr(double energy)
Leak correction.
static float timeshift_ns_hbheho(float wpksamp)
int size() const
get the size
double timecorr() const
get time correction factor
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const =0
static float eCorr(int ieta, int iphi, double ampl, int runnum)
Ugly hack to apply energy corrections to some HB- cells.
static double delay(double fC, BiasSetting bias=Medium)
Returns the amount (ns) by which a pulse of the given number of fC will be delayed by the timeslew ef...