Validation/MtdValidation/plugins/Primary4DVertexHarvester.cc
// auxiliary method to add 1D MonitorElement toBeAdded to a base ME
auxiliary method to add 1D MonitorElement toBeAdded to a base ME
auxiliary method to add 1D MonitorElement toBeAdded to a base ME
void Primary4DVertexHarvester::incrementME(MonitorElement* base, MonitorElement* toBeAdded) {
  for (int ibin = 1; ibin <= base->getNbinsX(); ibin++) {
    double newC = base->getBinContent(ibin) + toBeAdded->getBinContent(ibin);
    double newE = std::sqrt(newC);
    base->setBinContent(ibin, newC);
    base->setBinError(ibin, newE);
  }
}
void Primary4DVertexHarvester :: incrementME ( MonitorElement * base , MonitorElement * toBeAdded ) { for ( int ibin = 1 ; ibin <= base -> getNbinsX ( ) ; ibin ++ ) { double newC = base -> getBinContent ( ibin ) + toBeAdded -> getBinContent ( ibin ) ; double newE = std :: sqrt ( newC ) ; base -> setBinContent ( ibin , newC ) ; base -> setBinError ( ibin , newE ) ; } }
auxiliary method to add 1D MonitorElement toBeAdded to a base ME
auxiliary method to add 1D MonitorElement toBeAdded to a base ME