9 const unsigned int nreals = reals.size();
10 const unsigned int nimags = imags.size();
11 const unsigned int nloops = pow(2, min(nreals, nimags));
12 const unsigned int nterms = max(nreals, nimags);
14 for (
unsigned int ic=0; ic<nloops; ic++){
16 unsigned int nimagsused=0;
18 for (
unsigned int it=0; it<nterms; it++){
19 unsigned int code = (nreals>=nimags ? 0 : 1);
20 if (it<nloops) code = (ic >> it);
23 termval*=imags.at(it);
25 else termval*=reals.at(it);
26 if (termval==0.){ doSkip=
true;
break; }
29 if (nimagsused%4==0) resRe += termval;
30 else if (nimagsused%4==1) resIm += termval;
31 else if (nimagsused%4==2) resRe -= termval;
32 else resIm -= termval;
41 const char* name,
const char* title,
46 ) : RooAbsPdf(name, title),
50 Phi(
"Phi",
"Phi", this),
53 m12(
"m12",
"m12", this),
55 Phi1(
"Phi1",
"Phi1", this),
58 mX(
"mX",
"mX", this, (RooAbsReal&)*(_parameters.mX)),
59 gamX(
"gamX",
"gamX", this, (RooAbsReal&)*(_parameters.gamX)),
60 mW(
"mW",
"mW", this, (RooAbsReal&)*(_parameters.mW)),
61 gamW(
"gamW",
"gamW", this, (RooAbsReal&)*(_parameters.gamW)),
62 mZ(
"mZ",
"mZ", this, (RooAbsReal&)*(_parameters.mZ)),
63 gamZ(
"gamZ",
"gamZ", this, (RooAbsReal&)*(_parameters.gamZ)),
64 mWprime(
"mWprime",
"mWprime", this, (RooAbsReal&)*(_parameters.mWprime)),
65 gamWprime(
"gamWprime",
"gamWprime", this, (RooAbsReal&)*(_parameters.gamWprime)),
66 mZprime(
"mZprime",
"mZprime", this, (RooAbsReal&)*(_parameters.mZprime)),
67 gamZprime(
"gamZprime",
"gamZprime", this, (RooAbsReal&)*(_parameters.gamZprime)),
68 Sin2ThetaW(
"Sin2ThetaW",
"Sin2ThetaW", this, (RooAbsReal&)*(_parameters.Sin2ThetaW)),
69 vev(
"vev",
"vev", this, (RooAbsReal&)*(_parameters.
vev)),
70 gVprimeff_decay1_left(
"gVprimeff_decay1_left",
"gVprimeff_decay1_left", this, (RooAbsReal&)*(_parameters.gVprimeff_decay1_left)),
71 gVprimeff_decay1_right(
"gVprimeff_decay1_right",
"gVprimeff_decay1_right", this, (RooAbsReal&)*(_parameters.gVprimeff_decay1_right)),
72 gVprimeff_decay2_left(
"gVprimeff_decay2_left",
"gVprimeff_decay2_left", this, (RooAbsReal&)*(_parameters.gVprimeff_decay2_left)),
73 gVprimeff_decay2_right(
"gVprimeff_decay2_right",
"gVprimeff_decay2_right", this, (RooAbsReal&)*(_parameters.gVprimeff_decay2_right)),
76 Vdecay1(_Vdecay1), Vdecay2(_Vdecay2),
85 RooAbsPdf(other, name),
87 h1(
"h1", this, other.h1),
88 h2(
"h2", this, other.h2),
89 Phi(
"Phi", this, other.Phi),
90 m1(
"m1", this, other.m1),
91 m2(
"m2", this, other.m2),
92 m12(
"m12", this, other.m12),
93 hs(
"hs", this, other.hs),
94 Phi1(
"Phi1", this, other.Phi1),
95 Y(
"Y", this, other.Y),
97 mX(
"mX", this, other.mX),
98 gamX(
"gamX", this, other.gamX),
99 mW(
"mW", this, other.mW),
100 gamW(
"gamW", this, other.gamW),
101 mZ(
"mZ", this, other.mZ),
102 gamZ(
"gamZ", this, other.gamZ),
103 mWprime(
"mWprime", this, other.mWprime),
104 gamWprime(
"gamWprime", this, other.gamWprime),
105 mZprime(
"mZprime", this, other.mZprime),
106 gamZprime(
"gamZprime", this, other.gamZprime),
107 Sin2ThetaW(
"Sin2ThetaW", this, other.Sin2ThetaW),
108 vev(
"vev", this, other.
vev),
109 gVprimeff_decay1_left(
"gVprimeff_decay1_left", this, other.gVprimeff_decay1_left),
110 gVprimeff_decay1_right(
"gVprimeff_decay1_right", this, other.gVprimeff_decay1_right),
111 gVprimeff_decay2_left(
"gVprimeff_decay2_left", this, other.gVprimeff_decay2_left),
112 gVprimeff_decay2_right(
"gVprimeff_decay2_right", this, other.gVprimeff_decay2_right),
114 Vdecay1(other.Vdecay1), Vdecay2(other.Vdecay2),
115 intCodeStart(other.intCodeStart),
117 verbosity(other.verbosity)
134 if (
verbosity>=
TVar::DEBUG)
MELAout <<
"RooSpin::calculatePropagator: Calling propagator with type " << propType <<
" and mass " << mass << endl;
138 propIm = (mass!=0. ? -1./pow(mass, 2) : 0.);
141 else if (propType==1){
145 Double_t denominator = pow(mV*gamV, 2)+pow(pow(mass, 2)-pow(mV, 2), 2);
146 propRe = -mV*gamV/denominator;
147 propIm = -(pow(mass, 2)-pow(mV, 2))/denominator;
152 propRe = (mass==mV ? 1. : 0.);
157 else if (propType==2){
159 Double_t denominator = pow(
mX*
gamX, 2)+pow(pow(mass, 2)-pow(
mX, 2), 2);
160 propRe =
mX*
gamX/denominator;
161 propIm = (pow(mass, 2)-pow(
mX, 2))/denominator;
166 propRe = (mass==
mX ? 1. : 0.);
170 else if (propType==3){
173 if (gamV>=0. && mV>=0.){
174 Double_t denominator = pow(mV*gamV, 2)+pow(pow(mass, 2)-pow(mV, 2), 2);
175 propRe = -mV*gamV/denominator;
176 propIm = -(pow(mass, 2)-pow(mV, 2))/denominator;
197 const Double_t atomicT3 = 0.5;
198 const Double_t atomicCharge = 1.;
200 const Double_t gW = 2.*
mW/
vev;
201 const Double_t overallFactorZ = gW*0.5/sqrt(1.-
Sin2ThetaW);
202 const Double_t overallFactorGamma = -gW*sqrt(
Sin2ThetaW);
203 const Double_t overallFactorW = gW*0.5/sqrt(2.);
205 const Double_t Q_up = 2.*atomicCharge/3.;
206 const Double_t Q_dn = -atomicCharge/3.;
207 const Double_t Q_l = -atomicCharge;
208 const Double_t Q_nu = 0;
211 const Double_t gV_up = atomicT3 - 2.*Q_up*
Sin2ThetaW;
212 const Double_t gV_dn = -atomicT3 - 2.*Q_dn*
Sin2ThetaW;
213 const Double_t gV_l = -atomicT3 - 2.*Q_l*
Sin2ThetaW;
214 const Double_t gV_nu = atomicT3 - 2.*Q_nu*
Sin2ThetaW;
217 const Double_t gA_up = atomicT3;
218 const Double_t gA_dn = -atomicT3;
219 const Double_t gA_l = -atomicT3;
220 const Double_t gA_nu = atomicT3;
224 double yy_up = pow(gV_up, 2) + pow(gA_up, 2);
225 double yy_dn = pow(gV_dn, 2) + pow(gA_dn, 2);
226 double xx_up = gV_up*gA_up;
227 double xx_dn = gV_dn*gA_dn;
228 double yy = (2.*yy_up+3.*yy_dn)/5.;
229 double xx = (2.*xx_up+3.*xx_dn)/5.;
230 double discriminant = pow(yy, 2)-4.*pow(xx, 2);
231 gV = (yy+sqrt(fabs(discriminant)))/2.;
233 gV = -overallFactorZ*sqrt(gV);
234 gA = -overallFactorZ*sqrt(gA);
237 gV = overallFactorGamma*sqrt((2.*pow(Q_up, 2) + 3.*pow(Q_dn, 2))/5.);
243 gV = overallFactorZ*gV_dn;
244 gA = overallFactorZ*gA_dn;
247 gV = overallFactorGamma*Q_dn;
253 gV = overallFactorZ*gV_up;
254 gA = overallFactorZ*gA_up;
257 gV = overallFactorGamma*Q_up;
263 gV = overallFactorZ*gV_nu;
264 gA = overallFactorZ*gA_nu;
267 gV = overallFactorGamma*Q_nu;
273 gV = overallFactorZ*gV_l;
274 gA = overallFactorZ*gA_l;
277 gV = overallFactorGamma*Q_l;
295 if (
verbosity>=
TVar::DEBUG)
MELAout <<
"RooSpin::calculateVffGVGA( " << gV <<
" , " << gA <<
" , " << Vdecay <<
" , " << isGamma <<
" )" << endl;
299 Double_t gV1=0, gV2=0, gA1=0, gA2=0;
301 if (gV1!=0. || gA1!=0.) R1Val = 2.*gV1*gA1/(pow(gV1, 2) + pow(gA1, 2));
303 if (gV2!=0. || gA2!=0.) R2Val = 2.*gV2*gA2/(pow(gV2, 2) + pow(gA2, 2));
308 if (gamV!=0) (*gamV)=
gamW;
312 if (gamV!=0) (*gamV)=
gamZ;
316 if (gamV!=0) (*gamV)=0;
321 const Double_t gW = 2.*
mW/
vev;
322 const Double_t overallFactor = gW*0.5/sqrt(1.-
Sin2ThetaW);
325 switch (whichVprime){
338 gV=(gL+gR)/2.*overallFactor;
339 gA=(gL-gR)/2.*overallFactor;
341 if (
verbosity>=
TVar::DEBUG)
MELAout <<
"RooSpin::calculateVprimeffGVGA( " << gV <<
" , " << gA <<
" , " << whichVprime <<
" )" << endl;
345 Double_t gV1=0, gV2=0, gA1=0, gA2=0;
347 if (gV1!=0. || gA1!=0.) R1Val = 2.*gV1*gA1/(pow(gV1, 2) + pow(gA1, 2));
349 if (gV2!=0. || gA2!=0.) R2Val = 2.*gV2*gA2/(pow(gV2, 2) + pow(gA2, 2));
362 if (gamV!=0) (*gamV)=0;
367 Double_t gV1=0, gV2=0, gA1=0, gA2=0;
372 Double_t ampScale = sqrt((pow(gV1, 2) + pow(gA1, 2))*(pow(gV2, 2) + pow(gA2, 2)));
390 if (objectPtr!=0) proxy.setArg((RooAbsReal&) *objectPtr);
393 RooAbsArg* arg = proxy.absArg();
394 return (
dynamic_cast<RooRealVar*
>(arg)!=0);