15 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 {
18 for (
auto i=0;
i<nTS;
i++) {
19 corrCharge.push_back(inputCharge[
i]-inputPedestal[
i]-bseCorr);
23 double PedestalSub::getCorrection(
const std::vector<double> & inputCharge,
const std::vector<double> & inputPedestal,
const std::vector<double> & inputNoise,
int soi,
int nTS)
const {
27 for (
auto i=0;
i<nTS;
i++) {
28 if (
i==soi ||
i==(soi+1))
continue;
29 if ( (inputCharge[
i]-inputPedestal[
i])<3*inputNoise[i]) {
30 baseline+=(inputCharge[
i]-inputPedestal[
i]);
33 baseline+=3*inputNoise[
i];
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