42 double ampl=0;
int maxI = -1;
double maxA = -1e10;
float ta=0;
44 for (
int i=ifirst;
i<tool.
size() &&
i<
n+ifirst;
i++) {
45 int capid=digi[
i].capid();
48 ta*=calibs.
gain(capid);
58 if(maxI==0 || maxI==(tool.
size()-1)) {
70 int capid=digi[maxI-1].capid();
71 float t0 = fabs((tool[maxI-1]-calibs.
pedestal(capid))*calibs.
gain(capid));
72 capid=digi[maxI+1].capid();
73 float t2 = fabs((tool[maxI+1]-calibs.
pedestal(capid))*calibs.
gain(capid));
74 float wpksamp = (t0 + maxA + t2);
75 if (wpksamp!=0) wpksamp=(maxA + 2.0*t2) / wpksamp;
87 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...
double getCorrection(double fc_ampl) const
virtual void adc2fC(const CastorDataFrame &df, CaloSamples &lf) const =0
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.