28   using namespace asg::SFHelper;
 
   41     std::vector<CP::SystematicVariation> positiveVar{};
 
   42     std::vector<CP::SystematicVariation> negativeVar{};
 
   43     for (
const auto& 
sys : systs) {
 
   44       float param = 
sys.parameter();
 
   46         negativeVar.push_back(
sys);
 
   48         positiveVar.push_back(
sys);
 
   54               const std::vector<CP::SystematicVariation>& 
variations,
 
   55               const double nominal) {
 
   59           if (
tool->applySystematicVariation({ sys }) != StatusCode::SUCCESS ||
 
   60               tool->getEfficiencyScaleFactor(
el, systematic) !=
 
   65           total2 += (nominal - systematic) * (nominal - systematic);
 
   67         return std::sqrt(total2);
 
   75     totalNeg = totalSyst(
el, negativeVar, nominalSF);
 
   76     totalPos = totalSyst(
el, positiveVar, nominalSF);
 
   82     std::vector<CP::SystematicSet> toys = sysVec.
result(
"toys");
 
   83     std::vector<double> toysVal{};
 
   84     toysVal.reserve(toys.size());
 
   87     for (
const auto& 
sys : toys) {
 
   90                 tool->getEfficiencyScaleFactor(
el, systematic) ==
 
   93                     << 
" toy Result : " << systematic);
 
   94       toysVal.push_back(systematic);
 
  102     double meanK{ toysVal[0] };   
 
  103     double meanK_1{ toysVal[0] }; 
 
  106     const size_t N = toysVal.size();
 
  108     for (
size_t i = 1; 
i != 
N; ++
i) {
 
  109       const double x{ toysVal[
i] };
 
  110       const double invk{ (1.0 / (++
k)) };
 
  111       meanK_1 = meanK + (
x - meanK) * invk;
 
  112       s += (
x - meanK_1) * (
x - meanK);
 
  115     const double variance = 
s / (
N - 1);
 
  117     totalNeg = sqrt(variance);
 
  118     totalPos = sqrt(variance);