MINT2
RooHILLdini_misID.cpp
Go to the documentation of this file.
1 // -- CLASS DESCRIPTION [PDF] --
2 
3 #include "RooFit.h"
4 #include <iostream>
5 #include <math.h>
6 
8 #include "RooAbsReal.h"
9 #include "RooRealVar.h"
10 
11 RooHILLdini_misID::RooHILLdini_misID(const char *name, const char *title, RooAbsReal& _m, RooAbsReal& _a, RooAbsReal& _b, RooAbsReal& _csi, RooAbsReal& _m1, RooAbsReal& _s1, RooAbsReal& _m2, RooAbsReal& _s2, RooAbsReal& _m3, RooAbsReal& _s3, RooAbsReal& _m4, RooAbsReal& _s4 ,RooAbsReal& _f1, RooAbsReal& _f2, RooAbsReal& _f3 ) :
12 
13  RooAbsPdf(name, title),
14  m("m", "Dependent", this, _m),
15  a("a", "a", this, _a),
16  b("b", "b", this, _b),
17  csi("csi", "csi", this, _csi),
18  m1("m1", "m1", this, _m1),
19  s1("s1", "s1", this, _s1),
20  m2("m2", "m2", this, _m2),
21  s2("s2", "s2", this, _s2),
22  m3("m3", "m3", this, _m3),
23  s3("s3", "s3", this, _s3),
24  m4("m4", "m4", this, _m4),
25  s4("s4", "s4", this, _s4),
26  f1("f1", "f1", this, _f1),
27  f2("f2", "f2", this, _f2),
28  f3("f3", "f3", this, _f3)
29 {
30 }
31 
32 
34 RooAbsPdf(other, name), m("m", this, other.m), a("a", this, other.a), b("b", this, other.b), csi("csi", this, other.csi), m1("m1", this, other.m1), s1("s1", this, other.s1), m2("m2", this, other.m2), s2("s2", this, other.s2), m3("m3", this, other.m3), s3("s3", this, other.s3), m4("m4", this, other.m4), s4("s4", this, other.s4), f1("f1", this, other.f1), f2("f2", this, other.f2), f3("f3", this, other.f3)
35 {
36 }
37 
38 
39 
40 
41 
42 Double_t RooHILLdini_misID::evaluate() const
43 {
44 
46  //double t = m;
47  double a_new = a;
48  double b_new = b;
49  double B_NEW = (a_new+b_new)/2;
51 
53  //mult = ((1-csi)/(b_new-a_new)*m + (b_new*csi - a_new)/(b_new-a_new));
54  //double CURVEG1 = fabs((1-csi)*secondG1 + (b_new*csi - a_new)*firstG1);
56 
58  double firstG1 = (2*exp(-((a_new-(m-m1))*(a_new-(m-m1))/(2*(s1*s1))))*s1*(b_new-(m-m1))+2*exp(-((b_new-(m-m1))*(b_new-(m-m1))/(2*(s1*s1))))*s1*(-a_new+(m-m1))-sqrt(2*TMath::Pi())*(a_new*b_new+(s1*s1)-(a_new+b_new)*(m-m1)+((m-m1)*(m-m1)))*TMath::Erf((-a_new+(m-m1))/(sqrt(2)*s1))+sqrt(2*TMath::Pi())*(a_new*b_new+(s1*s1)-(a_new+b_new)*(m-m1)+((m-m1)*(m-m1)))*TMath::Erf((-b_new+(m-m1))/(sqrt(2)*s1)))/(2*sqrt(2*TMath::Pi()));
59  double CURVEG1 = fabs( (1-csi)/(b_new-a_new)*(m-m1) + (b_new*csi - a_new)/(b_new-a_new) )*fabs(firstG1);
61 
63  double firstG2 = (2*exp(-((a_new-(m-m2))*(a_new-(m-m2))/(2*(s2*s2))))*s2*(b_new-(m-m2))+2*exp(-((b_new-(m-m2))*(b_new-(m-m2))/(2*(s2*s2))))*s2*(-a_new+(m-m2))-sqrt(2*TMath::Pi())*(a_new*b_new+(s2*s2)-(a_new+b_new)*(m-m2)+((m-m2)*(m-m2)))*TMath::Erf((-a_new+(m-m2))/(sqrt(2)*s2))+sqrt(2*TMath::Pi())*(a_new*b_new+(s2*s2)-(a_new+b_new)*(m-m2)+((m-m2)*(m-m2)))*TMath::Erf((-b_new+(m-m2))/(sqrt(2)*s2)))/(2*sqrt(2*TMath::Pi()));
64  double CURVEG2 = fabs( (1-csi)/(b_new-a_new)*(m-m2) + (b_new*csi - a_new)/(b_new-a_new) )*fabs(firstG2);
66 
67 
69  double firstG3 = (2*exp(-((a_new-(m-m3))*(a_new-(m-m3))/(2*(s3*s3))))*s3*(b_new-(m-m3))+2*exp(-((b_new-(m-m3))*(b_new-(m-m3))/(2*(s3*s3))))*s3*(-a_new+(m-m3))-sqrt(2*TMath::Pi())*(a_new*b_new+(s3*s3)-(a_new+b_new)*(m-m3)+((m-m3)*(m-m3)))*TMath::Erf((-a_new+(m-m3))/(sqrt(2)*s3))+sqrt(2*TMath::Pi())*(a_new*b_new+(s3*s3)-(a_new+b_new)*(m-m3)+((m-m3)*(m-m3)))*TMath::Erf((-b_new+(m-m3))/(sqrt(2)*s3)))/(2*sqrt(2*TMath::Pi()));
70  double CURVEG3 = fabs( (1-csi)/(b_new-a_new)*(m-m3) + (b_new*csi - a_new)/(b_new-a_new) )*fabs(firstG3);
72 
74  double firstG4 = (2*exp(-((a_new-(m-m4))*(a_new-(m-m4))/(2*(s4*s4))))*s4*(b_new-(m-m4))+2*exp(-((b_new-(m-m4))*(b_new-(m-m4))/(2*(s4*s4))))*s4*(-a_new+(m-m4))-sqrt(2*TMath::Pi())*(a_new*b_new+(s4*s4)-(a_new+b_new)*(m-m4)+((m-m4)*(m-m4)))*TMath::Erf((-a_new+(m-m4))/(sqrt(2)*s4))+sqrt(2*TMath::Pi())*(a_new*b_new+(s4*s4)-(a_new+b_new)*(m-m4)+((m-m4)*(m-m4)))*TMath::Erf((-b_new+(m-m4))/(sqrt(2)*s4)))/(2*sqrt(2*TMath::Pi()));
75  double CURVEG4 = fabs( (1-csi)/(b_new-a_new)*(m-m4) + (b_new*csi - a_new)/(b_new-a_new) )*fabs(firstG4);
77 
78  return fabs(f1*CURVEG1)+ fabs(f2*CURVEG2)+ fabs(f3*CURVEG3) + fabs((1-f1-f2-f3)*CURVEG4);
79 }
RooHILLdini_misID(const char *name, const char *title, RooAbsReal &_m, RooAbsReal &_a, RooAbsReal &_b, RooAbsReal &_csi, RooAbsReal &_m1, RooAbsReal &_s1, RooAbsReal &_m2, RooAbsReal &_s2, RooAbsReal &_m3, RooAbsReal &_s3, RooAbsReal &_m4, RooAbsReal &_s4, RooAbsReal &_f1, RooAbsReal &_f2, RooAbsReal &_f3)
static const double m2
static const double m
Double_t evaluate() const
static const double m3