41 double ampl=0;
int maxI = -1;
double maxA = -1e10;
float ta=0;
43 for (
int i=ifirst;
i<tool.
size() &&
i<
n+ifirst;
i++) {
44 int capid=digi[
i].capid();
47 ta*=calibs.
gain(capid);
57 if(maxI==0 || maxI==(tool.
size()-1)) {
69 int capid=digi[maxI-1].capid();
70 float t0 = fabs((tool[maxI-1]-calibs.
pedestal(capid))*calibs.
gain(capid));
71 capid=digi[maxI+1].capid();
72 float t2 = fabs((tool[maxI+1]-calibs.
pedestal(capid))*calibs.
gain(capid));
73 float wpksamp = (t0 + maxA + t2);
74 if (wpksamp!=0) wpksamp=(maxA + 2.0*t2) / wpksamp;
86 return RecHit(digi.id(),ampl,
time);
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...
virtual void adc2fC(const CastorDataFrame &df, CaloSamples &lf) const =0
double getCorrection(double fc_ampl) const
const T & max(const T &a, const T &b)
double pedestal(int fCapId) const
get pedestal for capid=0..3
double gain(int fCapId) const
get gain for capid=0..3
int size() const
get the size
static float timeshift_ns_hf(float wpksamp)
Same as above, but for the HF PMTs.