/ElectroWeakAnalysis/ZMuMu/src/ZMuMuBackNorm.cc

https://github.com/aivanov-cern/cmssw · C++ · 23 lines · 0 code · 0 blank · 23 comment · 0 complexity · 5cab02b69b198ea85fb64943169444c9 MD5 · raw file

  1. /*
  2. #include "ElectroWeakAnalysis/ZMuMu/interface/ZMuMuBackNorm.h"
  3. #include <cmath>
  4. ZMuMuBackNorm::ZMuMuBackNorm(double l, double a, double b):
  5. expo_(-l),
  6. pol_(-pow(l, 2)-l*a-2*b, -pow(l, 2)*a-2*l*b, -pow(l, 2)*b) {
  7. }
  8. void ZMuMuBackNorm::setParameters(double l, double a, double b) {
  9. expo_.setParameters(-l);
  10. double l2 = l*l;
  11. pol_.setParameters(-l2-l*a-2*b, -l2*a-2*l*b, -l2*b);
  12. }
  13. double ZMuMuBackNorm::operator()(const int x_min, const int x_max) const {
  14. double l = - expo_.lambda; //the exponential is constructed as negative!!
  15. double l3inv = 1/(l*l*l);
  16. double N1 = expo_(x_max)*l3inv * pol_(x_max);
  17. double N2 = expo_(x_min)*l3inv * pol_(x_min);
  18. return 1/(N1 - N2);
  19. }
  20. */