PageRenderTime 18ms CodeModel.GetById 14ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 5ZMuMuBackNorm::ZMuMuBackNorm(double l, double a, double b):
 6  expo_(-l), 
 7  pol_(-pow(l, 2)-l*a-2*b, -pow(l, 2)*a-2*l*b, -pow(l, 2)*b) {
 8} 
 9
10void ZMuMuBackNorm::setParameters(double l, double a, double b) {
11  expo_.setParameters(-l);
12  double l2 = l*l;
13  pol_.setParameters(-l2-l*a-2*b, -l2*a-2*l*b, -l2*b);
14}
15
16double ZMuMuBackNorm::operator()(const int x_min, const int x_max) const {
17  double l = - expo_.lambda; //the exponential is constructed as negative!!
18  double l3inv = 1/(l*l*l);
19  double N1 = expo_(x_max)*l3inv * pol_(x_max);
20  double N2 = expo_(x_min)*l3inv * pol_(x_min);
21  return 1/(N1 - N2);
22}
23*/