27 if(alpha<10e-5||beta<10e-5||
theta<10e-5)
29 return std::make_pair(-1,-1);
40 double m = std::exp(-ADCSum/
theta);
41 double p = std::exp(-(ADCSum - alpha) / beta);
43 double dda = (1 - m) * -p / beta / (1 + p) / (1 + p);
44 double ddb = (1 - m) * -p / std::pow(1 + p, 2.0) * ADCSum / beta / beta;
45 double ddt = -ADCSum * m /
theta /
theta / (1 + p);
47 double efficiencyErr = std::sqrt(
48 std::pow(alphaErr * dda, 2) +
49 std::pow(betaErr * ddb, 2) +
50 std::pow(thetaErr * ddt, 2) +
51 2 * corrAlphaBeta*alphaErr*betaErr * dda * ddb +
52 2 * corrAlphaTheta*alphaErr*thetaErr * dda * ddt +
53 2 * corrBetaTheta*betaErr*thetaErr * ddb * ddt);
58 msg << MSG::INFO <<
"Efficiency Uncertainty calculation abnormal." <<
endmsg;
61 return std::make_pair(
efficiency, efficiencyErr);
void efficiency(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")