20 void PedestalSub::calculate(
const std::vector<double> & inputCharge,
const std::vector<double> & inputPedestal,
const std::vector<double> & inputNoise, std::vector<double> & corrCharge,
int soi,
int nTS)
const {
23 for (
auto i=0;
i<nTS;
i++) {
24 corrCharge.push_back(inputCharge[
i]-inputPedestal[
i]-bseCorr);
28 double PedestalSub::getCorrection(
const std::vector<double> & inputCharge,
const std::vector<double> & inputPedestal,
const std::vector<double> & inputNoise,
int soi,
int nTS)
const {
32 for (
auto i=0;
i<nTS;
i++) {
33 if (
i==soi ||
i==(soi+1))
continue;
34 if ( (inputCharge[
i]-inputPedestal[
i])<3*inputNoise[i]) {
35 baseline+=(inputCharge[
i]-inputPedestal[
i]);
38 baseline+=3*inputNoise[
i];
void init(int runCond, float threshold, float quantile)
double getCorrection(const std::vector< double > &inputCharge, const std::vector< double > &inputPedestal, const std::vector< double > &inputNoise, int soi, int nSample) const
void calculate(const std::vector< double > &inputCharge, const std::vector< double > &inputPedestal, const std::vector< double > &inputNoise, std::vector< double > &corrCharge, int soi, int nSample) const