test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ZMuStandaloneScaledFunction.h
Go to the documentation of this file.
1 #ifndef ElectroWeakAnalysis_ZMuMu_ZMuStandaloneScaledFunction_h
2 #define ElectroWeakAnalysis_ZMuMu_ZMuStandaloneScaledFunction_h
4 #include <boost/shared_ptr.hpp>
5 
6 namespace function {
8  public:
9  enum { arguments = 1 };
10  enum { parameters = 9 };
12  binScaleFactor(bin), zms_(zms) {}
13  ZMuStandaloneScaledFunction(boost::shared_ptr<double> m, boost::shared_ptr<double> g, boost::shared_ptr<double> Ng, boost::shared_ptr<double> Ni,
14  boost::shared_ptr<double> me, boost::shared_ptr<double> s,
15  boost::shared_ptr<double> N, boost::shared_ptr<double> eff_tr, boost::shared_ptr<double> eff_sa, int bin):
16  mass(m), width(g), Ngamma(Ng), Nint(Ni), mean(me), sigma(s),
18  zms_(m, g, Ng, Ni, me, s, N, eff_tr, eff_sa) {}
19  ZMuStandaloneScaledFunction(double m, double g, double Ng, double Ni,
20  double me, double s,
21  double N, double eff_tr, double eff_sa,
22  int bin):
23  mass(new double(m)), width(new double(g)), Ngamma(new double(Ng)), Nint(new double(Ni)), mean(new double(me)), sigma(new double(s)),
24  numberOfEvents(new double(N)), efficiencyTrack(new double(eff_tr)), efficiencyStandalone(new double(eff_sa)), binScaleFactor(bin),
25  zms_(m, g, Ng, Ni, me, s, N, eff_tr, eff_sa) {}
26  void setParameters(double m, double g, double Ng, double Ni,
27  double me, double s,
28  double N, double eff_tr, double eff_sa) {
29  *mass = m;
30  *width = g;
31  *Ngamma = Ng;
32  *Nint = Ni;
33  *mean = me;
34  *sigma = s;
35  *numberOfEvents = N;
36  *efficiencyTrack = eff_tr;
37  *efficiencyStandalone = eff_sa;
38  zms_.setParameters(m, g, Ng, Ni, me, s, N, eff_tr, eff_sa);
39  }
40  double operator()(double x) const {
41  return binScaleFactor * zms_(x);
42  }
43  boost::shared_ptr<double> mass, width, Ngamma, Nint, mean, sigma;
46  private:
48  };
49 }
50 
51 #endif
52 
void setParameters(double m, double g, double Ng, double Ni, double me, double s, double N, double eff_tr, double eff_sa)
Definition: vlib.h:256
ZMuStandaloneScaledFunction(const ZMuStandaloneFunction &zms, int bin)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
#define N
Definition: blowfish.cc:9
ZMuStandaloneScaledFunction(double m, double g, double Ng, double Ni, double me, double s, double N, double eff_tr, double eff_sa, int bin)
ZMuStandaloneScaledFunction(boost::shared_ptr< double > m, boost::shared_ptr< double > g, boost::shared_ptr< double > Ng, boost::shared_ptr< double > Ni, boost::shared_ptr< double > me, boost::shared_ptr< double > s, boost::shared_ptr< double > N, boost::shared_ptr< double > eff_tr, boost::shared_ptr< double > eff_sa, int bin)