Traruh Synred

55 Reputation

3 Badges

9 years, 246 days

MaplePrimes Activity


These are replies submitted by Traruh Synred

@dharr Thanks.

I did find that by converting Vector to Matriix I can output it.

I will up load...

restart

vv := Vector([1, 3, 5, 7])

Vector[column](%id = 4409128066)

(1)

File output has the four numbers, one per line

Export("c:/Users/snyde/BFROOT/testfile.dat", vv, format = "CSV")

Error, (in Export) invalid input: ExportMatrix expects its 2nd argument, M, to be of type {Matrix, list(Matrix)}, but received Vector(4, {(1) = 1, (2) = 3, (3) = 5, (4) = 7})

 

mm := Matrix([2, 3, 4, 5])

Matrix(%id = 4409122946)

(2)

Export("c:/Users/snyde/BFROOT/testfileb.dat", MM, format = "CSV")

8

(3)

vv

Vector[column](%id = 4409128066)

(4)

MM := convert(vv, Matrix)

Matrix(%id = 4409118722)

(5)

MM+MM

Matrix(%id = 4409122306)

(6)

dataplot(MM)

 

help("import")

``

Download testfile.mw

@dharr  It seems like it doesn't like Vector (which I thought was a kind of Matrix). Could this be because I only have Maple 18?

@gulliet That method doesn't work for me (Maple 18). It gives strings describing the list not concatenated list.

Just adding them with ''+' produces a vector. It's not hard. I could write my own and it's the obvious function to override '+' with.

 

@Carl Love Here is another file from an attempt at 400 event fun. It only made it to 217.

DStar3DKinRecoLoopDebugCombo400EventCrashed217.mw

@Carl Love Besides the more or less small continuous leaking, I have found occasional large 'bumps'. I plot the increase using 'MemUse()' for my event loop -- from start to end for each iteration. plot the log of the number of bytes. (I haven't figured out how to make a 'dataplot' using a log scale). That big spike is 10^7..10MB.  At least, mostly these are associated with a similar size increase in the proc 'bDecay'. I also count ('nTryAng') the number of trials it takes 'PickAngles' to pick the angles and this does not seem to be strongly associated with the size of the bump from 'bDecay'.

For a given random seed these bumps do occur at the same event, but they vary in size. However, running the same seed multiple times does not result in a crash at that event.

While the bumps I see are not big enough to cause crashes, the crashes are so hard that I can not examine anything afterward.

@Joe Riel This [ (* *_ doesn't work for me, even though it shows up in Maple Help on commenting.

@Carl Love  I've been running the 'MemUse()' disabled version with the same 'seed' multiple times and it crashes at a different event every time. This hints to me that it's not the code as I don't think there is the undefined variable being random in old Fortran occurs n Maple.

@Carl Love Here's one that crashes with 'MemUse()' disabled (replaced with a version that just returns 1); It crashes earlier.DStar3DKinRecoLoopDebug.mw

'Insert Comment' didn't seem to work so I inserted a link. I'll leave it alone for a while or rename it.

 Download DStar3DKinRecoLoopDebug.mw

@Carl Love This is an
 

``

B-vector mathcing for double D*LNu decays       

 

restart

Version := 6.2

6.2

(1)

NULL

4.9 -- Fix boostTo to use Gram-Schmit orthogonalization

5.3 -- Fixed sign error in two body decay momentum calc in doa loop

         Fixed incorrect calculation of v1 and v2 which summed D* and it's pion instead of D* and the lepton

5.9    Fixed bug in 'PickAngles'
6.0   Remove 5.9..that was a mistake...

6.1 Negative values from 'ProbDLNu'. There was a missing sThetaL from the cross terms

6.2 Type causing none zero neutrion masses found and fixe

      Does not stop mememory crashs they seem less common when memory is intergated?

 

estart; with(Physics); with(LinearAlgebra); with(VectorCalculus); with(Optimization); with(Statistics); with(ArrayTools); with(plots); with(Threads); with(MmaTranslator[Mma]); Setup(mathematicalnotation = true); Setup(coordinatesystems = cartesian)

estart

 

`Default differentiation variables for d_, D_ and dAlembertian are:`*{X = (x, y, z, t)}

 

`Systems of spacetime Coordinates are:`*{X = (x, y, z, t)}; "_noterminate"

(2)

 

 

Here I consider the 0C reconstructing of both B-mesons in the decay BBbar --> (D*LNu)(D*Lnu). The vectors v1 and v2 are the three momenta of the D* and the lepton. The angle bbetween v1 and I is called theta12 (T12in Maple code).The B-vectors B1 and B2 branch (unlabed ugh!) of there respective v (D*+lep) vectors at angle specified. Clearly to mathch (pB1=-pB2) the must lie in the v1-v2 plane. Their angles with w.r.t., v1 and v2 are theta1 (T1) and theta2 (T2). The kinematics of the decay should guarentee that one and only one match. The only ambiguous case would be when v1 and v2 are back-to-back and this could be excluded w/o much loss.The kinematics determins the angles cos(theta1) and cos(theta2).In most cases it will be possible to reconstruct the decay angles of both D*LNu's.

There are 4 possible values for the angles between the B-mesons -theta12+/-theta1+/-theta2. One must by 180 deg (pi).

 

Angles to try:

mStart := MemUse()

MemUse()

(3)

NULL

NULL

NULL

randomize(7759447594)

NULL

7759447594

(4)

NULL

rFlat := rand(0. .. 1.0)

proc () options operator, arrow; RandomTools:-Generate(float('range' = 0. .. 1.0, 'method' = 'uniform')) end proc

(5)

 

Max := 6.0

6.0

(6)

`#memUse`()-mStart

`#memUse`()-MemUse()

(7)

"PickAngles:=proc(HP,HM,H0)   global rFlat, Max;   local thetaL,thetaV,Chi, result,R,cL,cV,test,angles;   do    R:=rFlat();   cL:=-1.0+2.0*rFlat();   cV:=-1.0+2.0*rFlat();   Chi:=2*Pi*rFlat();   thetaL:=arccos(cL);   thetaV:=arccos(cV); #`  print`("Hs:",HP,HM,H0);   test:=(ProbDStarLNu(HP,HM,H0,thetaL,thetaV,Chi))/(Max);  #print("angles:",thetaL,thetaV,Chi, "test:",test,R);   until R<test;   angles:=[thetaL,thetaV,Chi];   return angles;  end proc:"

ProbDStarLNu := proc (HP, HM, H0, theta_L, theta_V, chi) local cL, sL, cV, sV, cChi, c2Chi, sum, result, memStart, memFin, memTrig, memSum1; `#probd print`("memStart:", memStart); cL := cos(theta_L); sL := sin(theta_L); cV := cos(theta_V); sV := sin(theta_V); cChi := cos(chi); c2Chi := cos(2.0*chi); sum := 0.; sum := sum+HP^2*(1-cL)^2*sV^2; sum := sum+HM^2*(1+cL)^2*sV^2; sum := sum+4*H0^2*sL^2*cV^2; sum := sum-2*HP*HM*sL^2*sV^2*c2Chi; sum := sum-4*HP*H0*sL*(1-cL)*sV*cV*cChi; sum := sum+4*HM*H0*sL*(1+cL)*sV*cV*cChi; result := sum/Max; `#probd print`("memFin:", memFin); `#probd print`("ProbDStarLNu: memTrig-memStart=", memTrig-memStart); `#probd print`("ProbDStarLNu: memSum1-memTrig=", memSum1-memTrig); `#probd print`("ProbDStarLNu: memFin-memTrig=", memFin-memTrig); `#probd print`("ProbDStarLNu: memFin-memStart=", memFin-memStart); `#probd print`("ProbDStarLNu: memFin=", memFin); return result end proc

``

``

NULL

``

recoAngles := proc (mB::float, p4DBCM, p4PiBCM, p4LepBCM) local nHatDBCM, nHatPiBCM, nHatLepBCM, nHatNuBCM, p4DStarBCM, p4LepNuBCM, p4DDStarCM, p4LepLepNuCM, p4BCM, p3DBCM, p3PiBCM, p3LepBCM, p4NuBM, p3NuBCM, nHatD, normDPi, normLepNu, Chi, cChi, ThetaD, cThetaD, cThetaLep, ThetaLep, nHatDDStarCM, nHatLepLepNuCM, zHat, phiL, phiD, zLepD, nDXL, zDXL; `#print`("recoAngles inputs"); `#print`("mB:", mB); `#print`("p4DBCM:", p4DBCM); `#print`("p4PiBCM:", p4PiBCM); `#print`("p4LepBCM:", p4LepBCM); p4BCM := Vector([mB, 0., 0., 0.]); p4NuBCM = p4BCM-p4DBCM-p4PiBCM-p4LepBCM; `#print`("p4NuBCM:", p4NuBCM); p4LepNuBCM := p4LepBCM+p4NuBCM; p4DStarBCM := p4DBCM+p4PiBCM; zHat := nHat(p4DStarBCM); `#print`("p4LepNuBCM:", p4LepNuBCM); `#print`("p4DStarBCM:", p4DStarBCM); `#print`("regoAng zHat:", zHat); p4DDStarCM := boostTo(p4DBCM, p4DStarBCM); `#print`("p4DDStarCM:", p4DDStarCM); p4LepLepNuCM := boostTo(p4LepBCM, p4LepNuBCM); `#print`("p4LepLepNuCM:", p4LepLepNuCM); nHatDDStarCM := nHat(p4DDStarCM); nHatLepLepNuCM := nHat(p4LepLepNuCM); nHatDBCM := nHat(p4DBCM); nHatPiBCM := nHat(p4PiBCM); nHatLepBCM := nHat(p4LepBCM); nHatNuBCM := nHat(p4NuBCM); normDPi := CrossProduct(nHatDBCM, nHatPiBCM); normDPi := normDPi/Norm(normDPi, Euclidean); normLepNu := CrossProduct(nHatLepBCM, nHatNuBCM); normLepNu := normLepNu/Norm(normLepNu, Euclidean); zLepD := normDPi.normLepNu; `#print`("zLepD:", zLepD); nDXL := CrossProduct(normDPi, normLepNu); zDXL := nDXL.zHat; Chi := arctan(zDXL, zLepD)+Pi; phiL := arctan(nHatLepLepNuCM[2], nHatLepLepNuCM[1]); `#print`("phiL:", phiL); cThetaD := nHatDDStarCM.zHat; ThetaD := arccos(cThetaD); cThetaLep := -nHatLepLepNuCM.zHat; ThetaLep := arccos(cThetaLep); return [ThetaLep, ThetaD, Chi, zDXL] end proc

 

Max

6.0

(8)

dot4 := proc (x, y) local result; result := x[1]*y[1]-x[2]*y[2]-x[3]*y[3]-x[4]*y[4]; return result end proc

Calculate theta from contraints

zThetaC := proc (EB, MB, P4) local E4, M4, MAG4, MAGB, Num, result; `#print`("starting zThetaC"); E4 := P4[1]; M4 := sqrt(dot4(P4, P4)); MAG4 := Norm(P3(P4), Euclidean); MAGB := sqrt(EB^2-MB^2); `#print`("MB,M4,EB,E4:", MB, M4, EB, E4); `#print`("MAG4,MAGB:", MAG4, MAGB); Num := MB^2+M4^2-2*EB*E4; `#print`("Num:", Num); `#print`("MAG4*MAGB:", MAG4*MAGB); result := -(1/2)*(MB^2+M4^2-2*EB*E4)/(MAG4*MAGB); `#print`("result:", result); if 1 < result then result := .999999999999999 end if; return result end proc

P3 := proc (P4) local result; `#print`("P3 on P4:", P4); result := Vector([P4[2], P4[3], P4[4]]); return result end proc

 

Mass := proc (P4) local result; result := Re(sqrt(dot4(P4, P4))); return result end proc

momentum := proc (P4) local result, p3; `#print`(" Momentum input P4:", P4); p3 := P3(P4); `#print`("p3:", p3); result := Norm(p3, Euclidean); return result end proc

 

nHat := proc (P4) local p3, magp3, nhat; p3 := P3(P4); magp3 := Norm(p3, Euclidean); nhat := p3/magp3; return nhat end proc

sums second particle is neutriono, taken to have zero mass

TwoBodyDecay := proc (mMother, mDaug) local k, z, phi, zsin, result, eDaug; global rFlat; k := (mMother^2-mDaug^2)/(2.0*mMother); eDaug := sqrt(mDaug^2+k^2); z := -1.0+2.0*rFlat(); zsin := sqrt(1-z^2); phi := 2*rFlat()*Pi; result := Vector([eDaug, k*zsin*cos(phi), k*zsin*sin(phi), k*z]); return result end proc

bDecay := proc (HP::float, HM::float, H0::float, w::float) local pDStar, eLepNu, pLepNu, mLepNu, p4LepNu, betaLepNu, angles, cBdecay, sBdecay, phiBdecay, p3DStar, p4DStar, eDStar, betaDStar, p3Lep, p4Lep, eNu, p3Nu, p4Nu, nHatD, pD, eD, ePi, p3D, p4D, p3Pi, p4Pi, thetal, thetav, chi, cthetal, sthetal, cthetav, sthetav, cchi, schi, nHatLep, phiLep, p4DBCM, p4NuBCM, p4LepBCM, p4PiBCM, cDStar, sDStar, phi, cPhi, sPhi, xHat, yHat, zHat, p4All, MAll, result, mPi, pLep, eLep, zhatLepNu; global MB, MD, MDStar, MLep, genAngles, nHatLepKeep, nHatDKeep; mPi := .1396; `#print`("bDecay: starting bDecay"); `#print`("input H+H-H0:", HP, HM, H0, " w:", w); assume(eNu, real, pNu, real); eDStar := w*MDStar; pDStar := sqrt(eDStar^2-MDStar^2); eLepNu := MB-eDStar; pLepNu := pDStar; mLepNu := sqrt(eLepNu^2-pLepNu^2); `#print`("pLepNu:", pLepNu); `#print`("eLepNu+eDStar-MB:", eLepNu+eDStar-MB); cDStar := -1.0+2.0*rFlat(); sDStar := sqrt(1.0-cDStar^2); phi := 2.0*Pi*rFlat(); cPhi := cos(phi); sPhi := sin(phi); xHat := Vector([cDStar*cPhi, cDStar*sPhi, -sDStar]); yHat := Vector([-sPhi, cPhi, 0]); zHat := Vector([sDStar*cPhi, sDStar*sPhi, cDStar]); `#print`("xHat:", xHat); `#print`("yHat:", yHat); `#print`("zHat:", zHat); `#bDecay print`("bDecay: xy:", xHat.yHat, " xz:", xHat.zHat, " yz:", yHat.zHat); `#print`("Masses:", MB, MDStar, MD, MLep); p3DStar := pDStar*zHat; p4DStar := Vector([eDStar, p3DStar]); Mp4DStar := Mass(p4DStar); p4LepNu := Vector([eLepNu, -pLepNu*zHat]); p4LepNuRest := boostTo(p4LepNu, p4LepNu, 1.0); `#print`("p4LepNuRest:", p4LepNuRest); Mp4LepNu := Mass(p4LepNu); `#bDecay print`("bDecay: B->DStar+Lep finished"); `#bDecay print`("bDecay: p4DStar+p4LepNu:", p4DStar+p4LepNu); `#print`("Mp4DStar:", Mp4DStar, " Mp4LepNu:", Mp4LepNu); `#print`("p4DStar:", p4DStar); `#print`("p4LepNu:", p4LepNu); mLepNu := sqrt(dot4(p4LepNu, p4LepNu)); angles := PickAngles(HP, HM, H0); eDStar := w*MDStar; pDStar := sqrt(eDStar^2-MDStar^2); eLepNu := MB-eDStar; pLepNu := pDStar; mLepNu := sqrt(eLepNu^2-pLepNu^2); `#print`("pLepNu:", pLepNu); `#print`("eLepNu+eDStar-MB:", eLepNu+eDStar-MB); cDStar := -1.0+2.0*rFlat(); sDStar := sqrt(1.0-cDStar^2); phi := 2.0*Pi*rFlat(); cPhi := cos(phi); sPhi := sin(phi); xHat := Vector([cDStar*cPhi, cDStar*sPhi, -sDStar]); yHat := Vector([-sPhi, cPhi, 0]); zHat := Vector([sDStar*cPhi, sDStar*sPhi, cDStar]); `#print`("xHat:", xHat); `#print`("yHat:", yHat); `#print`("zHat:", zHat); `#bDecay print`("bDecay: xy:", xHat.yHat, " xz:", xHat.zHat, " yz:", yHat.zHat); `#print`("Masses:", MB, MDStar, MD, MLep); p3DStar := pDStar*zHat; p4DStar := Vector([eDStar, p3DStar]); Mp4DStar := Mass(p4DStar); p4LepNu := Vector([eLepNu, -pLepNu*zHat]); p4LepNuRest := boostTo(p4LepNu, p4LepNu, 1.0); `#print`("p4LepNuRest:", p4LepNuRest); Mp4LepNu := Mass(p4LepNu); `#bDecay print`("bDecay: B->DStar+Lep finished"); `#bDecay print`("bDecay: p4DStar+p4LepNu:", p4DStar+p4LepNu); `#print`("bDecay: angles picked"); thetal := angles[1]; cthetal := cos(thetal); sthetal := sin(thetal); thetav := angles[2]; cthetav := cos(thetav); sthetav := sin(thetav); genAngles := angles; chi := angles[3]; cchi := cos(chi); schi := sin(chi); `#bDecay print`("bDecay: thetal:", thetal, cthetal, sthetal); `#bDecay print`("bDecatLthetav:", thetav, cthetav, sthetav); zhatLepNu := nHat(p4LepNu); pLep := (1/2)*(mLepNu^2-MLep^2)/mLepNu; `#print`("mLepNu,pLep:", mLepNu, MLep, pLep); eLep := sqrt(MLep^2+pLep^2); `#print`("eLep,pLep,MLep:", eLep, pLep, MLep); phiLep := 2.0*Pi*rFlat(); nHatLep := sthetal*cos(phiLep)*xHat+sthetal*sin(phiLep)*yHat-cthetal*zHat; `#print`("xHat:", xHat); `#print`("nHatLepDotnHatLep:", nHatLep.nHatLep); `#print`("nHatLep:", nHatLep); `#print`("Norm(pHatLep):", Norm(nHatLep, Euclidean)); p3Lep := pLep*nHatLep; p4Lep := Vector([eLep, p3Lep]); Mp4Lep := Mass(p4Lep); `#print`("Mp4Lep:", Mp4Lep); `#bDecay print`("bDecay: p4Lep", p4Lep); eNu := pLep; p3Nu := -pLep*nHatLep; p4Nu := Vector([eNu, p3Nu]); Mp4Nu := Mass(p4Nu); `#print`("lep:", eNu, pLep, Mp4Nu); `#print`("p4Lep:", p4Lep); `#print`("bDecay:p4Nu:", p4Nu); p4LepNuSum := p4Lep+p4Nu; `#print`("p4LepNuSum:", p4LepNuSum); prit("p4LepNu:", p4LepNu); `#print`("Mp4LepNuSum:", Mp4LepNuSum); `#print`("p4LepNu:", p4LepNu); `#print`("Mp4LepNu:", Mp4LepNu); eD := (1/2)*(MDStar^2+MD^2-mPi^2)/MDStar; pD := sqrt(eD^2-MD^2); nHatD := sthetav*cos(phiLep-chi)*xHat+sthetav*sin(phiLep-chi)*yHat+cthetav*zHat; `#print`("nHatD:", nHatD); nHatLepKeep := nHatLep; nHatDKeep := nHatD; p3D := pD*nHatD; p4D := Vector([eD, p3D]); p3Pi := -p3D; ePi := sqrt(mPi^2+pD^2); p4Pi := Vector([ePi, p3Pi]); `#bDecay print`("bDecay:p4D:", p4D); `#bDecay print`("bDecay:p4Pi:", p4Pi); betaLepNu := pLepNu/eLepNu; p4LepBCM := boostTo(p4Lep, p4LepNu, -1.0); p4NuBCM := boostTo(p4Nu, p4LepNu, -1.0); `#print`("p4LebBCM:", p4LepBCM); `#print`("p4NuBCM:", p4NuBCM); `#print`("p4LepBCM+p4NuBCM-p4LepNu", p4LepBCM+p4NuBCM-p4LepNu); betaDStar := pDStar/eDStar; `#print`("betaDStar:", betaDStar); p4DBCM := boostTo(p4D, p4DStar, -1.0); `#print`("p4DBCM:", p4DBCM); p4PiBCM := boostTo(p4Pi, p4DStar, -1.0); `#print`("p4Pi:", p4Pi); p4All := p4DBCM+p4PiBCM+p4LepBCM+p4NuBCM; MAll := Mass(p4All); `#print`("MAll:", MAll, " MB:", MB); `#print`("p4All:", p4All); result := [p4DBCM, p4PiBCM, p4LepBCM, p4NuBCM, thetal, thetav, chi]; `#bDecay print`("bDecay:result:", result); return result end proc

Warning, `Mp4DStar` is implicitly declared local to procedure `bDecay`

 

Warning, `p4LepNuRest` is implicitly declared local to procedure `bDecay`

 

Warning, `Mp4LepNu` is implicitly declared local to procedure `bDecay`

 

Warning, `Mp4Lep` is implicitly declared local to procedure `bDecay`

 

Warning, `Mp4Nu` is implicitly declared local to procedure `bDecay`

 

Warning, `p4LepNuSum` is implicitly declared local to procedure `bDecay`

 

print("bDecay defined")

"bDecay defined"

(9)

 

Typesetting:-mrow(Typesetting:-mi("boost", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mo("proc", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("beta", italic = "false", mathvariant = "normal"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("idir", italic = "true", mathvariant = "italic"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("sign", italic = "true", mathvariant = "italic"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic")), mathvariant = "normal"), Typesetting:-mi(""), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("Ep", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("E", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("pdirp", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("result", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("pdir", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("gam", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("jdir", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("#", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("print", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi(""), Typesetting:-ms("P4:"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic")), mathvariant = "normal"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("if", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("idir", italic = "true", mathvariant = "italic"), Typesetting:-mo("<", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("or", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("idir", italic = "true", mathvariant = "italic"), Typesetting:-mo(">", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mn("3", mathvariant = "normal")), mathvariant = "normal"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("then", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("error", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-ms("idir out of range: %1"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("end", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("if", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("jdir", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("idir", italic = "true", mathvariant = "italic"), Typesetting:-mo("+", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2222222em", rspace = "0.2222222em"), Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("pdir", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("jdir", italic = "true", mathvariant = "italic")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("gam", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mfrac(Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mi("sqrt", italic = "false", mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mo("&minus;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2222222em", rspace = "0.2222222em"), Typesetting:-msup(Typesetting:-mi("β", italic = "false", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mn("2", mathvariant = "normal")), superscriptshift = "0")), mathvariant = "normal")), linethickness = "1", denomalign = "center", numalign = "center", bevelled = "false"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("Ep", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("gam", italic = "true", mathvariant = "italic"), Typesetting:-mo("&sdot;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("P4", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("1", mathvariant = "normal")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo("+", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2222222em", rspace = "0.2222222em"), Typesetting:-mi("sign", italic = "true", mathvariant = "italic"), Typesetting:-mo("&sdot;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("beta", italic = "false", mathvariant = "normal"), Typesetting:-mo("&sdot;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("pdir", italic = "true", mathvariant = "italic")), mathvariant = "normal"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("#", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("print", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi(""), Typesetting:-ms("Ep:"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("Ep", italic = "true", mathvariant = "italic")), mathvariant = "normal"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "auto"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("pdirp", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("gam", italic = "true", mathvariant = "italic"), Typesetting:-mo("&sdot;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("pdir", italic = "true", mathvariant = "italic"), Typesetting:-mo("+", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2222222em", rspace = "0.2222222em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("1", mathvariant = "normal")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo("&sdot;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("sign", italic = "true", mathvariant = "italic"), Typesetting:-mo("&sdot;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("beta", italic = "false", mathvariant = "normal")), mathvariant = "normal"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("result", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("Vector", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("Ep", italic = "true", mathvariant = "italic"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("2", mathvariant = "normal")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("3", mathvariant = "normal")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("4", mathvariant = "normal")), mathvariant = "normal", open = "[", close = "]")), mathvariant = "normal", open = "[", close = "]")), mathvariant = "normal"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("result", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("jdir", italic = "true", mathvariant = "italic")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("pdirp", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("return", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("result", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("end", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("proc", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(":", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "auto"), Typesetting:-mi(""))

rotated := proc (alpha, beta, gamma, v3::Vector) end proc

proc (alpha, beta, gamma, v3::Vector) end proc

(10)

boostTo := proc (p4::Vector, p4To::Vector, sign::float := 1.0) local p3, eNergy, pTrans, pz, zHat, yHat, xHat, betaTo, cTheta, sTheta, rcs, xz, gammaTo, eP, pzP, p3P, mp4, mag, result; `#print`("boostTo starts"); mp4 := Mass(p4); betaTo := momentum(p4To)/p4To[1]; gammaTo := 1/sqrt(1.0-betaTo^2); `##print`("betaTo,gammaTo:", betaTo, "\n", gammaTo); zHat := nHat(p4To); `#print`("zHat:", zHat); p3 := P3(p4); `#print`("p3:", p3); eNergy := p4[1]; pz := zHat.p3; pTrans := p3-pz*zHat; `#print`("pTrans:", pTrans); pzP := gammaTo*(pz-sign*betaTo*eNergy); `#print`("eP:", eP, " pzP:", pzP); `#print`("pTrans:", pTrans); `#print`("pzP*zHat:", pzP*zHat); p3P := pzP*zHat+pTrans; `#print`("p3P:", p3P); mag := Norm(p3P, Euclidean); eP := sqrt(mp4^2+mag^2); result := Vector([eP, p3P]); `#print`("boostTo stops"); return result end proc

flip := proc (p4::Vector) local p3, result; p3 := P3(p4); result := Vector([p4[1], -p3]); return result end proc

defHist := proc (n, low, high, name::string) local h, info, result; h := Sample(0, n); info := Sample(0, 5); info[1] := low; info[2] := high; result := [h, info, name]; return result end proc

 

fillHist := proc (aHist, x::float) local nhist, dx, bin, h, info, low, high; h := aHist[1]; info := aHist[2]; nhist := Size(h, 2); low := info[1]; high := info[2]; dx := (high-low)/nhist; bin := trunc((x-low)/dx)+1; if bin < nhist+1 and 0 < nhist then h[bin] := h[bin]+1; info[3] := info[3]+x; info[4] := info[4]+x^2; info[5] := info[5]+1 end if; return nhist end proc

plotHist := proc (aHist) local h, info, low, high, mean, rms, std, nentry, name, xcenter, xBinCenters, nhist, dx, ibin, thePlot; h := aHist[1]; info := aHist[2]; low := info[1]; high := info[2]; name := aHist[3]; mean := info[3]/info[5]; rms := info[4]/info[5]; nentry := info[5]; std := rms-mean^2; print(" mean:", mean, " std:", std, "name:", name); name := cat(name, "\n entries:", nentry, "\n mean:", mean, "\n std:", std); nhist := Size(h, 2); xBinCenters := Sample(0, 0); dx := (high-low)/nhist; for ibin to nhist do xcenter := low+(1/2)*dx+(ibin-1)*dx; Append(xBinCenters, xcenter); thePlot := plot(xBinCenters, h, style = point, axes = boxed, symbol = solidcircle, symbolsize = 10, title = name) end do; return thePlot end proc

compareMem := proc (lista, listb) local nLena, nLenb, index, named; nLena := Dimensions(lista)[1]; nLenb := Dimensions(listb)[1]; if nLenb <> nLena then return 0 end if; for index to nLena do if index = 15 then next end if; if index = 50 then next end if; if index = 52 then next end if; if index = 62 then next end if; named := lista[index, 1]; `#print`("i:", index, " ", named) end do; return 1 end proc

 

Parse:-ConvertTo1D, "first argument to _Inert_ASSIGN must be assignable"

MemUse := proc () local r; add(r[3], r = kernelopts('memusage')) end proc

NULL

Digits := 20

20

(11)

 

``

NULL

Assume(M4S, real, mB, real, eB, real, real, MDStar, real, MDl, real)

{M4S::real}, {MDStar::real}, {MDl::real}, {eB::real}, {mB::real}

(12)

Restart here to gen new event

M4S := 10579.4; mB := 5279.34; MDStar := 2010.27; MD := 1864.84; MDl := MDStar+1.0

10579.4

 

5279.34

 

2010.27

 

1864.84

 

2011.27

(13)

MB := mB; MLep := .510998950

5279.34

 

.510998950

(14)

 

``

count := 0; fa := 1.0; `#memSum` := 0.; nDo := 1

0

 

1.0

 

0.

 

1

(15)

for i to nDo do `#memBefProb` := MemUse(); Prob := ProbDStarLNu(1.0, 1.0, 1.0, .2*fa, .4*fa, 1.01*fa); count := count+1; fa := 1.0001*fa; `#memAftProb` := MemUse(); `#memProb` := memAftProb-memBefProb; `#memSum` := memSum+memProb end do

NULL

NULL

 

``

NULL

 

 

``

 

NULL

``

NULL

``

NULL

NULL

NULL

NULL

NULL

 

 

NULL

NULL

``

NULL

``

``

NULL

NULL

picks := PickAngles(1.0, 1.0, 1.0)

[1.0244455525261483956, 1.2048619278945573528, 2.1140893897662963370]

(16)

NULL

NULL

NULL

NULL

NULL

NULL

BDecay := bDecay(1.0, 1.0, 1.0, 1.2)

p4DBCM := BDecay[1]; p4PiBCM := BDecay[2]; p4LepBCM := BDecay[3]; p4NuBCM := BDecay[4]

Vector(4, {(1) = 2161.4540183799612632, (2) = 244.93657976024539873, (3) = 478.46812092888873589, (4) = 951.48808564322715396})

 

Vector(4, {(1) = 250.86998162003873729, (2) = 95.779097099681417500, (3) = 158.14695992125048399, (4) = 169.56306147364397496})

 

Vector(4, {(1) = 1891.3133351496805806, (2) = -989.98766795689809863, (3) = -1332.5398224582864055, (4) = -906.27143254721546083})

 

Vector[column](%id = 4697626498)

(17)

BDecay := bDecay(1.0, 1.0, 1.0, 1.2)

nTemp := nHat(p4DBCM)

Vector[column](%id = 4409329602)

(18)

arccos(nTemp[3])

.51422861933828528430

(19)

genAngles

[1.8649200867494644263, 1.9436739709801282119, 2.2807748005588111424]

(20)

cos(genAngles[3])

-.65181744619373415684

(21)

``

recoAngles := recoAngles(MB, p4DBCM, p4PiBCM, p4LepBCM)

[.81393704306307093521, 2.6661682467656728526, 6.1691365542167692093, .11380167277537668519]

(22)

recoAngles

[.81393704306307093521, 2.6661682467656728526, 6.1691365542167692093, .11380167277537668519]

(23)

``

genAngles[3]/Pi

.72599316717673304325

(24)

recoAngles[3]/Pi

1.9636971544250023764

(25)

recoAngles[3]/Pi

1.9636971544250023764

(26)

``

cChi := cos(recoAngles[3])

NULL

zDXL := recoAngles[4]

.11380167277537668519

(27)

``

NULL

``

(recoAngles[3]+genAngles[3])/Pi; (recoAngles[3]-genAngles[3])/Pi

2.6896903216017354196

 

1.2377039872482693331

(28)

(recoAngles[2]+genAngles[2])/Pi; (recoAngles[2]-genAngles[2])/Pi

1.4673583516558991107

 

.22997707069373698316

(29)

(recoAngles[1]+genAngles[1])/Pi; (recoAngles[1]-genAngles[1])/Pi

.85270670809326428312

 

-.33453829301690981127

(30)

NULL

p4DBCM := BDecay[1]

Vector[column](%id = 4697181506)

(31)

p4PiBCM := BDecay[2]

Vector[column](%id = 4697176322)

(32)

p4LepBCM := BDecay[3]

Vector[column](%id = 4697182786)

(33)

p4NuBCM := BDecay[4]

Vector[column](%id = 4697185794)

(34)

p4NuBCM+p4LepBCM+p4PiBCM+p4DBCM

Vector[column](%id = 4697644354)

(35)

NULL

BDecay[5]; BDecay[6]; BDecay[7]

1.8649200867494644263

 

1.9436739709801282119

 

2.2807748005588111424

(36)

Mass(p4DBCM); Mass(p4PiBCM); Mass(p4LepBCM); Mass(p4NuBCM)

1864.8400000000000000

 

.13959999999997851003

 

.51099895000019324893

 

0.

(37)

Mass(p4DBCM+p4PiBCM+p4LepBCM+p4NuBCM); Mass(p4DBCM+p4PiBCM); Mass(p4LepBCM+p4NuBCM)

5279.3400000000000003

 

2010.2700000000000004

 

2538.0423826603053792

(38)

NULL

wmax := (MDStar^2+mB^2)/(2*MDStar*mB)

1.5034825472446868588

(39)

eB := (1/2)*M4S

5289.7000000000000000

(40)

pB := sqrt(eB^2-mB^2)

330.90067150128299490

(41)

beta := pB/eB

0.62555659394915211618e-1

(42)

p4B := Vector([eB, 0., 0., pB])

Vector[column](%id = 4697631938)

(43)

p4BRest := boost(beta, 3, -1, p4B)

Vector[column](%id = 4697624962)

(44)

``

p4BRest := boostTo(p4B, p4B)

Vector[column](%id = 4697620994)

(45)

NULL

p4B2 := Vector([eB, 0., 0., -pB])

Vector[column](%id = 4697621954)

(46)

nHatB := nHat(p4B)

Vector[column](%id = 4697623298)

(47)

nHatB2 := nHat(p4B2)

Vector[column](%id = 4697624450)

(48)

nHatB1; nHatB2

nHatB1

 

Vector[column](%id = 4697624450)

(49)

ZBB2 := nHatB.nHatB2

-.99999999999999999998

(50)

boost(beta, 3, 1, p4B2)

Vector[column](%id = 4697619458)

(51)

``

nExp := 1000; i := 0

1000

 

0

(52)

z12List := Sample(0, nExp)

Vector[row](%id = 4697612866)

(53)

zTS1Or2List := Sample(0, nExp)

Vector[row](%id = 4697613570)

(54)

zTS1List := Sample(0, nExp)

zTS2List := Sample(0, nExp)

dzList := Sample(0, nExp)

i := 0; n1Match := 0; n2Match := 0

0

 

0

 

0

(55)

fPi := evalf(Pi)

3.1415926535897932385

(56)

NULL

NULL

 

NULL

`#memLoopBef` := MemUse()

14967976

(57)

`#memB1DecaySum` := 0

0

(58)

`#memB2DecaySum` := 0

0

(59)

`#memPostBDecaysSum` := 0

0

(60)

`#memToSolveFromBSum` := 0

0

(61)

`#memSolveSum` := 0

0

(62)

NULL

p4B

Vector[column](%id = 4697631938)

(63)

p4B2

Vector[column](%id = 4697621954)

(64)

NULL

i := 0

0

(65)

"do        i:=i+1;    print(" doa loop i:",i ) ;  #`BDecay 1` #`v1BCM := TwoBodyDecay`(mB, MDl);  memStartLoop:=MemUse();     `#memB1DecayBef`:=MemUse();  B1Decay:=bDecay(1.0,1.0,1.0,1.2);   `#memB1DecayAft`:=MemUse();  #`dmemB1Decay:=memB1DecayAft-memB1DecayBef;`  `#memB1DecaySum`:=memB1DecaySum+dmemB1Decay;    `#print`("B1Decay:", memB1DecayAft,memB1DecayBef,dmemB1Decay,memB1DecaySum);    #`mB1Time:=`();  #`dB1Time:=mB1Time-mStartLoop;`    `#print`("B decay 1 done");    p4DB1CM := B1Decay[1];  p4PiB1CM := B1Decay[2];  p4LepB1CM := B1Decay[3];  p4NuB1CM:=B1Decay[4];      p4Test1:=p4DB1CM+p4PiB1CM+p4LepB1CM+p4NuB1CM;  MTest1:=Mass(p4Test1);  MNu1:=Mass(p4NuB1CM);     `#print`("MTest1:",MTest1," MNu:",MNu1);   `#print`("p4Test1:",p4Test1);   `#print`("p4NuB1CM:",p4NuB1CM);    p4DStarB1CM:=p4DB1CM+p4PiB1CM;   v1BCM:=p4DStarB1CM+p4LepB1CM;     `#print`("p4DB1CM:",p4DB1CM);  `#print`("p4PiB1CM:",p4PiB1CM);  `#print`("p4LepB1CM:",p4LepB1CM);    `#print`("p4DStarB1CM:",p4DStarB1CM);  `#print`("v1BCM:",v1BCM);     `#print`("starting B decay 2");    #`BDecay 2`   `#memB2DecayBef`:=MemUse();  B2Decay:=bDecay(1.0,1.0,1.0,1.2);  `#memB2DecayAft`:=MemUse();   #`dMemB2Decay:=memB2DecayAft-memB2DecayBef;`   `#memB2DecaySum`:=memB2DecaySum+dMemB2Decay;   `#print`("BDecay2:",memB2DecayAft,memB2DecayBef,dMemB2Decay,memB2DecaySum);  #`mB2Fin:=`(0);    dB2Time:=mB2Fin-mB2Start;  `#print`("B decay 2 done");    p4DB2CM := B2Decay[1];  p4PiB2CM := B2Decay[2];  p4LepB2CM := B2Decay[3];  p4NuB2CM:=B2Decay[4];      p4DStarB2CM:=p4DB2CM+p4PiB2CM;  p4DStarLepB2CM:=p4DStarB2CM+p4LepB2CM;      `#print`("p4DB2CM:",p4DB2CM);  `#print`("p4PiB2CM:",p4PiB2CM);  `#print`("p4LepB2CM:",p4LepB2CM);    `#print`("p4DStarLepB2CM:",p4DStarLepB2CM);     p4Test2:=p4DB2CM+p4PiB2CM+p4LepB2CM+p4NuB2CM;  MTest2:=Mass(p4Test2);  MNu2:=Mass(p4NuB2CM);      `#print`("MTest2:",MTest2," ,MNu2:",MNu2);  `#print`("p4Test2:",p4Test2);  `#print`("p4NuB2CM:",p4NuB2CM);         #`boost to the B-Bvar frame`  p4NuB2Lab:=boostTo(p4NuB2CM,p4B,+1.0);    #`v1:=boost`(beta,3,+1.0,v1BCM);   v1:=boostTo(v1BCM,p4B,-1.0);   p4Nu1:=p4B-v1;   mNu1:=Mass(p4Nu1);   v1Flip:=flip(v1);   sumV1:=v1+v1Flip;   p4Nu1P:=p4B-v1Flip;   `#print`("p4Nu1P=",p4Nu1P);   mNu1P:=Mass(p4Nu1P);     `#print`("mNu1=",mNu1," MNu1=",MNu1," mNu1P=",mNu1P);  `#print`(" sumV1=",sumV1);     `#print`("v1=",v1);  v1hat := nHat(v1);     #`v2 := boost`(beta, 3,-1.0, p4DStarLepB2CM);   v2:=boostTo(p4DStarLepB2CM,p4B,+1.0); #`+or-?`     v2P:=boostTo(p4DStarLepB2CM,p4B2,-1.0);      `#print`("p4B=",p4B);    `#print`("p4B2=",p4B2);    `#print`("v2=",v2);   `#print`("v2P=",v2P);   `#print`("v2P-v2=",v2P-v2);      #`p4B2Boosted:=boostTo`(p4B2,p4B2,-1.0);     `#print`("p4B2=",p4B2);     `#print`("p4B2Boosted=",p4B2Boosted):    #print("v2=",v2);  v2hat := nHat(v2);  z12 := v1hat . v2hat;  p4Nu2:=p4B2-v2;  mNu2:=Mass(p4Nu2);   v2Flip:=flip(v2);   sumV2:=v2+v2Flip; p4Nu2P:=p4B2-v2Flip; mNu2P:=Mass(p4Nu2P);    `#print`(" p4Nu2=",p4Nu2);   `#print`("sumV2=",sumV2);  `#print`("mNu2=",mNu2," MNu2=",MNu2, " mNu2P=",mNu2P);      `#print`("Angles done");     `#print`("v1Hat:",v1hat);   `#print`("v2Hat:",v2hat);   `#print`("z12:",z12);    #z12List[i]:=z12;     `#doa print`("z12 stored");   mV1:=Mass(v1);   pV1:=Norm(P3(v1),Euclidean);   eV1:=v1[1];    `#doa print`("eB:",eB," mB:",mB," pB:",pB, " mV1:",mV1,"eV1:",eV1," pV1",pV1);  `#doa print`("v1:",v1);    #`comput e the angles from contraints`  zV1B1 := zThetaC(eB, mB, v1);  theta1 := arccos(zV1B1);  zV2B2 := zThetaC(eB, mB, v2);  theta2 := arccos(zV2B2);    `#print`("eB=",eB," mB=",mB,"zV2B2=",zV2B2, "theta2=",theta2);  `#print`("v2=",v2);    theta12 := arccos(z12);    `#doa print`("eB,mB,Ev1:",eB,mB);  `#print`("theta1:",theta1," zV1B1",zV1B1);  `#doa print`("eB,mB:",eB,mB);  `#print`("theta2:",theta2,"  zV2B2:",zV2B2);  `#print`("theta12:",theta12," z12:",z12);    z1hat := v1hat;  y1hat := CrossProduct(v1hat, v2hat);    y1hat := y1hat*(1/Norm(y1hat, Euclidean));  x1hat := CrossProduct(y1hat, z1hat);  magx1hat := Norm(x1hat, Euclidean);    `#doa print`("x1hat:",x1hat);  `#doa print`("y1hat:",y1hat);  `#doa print`("z2hat:",z2hat);      z2hat := v2hat;  y2hat := y1hat;  x2hat := CrossProduct(y2hat, z2hat);    x2hatp := x2hat*x1hat*x1hat+x2hat * y1hat*y1hat+x2hat * z1hat*z1hat;  y2hatp := y2hat*x1hat*x1hat+y2hat * y1hat*y1hat+y2hat * z1hat*z1hat;  z2hatp := z2hat*x1hat*x1hat+z2hat * y1hat*y1hat+z2hat * z1hat*z1hat;      nb1x := sin(theta1)*cos(phi1)*x1hat;  nb1y := sin(theta1)*sin(phi1)*y1hat;  nb1z := cos(theta1)*z1hat;  nb1 := nb1x+nb1y+nb1z;    `#print`("x2hatp=",x2hatp);          `#print`("y2hatp=",y2hatp);  `#print`("z2hatP=",z2hatp);    #herebad  `#print`("sin(theta2)=",sin(theta2));  `#print` ("cos(theta2)=",cos(theta2));  `#print`("theta2=",theta2);    nb2x := sin(theta2)*cos(phi2)*x2hatp;  nb2y := sin(theta2)*sin(phi2)*y2hatp;  nb2z := cos(theta2)*z2hatp;  nb2 := nb2x+nb2y+nb2z;   `#print`(" nb2x=",nb2x," nb2y=",nb2y," nb2z=",nb2z);   #`nb1p := evalf`(subs(theta1 = theta1U, nb1));    #`nb2p := evalf`(subs(theta12 = theta12U, theta2 = theta2U, nb2));    test := nb2*nb1;     #`doa print`("nb1:",nb1);  #`doa print`("nb2:",nb2);  #`doa print`("test computed:",test);     `#memSolveBef`:=MemUse();  #`dMemToSolveFromB:=memSolveBef-memB2DecayAft;`   `#memToSolveFromBSum`:=memToSolveFromBSum+dMemToSolveFromB;     `#print`("solve: dMemToSolveFromB=",dMemToSolveFromB," memToSolveFromBSum=",memToSolveFromBSum);   qDoSolve:=false;  #` if qDoSolve then`  S2 := NLPSolve(test, phi1 = 0 .. 2*Pi, phi2 = 1.0*Pi .. 2*Pi);  `#doa print`("S2:",S2);    S1 := NLPSolve(test, phi1 = 0 .. 2*Pi, phi2 = 0.*Pi .. 1.0*Pi);  `#memSolveAft`:=MemUse();  #`dMemSolve:=memSolveAft-memSolveBef;`  `#memSolveSum`:=memSolveSum+dMemSolve;   `#print`("solve: dMemSolve=", dMemSolve," memSolveSum=",memSolveSum);  `#doa print`("S1:",S1);   `#doa print`("Solutions found");      phi1S1 := eval(phi1, S1[2]);  phi2S1 := eval(phi2, S1[2]);  phi1S2 := eval(phi1, S2[2]);  phi2S2 := eval(phi2, S2[2]);  nb1S1 := evalf(subs(phi1 = phi1S1, phi2 = phi2S1, nb1));  nb2S1 := evalf(subs(phi1 = phi1S1, phi2 = phi2S1, nb2));  nb1S2 := evalf(subs(phi1 = phi1S2, phi2 = phi2S, nb1));  nb2S2 := evalf(subs(phi1 = phi1S2, phi2 = phi2S2, nb2));   zTS1 := nHatB*nb1S1;  zTS2 := nHatB*nb1S2;    `#print`("doa loop  zZTS1,zTS2,i:",zTS1,zTS2,i);    zTS1List[i]:=zTS1;  zTS2List[i]:=zTS2;  if zTS1<zTS2 then zTS1Or2List[i]:=zTS1 else zTS1Or2List[i]:=zTS2 end if;   deltazTS:=zTS1-zTS2;  #dzList[i]:=deltazTS;  #fillHist(hDeltaTS,deltazTS); if zTS1> 0.99 then   #`n1Match:=n1Match+1; `  end if;  if zTS2>0.99 then   #`n2Match:=n2Match+1;`   end if;    #`end if #qDoSolve`       #`doa print`("doa: dB1Time:=",dB1Time," dB2Time=",dB2Time," drecPart:=",dRecoPart);   #`doa print`("doa: mStartLoop=",mStartLoop, " dMemEndLoop=",dMemLoop," mLoop:=",mLoop, " mEndLoop-mStart=",mEndLoop-mStart);      memEndLoop:=MemUse();    dMemLoop:=memEndLoop-memStartLoop;      print("dMemLoop=",dMemLoop):      #`dMemPostBDecays:=memEndLoop-memB2DecayAft;`    #`memPostBDecaysSum:=memPostBDecaysSum+dMemPostBDecays;`     `#print`("memEndLoop=",memEndLoop," dMemPostBDecays=",dMemPostBDecays," memPostBDecaysSum=",memPostBDecaysSum);    until i>nExp-1: "

" doa loop i:", 1

 

"dMemLoop=", 203036

 

" doa loop i:", 2

 

"dMemLoop=", 42668

 

" doa loop i:", 3

 

"dMemLoop=", 41412

 

" doa loop i:", 4

 

"dMemLoop=", 33584

 

" doa loop i:", 5

 

"dMemLoop=", 32316

 

" doa loop i:", 6

 

"dMemLoop=", 30460

 

" doa loop i:", 7

 

"dMemLoop=", 31212

 

" doa loop i:", 8

 

"dMemLoop=", 30224

 

" doa loop i:", 9

 

"dMemLoop=", 29276

 

" doa loop i:", 10

 

"dMemLoop=", 30688

 

" doa loop i:", 11

 

"dMemLoop=", 30144

 

" doa loop i:", 12

 

"dMemLoop=", 29248

 

" doa loop i:", 13

 

"dMemLoop=", 28548

 

" doa loop i:", 14

 

"dMemLoop=", 29892

 

" doa loop i:", 15

 

"dMemLoop=", 28400

 

" doa loop i:", 16

 

"dMemLoop=", 28144

 

" doa loop i:", 17

 

"dMemLoop=", 28444

 

" doa loop i:", 18

 

"dMemLoop=", 28996

 

" doa loop i:", 19

 

"dMemLoop=", 29236

 

" doa loop i:", 20

 

"dMemLoop=", 28468

 

" doa loop i:", 21

 

"dMemLoop=", 28712

 

" doa loop i:", 22

 

"dMemLoop=", 28676

 

" doa loop i:", 23

 

"dMemLoop=", 27988

 

" doa loop i:", 24

 

"dMemLoop=", 29052

 

" doa loop i:", 25

 

"dMemLoop=", 29840

 

" doa loop i:", 26

 

"dMemLoop=", 27772

 

" doa loop i:", 27

 

"dMemLoop=", 29688

 

" doa loop i:", 28

 

"dMemLoop=", 27780

 

" doa loop i:", 29

 

"dMemLoop=", 29060

 

" doa loop i:", 30

 

"dMemLoop=", 28280

 

" doa loop i:", 31

 

"dMemLoop=", 29292

 

" doa loop i:", 32

 

"dMemLoop=", 28068

 

" doa loop i:", 33

 

"dMemLoop=", 28160

 

" doa loop i:", 34

 

"dMemLoop=", 29280

 

" doa loop i:", 35

 

"dMemLoop=", 28568

 

" doa loop i:", 36

 

"dMemLoop=", 27148

 

" doa loop i:", 37

 

"dMemLoop=", 27340

 

" doa loop i:", 38

 

"dMemLoop=", 28604

 

" doa loop i:", 39

 

"dMemLoop=", 27964

 

" doa loop i:", 40

 

"dMemLoop=", 28544

 

" doa loop i:", 41

 

"dMemLoop=", 27680

 

" doa loop i:", 42

 

"dMemLoop=", 29472

 

" doa loop i:", 43

 

"dMemLoop=", 31012

 

" doa loop i:", 44

 

"dMemLoop=", 39900

 

" doa loop i:", 45

 

"dMemLoop=", 30324

 

" doa loop i:", 46

 

"dMemLoop=", 4218520

 

" doa loop i:", 47

 

"dMemLoop=", 29380

 

" doa loop i:", 48

 

"dMemLoop=", 32880

 

" doa loop i:", 49

 

"dMemLoop=", 30732

 

" doa loop i:", 50

 

"dMemLoop=", 31624

 

" doa loop i:", 51

 

"dMemLoop=", 31636

 

" doa loop i:", 52

 

"dMemLoop=", 30680

 

" doa loop i:", 53

 

"dMemLoop=", 31484

 

" doa loop i:", 54

 

"dMemLoop=", 30116

 

" doa loop i:", 55

 

"dMemLoop=", 30284

 

" doa loop i:", 56

 

"dMemLoop=", 30344

 

" doa loop i:", 57

 

"dMemLoop=", 30108

 

" doa loop i:", 58

 

"dMemLoop=", 30692

 

" doa loop i:", 59

 

"dMemLoop=", 30808

 

" doa loop i:", 60

 

"dMemLoop=", 28592

 

" doa loop i:", 61

 

"dMemLoop=", 30800

 

" doa loop i:", 62

 

"dMemLoop=", 30092

 

" doa loop i:", 63

 

"dMemLoop=", 31348

 

" doa loop i:", 64

 

"dMemLoop=", 31216

 

" doa loop i:", 65

 

"dMemLoop=", 31192

 

" doa loop i:", 66

 

"dMemLoop=", 30552

 

" doa loop i:", 67

 

"dMemLoop=", 30660

 

" doa loop i:", 68

 

"dMemLoop=", 30420

 

" doa loop i:", 69

 

"dMemLoop=", 30796

 

" doa loop i:", 70

 

"dMemLoop=", 30036

 

" doa loop i:", 71

 

"dMemLoop=", 30216

 

" doa loop i:", 72

 

"dMemLoop=", 30960

 

" doa loop i:", 73

 

"dMemLoop=", 30460

 

" doa loop i:", 74

 

"dMemLoop=", 31112

 

" doa loop i:", 75

 

"dMemLoop=", 29804

 

" doa loop i:", 76

 

"dMemLoop=", 31920

 

" doa loop i:", 77

 

"dMemLoop=", 32184

 

" doa loop i:", 78

 

"dMemLoop=", 31604

 

" doa loop i:", 79

 

"dMemLoop=", 30996

 

" doa loop i:", 80

 

"dMemLoop=", 30480

 

" doa loop i:", 81

 

"dMemLoop=", 31244

 

" doa loop i:", 82

 

"dMemLoop=", 30432

 

" doa loop i:", 83

 

"dMemLoop=", 29756

 

" doa loop i:", 84

 

"dMemLoop=", 31556

 

" doa loop i:", 85

 

"dMemLoop=", 32812

 

" doa loop i:", 86

 

"dMemLoop=", 30404

 

" doa loop i:", 87

 

"dMemLoop=", 31680

 

" doa loop i:", 88

 

"dMemLoop=", 30196

 

" doa loop i:", 89

 

"dMemLoop=", 29728

 

" doa loop i:", 90

 

"dMemLoop=", 29800

 

" doa loop i:", 91

 

"dMemLoop=", 32724

 

" doa loop i:", 92

 

"dMemLoop=", 30884

 

" doa loop i:", 93

 

"dMemLoop=", 32524

 

" doa loop i:", 94

 

"dMemLoop=", 32104

 

" doa loop i:", 95

 

"dMemLoop=", 30688

 

" doa loop i:", 96

 

"dMemLoop=", 31844

 

" doa loop i:", 97

 

"dMemLoop=", 29596

 

" doa loop i:", 98

 

"dMemLoop=", 88104

 

" doa loop i:", 99

 

"dMemLoop=", 34912

 

" doa loop i:", 100

 

"dMemLoop=", 21848

 

" doa loop i:", 101

 

"dMemLoop=", 34124

 

" doa loop i:", 102

 

"dMemLoop=", 93688

 

" doa loop i:", 103

 

"dMemLoop=", 37364

 

" doa loop i:", 104

 

"dMemLoop=", 48776

 

" doa loop i:", 105

 

"dMemLoop=", 31744

 

" doa loop i:", 106

 

"dMemLoop=", 48200

 

" doa loop i:", 107

 

"dMemLoop=", 30512

 

" doa loop i:", 108

 

"dMemLoop=", 30344

 

" doa loop i:", 109

 

"dMemLoop=", 15932

 

" doa loop i:", 110

 

"dMemLoop=", 56880

 

" doa loop i:", 111

 

"dMemLoop=", 34952

 

" doa loop i:", 112

 

"dMemLoop=", 41316

 

" doa loop i:", 113

 

"dMemLoop=", 34196

 

" doa loop i:", 114

 

"dMemLoop=", 38112

 

" doa loop i:", 115

 

"dMemLoop=", 29760

 

" doa loop i:", 116

 

"dMemLoop=", 37260

 

" doa loop i:", 117

 

"dMemLoop=", 33052

 

" doa loop i:", 118

 

"dMemLoop=", 37108

 

" doa loop i:", 119

 

"dMemLoop=", 41412

 

" doa loop i:", 120

 

"dMemLoop=", 32360

 

" doa loop i:", 121

 

"dMemLoop=", 38236

 

" doa loop i:", 122

 

"dMemLoop=", 21416

 

" doa loop i:", 123

 

"dMemLoop=", 53912

 

" doa loop i:", 124

 

"dMemLoop=", 14692

 

" doa loop i:", 125

 

"dMemLoop=", 34616

 

" doa loop i:", 126

 

"dMemLoop=", 61680

 

" doa loop i:", 127

 

"dMemLoop=", 82200

 

" doa loop i:", 128

 

"dMemLoop=", 37792

 

" doa loop i:", 129

 

"dMemLoop=", 35948

 

" doa loop i:", 130

 

"dMemLoop=", 38980

 

" doa loop i:", 131

 

"dMemLoop=", 15628

 

" doa loop i:", 132

 

"dMemLoop=", 58272

 

" doa loop i:", 133

 

"dMemLoop=", 35192

 

" doa loop i:", 134

 

"dMemLoop=", 17404

 

" doa loop i:", 135

 

"dMemLoop=", 39764

 

" doa loop i:", 136

 

"dMemLoop=", 62236

 

" doa loop i:", 137

 

"dMemLoop=", 34612

 

" doa loop i:", 138

 

"dMemLoop=", 64052

 

" doa loop i:", 139

 

"dMemLoop=", 37828

 

" doa loop i:", 140

 

"dMemLoop=", 35976

 

" doa loop i:", 141

 

"dMemLoop=", 34956

 

" doa loop i:", 142

 

"dMemLoop=", 34196

 

" doa loop i:", 143

 

"dMemLoop=", 32800

 

" doa loop i:", 144

 

"dMemLoop=", 39608

 

" doa loop i:", 145

 

"dMemLoop=", 41972

 

" doa loop i:", 146

 

"dMemLoop=", 21624

 

" doa loop i:", 147

 

"dMemLoop=", 51852

 

" doa loop i:", 148

 

"dMemLoop=", 35084

 

" doa loop i:", 149

 

"dMemLoop=", 37176

 

" doa loop i:", 150

 

"dMemLoop=", 32116

 

" doa loop i:", 151

 

"dMemLoop=", 37548

 

" doa loop i:", 152

 

"dMemLoop=", 34548

 

" doa loop i:", 153

 

"dMemLoop=", 40652

 

" doa loop i:", 154

 

"dMemLoop=", 35732

 

" doa loop i:", 155

 

"dMemLoop=", 28884

 

" doa loop i:", 156

 

"dMemLoop=", 34600

 

" doa loop i:", 157

 

"dMemLoop=", 38440

 

" doa loop i:", 158

 

"dMemLoop=", 32348

 

" doa loop i:", 159

 

"dMemLoop=", 32652

 

" doa loop i:", 160

 

"dMemLoop=", 34680

 

" doa loop i:", 161

 

"dMemLoop=", 38276

 

" doa loop i:", 162

 

"dMemLoop=", 35064

 

" doa loop i:", 163

 

"dMemLoop=", 31672

 

" doa loop i:", 164

 

"dMemLoop=", 32164

 

" doa loop i:", 165

 

"dMemLoop=", 25748

 

" doa loop i:", 166

 

"dMemLoop=", 36364

 

" doa loop i:", 167

 

"dMemLoop=", 29152

 

" doa loop i:", 168

 

"dMemLoop=", 31044

 

" doa loop i:", 169

 

"dMemLoop=", 35256

 

" doa loop i:", 170

 

"dMemLoop=", 32940

 

" doa loop i:", 171

 

"dMemLoop=", 30936

 

" doa loop i:", 172

 

"dMemLoop=", 31232

 

" doa loop i:", 173

 

"dMemLoop=", 34028

 

" doa loop i:", 174

 

"dMemLoop=", 40696

 

" doa loop i:", 175

 

"dMemLoop=", 29980

 

" doa loop i:", 176

 

"dMemLoop=", 31972

 

" doa loop i:", 177

 

"dMemLoop=", 35752

 

" doa loop i:", 178

 

"dMemLoop=", 37516

 

" doa loop i:", 179

 

"dMemLoop=", 29856

 

" doa loop i:", 180

 

"dMemLoop=", 31024

 

" doa loop i:", 181

 

"dMemLoop=", 33012

 

" doa loop i:", 182

 

"dMemLoop=", 30744

 

" doa loop i:", 183

 

"dMemLoop=", 14660

 

" doa loop i:", 184

 

"dMemLoop=", 29324

 

" doa loop i:", 185

 

"dMemLoop=", 39868

 

" doa loop i:", 186

 

"dMemLoop=", 27404

 

" doa loop i:", 187

 

"dMemLoop=", 29704

 

" doa loop i:", 188

 

"dMemLoop=", 19608

 

" doa loop i:", 189

 

"dMemLoop=", 35068

 

" doa loop i:", 190

 

"dMemLoop=", 26380

 

" doa loop i:", 191

 

"dMemLoop=", 32960

 

" doa loop i:", 192

 

"dMemLoop=", 50320

 

" doa loop i:", 193

 

"dMemLoop=", 29168

 

" doa loop i:", 194

 

"dMemLoop=", 30544

 

" doa loop i:", 195

 

"dMemLoop=", 33836

 

" doa loop i:", 196

 

"dMemLoop=", 29240

 

" doa loop i:", 197

 

"dMemLoop=", 29988

 

" doa loop i:", 198

 

"dMemLoop=", 36984

 

" doa loop i:", 199

 

"dMemLoop=", 28040

 

" doa loop i:", 200

 

"dMemLoop=", 29136

 

" doa loop i:", 201

 

"dMemLoop=", 29244

 

" doa loop i:", 202

 

"dMemLoop=", 29064

 

" doa loop i:", 203

 

"dMemLoop=", 21856

 

" doa loop i:", 204

 

"dMemLoop=", 32080

 

" doa loop i:", 205

 

"dMemLoop=", 30328

 

" doa loop i:", 206

 

"dMemLoop=", 32236

 

" doa loop i:", 207

 

"dMemLoop=", 29816

 

" doa loop i:", 208

 

"dMemLoop=", 31048

 

" doa loop i:", 209

 

"dMemLoop=", 32076

 

" doa loop i:", 210

 

"dMemLoop=", 30176

 

" doa loop i:", 211

 

"dMemLoop=", 32640

 

" doa loop i:", 212

 

"dMemLoop=", 33692

 

" doa loop i:", 213

 

"dMemLoop=", 31928

 

" doa loop i:", 214

 

"dMemLoop=", 36080

 

" doa loop i:", 215

 

"dMemLoop=", 44068

 

" doa loop i:", 216

 

"dMemLoop=", 32364

 

" doa loop i:", 217

 

"dMemLoop=", 23580

 

" doa loop i:", 218

 

"dMemLoop=", 30416

 

" doa loop i:", 219

 

"dMemLoop=", 147112

 

" doa loop i:", 220

 

"dMemLoop=", 19840

 

" doa loop i:", 221

 

Error, (in Vector) Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

NULL

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

HandCalcZ

v2

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

p4Nu2

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

Mass(p4Nu2)

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

p4Nu2P

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

NULL

p4NuB2Lab

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

Mass(p4NuB2CM)

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

Mass(p4NuB2Lab)

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

p4DStarLepB2CM

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

p4BRest

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

p4TestNu2 := p4BRest-p4DB2CM-p4LepB2CM-p4PiB2CM

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

p4Nu2

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

p4Test2

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

p4NuB2CM

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

B2Decay[4]

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

eB, mB

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

pB := sqrt(eB^2-mB^2)

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

v2

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

M2 := Mass(v2)

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

E2 := v2[1]

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

P2 := Norm(P3(v2), Euclidean)

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

zThetaC(eB, mB, v2)

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

Numerator := -2*E2*eB+M2^2+mB^2

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

Denom := 2*pB*P2

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

 

Numerator/Denom

``

``

print("mPostLoop=", mPostLoop, " mPostLoop-mStart=", mPostLoop-mStart)

``

NULL

``

NULL

n1Match; n2Match; n2Match-n1Match

zTS2List

i := 0

help("write")

sid := open("myfile.txt", WRITE)

Write(sid, output)

output := zTS1Or2List

NULL

``

help("write")

H12 := Histogram(zTS1Or2List, range = -1.0 .. 1.0, title = "z1 or z2", frequencyscale = absolute)

H12BlowUp := Histogram(zTS1Or2List, range = .70 .. 1.0, title = "z1 or z2 (magnified)", frequencyscale = absolute)

NULL

H1 := Histogram(zTS1List, range = -1.0 .. 1.0, title = "zTS1", frequencyscale = absolute)

H2 := Histogram(zTS2List, range = -1.0 .. 1.0, title = "zTS2", frequencyscale = absolute)

Threads[Sleep](10)

NULL

ScatterPlot(dzList, zTS1List, view = [-0.1e-13 .. 0.1e-13, .4 .. .99])

ScatterPlot(zTS1List, zTS2List)

bins := [1, 2, 3, 4, 5]

dataplot(bins, bar)

hTest := Sample(0, 10)

A := Array([])

dohist(hTest, 0., 2.0, .1, A)

NULL

 

 

v1 := boost(beta, 3, 1, v1BCM)

v1hat := nHat(v1)

v2BbarCM := TwoBodyDecay(mB, MDl)

v2 := boost(beta, 3, -1, v2BbarCM)

v2hat := nHat(v2)

v1; v2

Mass(v1)

 

Mass(v2)

v2BbarCM

v2

v1

zHatBTrue := v1hat.nHatB

nHatB

nHatBbar := -nHatB

``

zHatB := zThetaC(eB, mB, v1)

theta1 := arccos(zHatB)

zHatB

theta1

zHatBbarTrue := v2hat.nHatBbar

zBBbar := nHatB.nHatBbar

zHatBbar := zThetaC(eB, mB, v2)

theta2 := arccos(zHatBbar)

contraint works!

zHatBbar

theta12 := arccos(z12)

z1hat := v1hat

y1hat := CrossProduct(v1hat, v2hat)

``

y1hat := y1hat/Norm(y1hat, Euclidean)

Norm(y1hat, Euclidean)

x1hat := CrossProduct(y1hat, z1hat)

magx1hat := Norm(x1hat, Euclidean)

``

z2hat := v2hat

y2hat := y1hat

x2hat := CrossProduct(y2hat, z2hat)

Norm(x2hat, Euclidean)

transformation!

x2hatp := (x2hat.x1hat)*x1hat+(x2hat.y1hat)*y1hat+(x2hat.z1hat)*z1hat

y2hatp := (y2hat.x1hat)*x1hat+(y2hat.y1hat)*y1hat+(y2hat.z1hat)*z1hat

z2hatp := (z2hat.x1hat)*x1hat+(z2hat.y1hat)*y1hat+(z2hat.z1hat)*z1hat

Norm(x1hat, Euclidean)

 

``

nb1x := sin(theta1)*cos(phi1)*x1hat

nb1y := sin(theta1)*sin(phi1)*y1hat

nb1z := cos(theta1)*z1hat

nb1 := nb1x+nb1y+nb1z

nb2x := sin(theta2)*cos(phi2)*x2hatp

nb2y := sin(theta2)*sin(phi2)*y2hatp

nb2z := cos(theta2)*z2hatp

nb2 := nb2x+nb2y+nb2z

Here need to compute theta1U and theta2U from the kinematics...

nb1p := evalf(subs(theta1 = theta1U, nb1))

``

nb2p := evalf(subs(theta12 = theta12U, theta2 = theta2U, nb2))

 

test := nb2.nb1

NULL

``

``

NULL

plot1 := plot3d(evalf(test), phi1 = 0 .. 2*Pi, phi2 = 0 .. 2*Pi)

``

S2 := NLPSolve(test, phi1 = 0 .. 2*Pi, phi2 = 1.0*Pi .. 2*Pi)

``

S1 := NLPSolve(test, phi1 = 0 .. 2*Pi, phi2 = 0.*Pi .. 1.0*Pi)

``

``

phi1S1 := eval(phi1, S1[2])

phi2S1 := eval(phi2, S1[2])

phi1S2 := eval(phi1, S2[2])

phi2S2 := eval(phi2, S2[2])

nb1S1 := evalf(subs(phi1 = phi1S1, phi2 = phi2S1, nb1))

nb2S1 := evalf(subs(phi1 = phi1S1, phi2 = phi2S1, nb2))

nb1S2 := evalf(subs(phi1 = phi1S2, phi2 = phi2S, nb1))

nb2S2 := evalf(subs(phi1 = phi1S2, phi2 = phi2S2, nb2))

So solution 1 is far from the orignal input, but solution 2 virtually perfect

zTS1 := nHatB.nb1S1

zTS2 := nHatB.nb1S2

here I have B-reco BTrue comparison

 

 

``

S1[2, 1]/Pi

S1[2, 2]/Pi

S2[2, 1]/Pi

S2[2, 2]/Pi

``

``

nb1p

nb1pphi := subs(phi1 = .6*Pi, nb1p)

nb2pphi := subs(phi2 = .2*Pi, nb2p)

NULL

``

NULL

``

``

NULL

NULL

``

nPhi := 40

v2hatp := 1.2*subs(theta12 = theta12U, v2hat)

VList := [1.2*v1hat, v2hatp]

``

PlotVector(VList)

numelems(VList)

nPhi

for i from 0 to nPhi-1 do phiU := 2.0*i*Pi/nPhi; VList := [VList[], i+3]; nb1pphi := subs(phi1 = phiU, nb1p); VList[i+3] := nb1pphi end do

VList[3]

PlotVector(VList)

nVList := numelems(VList)

nVList

for i from 0 to nPhi-1 do phiU := 2.0*i*Pi/nPhi; VList := [VList[], i+1+nVlist]; nb2pphi := evalf(subs(phi2 = phiU, nb2p)); VList[i+1+nVList] := nb2pphi end do

``

numelems(VList)

VList[1]

PlotVector(VList)

plot1

``

theta12/Pi; theta1/Pi; theta2/Pi

S1[1]; S1[2, 1]/Pi; S1[2, 2]/Pi; S2[1]; S2[2, 1]/Pi; S2[2, 2]/Pi

``

 Hp :=1.0;   Hm:=1.0; H0:=1.0;        

temp := ProbDStarLNu(Hp, Hm, H0, thetal, thetav, 3.5*((1/2)*Pi))

plot3 := plot3d(temp, thetal = 0 .. Pi, thetav = 0 .. Pi)

 

NULL

``

``

nMax := 100

Al := Sample(0, nMax)

AV := Sample(0, nMax)

AChi := Sample(0, nMax)

n := 0

"do   n:=n+1;   #`#doa print`(n);   angles:=PickAngles(Hp,Hm,H0);   thetal:=angles[1];   thetav:=angles[2];   chi:=angles[3];    cL:=cos(thetal);    Al[n]:=cL;   AV[n]:=cos(thetav);   AChi[n]:=chi;   #hist(Al,-1.0,1.0,cL);  #print("n:",n,"cL:",cL);  until n > nMax-1:   "

Histogram(Al, range = -1.1 .. 1.1, title = "H+=H-, cos(thetaL)", frequencyscale = absolute)

Histogram(AV, range = -1.1 .. 1.1, title = "H+=H- cos(thetaV)", frequencyscale = absolute)

Histogram(AChi, range = 0. .. 1.0*Pi, title = "H+=H-, Chi", frequencyscale = absolute)

``

``

``


 

Download DStar3DKinRecoLoopDebugMemCrashA.mw

earlier before I turned on more detailed printing in the event loop. That one did save intact...

@Traruh Synred @Carl Love

That's not one with a crash. I'll try again. in a bit.

@Carl Love It's sort of big with lots of extraneous stuff from when I was trying out things (like timing some 'proc's on there own. I just made a run in which I had disabled 'MemUse' which crashed earlier than somewhere it was being used properly. That seems to be a persistent pattern. The crash takes longer to develop of I look at memory usage.

Hmm,mm the crash is so hard it's not letting me save 
 

``

B-vector mathcing for double D*LNu decays       

 

restart

Version := 6.2

6.2

(1)

NULL

4.9 -- Fix boostTo to use Gram-Schmit orthogonalization

5.3 -- Fixed sign error in two body decay momentum calc in doa loop

         Fixed incorrect calculation of v1 and v2 which summed D* and it's pion instead of D* and the lepton

5.9    Fixed bug in 'PickAngles'
6.0   Remove 5.9..that was a mistake...

6.1 Negative values from 'ProbDLNu'. There was a missing sThetaL from the cross terms

6.2 Type causing none zero neutrion masses found and fixe

      Does not stop mememory crashs they seem less common when memory is intergated?

 

estart; with(Physics); with(LinearAlgebra); with(VectorCalculus); with(Optimization); with(Statistics); with(ArrayTools); with(plots); with(Threads); with(MmaTranslator[Mma]); Setup(mathematicalnotation = true); Setup(coordinatesystems = cartesian)

estart

 

`Default differentiation variables for d_, D_ and dAlembertian are:`*{X = (x, y, z, t)}

 

`Systems of spacetime Coordinates are:`*{X = (x, y, z, t)}

(2)

 

 

Here I consider the 0C reconstructing of both B-mesons in the decay BBbar --> (D*LNu)(D*Lnu). The vectors v1 and v2 are the three momenta of the D* and the lepton. The angle bbetween v1 and I is called theta12 (T12in Maple code).The B-vectors B1 and B2 branch (unlabed ugh!) of there respective v (D*+lep) vectors at angle specified. Clearly to mathch (pB1=-pB2) the must lie in the v1-v2 plane. Their angles with w.r.t., v1 and v2 are theta1 (T1) and theta2 (T2). The kinematics of the decay should guarentee that one and only one match. The only ambiguous case would be when v1 and v2 are back-to-back and this could be excluded w/o much loss.The kinematics determins the angles cos(theta1) and cos(theta2).In most cases it will be possible to reconstruct the decay angles of both D*LNu's.

There are 4 possible values for the angles between the B-mesons -theta12+/-theta1+/-theta2. One must by 180 deg (pi).

 

Angles to try:

mStart := MemUse()

MemUse()

(3)

NULL

NULL

NULL

randomize(7759447594)

7759447594

(4)

NULL

NULL

rFlat := rand(0. .. 1.0)

proc () options operator, arrow; RandomTools:-Generate(float('range' = 0. .. 1.0, 'method' = 'uniform')) end proc

(5)

 

Max := 6.0

6.0

(6)

`#memUse`()-mStart

`#memUse`()-MemUse()

(7)

"PickAngles:=proc(HP,HM,H0)   global rFlat, Max;   local thetaL,thetaV,Chi, result,R,cL,cV,test,angles;   do    R:=rFlat();   cL:=-1.0+2.0*rFlat();   cV:=-1.0+2.0*rFlat();   Chi:=2*Pi*rFlat();   thetaL:=arccos(cL);   thetaV:=arccos(cV); #`  print`("Hs:",HP,HM,H0);   test:=(ProbDStarLNu(HP,HM,H0,thetaL,thetaV,Chi))/(Max);  #print("angles:",thetaL,thetaV,Chi, "test:",test,R);   until R<test;   angles:=[thetaL,thetaV,Chi];   return angles;  end proc:"

ProbDStarLNu := proc (HP, HM, H0, theta_L, theta_V, chi) local cL, sL, cV, sV, cChi, c2Chi, sum, result, memStart, memFin, memTrig, memSum1; `#probd print`("memStart:", memStart); cL := cos(theta_L); sL := sin(theta_L); cV := cos(theta_V); sV := sin(theta_V); cChi := cos(chi); c2Chi := cos(2.0*chi); sum := 0.; sum := sum+HP^2*(1-cL)^2*sV^2; sum := sum+HM^2*(1+cL)^2*sV^2; sum := sum+4*H0^2*sL^2*cV^2; sum := sum-2*HP*HM*sL^2*sV^2*c2Chi; sum := sum-4*HP*H0*sL*(1-cL)*sV*cV*cChi; sum := sum+4*HM*H0*sL*(1+cL)*sV*cV*cChi; result := sum/Max; `#probd print`("memFin:", memFin); `#probd print`("ProbDStarLNu: memTrig-memStart=", memTrig-memStart); `#probd print`("ProbDStarLNu: memSum1-memTrig=", memSum1-memTrig); `#probd print`("ProbDStarLNu: memFin-memTrig=", memFin-memTrig); `#probd print`("ProbDStarLNu: memFin-memStart=", memFin-memStart); `#probd print`("ProbDStarLNu: memFin=", memFin); return result end proc

``

``

NULL

``

recoAngles := proc (mB::float, p4DBCM, p4PiBCM, p4LepBCM) local nHatDBCM, nHatPiBCM, nHatLepBCM, nHatNuBCM, p4DStarBCM, p4LepNuBCM, p4DDStarCM, p4LepLepNuCM, p4BCM, p3DBCM, p3PiBCM, p3LepBCM, p4NuBM, p3NuBCM, nHatD, normDPi, normLepNu, Chi, cChi, ThetaD, cThetaD, cThetaLep, ThetaLep, nHatDDStarCM, nHatLepLepNuCM, zHat, phiL, phiD, zLepD, nDXL, zDXL; `#print`("recoAngles inputs"); `#print`("mB:", mB); `#print`("p4DBCM:", p4DBCM); `#print`("p4PiBCM:", p4PiBCM); `#print`("p4LepBCM:", p4LepBCM); p4BCM := Vector([mB, 0., 0., 0.]); p4NuBCM = p4BCM-p4DBCM-p4PiBCM-p4LepBCM; `#print`("p4NuBCM:", p4NuBCM); p4LepNuBCM := p4LepBCM+p4NuBCM; p4DStarBCM := p4DBCM+p4PiBCM; zHat := nHat(p4DStarBCM); `#print`("p4LepNuBCM:", p4LepNuBCM); `#print`("p4DStarBCM:", p4DStarBCM); `#print`("regoAng zHat:", zHat); p4DDStarCM := boostTo(p4DBCM, p4DStarBCM); `#print`("p4DDStarCM:", p4DDStarCM); p4LepLepNuCM := boostTo(p4LepBCM, p4LepNuBCM); `#print`("p4LepLepNuCM:", p4LepLepNuCM); nHatDDStarCM := nHat(p4DDStarCM); nHatLepLepNuCM := nHat(p4LepLepNuCM); nHatDBCM := nHat(p4DBCM); nHatPiBCM := nHat(p4PiBCM); nHatLepBCM := nHat(p4LepBCM); nHatNuBCM := nHat(p4NuBCM); normDPi := CrossProduct(nHatDBCM, nHatPiBCM); normDPi := normDPi/Norm(normDPi, Euclidean); normLepNu := CrossProduct(nHatLepBCM, nHatNuBCM); normLepNu := normLepNu/Norm(normLepNu, Euclidean); zLepD := normDPi.normLepNu; `#print`("zLepD:", zLepD); nDXL := CrossProduct(normDPi, normLepNu); zDXL := nDXL.zHat; Chi := arctan(zDXL, zLepD)+Pi; phiL := arctan(nHatLepLepNuCM[2], nHatLepLepNuCM[1]); `#print`("phiL:", phiL); cThetaD := nHatDDStarCM.zHat; ThetaD := arccos(cThetaD); cThetaLep := -nHatLepLepNuCM.zHat; ThetaLep := arccos(cThetaLep); return [ThetaLep, ThetaD, Chi, zDXL] end proc

 

Max

6.0

(8)

dot4 := proc (x, y) local result; result := x[1]*y[1]-x[2]*y[2]-x[3]*y[3]-x[4]*y[4]; return result end proc

Calculate theta from contraints

zThetaC := proc (EB, MB, P4) local E4, M4, MAG4, MAGB, Num, result; `#print`("starting zThetaC"); E4 := P4[1]; M4 := sqrt(dot4(P4, P4)); MAG4 := Norm(P3(P4), Euclidean); MAGB := sqrt(EB^2-MB^2); `#print`("MB,M4,EB,E4:", MB, M4, EB, E4); `#print`("MAG4,MAGB:", MAG4, MAGB); Num := MB^2+M4^2-2*EB*E4; `#print`("Num:", Num); `#print`("MAG4*MAGB:", MAG4*MAGB); result := -(1/2)*(MB^2+M4^2-2*EB*E4)/(MAG4*MAGB); `#print`("result:", result); if 1 < result then result := .999999999999999 end if; return result end proc

P3 := proc (P4) local result; `#print`("P3 on P4:", P4); result := Vector([P4[2], P4[3], P4[4]]); return result end proc

 

Mass := proc (P4) local result; result := Re(sqrt(dot4(P4, P4))); return result end proc

momentum := proc (P4) local result, p3; `#print`(" Momentum input P4:", P4); p3 := P3(P4); `#print`("p3:", p3); result := Norm(p3, Euclidean); return result end proc

 

nHat := proc (P4) local p3, magp3, nhat; p3 := P3(P4); magp3 := Norm(p3, Euclidean); nhat := p3/magp3; return nhat end proc

sums second particle is neutriono, taken to have zero mass

TwoBodyDecay := proc (mMother, mDaug) local k, z, phi, zsin, result, eDaug; global rFlat; k := (mMother^2-mDaug^2)/(2.0*mMother); eDaug := sqrt(mDaug^2+k^2); z := -1.0+2.0*rFlat(); zsin := sqrt(1-z^2); phi := 2*rFlat()*Pi; result := Vector([eDaug, k*zsin*cos(phi), k*zsin*sin(phi), k*z]); return result end proc

bDecay := proc (HP::float, HM::float, H0::float, w::float) local pDStar, eLepNu, pLepNu, mLepNu, p4LepNu, betaLepNu, angles, cBdecay, sBdecay, phiBdecay, p3DStar, p4DStar, eDStar, betaDStar, p3Lep, p4Lep, eNu, p3Nu, p4Nu, nHatD, pD, eD, ePi, p3D, p4D, p3Pi, p4Pi, thetal, thetav, chi, cthetal, sthetal, cthetav, sthetav, cchi, schi, nHatLep, phiLep, p4DBCM, p4NuBCM, p4LepBCM, p4PiBCM, cDStar, sDStar, phi, cPhi, sPhi, xHat, yHat, zHat, p4All, MAll, result, mPi, pLep, eLep, zhatLepNu; global MB, MD, MDStar, MLep, genAngles, nHatLepKeep, nHatDKeep; mPi := .1396; `#print`("bDecay: starting bDecay"); `#print`("input H+H-H0:", HP, HM, H0, " w:", w); assume(eNu, real, pNu, real); eDStar := w*MDStar; pDStar := sqrt(eDStar^2-MDStar^2); eLepNu := MB-eDStar; pLepNu := pDStar; mLepNu := sqrt(eLepNu^2-pLepNu^2); `#print`("pLepNu:", pLepNu); `#print`("eLepNu+eDStar-MB:", eLepNu+eDStar-MB); cDStar := -1.0+2.0*rFlat(); sDStar := sqrt(1.0-cDStar^2); phi := 2.0*Pi*rFlat(); cPhi := cos(phi); sPhi := sin(phi); xHat := Vector([cDStar*cPhi, cDStar*sPhi, -sDStar]); yHat := Vector([-sPhi, cPhi, 0]); zHat := Vector([sDStar*cPhi, sDStar*sPhi, cDStar]); `#print`("xHat:", xHat); `#print`("yHat:", yHat); `#print`("zHat:", zHat); `#bDecay print`("bDecay: xy:", xHat.yHat, " xz:", xHat.zHat, " yz:", yHat.zHat); `#print`("Masses:", MB, MDStar, MD, MLep); p3DStar := pDStar*zHat; p4DStar := Vector([eDStar, p3DStar]); Mp4DStar := Mass(p4DStar); p4LepNu := Vector([eLepNu, -pLepNu*zHat]); p4LepNuRest := boostTo(p4LepNu, p4LepNu, 1.0); `#print`("p4LepNuRest:", p4LepNuRest); Mp4LepNu := Mass(p4LepNu); `#bDecay print`("bDecay: B->DStar+Lep finished"); `#bDecay print`("bDecay: p4DStar+p4LepNu:", p4DStar+p4LepNu); `#print`("Mp4DStar:", Mp4DStar, " Mp4LepNu:", Mp4LepNu); `#print`("p4DStar:", p4DStar); `#print`("p4LepNu:", p4LepNu); mLepNu := sqrt(dot4(p4LepNu, p4LepNu)); angles := PickAngles(HP, HM, H0); eDStar := w*MDStar; pDStar := sqrt(eDStar^2-MDStar^2); eLepNu := MB-eDStar; pLepNu := pDStar; mLepNu := sqrt(eLepNu^2-pLepNu^2); `#print`("pLepNu:", pLepNu); `#print`("eLepNu+eDStar-MB:", eLepNu+eDStar-MB); cDStar := -1.0+2.0*rFlat(); sDStar := sqrt(1.0-cDStar^2); phi := 2.0*Pi*rFlat(); cPhi := cos(phi); sPhi := sin(phi); xHat := Vector([cDStar*cPhi, cDStar*sPhi, -sDStar]); yHat := Vector([-sPhi, cPhi, 0]); zHat := Vector([sDStar*cPhi, sDStar*sPhi, cDStar]); `#print`("xHat:", xHat); `#print`("yHat:", yHat); `#print`("zHat:", zHat); `#bDecay print`("bDecay: xy:", xHat.yHat, " xz:", xHat.zHat, " yz:", yHat.zHat); `#print`("Masses:", MB, MDStar, MD, MLep); p3DStar := pDStar*zHat; p4DStar := Vector([eDStar, p3DStar]); Mp4DStar := Mass(p4DStar); p4LepNu := Vector([eLepNu, -pLepNu*zHat]); p4LepNuRest := boostTo(p4LepNu, p4LepNu, 1.0); `#print`("p4LepNuRest:", p4LepNuRest); Mp4LepNu := Mass(p4LepNu); `#bDecay print`("bDecay: B->DStar+Lep finished"); `#bDecay print`("bDecay: p4DStar+p4LepNu:", p4DStar+p4LepNu); `#print`("bDecay: angles picked"); thetal := angles[1]; cthetal := cos(thetal); sthetal := sin(thetal); thetav := angles[2]; cthetav := cos(thetav); sthetav := sin(thetav); genAngles := angles; chi := angles[3]; cchi := cos(chi); schi := sin(chi); `#bDecay print`("bDecay: thetal:", thetal, cthetal, sthetal); `#bDecay print`("bDecatLthetav:", thetav, cthetav, sthetav); zhatLepNu := nHat(p4LepNu); pLep := (1/2)*(mLepNu^2-MLep^2)/mLepNu; `#print`("mLepNu,pLep:", mLepNu, MLep, pLep); eLep := sqrt(MLep^2+pLep^2); `#print`("eLep,pLep,MLep:", eLep, pLep, MLep); phiLep := 2.0*Pi*rFlat(); nHatLep := sthetal*cos(phiLep)*xHat+sthetal*sin(phiLep)*yHat-cthetal*zHat; `#print`("xHat:", xHat); `#print`("nHatLepDotnHatLep:", nHatLep.nHatLep); `#print`("nHatLep:", nHatLep); `#print`("Norm(pHatLep):", Norm(nHatLep, Euclidean)); p3Lep := pLep*nHatLep; p4Lep := Vector([eLep, p3Lep]); Mp4Lep := Mass(p4Lep); `#print`("Mp4Lep:", Mp4Lep); `#bDecay print`("bDecay: p4Lep", p4Lep); eNu := pLep; p3Nu := -pLep*nHatLep; p4Nu := Vector([eNu, p3Nu]); Mp4Nu := Mass(p4Nu); `#print`("lep:", eNu, pLep, Mp4Nu); `#print`("p4Lep:", p4Lep); `#print`("bDecay:p4Nu:", p4Nu); p4LepNuSum := p4Lep+p4Nu; `#print`("p4LepNuSum:", p4LepNuSum); prit("p4LepNu:", p4LepNu); `#print`("Mp4LepNuSum:", Mp4LepNuSum); `#print`("p4LepNu:", p4LepNu); `#print`("Mp4LepNu:", Mp4LepNu); eD := (1/2)*(MDStar^2+MD^2-mPi^2)/MDStar; pD := sqrt(eD^2-MD^2); nHatD := sthetav*cos(phiLep-chi)*xHat+sthetav*sin(phiLep-chi)*yHat+cthetav*zHat; `#print`("nHatD:", nHatD); nHatLepKeep := nHatLep; nHatDKeep := nHatD; p3D := pD*nHatD; p4D := Vector([eD, p3D]); p3Pi := -p3D; ePi := sqrt(mPi^2+pD^2); p4Pi := Vector([ePi, p3Pi]); `#bDecay print`("bDecay:p4D:", p4D); `#bDecay print`("bDecay:p4Pi:", p4Pi); betaLepNu := pLepNu/eLepNu; p4LepBCM := boostTo(p4Lep, p4LepNu, -1.0); p4NuBCM := boostTo(p4Nu, p4LepNu, -1.0); `#print`("p4LebBCM:", p4LepBCM); `#print`("p4NuBCM:", p4NuBCM); `#print`("p4LepBCM+p4NuBCM-p4LepNu", p4LepBCM+p4NuBCM-p4LepNu); betaDStar := pDStar/eDStar; `#print`("betaDStar:", betaDStar); p4DBCM := boostTo(p4D, p4DStar, -1.0); `#print`("p4DBCM:", p4DBCM); p4PiBCM := boostTo(p4Pi, p4DStar, -1.0); `#print`("p4Pi:", p4Pi); p4All := p4DBCM+p4PiBCM+p4LepBCM+p4NuBCM; MAll := Mass(p4All); `#print`("MAll:", MAll, " MB:", MB); `#print`("p4All:", p4All); result := [p4DBCM, p4PiBCM, p4LepBCM, p4NuBCM, thetal, thetav, chi]; `#bDecay print`("bDecay:result:", result); return result end proc

Warning, `Mp4DStar` is implicitly declared local to procedure `bDecay`

 

Warning, `p4LepNuRest` is implicitly declared local to procedure `bDecay`

 

Warning, `Mp4LepNu` is implicitly declared local to procedure `bDecay`

 

Warning, `Mp4Lep` is implicitly declared local to procedure `bDecay`

 

Warning, `Mp4Nu` is implicitly declared local to procedure `bDecay`

 

Warning, `p4LepNuSum` is implicitly declared local to procedure `bDecay`

 

print("bDecay defined")

"bDecay defined"

(9)

 

Typesetting:-mrow(Typesetting:-mi("boost", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mo("proc", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("beta", italic = "false", mathvariant = "normal"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("idir", italic = "true", mathvariant = "italic"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("sign", italic = "true", mathvariant = "italic"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic")), mathvariant = "normal"), Typesetting:-mi(""), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("Ep", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("E", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("pdirp", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("result", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("pdir", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("gam", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("jdir", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("#", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("print", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi(""), Typesetting:-ms("P4:"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic")), mathvariant = "normal"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("if", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("idir", italic = "true", mathvariant = "italic"), Typesetting:-mo("<", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("or", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("idir", italic = "true", mathvariant = "italic"), Typesetting:-mo(">", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mn("3", mathvariant = "normal")), mathvariant = "normal"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("then", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("error", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-ms("idir out of range: %1"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("end", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("if", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("jdir", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("idir", italic = "true", mathvariant = "italic"), Typesetting:-mo("+", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2222222em", rspace = "0.2222222em"), Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("pdir", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("jdir", italic = "true", mathvariant = "italic")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("gam", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mfrac(Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mi("sqrt", italic = "false", mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mo("&minus;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2222222em", rspace = "0.2222222em"), Typesetting:-msup(Typesetting:-mi("β", italic = "false", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mn("2", mathvariant = "normal")), superscriptshift = "0")), mathvariant = "normal")), linethickness = "1", denomalign = "center", numalign = "center", bevelled = "false"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("Ep", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("gam", italic = "true", mathvariant = "italic"), Typesetting:-mo("&sdot;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("P4", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("1", mathvariant = "normal")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo("+", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2222222em", rspace = "0.2222222em"), Typesetting:-mi("sign", italic = "true", mathvariant = "italic"), Typesetting:-mo("&sdot;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("beta", italic = "false", mathvariant = "normal"), Typesetting:-mo("&sdot;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("pdir", italic = "true", mathvariant = "italic")), mathvariant = "normal"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("#", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("print", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi(""), Typesetting:-ms("Ep:"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("Ep", italic = "true", mathvariant = "italic")), mathvariant = "normal"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "auto"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("pdirp", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("gam", italic = "true", mathvariant = "italic"), Typesetting:-mo("&sdot;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("pdir", italic = "true", mathvariant = "italic"), Typesetting:-mo("+", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2222222em", rspace = "0.2222222em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("1", mathvariant = "normal")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo("&sdot;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("sign", italic = "true", mathvariant = "italic"), Typesetting:-mo("&sdot;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("beta", italic = "false", mathvariant = "normal")), mathvariant = "normal"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("result", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("Vector", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("Ep", italic = "true", mathvariant = "italic"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("2", mathvariant = "normal")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("3", mathvariant = "normal")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("4", mathvariant = "normal")), mathvariant = "normal", open = "[", close = "]")), mathvariant = "normal", open = "[", close = "]")), mathvariant = "normal"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("result", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("jdir", italic = "true", mathvariant = "italic")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("pdirp", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("return", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("result", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("end", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("proc", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(":", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "auto"), Typesetting:-mi(""))

rotated := proc (alpha, beta, gamma, v3::Vector) end proc

proc (alpha, beta, gamma, v3::Vector) end proc

(10)

boostTo := proc (p4::Vector, p4To::Vector, sign::float := 1.0) local p3, eNergy, pTrans, pz, zHat, yHat, xHat, betaTo, cTheta, sTheta, rcs, xz, gammaTo, eP, pzP, p3P, mp4, mag, result; `#print`("boostTo starts"); mp4 := Mass(p4); betaTo := momentum(p4To)/p4To[1]; gammaTo := 1/sqrt(1.0-betaTo^2); `##print`("betaTo,gammaTo:", betaTo, "\n", gammaTo); zHat := nHat(p4To); `#print`("zHat:", zHat); p3 := P3(p4); `#print`("p3:", p3); eNergy := p4[1]; pz := zHat.p3; pTrans := p3-pz*zHat; `#print`("pTrans:", pTrans); pzP := gammaTo*(pz-sign*betaTo*eNergy); `#print`("eP:", eP, " pzP:", pzP); `#print`("pTrans:", pTrans); `#print`("pzP*zHat:", pzP*zHat); p3P := pzP*zHat+pTrans; `#print`("p3P:", p3P); mag := Norm(p3P, Euclidean); eP := sqrt(mp4^2+mag^2); result := Vector([eP, p3P]); `#print`("boostTo stops"); return result end proc

flip := proc (p4::Vector) local p3, result; p3 := P3(p4); result := Vector([p4[1], -p3]); return result end proc

defHist := proc (n, low, high, name::string) local h, info, result; h := Sample(0, n); info := Sample(0, 5); info[1] := low; info[2] := high; result := [h, info, name]; return result end proc

 

fillHist := proc (aHist, x::float) local nhist, dx, bin, h, info, low, high; h := aHist[1]; info := aHist[2]; nhist := Size(h, 2); low := info[1]; high := info[2]; dx := (high-low)/nhist; bin := trunc((x-low)/dx)+1; if bin < nhist+1 and 0 < nhist then h[bin] := h[bin]+1; info[3] := info[3]+x; info[4] := info[4]+x^2; info[5] := info[5]+1 end if; return nhist end proc

plotHist := proc (aHist) local h, info, low, high, mean, rms, std, nentry, name, xcenter, xBinCenters, nhist, dx, ibin, thePlot; h := aHist[1]; info := aHist[2]; low := info[1]; high := info[2]; name := aHist[3]; mean := info[3]/info[5]; rms := info[4]/info[5]; nentry := info[5]; std := rms-mean^2; print(" mean:", mean, " std:", std, "name:", name); name := cat(name, "\n entries:", nentry, "\n mean:", mean, "\n std:", std); nhist := Size(h, 2); xBinCenters := Sample(0, 0); dx := (high-low)/nhist; for ibin to nhist do xcenter := low+(1/2)*dx+(ibin-1)*dx; Append(xBinCenters, xcenter); thePlot := plot(xBinCenters, h, style = point, axes = boxed, symbol = solidcircle, symbolsize = 10, title = name) end do; return thePlot end proc

compareMem := proc (lista, listb) local nLena, nLenb, index, named; nLena := Dimensions(lista)[1]; nLenb := Dimensions(listb)[1]; if nLenb <> nLena then return 0 end if; for index to nLena do if index = 15 then next end if; if index = 50 then next end if; if index = 52 then next end if; if index = 62 then next end if; named := lista[index, 1]; `#print`("i:", index, " ", named) end do; return 1 end proc

 

Parse:-ConvertTo1D, "first argument to _Inert_ASSIGN must be assignable"

NULL

MemUse := proc () return 1.0 end proc

NULL

Digits := 20

20

(11)

 

``

NULL

Assume(M4S, real, mB, real, eB, real, real, MDStar, real, MDl, real)

{M4S::real}, {MDStar::real}, {MDl::real}, {eB::real}, {mB::real}

(12)

Restart here to gen new event

M4S := 10579.4; mB := 5279.34; MDStar := 2010.27; MD := 1864.84; MDl := MDStar+1.0

10579.4

 

5279.34

 

2010.27

 

1864.84

 

2011.27

(13)

MB := mB; MLep := .510998950

5279.34

 

.510998950

(14)

 

``

count := 0; fa := 1.0; `#memSum` := 0.; nDo := 1

0

 

1.0

 

0.

 

1

(15)

for i to nDo do `#memBefProb` := MemUse(); Prob := ProbDStarLNu(1.0, 1.0, 1.0, .2*fa, .4*fa, 1.01*fa); count := count+1; fa := 1.0001*fa; `#memAftProb` := MemUse(); `#memProb` := memAftProb-memBefProb; `#memSum` := memSum+memProb end do

NULL

NULL

 

``

NULL

 

 

``

 

NULL

``

NULL

``

NULL

NULL

NULL

NULL

NULL

 

 

NULL

NULL

``

NULL

``

``

NULL

NULL

picks := PickAngles(1.0, 1.0, 1.0)

[1.0244455525261483956, 1.2048619278945573528, 2.1140893897662963370]

(16)

NULL

NULL

NULL

NULL

NULL

NULL

BDecay := bDecay(1.0, 1.0, 1.0, 1.2)

p4DBCM := BDecay[1]; p4PiBCM := BDecay[2]; p4LepBCM := BDecay[3]; p4NuBCM := BDecay[4]

Vector(4, {(1) = 2161.4540183799612632, (2) = 244.93657976024539873, (3) = 478.46812092888873589, (4) = 951.48808564322715396})

 

Vector(4, {(1) = 250.86998162003873729, (2) = 95.779097099681417500, (3) = 158.14695992125048399, (4) = 169.56306147364397496})

 

Vector(4, {(1) = 1891.3133351496805806, (2) = -989.98766795689809863, (3) = -1332.5398224582864055, (4) = -906.27143254721546083})

 

Vector(4, {(1) = 975.70266485031941945, (2) = 649.27199109697128247, (3) = 695.92474160814718574, (4) = -214.77971456965566785})

(17)

BDecay := bDecay(1.0, 1.0, 1.0, 1.2)

nTemp := nHat(p4DBCM)

Vector(3, {(1) = .22413262108928306467, (2) = .43782890312434092641, (3) = .87067239519384347632})

(18)

arccos(nTemp[3])

.51422861933828528430

(19)

genAngles

[1.8649200867494644263, 1.9436739709801282119, 2.2807748005588111424]

(20)

cos(genAngles[3])

-.65181744619373415684

(21)

``

recoAngles := recoAngles(MB, p4DBCM, p4PiBCM, p4LepBCM)

[.81393704306307093521, 2.6661682467656728526, 6.1691365542167692093, .11380167277537668519]

(22)

recoAngles

[.81393704306307093521, 2.6661682467656728526, 6.1691365542167692093, .11380167277537668519]

(23)

``

genAngles[3]/Pi

.72599316717673304325

(24)

recoAngles[3]/Pi

1.9636971544250023764

(25)

recoAngles[3]/Pi

1.9636971544250023764

(26)

``

cChi := cos(recoAngles[3])

NULL

zDXL := recoAngles[4]

.11380167277537668519

(27)

``

NULL

``

(recoAngles[3]+genAngles[3])/Pi; (recoAngles[3]-genAngles[3])/Pi

2.6896903216017354196

 

1.2377039872482693331

(28)

(recoAngles[2]+genAngles[2])/Pi; (recoAngles[2]-genAngles[2])/Pi

1.4673583516558991107

 

.22997707069373698316

(29)

(recoAngles[1]+genAngles[1])/Pi; (recoAngles[1]-genAngles[1])/Pi

.85270670809326428312

 

-.33453829301690981127

(30)

NULL

p4DBCM := BDecay[1]

Vector(4, {(1) = 2210.2489853584658006, (2) = -582.98360907141692211, (3) = 933.83871487847686035, (4) = 442.32083132756442472})

(31)

p4PiBCM := BDecay[2]

Vector(4, {(1) = 202.07501464153419981, (2) = -152.21139748029832032, (3) = 113.93423781061827915, (4) = -68.446855193093973541})

(32)

p4LepBCM := BDecay[3]

Vector(4, {(1) = 1240.2218105923179287, (2) = 336.03729168026476119, (3) = 325.95749810552585223, (4) = -1148.4687746638735673})

(33)

p4NuBCM := BDecay[4]

Vector(4, {(1) = 1626.7941894076820712, (2) = 399.15771487145048112, (3) = -1373.7304507946209916, (4) = 774.59479852940311618})

(34)

p4NuBCM+p4LepBCM+p4PiBCM+p4DBCM

Vector(4, {(1) = 5279.3400000000000003, (2) = -0.1200000000e-15, (3) = 0.1000000000e-15, (4) = 0.6000000000e-16})

(35)

NULL

BDecay[5]; BDecay[6]; BDecay[7]

1.8649200867494644263

 

1.9436739709801282119

 

2.2807748005588111424

(36)

Mass(p4DBCM); Mass(p4PiBCM); Mass(p4LepBCM); Mass(p4NuBCM)

1864.8400000000000000

 

.13959999999997851003

 

.51099895000019324893

 

0.

(37)

Mass(p4NuBCM+p4LepBCM+p4PiBCM+p4DBCM); Mass(p4DBCM+p4PiBCM); Mass(p4NuBCM+p4LepBCM)

5279.3400000000000003

 

2010.2700000000000004

 

2538.0423826603053792

(38)

NULL

wmax := (MDStar^2+mB^2)/(2*MDStar*mB)

1.5034825472446868588

(39)

eB := (1/2)*M4S

5289.7000000000000000

(40)

pB := sqrt(eB^2-mB^2)

330.90067150128299490

(41)

beta := pB/eB

0.62555659394915211618e-1

(42)

p4B := Vector([eB, 0., 0., pB])

Vector(4, {(1) = 5289.7000000000000000, (2) = 0., (3) = 0., (4) = 330.90067150128299490})

(43)

p4BRest := boost(beta, 3, -1, p4B)

Vector(4, {(1) = 5279.3400000000000002, (2) = 0., (3) = 0., (4) = 0.})

(44)

``

p4BRest := boostTo(p4B, p4B)

Vector(4, {(1) = 5279.3400000000000000, (2) = 0., (3) = 0., (4) = 0.})

(45)

NULL

p4B2 := Vector([eB, 0., 0., -pB])

Vector(4, {(1) = 5289.7000000000000000, (2) = 0., (3) = 0., (4) = -330.90067150128299490})

(46)

nHatB := nHat(p4B)

Vector(3, {(1) = 0., (2) = 0., (3) = .99999999999999999999})

(47)

nHatB2 := nHat(p4B2)

Vector(3, {(1) = 0., (2) = 0., (3) = -.99999999999999999999})

(48)

nHatB1; nHatB2

nHatB1

 

Vector(3, {(1) = 0., (2) = 0., (3) = -.99999999999999999999})

(49)

ZBB2 := nHatB.nHatB2

-.99999999999999999998

(50)

boost(beta, 3, 1, p4B2)

Vector(4, {(1) = 5279.3400000000000002, (2) = 0., (3) = 0., (4) = 0.})

(51)

``

nExp := 1000; i := 0

1000

 

0

(52)

z12List := Sample(0, nExp)

z12List := Vector(4, {(1) = ` 1 .. 1000 `*Vector[row], (2) = `Data Type: `*sfloat, (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})

(53)

zTS1Or2List := Sample(0, nExp)

zTS1Or2List := Vector(4, {(1) = ` 1 .. 1000 `*Vector[row], (2) = `Data Type: `*sfloat, (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})

(54)

zTS1List := Sample(0, nExp)

zTS2List := Sample(0, nExp)

dzList := Sample(0, nExp)

i := 0; n1Match := 0; n2Match := 0

0

 

0

 

0

(55)

fPi := evalf(Pi)

3.1415926535897932385

(56)

NULL

NULL

 

NULL

`#memLoopBef` := MemUse()

14966056

(57)

`#memB1DecaySum` := 0

0

(58)

`#memB2DecaySum` := 0

0

(59)

`#memPostBDecaysSum` := 0

0

(60)

`#memToSolveFromBSum` := 0

0

(61)

`#memSolveSum` := 0

0

(62)

memEndLoop := 0

0

(63)

NULL

p4B

Vector(4, {(1) = 5289.7000000000000000, (2) = 0., (3) = 0., (4) = 330.90067150128299490})

(64)

p4B2

Vector(4, {(1) = 5289.7000000000000000, (2) = 0., (3) = 0., (4) = -330.90067150128299490})

(65)

NULL

i := 0

0

(66)

"do        i:=i+1;    print(" doa loop i:",i ) ;  #`BDecay 1` #`v1BCM := TwoBodyDecay`(mB, MDl);  memStartLoop:=MemUse();  dMemStartLoop:=memStartLoop-memEndLoop;   `#memB1DecayBef`:=MemUse();  B1Decay:=bDecay(1.0,1.0,1.0,1.2);   `#memB1DecayAft`:=MemUse();  #`dmemB1Decay:=memB1DecayAft-memB1DecayBef;`  `#memB1DecaySum`:=memB1DecaySum+dmemB1Decay;    `#print`("B1Decay:", memB1DecayAft,memB1DecayBef,dmemB1Decay,memB1DecaySum);    #`mB1Time:=`();  #`dB1Time:=mB1Time-mStartLoop;`    `#print`("B decay 1 done");    p4DB1CM := B1Decay[1];  p4PiB1CM := B1Decay[2];  p4LepB1CM := B1Decay[3];  p4NuB1CM:=B1Decay[4];      p4Test1:=p4DB1CM+p4PiB1CM+p4LepB1CM+p4NuB1CM;  MTest1:=Mass(p4Test1);  MNu1:=Mass(p4NuB1CM);     `#print`("MTest1:",MTest1," MNu:",MNu1);   `#print`("p4Test1:",p4Test1);   `#print`("p4NuB1CM:",p4NuB1CM);    p4DStarB1CM:=p4DB1CM+p4PiB1CM;   v1BCM:=p4DStarB1CM+p4LepB1CM;     `#print`("p4DB1CM:",p4DB1CM);  `#print`("p4PiB1CM:",p4PiB1CM);  `#print`("p4LepB1CM:",p4LepB1CM);    `#print`("p4DStarB1CM:",p4DStarB1CM);  `#print`("v1BCM:",v1BCM);     `#print`("starting B decay 2");    #`BDecay 2`   `#memB2DecayBef`:=MemUse();  B2Decay:=bDecay(1.0,1.0,1.0,1.2);  `#memB2DecayAft`:=MemUse();   #`dMemB2Decay:=memB2DecayAft-memB2DecayBef;`   `#memB2DecaySum`:=memB2DecaySum+dMemB2Decay;   `#print`("BDecay2:",memB2DecayAft,memB2DecayBef,dMemB2Decay,memB2DecaySum);  #`mB2Fin:=`(0);    dB2Time:=mB2Fin-mB2Start;  `#print`("B decay 2 done");    p4DB2CM := B2Decay[1];  p4PiB2CM := B2Decay[2];  p4LepB2CM := B2Decay[3];  p4NuB2CM:=B2Decay[4];      p4DStarB2CM:=p4DB2CM+p4PiB2CM;  p4DStarLepB2CM:=p4DStarB2CM+p4LepB2CM;      `#print`("p4DB2CM:",p4DB2CM);  `#print`("p4PiB2CM:",p4PiB2CM);  `#print`("p4LepB2CM:",p4LepB2CM);    `#print`("p4DStarLepB2CM:",p4DStarLepB2CM);     p4Test2:=p4DB2CM+p4PiB2CM+p4LepB2CM+p4NuB2CM;  MTest2:=Mass(p4Test2);  MNu2:=Mass(p4NuB2CM);      `#print`("MTest2:",MTest2," ,MNu2:",MNu2);  `#print`("p4Test2:",p4Test2);  `#print`("p4NuB2CM:",p4NuB2CM);         #`boost to the B-Bvar frame`  p4NuB2Lab:=boostTo(p4NuB2CM,p4B,+1.0);    #`v1:=boost`(beta,3,+1.0,v1BCM);   v1:=boostTo(v1BCM,p4B,-1.0);   p4Nu1:=p4B-v1;   mNu1:=Mass(p4Nu1);   v1Flip:=flip(v1);   sumV1:=v1+v1Flip;   p4Nu1P:=p4B-v1Flip;   `#print`("p4Nu1P=",p4Nu1P);   mNu1P:=Mass(p4Nu1P);     `#print`("mNu1=",mNu1," MNu1=",MNu1," mNu1P=",mNu1P);  `#print`(" sumV1=",sumV1);     `#print`("v1=",v1);  v1hat := nHat(v1);     #`v2 := boost`(beta, 3,-1.0, p4DStarLepB2CM);   v2:=boostTo(p4DStarLepB2CM,p4B,+1.0); #`+or-?`     v2P:=boostTo(p4DStarLepB2CM,p4B2,-1.0);      `#print`("p4B=",p4B);    `#print`("p4B2=",p4B2);    `#print`("v2=",v2);   `#print`("v2P=",v2P);   `#print`("v2P-v2=",v2P-v2);      #`p4B2Boosted:=boostTo`(p4B2,p4B2,-1.0);     `#print`("p4B2=",p4B2);     `#print`("p4B2Boosted=",p4B2Boosted):    #print("v2=",v2);  v2hat := nHat(v2);  z12 := v1hat . v2hat;  p4Nu2:=p4B2-v2;  mNu2:=Mass(p4Nu2);   v2Flip:=flip(v2);   sumV2:=v2+v2Flip; p4Nu2P:=p4B2-v2Flip; mNu2P:=Mass(p4Nu2P);    `#print`(" p4Nu2=",p4Nu2);   `#print`("sumV2=",sumV2);  `#print`("mNu2=",mNu2," MNu2=",MNu2, " mNu2P=",mNu2P);      `#print`("Angles done");     `#print`("v1Hat:",v1hat);   `#print`("v2Hat:",v2hat);   `#print`("z12:",z12);    #z12List[i]:=z12;     `#doa print`("z12 stored");   mV1:=Mass(v1);   pV1:=Norm(P3(v1),Euclidean);   eV1:=v1[1];    `#doa print`("eB:",eB," mB:",mB," pB:",pB, " mV1:",mV1,"eV1:",eV1," pV1",pV1);  `#doa print`("v1:",v1);    #`comput e the angles from contraints`  zV1B1 := zThetaC(eB, mB, v1);  theta1 := arccos(zV1B1);  zV2B2 := zThetaC(eB, mB, v2);  theta2 := arccos(zV2B2);    `#print`("eB=",eB," mB=",mB,"zV2B2=",zV2B2, "theta2=",theta2);  `#print`("v2=",v2);    theta12 := arccos(z12);    `#doa print`("eB,mB,Ev1:",eB,mB);  `#print`("theta1:",theta1," zV1B1",zV1B1);  `#doa print`("eB,mB:",eB,mB);  `#print`("theta2:",theta2,"  zV2B2:",zV2B2);  `#print`("theta12:",theta12," z12:",z12);    z1hat := v1hat;  y1hat := CrossProduct(v1hat, v2hat);    y1hat := y1hat*(1/Norm(y1hat, Euclidean));  x1hat := CrossProduct(y1hat, z1hat);  magx1hat := Norm(x1hat, Euclidean);    `#doa print`("x1hat:",x1hat);  `#doa print`("y1hat:",y1hat);  `#doa print`("z2hat:",z2hat);      z2hat := v2hat;  y2hat := y1hat;  x2hat := CrossProduct(y2hat, z2hat);    x2hatp := x2hat*x1hat*x1hat+x2hat * y1hat*y1hat+x2hat * z1hat*z1hat;  y2hatp := y2hat*x1hat*x1hat+y2hat * y1hat*y1hat+y2hat * z1hat*z1hat;  z2hatp := z2hat*x1hat*x1hat+z2hat * y1hat*y1hat+z2hat * z1hat*z1hat;      nb1x := sin(theta1)*cos(phi1)*x1hat;  nb1y := sin(theta1)*sin(phi1)*y1hat;  nb1z := cos(theta1)*z1hat;  nb1 := nb1x+nb1y+nb1z;    `#print`("x2hatp=",x2hatp);          `#print`("y2hatp=",y2hatp);  `#print`("z2hatP=",z2hatp);    #herebad  `#print`("sin(theta2)=",sin(theta2));  `#print` ("cos(theta2)=",cos(theta2));  `#print`("theta2=",theta2);    nb2x := sin(theta2)*cos(phi2)*x2hatp;  nb2y := sin(theta2)*sin(phi2)*y2hatp;  nb2z := cos(theta2)*z2hatp;  nb2 := nb2x+nb2y+nb2z;   `#print`(" nb2x=",nb2x," nb2y=",nb2y," nb2z=",nb2z);   #`nb1p := evalf`(subs(theta1 = theta1U, nb1));    #`nb2p := evalf`(subs(theta12 = theta12U, theta2 = theta2U, nb2));    test := nb2*nb1;     #`doa print`("nb1:",nb1);  #`doa print`("nb2:",nb2);  #`doa print`("test computed:",test);     `#memSolveBef`:=MemUse();  #`dMemToSolveFromB:=memSolveBef-memB2DecayAft;`   `#memToSolveFromBSum`:=memToSolveFromBSum+dMemToSolveFromB;     `#print`("solve: dMemToSolveFromB=",dMemToSolveFromB," memToSolveFromBSum=",memToSolveFromBSum);   qDoSolve:=false;  #` if qDoSolve then`  S2 := NLPSolve(test, phi1 = 0 .. 2*Pi, phi2 = 1.0*Pi .. 2*Pi);  `#doa print`("S2:",S2);    S1 := NLPSolve(test, phi1 = 0 .. 2*Pi, phi2 = 0.*Pi .. 1.0*Pi);  `#memSolveAft`:=MemUse();  #`dMemSolve:=memSolveAft-memSolveBef;`  `#memSolveSum`:=memSolveSum+dMemSolve;   `#print`("solve: dMemSolve=", dMemSolve," memSolveSum=",memSolveSum);  `#doa print`("S1:",S1);   `#doa print`("Solutions found");      phi1S1 := eval(phi1, S1[2]);  phi2S1 := eval(phi2, S1[2]);  phi1S2 := eval(phi1, S2[2]);  phi2S2 := eval(phi2, S2[2]);  nb1S1 := evalf(subs(phi1 = phi1S1, phi2 = phi2S1, nb1));  nb2S1 := evalf(subs(phi1 = phi1S1, phi2 = phi2S1, nb2));  nb1S2 := evalf(subs(phi1 = phi1S2, phi2 = phi2S, nb1));  nb2S2 := evalf(subs(phi1 = phi1S2, phi2 = phi2S2, nb2));   zTS1 := nHatB*nb1S1;  zTS2 := nHatB*nb1S2;    `#print`("doa loop  zZTS1,zTS2,i:",zTS1,zTS2,i);    zTS1List[i]:=zTS1;  zTS2List[i]:=zTS2;  if zTS1<zTS2 then zTS1Or2List[i]:=zTS1 else zTS1Or2List[i]:=zTS2 end if;   deltazTS:=zTS1-zTS2;  #dzList[i]:=deltazTS;  #fillHist(hDeltaTS,deltazTS); if zTS1> 0.99 then   #`n1Match:=n1Match+1; `  end if;  if zTS2>0.99 then   #`n2Match:=n2Match+1;`   end if;    #`end if #qDoSolve`       #`doa print`("doa: dB1Time:=",dB1Time," dB2Time=",dB2Time," drecPart:=",dRecoPart);   #`doa print`("doa: mStartLoop=",mStartLoop, " dMemEndLoop=",dMemLoop," mLoop:=",mLoop, " mEndLoop-mStart=",mEndLoop-mStart);      memEndLoop:=MemUse();    dMemLoop:=memEndLoop-memStartLoop;      print("dMemLoop=",dMemLoop," memEndLoop=",memEndLoop," dMemStartLoop=",dMemStartLoop):      #`dMemPostBDecays:=memEndLoop-memB2DecayAft;`    #`memPostBDecaysSum:=memPostBDecaysSum+dMemPostBDecays;`     `#print`("memEndLoop=",memEndLoop," dMemPostBDecays=",dMemPostBDecays," memPostBDecaysSum=",memPostBDecaysSum);    until i>nExp-1: "

" doa loop i:", 1

 

"dMemLoop=", 203872, " memEndLoop=", 15298560, " dMemStartLoop=", 15094688

 

" doa loop i:", 2

 

"dMemLoop=", 41544, " memEndLoop=", 15330860, " dMemStartLoop=", -9244

 

" doa loop i:", 3

 

"dMemLoop=", 42440, " memEndLoop=", 15363892, " dMemStartLoop=", -9408

 

" doa loop i:", 4

 

"dMemLoop=", 34420, " memEndLoop=", 15388916, " dMemStartLoop=", -9396

 

" doa loop i:", 5

 

"dMemLoop=", 32160, " memEndLoop=", 15411744, " dMemStartLoop=", -9332

 

" doa loop i:", 6

 

"dMemLoop=", 30168, " memEndLoop=", 15432460, " dMemStartLoop=", -9452

 

" doa loop i:", 7

 

"dMemLoop=", 30284, " memEndLoop=", 15453432, " dMemStartLoop=", -9312

 

" doa loop i:", 8

 

"dMemLoop=", 30256, " memEndLoop=", 15474316, " dMemStartLoop=", -9372

 

" doa loop i:", 9

 

"dMemLoop=", 29980, " memEndLoop=", 15494972, " dMemStartLoop=", -9324

 

" doa loop i:", 10

 

"dMemLoop=", 29604, " memEndLoop=", 15515140, " dMemStartLoop=", -9436

 

" doa loop i:", 11

 

"dMemLoop=", 29552, " memEndLoop=", 15535352, " dMemStartLoop=", -9340

 

" doa loop i:", 12

 

"dMemLoop=", 28640, " memEndLoop=", 15554608, " dMemStartLoop=", -9384

 

" doa loop i:", 13

 

"dMemLoop=", 28156, " memEndLoop=", 15573464, " dMemStartLoop=", -9300

 

" doa loop i:", 14

 

"dMemLoop=", 29600, " memEndLoop=", 15593676, " dMemStartLoop=", -9388

 

" doa loop i:", 15

 

"dMemLoop=", 29152, " memEndLoop=", 15613444, " dMemStartLoop=", -9384

 

" doa loop i:", 16

 

"dMemLoop=", 28660, " memEndLoop=", 15632688, " dMemStartLoop=", -9416

 

" doa loop i:", 17

 

"dMemLoop=", 29016, " memEndLoop=", 15652268, " dMemStartLoop=", -9436

 

" doa loop i:", 18

 

"dMemLoop=", 30168, " memEndLoop=", 15673116, " dMemStartLoop=", -9320

 

" doa loop i:", 19

 

"dMemLoop=", 28916, " memEndLoop=", 15692616, " dMemStartLoop=", -9416

 

" doa loop i:", 20

 

"dMemLoop=", 27800, " memEndLoop=", 15711056, " dMemStartLoop=", -9360

 

" doa loop i:", 21

 

"dMemLoop=", 29564, " memEndLoop=", 15731360, " dMemStartLoop=", -9260

 

" doa loop i:", 22

 

"dMemLoop=", 27996, " memEndLoop=", 15750060, " dMemStartLoop=", -9296

 

" doa loop i:", 23

 

"dMemLoop=", 28624, " memEndLoop=", 15769312, " dMemStartLoop=", -9372

 

" doa loop i:", 24

 

"dMemLoop=", 28828, " memEndLoop=", 15788768, " dMemStartLoop=", -9372

 

" doa loop i:", 25

 

"dMemLoop=", 28540, " memEndLoop=", 15808016, " dMemStartLoop=", -9292

 

" doa loop i:", 26

 

"dMemLoop=", 28208, " memEndLoop=", 15826852, " dMemStartLoop=", -9372

 

" doa loop i:", 27

 

"dMemLoop=", 30684, " memEndLoop=", 15848208, " dMemStartLoop=", -9328

 

" doa loop i:", 28

 

"dMemLoop=", 29672, " memEndLoop=", 15868572, " dMemStartLoop=", -9308

 

" doa loop i:", 29

 

"dMemLoop=", 27628, " memEndLoop=", 15886852, " dMemStartLoop=", -9348

 

" doa loop i:", 30

(67)

NULL

HandCalcZ

v2

p4Nu2

Mass(p4Nu2)

p4Nu2P

NULL

p4NuB2Lab

Mass(p4NuB2CM)

Mass(p4NuB2Lab)

p4DStarLepB2CM

p4BRest

p4TestNu2 := p4BRest-p4DB2CM-p4LepB2CM-p4PiB2CM

p4Nu2

p4Test2

p4NuB2CM

B2Decay[4]

eB, mB

pB := sqrt(eB^2-mB^2)

v2

M2 := Mass(v2)

E2 := v2[1]

P2 := Norm(P3(v2), Euclidean)

zThetaC(eB, mB, v2)

Numerator := -2*E2*eB+M2^2+mB^2

Denom := 2*pB*P2

Numerator/Denom

``

``

print("mPostLoop=", mPostLoop, " mPostLoop-mStart=", mPostLoop-mStart)

``

NULL

``

NULL

n1Match; n2Match; n2Match-n1Match

zTS2List

i := 0

help("write")

sid := open("myfile.txt", WRITE)

Write(sid, output)

output := zTS1Or2List

NULL

``

help("write")

H12 := Histogram(zTS1Or2List, range = -1.0 .. 1.0, title = "z1 or z2", frequencyscale = absolute)

H12BlowUp := Histogram(zTS1Or2List, range = .70 .. 1.0, title = "z1 or z2 (magnified)", frequencyscale = absolute)

NULL

H1 := Histogram(zTS1List, range = -1.0 .. 1.0, title = "zTS1", frequencyscale = absolute)

H2 := Histogram(zTS2List, range = -1.0 .. 1.0, title = "zTS2", frequencyscale = absolute)

Threads[Sleep](10)

NULL

ScatterPlot(dzList, zTS1List, view = [-0.1e-13 .. 0.1e-13, .4 .. .99])

ScatterPlot(zTS1List, zTS2List)

bins := [1, 2, 3, 4, 5]

dataplot(bins, bar)

hTest := Sample(0, 10)

A := Array([])

dohist(hTest, 0., 2.0, .1, A)

NULL

 

 

v1 := boost(beta, 3, 1, v1BCM)

v1hat := nHat(v1)

v2BbarCM := TwoBodyDecay(mB, MDl)

v2 := boost(beta, 3, -1, v2BbarCM)

v2hat := nHat(v2)

v1; v2

Mass(v1)

 

Mass(v2)

v2BbarCM

v2

v1

zHatBTrue := v1hat.nHatB

nHatB

nHatBbar := -nHatB

``

zHatB := zThetaC(eB, mB, v1)

theta1 := arccos(zHatB)

zHatB

theta1

zHatBbarTrue := v2hat.nHatBbar

zBBbar := nHatB.nHatBbar

zHatBbar := zThetaC(eB, mB, v2)

theta2 := arccos(zHatBbar)

contraint works!

zHatBbar

theta12 := arccos(z12)

z1hat := v1hat

y1hat := CrossProduct(v1hat, v2hat)

``

y1hat := y1hat/Norm(y1hat, Euclidean)

Norm(y1hat, Euclidean)

x1hat := CrossProduct(y1hat, z1hat)

magx1hat := Norm(x1hat, Euclidean)

``

z2hat := v2hat

y2hat := y1hat

x2hat := CrossProduct(y2hat, z2hat)

Norm(x2hat, Euclidean)

transformation!

x2hatp := (x2hat.x1hat)*x1hat+(x2hat.y1hat)*y1hat+(x2hat.z1hat)*z1hat

y2hatp := (y2hat.x1hat)*x1hat+(y2hat.y1hat)*y1hat+(y2hat.z1hat)*z1hat

z2hatp := (z2hat.x1hat)*x1hat+(z2hat.y1hat)*y1hat+(z2hat.z1hat)*z1hat

Norm(x1hat, Euclidean)

 

``

nb1x := sin(theta1)*cos(phi1)*x1hat

nb1y := sin(theta1)*sin(phi1)*y1hat

nb1z := cos(theta1)*z1hat

nb1 := nb1x+nb1y+nb1z

nb2x := sin(theta2)*cos(phi2)*x2hatp

nb2y := sin(theta2)*sin(phi2)*y2hatp

nb2z := cos(theta2)*z2hatp

nb2 := nb2x+nb2y+nb2z

Here need to compute theta1U and theta2U from the kinematics...

nb1p := evalf(subs(theta1 = theta1U, nb1))

``

nb2p := evalf(subs(theta12 = theta12U, theta2 = theta2U, nb2))

 

test := nb2.nb1

NULL

``

``

NULL

plot1 := plot3d(evalf(test), phi1 = 0 .. 2*Pi, phi2 = 0 .. 2*Pi)

``

S2 := NLPSolve(test, phi1 = 0 .. 2*Pi, phi2 = 1.0*Pi .. 2*Pi)

``

S1 := NLPSolve(test, phi1 = 0 .. 2*Pi, phi2 = 0.*Pi .. 1.0*Pi)

``

``

phi1S1 := eval(phi1, S1[2])

phi2S1 := eval(phi2, S1[2])

phi1S2 := eval(phi1, S2[2])

phi2S2 := eval(phi2, S2[2])

nb1S1 := evalf(subs(phi1 = phi1S1, phi2 = phi2S1, nb1))

nb2S1 := evalf(subs(phi1 = phi1S1, phi2 = phi2S1, nb2))

nb1S2 := evalf(subs(phi1 = phi1S2, phi2 = phi2S, nb1))

nb2S2 := evalf(subs(phi1 = phi1S2, phi2 = phi2S2, nb2))

So solution 1 is far from the orignal input, but solution 2 virtually perfect

zTS1 := nHatB.nb1S1

zTS2 := nHatB.nb1S2

here I have B-reco BTrue comparison

 

 

``

S1[2, 1]/Pi

S1[2, 2]/Pi

S2[2, 1]/Pi

S2[2, 2]/Pi

``

``

nb1p

nb1pphi := subs(phi1 = .6*Pi, nb1p)

nb2pphi := subs(phi2 = .2*Pi, nb2p)

NULL

``

NULL

``

``

NULL

NULL

``

nPhi := 40

v2hatp := 1.2*subs(theta12 = theta12U, v2hat)

VList := [1.2*v1hat, v2hatp]

``

PlotVector(VList)

numelems(VList)

nPhi

for i from 0 to nPhi-1 do phiU := 2.0*i*Pi/nPhi; VList := [VList[], i+3]; nb1pphi := subs(phi1 = phiU, nb1p); VList[i+3] := nb1pphi end do

VList[3]

PlotVector(VList)

nVList := numelems(VList)

nVList

for i from 0 to nPhi-1 do phiU := 2.0*i*Pi/nPhi; VList := [VList[], i+1+nVlist]; nb2pphi := evalf(subs(phi2 = phiU, nb2p)); VList[i+1+nVList] := nb2pphi end do

``

numelems(VList)

VList[1]

PlotVector(VList)

plot1

``

theta12/Pi; theta1/Pi; theta2/Pi

S1[1]; S1[2, 1]/Pi; S1[2, 2]/Pi; S2[1]; S2[2, 1]/Pi; S2[2, 2]/Pi

``

 Hp :=1.0;   Hm:=1.0; H0:=1.0;        

temp := ProbDStarLNu(Hp, Hm, H0, thetal, thetav, 3.5*((1/2)*Pi))

plot3 := plot3d(temp, thetal = 0 .. Pi, thetav = 0 .. Pi)

 

NULL

``

``

nMax := 100

Al := Sample(0, nMax)

AV := Sample(0, nMax)

AChi := Sample(0, nMax)

n := 0

"do   n:=n+1;   #`#doa print`(n);   angles:=PickAngles(Hp,Hm,H0);   thetal:=angles[1];   thetav:=angles[2];   chi:=angles[3];    cL:=cos(thetal);    Al[n]:=cL;   AV[n]:=cos(thetav);   AChi[n]:=chi;   #hist(Al,-1.0,1.0,cL);  #print("n:",n,"cL:",cL);  until n > nMax-1:   "

Histogram(Al, range = -1.1 .. 1.1, title = "H+=H-, cos(thetaL)", frequencyscale = absolute)

Histogram(AV, range = -1.1 .. 1.1, title = "H+=H- cos(thetaV)", frequencyscale = absolute)

Histogram(AChi, range = 0. .. 1.0*Pi, title = "H+=H-, Chi", frequencyscale = absolute)

``

``

``


 

Download DStar3DKinRecoLoopDebug.mw
 

``

B-vector mathcing for double D*LNu decays       

 

restart

Version := 6.2

6.2

(1)

NULL

4.9 -- Fix boostTo to use Gram-Schmit orthogonalization

5.3 -- Fixed sign error in two body decay momentum calc in doa loop

         Fixed incorrect calculation of v1 and v2 which summed D* and it's pion instead of D* and the lepton

5.9    Fixed bug in 'PickAngles'
6.0   Remove 5.9..that was a mistake...

6.1 Negative values from 'ProbDLNu'. There was a missing sThetaL from the cross terms

6.2 Type causing none zero neutrion masses found and fixe

      Does not stop mememory crashs they seem less common when memory is intergated?

 

estart; with(Physics); with(LinearAlgebra); with(VectorCalculus); with(Optimization); with(Statistics); with(ArrayTools); with(plots); with(Threads); with(MmaTranslator[Mma]); Setup(mathematicalnotation = true); Setup(coordinatesystems = cartesian)

estart

 

`Default differentiation variables for d_, D_ and dAlembertian are:`*{X = (x, y, z, t)}

 

`Systems of spacetime Coordinates are:`*{X = (x, y, z, t)}

(2)

 

 

Here I consider the 0C reconstructing of both B-mesons in the decay BBbar --> (D*LNu)(D*Lnu). The vectors v1 and v2 are the three momenta of the D* and the lepton. The angle bbetween v1 and I is called theta12 (T12in Maple code).The B-vectors B1 and B2 branch (unlabed ugh!) of there respective v (D*+lep) vectors at angle specified. Clearly to mathch (pB1=-pB2) the must lie in the v1-v2 plane. Their angles with w.r.t., v1 and v2 are theta1 (T1) and theta2 (T2). The kinematics of the decay should guarentee that one and only one match. The only ambiguous case would be when v1 and v2 are back-to-back and this could be excluded w/o much loss.The kinematics determins the angles cos(theta1) and cos(theta2).In most cases it will be possible to reconstruct the decay angles of both D*LNu's.

There are 4 possible values for the angles between the B-mesons -theta12+/-theta1+/-theta2. One must by 180 deg (pi).

 

Angles to try:

mStart := MemUse()

MemUse()

(3)

NULL

NULL

NULL

randomize(7759447594)

7759447594

(4)

NULL

NULL

rFlat := rand(0. .. 1.0)

proc () options operator, arrow; RandomTools:-Generate(float('range' = 0. .. 1.0, 'method' = 'uniform')) end proc

(5)

 

Max := 6.0

6.0

(6)

`#memUse`()-mStart

`#memUse`()-MemUse()

(7)

"PickAngles:=proc(HP,HM,H0)   global rFlat, Max;   local thetaL,thetaV,Chi, result,R,cL,cV,test,angles;   do    R:=rFlat();   cL:=-1.0+2.0*rFlat();   cV:=-1.0+2.0*rFlat();   Chi:=2*Pi*rFlat();   thetaL:=arccos(cL);   thetaV:=arccos(cV); #`  print`("Hs:",HP,HM,H0);   test:=(ProbDStarLNu(HP,HM,H0,thetaL,thetaV,Chi))/(Max);  #print("angles:",thetaL,thetaV,Chi, "test:",test,R);   until R<test;   angles:=[thetaL,thetaV,Chi];   return angles;  end proc:"

ProbDStarLNu := proc (HP, HM, H0, theta_L, theta_V, chi) local cL, sL, cV, sV, cChi, c2Chi, sum, result, memStart, memFin, memTrig, memSum1; `#probd print`("memStart:", memStart); cL := cos(theta_L); sL := sin(theta_L); cV := cos(theta_V); sV := sin(theta_V); cChi := cos(chi); c2Chi := cos(2.0*chi); sum := 0.; sum := sum+HP^2*(1-cL)^2*sV^2; sum := sum+HM^2*(1+cL)^2*sV^2; sum := sum+4*H0^2*sL^2*cV^2; sum := sum-2*HP*HM*sL^2*sV^2*c2Chi; sum := sum-4*HP*H0*sL*(1-cL)*sV*cV*cChi; sum := sum+4*HM*H0*sL*(1+cL)*sV*cV*cChi; result := sum/Max; `#probd print`("memFin:", memFin); `#probd print`("ProbDStarLNu: memTrig-memStart=", memTrig-memStart); `#probd print`("ProbDStarLNu: memSum1-memTrig=", memSum1-memTrig); `#probd print`("ProbDStarLNu: memFin-memTrig=", memFin-memTrig); `#probd print`("ProbDStarLNu: memFin-memStart=", memFin-memStart); `#probd print`("ProbDStarLNu: memFin=", memFin); return result end proc

``

``

NULL

``

recoAngles := proc (mB::float, p4DBCM, p4PiBCM, p4LepBCM) local nHatDBCM, nHatPiBCM, nHatLepBCM, nHatNuBCM, p4DStarBCM, p4LepNuBCM, p4DDStarCM, p4LepLepNuCM, p4BCM, p3DBCM, p3PiBCM, p3LepBCM, p4NuBM, p3NuBCM, nHatD, normDPi, normLepNu, Chi, cChi, ThetaD, cThetaD, cThetaLep, ThetaLep, nHatDDStarCM, nHatLepLepNuCM, zHat, phiL, phiD, zLepD, nDXL, zDXL; `#print`("recoAngles inputs"); `#print`("mB:", mB); `#print`("p4DBCM:", p4DBCM); `#print`("p4PiBCM:", p4PiBCM); `#print`("p4LepBCM:", p4LepBCM); p4BCM := Vector([mB, 0., 0., 0.]); p4NuBCM = p4BCM-p4DBCM-p4PiBCM-p4LepBCM; `#print`("p4NuBCM:", p4NuBCM); p4LepNuBCM := p4LepBCM+p4NuBCM; p4DStarBCM := p4DBCM+p4PiBCM; zHat := nHat(p4DStarBCM); `#print`("p4LepNuBCM:", p4LepNuBCM); `#print`("p4DStarBCM:", p4DStarBCM); `#print`("regoAng zHat:", zHat); p4DDStarCM := boostTo(p4DBCM, p4DStarBCM); `#print`("p4DDStarCM:", p4DDStarCM); p4LepLepNuCM := boostTo(p4LepBCM, p4LepNuBCM); `#print`("p4LepLepNuCM:", p4LepLepNuCM); nHatDDStarCM := nHat(p4DDStarCM); nHatLepLepNuCM := nHat(p4LepLepNuCM); nHatDBCM := nHat(p4DBCM); nHatPiBCM := nHat(p4PiBCM); nHatLepBCM := nHat(p4LepBCM); nHatNuBCM := nHat(p4NuBCM); normDPi := CrossProduct(nHatDBCM, nHatPiBCM); normDPi := normDPi/Norm(normDPi, Euclidean); normLepNu := CrossProduct(nHatLepBCM, nHatNuBCM); normLepNu := normLepNu/Norm(normLepNu, Euclidean); zLepD := normDPi.normLepNu; `#print`("zLepD:", zLepD); nDXL := CrossProduct(normDPi, normLepNu); zDXL := nDXL.zHat; Chi := arctan(zDXL, zLepD)+Pi; phiL := arctan(nHatLepLepNuCM[2], nHatLepLepNuCM[1]); `#print`("phiL:", phiL); cThetaD := nHatDDStarCM.zHat; ThetaD := arccos(cThetaD); cThetaLep := -nHatLepLepNuCM.zHat; ThetaLep := arccos(cThetaLep); return [ThetaLep, ThetaD, Chi, zDXL] end proc

 

Max

6.0

(8)

dot4 := proc (x, y) local result; result := x[1]*y[1]-x[2]*y[2]-x[3]*y[3]-x[4]*y[4]; return result end proc

Calculate theta from contraints

zThetaC := proc (EB, MB, P4) local E4, M4, MAG4, MAGB, Num, result; `#print`("starting zThetaC"); E4 := P4[1]; M4 := sqrt(dot4(P4, P4)); MAG4 := Norm(P3(P4), Euclidean); MAGB := sqrt(EB^2-MB^2); `#print`("MB,M4,EB,E4:", MB, M4, EB, E4); `#print`("MAG4,MAGB:", MAG4, MAGB); Num := MB^2+M4^2-2*EB*E4; `#print`("Num:", Num); `#print`("MAG4*MAGB:", MAG4*MAGB); result := -(1/2)*(MB^2+M4^2-2*EB*E4)/(MAG4*MAGB); `#print`("result:", result); if 1 < result then result := .999999999999999 end if; return result end proc

P3 := proc (P4) local result; `#print`("P3 on P4:", P4); result := Vector([P4[2], P4[3], P4[4]]); return result end proc

 

Mass := proc (P4) local result; result := Re(sqrt(dot4(P4, P4))); return result end proc

momentum := proc (P4) local result, p3; `#print`(" Momentum input P4:", P4); p3 := P3(P4); `#print`("p3:", p3); result := Norm(p3, Euclidean); return result end proc

 

nHat := proc (P4) local p3, magp3, nhat; p3 := P3(P4); magp3 := Norm(p3, Euclidean); nhat := p3/magp3; return nhat end proc

sums second particle is neutriono, taken to have zero mass

TwoBodyDecay := proc (mMother, mDaug) local k, z, phi, zsin, result, eDaug; global rFlat; k := (mMother^2-mDaug^2)/(2.0*mMother); eDaug := sqrt(mDaug^2+k^2); z := -1.0+2.0*rFlat(); zsin := sqrt(1-z^2); phi := 2*rFlat()*Pi; result := Vector([eDaug, k*zsin*cos(phi), k*zsin*sin(phi), k*z]); return result end proc

bDecay := proc (HP::float, HM::float, H0::float, w::float) local pDStar, eLepNu, pLepNu, mLepNu, p4LepNu, betaLepNu, angles, cBdecay, sBdecay, phiBdecay, p3DStar, p4DStar, eDStar, betaDStar, p3Lep, p4Lep, eNu, p3Nu, p4Nu, nHatD, pD, eD, ePi, p3D, p4D, p3Pi, p4Pi, thetal, thetav, chi, cthetal, sthetal, cthetav, sthetav, cchi, schi, nHatLep, phiLep, p4DBCM, p4NuBCM, p4LepBCM, p4PiBCM, cDStar, sDStar, phi, cPhi, sPhi, xHat, yHat, zHat, p4All, MAll, result, mPi, pLep, eLep, zhatLepNu; global MB, MD, MDStar, MLep, genAngles, nHatLepKeep, nHatDKeep; mPi := .1396; `#print`("bDecay: starting bDecay"); `#print`("input H+H-H0:", HP, HM, H0, " w:", w); assume(eNu, real, pNu, real); eDStar := w*MDStar; pDStar := sqrt(eDStar^2-MDStar^2); eLepNu := MB-eDStar; pLepNu := pDStar; mLepNu := sqrt(eLepNu^2-pLepNu^2); `#print`("pLepNu:", pLepNu); `#print`("eLepNu+eDStar-MB:", eLepNu+eDStar-MB); cDStar := -1.0+2.0*rFlat(); sDStar := sqrt(1.0-cDStar^2); phi := 2.0*Pi*rFlat(); cPhi := cos(phi); sPhi := sin(phi); xHat := Vector([cDStar*cPhi, cDStar*sPhi, -sDStar]); yHat := Vector([-sPhi, cPhi, 0]); zHat := Vector([sDStar*cPhi, sDStar*sPhi, cDStar]); `#print`("xHat:", xHat); `#print`("yHat:", yHat); `#print`("zHat:", zHat); `#bDecay print`("bDecay: xy:", xHat.yHat, " xz:", xHat.zHat, " yz:", yHat.zHat); `#print`("Masses:", MB, MDStar, MD, MLep); p3DStar := pDStar*zHat; p4DStar := Vector([eDStar, p3DStar]); Mp4DStar := Mass(p4DStar); p4LepNu := Vector([eLepNu, -pLepNu*zHat]); p4LepNuRest := boostTo(p4LepNu, p4LepNu, 1.0); `#print`("p4LepNuRest:", p4LepNuRest); Mp4LepNu := Mass(p4LepNu); `#bDecay print`("bDecay: B->DStar+Lep finished"); `#bDecay print`("bDecay: p4DStar+p4LepNu:", p4DStar+p4LepNu); `#print`("Mp4DStar:", Mp4DStar, " Mp4LepNu:", Mp4LepNu); `#print`("p4DStar:", p4DStar); `#print`("p4LepNu:", p4LepNu); mLepNu := sqrt(dot4(p4LepNu, p4LepNu)); angles := PickAngles(HP, HM, H0); eDStar := w*MDStar; pDStar := sqrt(eDStar^2-MDStar^2); eLepNu := MB-eDStar; pLepNu := pDStar; mLepNu := sqrt(eLepNu^2-pLepNu^2); `#print`("pLepNu:", pLepNu); `#print`("eLepNu+eDStar-MB:", eLepNu+eDStar-MB); cDStar := -1.0+2.0*rFlat(); sDStar := sqrt(1.0-cDStar^2); phi := 2.0*Pi*rFlat(); cPhi := cos(phi); sPhi := sin(phi); xHat := Vector([cDStar*cPhi, cDStar*sPhi, -sDStar]); yHat := Vector([-sPhi, cPhi, 0]); zHat := Vector([sDStar*cPhi, sDStar*sPhi, cDStar]); `#print`("xHat:", xHat); `#print`("yHat:", yHat); `#print`("zHat:", zHat); `#bDecay print`("bDecay: xy:", xHat.yHat, " xz:", xHat.zHat, " yz:", yHat.zHat); `#print`("Masses:", MB, MDStar, MD, MLep); p3DStar := pDStar*zHat; p4DStar := Vector([eDStar, p3DStar]); Mp4DStar := Mass(p4DStar); p4LepNu := Vector([eLepNu, -pLepNu*zHat]); p4LepNuRest := boostTo(p4LepNu, p4LepNu, 1.0); `#print`("p4LepNuRest:", p4LepNuRest); Mp4LepNu := Mass(p4LepNu); `#bDecay print`("bDecay: B->DStar+Lep finished"); `#bDecay print`("bDecay: p4DStar+p4LepNu:", p4DStar+p4LepNu); `#print`("bDecay: angles picked"); thetal := angles[1]; cthetal := cos(thetal); sthetal := sin(thetal); thetav := angles[2]; cthetav := cos(thetav); sthetav := sin(thetav); genAngles := angles; chi := angles[3]; cchi := cos(chi); schi := sin(chi); `#bDecay print`("bDecay: thetal:", thetal, cthetal, sthetal); `#bDecay print`("bDecatLthetav:", thetav, cthetav, sthetav); zhatLepNu := nHat(p4LepNu); pLep := (1/2)*(mLepNu^2-MLep^2)/mLepNu; `#print`("mLepNu,pLep:", mLepNu, MLep, pLep); eLep := sqrt(MLep^2+pLep^2); `#print`("eLep,pLep,MLep:", eLep, pLep, MLep); phiLep := 2.0*Pi*rFlat(); nHatLep := sthetal*cos(phiLep)*xHat+sthetal*sin(phiLep)*yHat-cthetal*zHat; `#print`("xHat:", xHat); `#print`("nHatLepDotnHatLep:", nHatLep.nHatLep); `#print`("nHatLep:", nHatLep); `#print`("Norm(pHatLep):", Norm(nHatLep, Euclidean)); p3Lep := pLep*nHatLep; p4Lep := Vector([eLep, p3Lep]); Mp4Lep := Mass(p4Lep); `#print`("Mp4Lep:", Mp4Lep); `#bDecay print`("bDecay: p4Lep", p4Lep); eNu := pLep; p3Nu := -pLep*nHatLep; p4Nu := Vector([eNu, p3Nu]); Mp4Nu := Mass(p4Nu); `#print`("lep:", eNu, pLep, Mp4Nu); `#print`("p4Lep:", p4Lep); `#print`("bDecay:p4Nu:", p4Nu); p4LepNuSum := p4Lep+p4Nu; `#print`("p4LepNuSum:", p4LepNuSum); prit("p4LepNu:", p4LepNu); `#print`("Mp4LepNuSum:", Mp4LepNuSum); `#print`("p4LepNu:", p4LepNu); `#print`("Mp4LepNu:", Mp4LepNu); eD := (1/2)*(MDStar^2+MD^2-mPi^2)/MDStar; pD := sqrt(eD^2-MD^2); nHatD := sthetav*cos(phiLep-chi)*xHat+sthetav*sin(phiLep-chi)*yHat+cthetav*zHat; `#print`("nHatD:", nHatD); nHatLepKeep := nHatLep; nHatDKeep := nHatD; p3D := pD*nHatD; p4D := Vector([eD, p3D]); p3Pi := -p3D; ePi := sqrt(mPi^2+pD^2); p4Pi := Vector([ePi, p3Pi]); `#bDecay print`("bDecay:p4D:", p4D); `#bDecay print`("bDecay:p4Pi:", p4Pi); betaLepNu := pLepNu/eLepNu; p4LepBCM := boostTo(p4Lep, p4LepNu, -1.0); p4NuBCM := boostTo(p4Nu, p4LepNu, -1.0); `#print`("p4LebBCM:", p4LepBCM); `#print`("p4NuBCM:", p4NuBCM); `#print`("p4LepBCM+p4NuBCM-p4LepNu", p4LepBCM+p4NuBCM-p4LepNu); betaDStar := pDStar/eDStar; `#print`("betaDStar:", betaDStar); p4DBCM := boostTo(p4D, p4DStar, -1.0); `#print`("p4DBCM:", p4DBCM); p4PiBCM := boostTo(p4Pi, p4DStar, -1.0); `#print`("p4Pi:", p4Pi); p4All := p4DBCM+p4PiBCM+p4LepBCM+p4NuBCM; MAll := Mass(p4All); `#print`("MAll:", MAll, " MB:", MB); `#print`("p4All:", p4All); result := [p4DBCM, p4PiBCM, p4LepBCM, p4NuBCM, thetal, thetav, chi]; `#bDecay print`("bDecay:result:", result); return result end proc

Warning, `Mp4DStar` is implicitly declared local to procedure `bDecay`

 

Warning, `p4LepNuRest` is implicitly declared local to procedure `bDecay`

 

Warning, `Mp4LepNu` is implicitly declared local to procedure `bDecay`

 

Warning, `Mp4Lep` is implicitly declared local to procedure `bDecay`

 

Warning, `Mp4Nu` is implicitly declared local to procedure `bDecay`

 

Warning, `p4LepNuSum` is implicitly declared local to procedure `bDecay`

 

print("bDecay defined")

"bDecay defined"

(9)

 

Typesetting:-mrow(Typesetting:-mi("boost", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mo("proc", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("beta", italic = "false", mathvariant = "normal"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("idir", italic = "true", mathvariant = "italic"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("sign", italic = "true", mathvariant = "italic"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic")), mathvariant = "normal"), Typesetting:-mi(""), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("Ep", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("E", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("pdirp", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("result", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("pdir", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("gam", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("local", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("jdir", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("#", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("print", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi(""), Typesetting:-ms("P4:"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic")), mathvariant = "normal"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("if", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("idir", italic = "true", mathvariant = "italic"), Typesetting:-mo("<", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("or", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("idir", italic = "true", mathvariant = "italic"), Typesetting:-mo(">", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mn("3", mathvariant = "normal")), mathvariant = "normal"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("then", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("error", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-ms("idir out of range: %1"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("end", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("if", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("jdir", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("idir", italic = "true", mathvariant = "italic"), Typesetting:-mo("+", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2222222em", rspace = "0.2222222em"), Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("pdir", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("jdir", italic = "true", mathvariant = "italic")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("gam", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mfrac(Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mi("sqrt", italic = "false", mathvariant = "normal"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("1", mathvariant = "normal"), Typesetting:-mo("&minus;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2222222em", rspace = "0.2222222em"), Typesetting:-msup(Typesetting:-mi("β", italic = "false", mathvariant = "normal"), Typesetting:-mrow(Typesetting:-mn("2", mathvariant = "normal")), superscriptshift = "0")), mathvariant = "normal")), linethickness = "1", denomalign = "center", numalign = "center", bevelled = "false"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("Ep", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("gam", italic = "true", mathvariant = "italic"), Typesetting:-mo("&sdot;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("P4", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("1", mathvariant = "normal")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo("+", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2222222em", rspace = "0.2222222em"), Typesetting:-mi("sign", italic = "true", mathvariant = "italic"), Typesetting:-mo("&sdot;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("beta", italic = "false", mathvariant = "normal"), Typesetting:-mo("&sdot;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("pdir", italic = "true", mathvariant = "italic")), mathvariant = "normal"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("#", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("print", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi(""), Typesetting:-ms("Ep:"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("Ep", italic = "true", mathvariant = "italic")), mathvariant = "normal"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "auto"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("pdirp", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("gam", italic = "true", mathvariant = "italic"), Typesetting:-mo("&sdot;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("pdir", italic = "true", mathvariant = "italic"), Typesetting:-mo("+", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2222222em", rspace = "0.2222222em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("1", mathvariant = "normal")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo("&sdot;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("sign", italic = "true", mathvariant = "italic"), Typesetting:-mo("&sdot;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("beta", italic = "false", mathvariant = "normal")), mathvariant = "normal"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("result", italic = "true", mathvariant = "italic"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("Vector", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("Ep", italic = "true", mathvariant = "italic"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("2", mathvariant = "normal")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("3", mathvariant = "normal")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo(",", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.3333333em"), Typesetting:-mi("P4", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn("4", mathvariant = "normal")), mathvariant = "normal", open = "[", close = "]")), mathvariant = "normal", open = "[", close = "]")), mathvariant = "normal"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("result", italic = "true", mathvariant = "italic"), Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mi("jdir", italic = "true", mathvariant = "italic")), mathvariant = "normal", open = "[", close = "]"), Typesetting:-mo("&coloneq;", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mi("pdirp", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("return", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mi("result", italic = "true", mathvariant = "italic"), Typesetting:-mo(";", mathvariant = "normal", fence = "false", separator = "true", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("end", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(" ", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo("proc", bold = "true", mathvariant = "bold", fontweight = "bold", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.0em", rspace = "0.0em"), Typesetting:-mo(":", mathvariant = "normal", fence = "false", separator = "false", stretchy = "false", symmetric = "false", largeop = "false", movablelimits = "false", accent = "false", lspace = "0.2777778em", rspace = "0.2777778em"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "newline"), Typesetting:-mspace(height = "0.0ex", width = "0.0em", depth = "0.0ex", linebreak = "auto"), Typesetting:-mi(""))

rotated := proc (alpha, beta, gamma, v3::Vector) end proc

proc (alpha, beta, gamma, v3::Vector) end proc

(10)

boostTo := proc (p4::Vector, p4To::Vector, sign::float := 1.0) local p3, eNergy, pTrans, pz, zHat, yHat, xHat, betaTo, cTheta, sTheta, rcs, xz, gammaTo, eP, pzP, p3P, mp4, mag, result; `#print`("boostTo starts"); mp4 := Mass(p4); betaTo := momentum(p4To)/p4To[1]; gammaTo := 1/sqrt(1.0-betaTo^2); `##print`("betaTo,gammaTo:", betaTo, "\n", gammaTo); zHat := nHat(p4To); `#print`("zHat:", zHat); p3 := P3(p4); `#print`("p3:", p3); eNergy := p4[1]; pz := zHat.p3; pTrans := p3-pz*zHat; `#print`("pTrans:", pTrans); pzP := gammaTo*(pz-sign*betaTo*eNergy); `#print`("eP:", eP, " pzP:", pzP); `#print`("pTrans:", pTrans); `#print`("pzP*zHat:", pzP*zHat); p3P := pzP*zHat+pTrans; `#print`("p3P:", p3P); mag := Norm(p3P, Euclidean); eP := sqrt(mp4^2+mag^2); result := Vector([eP, p3P]); `#print`("boostTo stops"); return result end proc

flip := proc (p4::Vector) local p3, result; p3 := P3(p4); result := Vector([p4[1], -p3]); return result end proc

defHist := proc (n, low, high, name::string) local h, info, result; h := Sample(0, n); info := Sample(0, 5); info[1] := low; info[2] := high; result := [h, info, name]; return result end proc

 

fillHist := proc (aHist, x::float) local nhist, dx, bin, h, info, low, high; h := aHist[1]; info := aHist[2]; nhist := Size(h, 2); low := info[1]; high := info[2]; dx := (high-low)/nhist; bin := trunc((x-low)/dx)+1; if bin < nhist+1 and 0 < nhist then h[bin] := h[bin]+1; info[3] := info[3]+x; info[4] := info[4]+x^2; info[5] := info[5]+1 end if; return nhist end proc

plotHist := proc (aHist) local h, info, low, high, mean, rms, std, nentry, name, xcenter, xBinCenters, nhist, dx, ibin, thePlot; h := aHist[1]; info := aHist[2]; low := info[1]; high := info[2]; name := aHist[3]; mean := info[3]/info[5]; rms := info[4]/info[5]; nentry := info[5]; std := rms-mean^2; print(" mean:", mean, " std:", std, "name:", name); name := cat(name, "\n entries:", nentry, "\n mean:", mean, "\n std:", std); nhist := Size(h, 2); xBinCenters := Sample(0, 0); dx := (high-low)/nhist; for ibin to nhist do xcenter := low+(1/2)*dx+(ibin-1)*dx; Append(xBinCenters, xcenter); thePlot := plot(xBinCenters, h, style = point, axes = boxed, symbol = solidcircle, symbolsize = 10, title = name) end do; return thePlot end proc

compareMem := proc (lista, listb) local nLena, nLenb, index, named; nLena := Dimensions(lista)[1]; nLenb := Dimensions(listb)[1]; if nLenb <> nLena then return 0 end if; for index to nLena do if index = 15 then next end if; if index = 50 then next end if; if index = 52 then next end if; if index = 62 then next end if; named := lista[index, 1]; `#print`("i:", index, " ", named) end do; return 1 end proc

 

Parse:-ConvertTo1D, "first argument to _Inert_ASSIGN must be assignable"

NULL

MemUse := proc () return 1.0 end proc

NULL

Digits := 20

20

(11)

 

``

NULL

Assume(M4S, real, mB, real, eB, real, real, MDStar, real, MDl, real)

{M4S::real}, {MDStar::real}, {MDl::real}, {eB::real}, {mB::real}

(12)

Restart here to gen new event

M4S := 10579.4; mB := 5279.34; MDStar := 2010.27; MD := 1864.84; MDl := MDStar+1.0

10579.4

 

5279.34

 

2010.27

 

1864.84

 

2011.27

(13)

MB := mB; MLep := .510998950

5279.34

 

.510998950

(14)

 

``

count := 0; fa := 1.0; `#memSum` := 0.; nDo := 1

0

 

1.0

 

0.

 

1

(15)

for i to nDo do `#memBefProb` := MemUse(); Prob := ProbDStarLNu(1.0, 1.0, 1.0, .2*fa, .4*fa, 1.01*fa); count := count+1; fa := 1.0001*fa; `#memAftProb` := MemUse(); `#memProb` := memAftProb-memBefProb; `#memSum` := memSum+memProb end do

NULL

NULL

 

``

NULL

 

 

``

 

NULL

``

NULL

``

NULL

NULL

NULL

NULL

NULL

 

 

NULL

NULL

``

NULL

``

``

NULL

NULL

picks := PickAngles(1.0, 1.0, 1.0)

[1.0244455525261483956, 1.2048619278945573528, 2.1140893897662963370]

(16)

NULL

NULL

NULL

NULL

NULL

NULL

BDecay := bDecay(1.0, 1.0, 1.0, 1.2)

p4DBCM := BDecay[1]; p4PiBCM := BDecay[2]; p4LepBCM := BDecay[3]; p4NuBCM := BDecay[4]

Vector(4, {(1) = 2161.4540183799612632, (2) = 244.93657976024539873, (3) = 478.46812092888873589, (4) = 951.48808564322715396})

 

Vector(4, {(1) = 250.86998162003873729, (2) = 95.779097099681417500, (3) = 158.14695992125048399, (4) = 169.56306147364397496})

 

Vector(4, {(1) = 1891.3133351496805806, (2) = -989.98766795689809863, (3) = -1332.5398224582864055, (4) = -906.27143254721546083})

 

Vector(4, {(1) = 975.70266485031941945, (2) = 649.27199109697128247, (3) = 695.92474160814718574, (4) = -214.77971456965566785})

(17)

BDecay := bDecay(1.0, 1.0, 1.0, 1.2)

nTemp := nHat(p4DBCM)

Vector(3, {(1) = .22413262108928306467, (2) = .43782890312434092641, (3) = .87067239519384347632})

(18)

arccos(nTemp[3])

.51422861933828528430

(19)

genAngles

[1.8649200867494644263, 1.9436739709801282119, 2.2807748005588111424]

(20)

cos(genAngles[3])

-.65181744619373415684

(21)

``

recoAngles := recoAngles(MB, p4DBCM, p4PiBCM, p4LepBCM)

[.81393704306307093521, 2.6661682467656728526, 6.1691365542167692093, .11380167277537668519]

(22)

recoAngles

[.81393704306307093521, 2.6661682467656728526, 6.1691365542167692093, .11380167277537668519]

(23)

``

genAngles[3]/Pi

.72599316717673304325

(24)

recoAngles[3]/Pi

1.9636971544250023764

(25)

recoAngles[3]/Pi

1.9636971544250023764

(26)

``

cChi := cos(recoAngles[3])

NULL

zDXL := recoAngles[4]

.11380167277537668519

(27)

``

NULL

``

(recoAngles[3]+genAngles[3])/Pi; (recoAngles[3]-genAngles[3])/Pi

2.6896903216017354196

 

1.2377039872482693331

(28)

(recoAngles[2]+genAngles[2])/Pi; (recoAngles[2]-genAngles[2])/Pi

1.4673583516558991107

 

.22997707069373698316

(29)

(recoAngles[1]+genAngles[1])/Pi; (recoAngles[1]-genAngles[1])/Pi

.85270670809326428312

 

-.33453829301690981127

(30)

NULL

p4DBCM := BDecay[1]

Vector(4, {(1) = 2210.2489853584658006, (2) = -582.98360907141692211, (3) = 933.83871487847686035, (4) = 442.32083132756442472})

(31)

p4PiBCM := BDecay[2]

Vector(4, {(1) = 202.07501464153419981, (2) = -152.21139748029832032, (3) = 113.93423781061827915, (4) = -68.446855193093973541})

(32)

p4LepBCM := BDecay[3]

Vector(4, {(1) = 1240.2218105923179287, (2) = 336.03729168026476119, (3) = 325.95749810552585223, (4) = -1148.4687746638735673})

(33)

p4NuBCM := BDecay[4]

Vector(4, {(1) = 1626.7941894076820712, (2) = 399.15771487145048112, (3) = -1373.7304507946209916, (4) = 774.59479852940311618})

(34)

p4NuBCM+p4LepBCM+p4PiBCM+p4DBCM

Vector(4, {(1) = 5279.3400000000000003, (2) = -0.1200000000e-15, (3) = 0.1000000000e-15, (4) = 0.6000000000e-16})

(35)

NULL

BDecay[5]; BDecay[6]; BDecay[7]

1.8649200867494644263

 

1.9436739709801282119

 

2.2807748005588111424

(36)

Mass(p4DBCM); Mass(p4PiBCM); Mass(p4LepBCM); Mass(p4NuBCM)

1864.8400000000000000

 

.13959999999997851003

 

.51099895000019324893

 

0.

(37)

Mass(p4NuBCM+p4LepBCM+p4PiBCM+p4DBCM); Mass(p4DBCM+p4PiBCM); Mass(p4NuBCM+p4LepBCM)

5279.3400000000000003

 

2010.2700000000000004

 

2538.0423826603053792

(38)

NULL

wmax := (MDStar^2+mB^2)/(2*MDStar*mB)

1.5034825472446868588

(39)

eB := (1/2)*M4S

5289.7000000000000000

(40)

pB := sqrt(eB^2-mB^2)

330.90067150128299490

(41)

beta := pB/eB

0.62555659394915211618e-1

(42)

p4B := Vector([eB, 0., 0., pB])

Vector(4, {(1) = 5289.7000000000000000, (2) = 0., (3) = 0., (4) = 330.90067150128299490})

(43)

p4BRest := boost(beta, 3, -1, p4B)

Vector(4, {(1) = 5279.3400000000000002, (2) = 0., (3) = 0., (4) = 0.})

(44)

``

p4BRest := boostTo(p4B, p4B)

Vector(4, {(1) = 5279.3400000000000000, (2) = 0., (3) = 0., (4) = 0.})

(45)

NULL

p4B2 := Vector([eB, 0., 0., -pB])

Vector(4, {(1) = 5289.7000000000000000, (2) = 0., (3) = 0., (4) = -330.90067150128299490})

(46)

nHatB := nHat(p4B)

Vector(3, {(1) = 0., (2) = 0., (3) = .99999999999999999999})

(47)

nHatB2 := nHat(p4B2)

Vector(3, {(1) = 0., (2) = 0., (3) = -.99999999999999999999})

(48)

nHatB1; nHatB2

nHatB1

 

Vector(3, {(1) = 0., (2) = 0., (3) = -.99999999999999999999})

(49)

ZBB2 := nHatB.nHatB2

-.99999999999999999998

(50)

boost(beta, 3, 1, p4B2)

Vector(4, {(1) = 5279.3400000000000002, (2) = 0., (3) = 0., (4) = 0.})

(51)

``

nExp := 1000; i := 0

1000

 

0

(52)

z12List := Sample(0, nExp)

z12List := Vector(4, {(1) = ` 1 .. 1000 `*Vector[row], (2) = `Data Type: `*sfloat, (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})

(53)

zTS1Or2List := Sample(0, nExp)

zTS1Or2List := Vector(4, {(1) = ` 1 .. 1000 `*Vector[row], (2) = `Data Type: `*sfloat, (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})

(54)

zTS1List := Sample(0, nExp)

zTS2List := Sample(0, nExp)

dzList := Sample(0, nExp)

i := 0; n1Match := 0; n2Match := 0

0

 

0

 

0

(55)

fPi := evalf(Pi)

3.1415926535897932385

(56)

NULL

NULL

 

NULL

`#memLoopBef` := MemUse()

14966056

(57)

`#memB1DecaySum` := 0

0

(58)

`#memB2DecaySum` := 0

0

(59)

`#memPostBDecaysSum` := 0

0

(60)

`#memToSolveFromBSum` := 0

0

(61)

`#memSolveSum` := 0

0

(62)

memEndLoop := 0

0

(63)

NULL

p4B

Vector(4, {(1) = 5289.7000000000000000, (2) = 0., (3) = 0., (4) = 330.90067150128299490})

(64)

p4B2

Vector(4, {(1) = 5289.7000000000000000, (2) = 0., (3) = 0., (4) = -330.90067150128299490})

(65)

NULL

i := 0

0

(66)

"do        i:=i+1;    print(" doa loop i:",i ) ;  #`BDecay 1` #`v1BCM := TwoBodyDecay`(mB, MDl);  memStartLoop:=MemUse();  dMemStartLoop:=memStartLoop-memEndLoop;   `#memB1DecayBef`:=MemUse();  B1Decay:=bDecay(1.0,1.0,1.0,1.2);   `#memB1DecayAft`:=MemUse();  #`dmemB1Decay:=memB1DecayAft-memB1DecayBef;`  `#memB1DecaySum`:=memB1DecaySum+dmemB1Decay;    `#print`("B1Decay:", memB1DecayAft,memB1DecayBef,dmemB1Decay,memB1DecaySum);    #`mB1Time:=`();  #`dB1Time:=mB1Time-mStartLoop;`    `#print`("B decay 1 done");    p4DB1CM := B1Decay[1];  p4PiB1CM := B1Decay[2];  p4LepB1CM := B1Decay[3];  p4NuB1CM:=B1Decay[4];      p4Test1:=p4DB1CM+p4PiB1CM+p4LepB1CM+p4NuB1CM;  MTest1:=Mass(p4Test1);  MNu1:=Mass(p4NuB1CM);     `#print`("MTest1:",MTest1," MNu:",MNu1);   `#print`("p4Test1:",p4Test1);   `#print`("p4NuB1CM:",p4NuB1CM);    p4DStarB1CM:=p4DB1CM+p4PiB1CM;   v1BCM:=p4DStarB1CM+p4LepB1CM;     `#print`("p4DB1CM:",p4DB1CM);  `#print`("p4PiB1CM:",p4PiB1CM);  `#print`("p4LepB1CM:",p4LepB1CM);    `#print`("p4DStarB1CM:",p4DStarB1CM);  `#print`("v1BCM:",v1BCM);     `#print`("starting B decay 2");    #`BDecay 2`   `#memB2DecayBef`:=MemUse();  B2Decay:=bDecay(1.0,1.0,1.0,1.2);  `#memB2DecayAft`:=MemUse();   #`dMemB2Decay:=memB2DecayAft-memB2DecayBef;`   `#memB2DecaySum`:=memB2DecaySum+dMemB2Decay;   `#print`("BDecay2:",memB2DecayAft,memB2DecayBef,dMemB2Decay,memB2DecaySum);  #`mB2Fin:=`(0);    dB2Time:=mB2Fin-mB2Start;  `#print`("B decay 2 done");    p4DB2CM := B2Decay[1];  p4PiB2CM := B2Decay[2];  p4LepB2CM := B2Decay[3];  p4NuB2CM:=B2Decay[4];      p4DStarB2CM:=p4DB2CM+p4PiB2CM;  p4DStarLepB2CM:=p4DStarB2CM+p4LepB2CM;      `#print`("p4DB2CM:",p4DB2CM);  `#print`("p4PiB2CM:",p4PiB2CM);  `#print`("p4LepB2CM:",p4LepB2CM);    `#print`("p4DStarLepB2CM:",p4DStarLepB2CM);     p4Test2:=p4DB2CM+p4PiB2CM+p4LepB2CM+p4NuB2CM;  MTest2:=Mass(p4Test2);  MNu2:=Mass(p4NuB2CM);      `#print`("MTest2:",MTest2," ,MNu2:",MNu2);  `#print`("p4Test2:",p4Test2);  `#print`("p4NuB2CM:",p4NuB2CM);         #`boost to the B-Bvar frame`  p4NuB2Lab:=boostTo(p4NuB2CM,p4B,+1.0);    #`v1:=boost`(beta,3,+1.0,v1BCM);   v1:=boostTo(v1BCM,p4B,-1.0);   p4Nu1:=p4B-v1;   mNu1:=Mass(p4Nu1);   v1Flip:=flip(v1);   sumV1:=v1+v1Flip;   p4Nu1P:=p4B-v1Flip;   `#print`("p4Nu1P=",p4Nu1P);   mNu1P:=Mass(p4Nu1P);     `#print`("mNu1=",mNu1," MNu1=",MNu1," mNu1P=",mNu1P);  `#print`(" sumV1=",sumV1);     `#print`("v1=",v1);  v1hat := nHat(v1);     #`v2 := boost`(beta, 3,-1.0, p4DStarLepB2CM);   v2:=boostTo(p4DStarLepB2CM,p4B,+1.0); #`+or-?`     v2P:=boostTo(p4DStarLepB2CM,p4B2,-1.0);      `#print`("p4B=",p4B);    `#print`("p4B2=",p4B2);    `#print`("v2=",v2);   `#print`("v2P=",v2P);   `#print`("v2P-v2=",v2P-v2);      #`p4B2Boosted:=boostTo`(p4B2,p4B2,-1.0);     `#print`("p4B2=",p4B2);     `#print`("p4B2Boosted=",p4B2Boosted):    #print("v2=",v2);  v2hat := nHat(v2);  z12 := v1hat . v2hat;  p4Nu2:=p4B2-v2;  mNu2:=Mass(p4Nu2);   v2Flip:=flip(v2);   sumV2:=v2+v2Flip; p4Nu2P:=p4B2-v2Flip; mNu2P:=Mass(p4Nu2P);    `#print`(" p4Nu2=",p4Nu2);   `#print`("sumV2=",sumV2);  `#print`("mNu2=",mNu2," MNu2=",MNu2, " mNu2P=",mNu2P);      `#print`("Angles done");     `#print`("v1Hat:",v1hat);   `#print`("v2Hat:",v2hat);   `#print`("z12:",z12);    #z12List[i]:=z12;     `#doa print`("z12 stored");   mV1:=Mass(v1);   pV1:=Norm(P3(v1),Euclidean);   eV1:=v1[1];    `#doa print`("eB:",eB," mB:",mB," pB:",pB, " mV1:",mV1,"eV1:",eV1," pV1",pV1);  `#doa print`("v1:",v1);    #`comput e the angles from contraints`  zV1B1 := zThetaC(eB, mB, v1);  theta1 := arccos(zV1B1);  zV2B2 := zThetaC(eB, mB, v2);  theta2 := arccos(zV2B2);    `#print`("eB=",eB," mB=",mB,"zV2B2=",zV2B2, "theta2=",theta2);  `#print`("v2=",v2);    theta12 := arccos(z12);    `#doa print`("eB,mB,Ev1:",eB,mB);  `#print`("theta1:",theta1," zV1B1",zV1B1);  `#doa print`("eB,mB:",eB,mB);  `#print`("theta2:",theta2,"  zV2B2:",zV2B2);  `#print`("theta12:",theta12," z12:",z12);    z1hat := v1hat;  y1hat := CrossProduct(v1hat, v2hat);    y1hat := y1hat*(1/Norm(y1hat, Euclidean));  x1hat := CrossProduct(y1hat, z1hat);  magx1hat := Norm(x1hat, Euclidean);    `#doa print`("x1hat:",x1hat);  `#doa print`("y1hat:",y1hat);  `#doa print`("z2hat:",z2hat);      z2hat := v2hat;  y2hat := y1hat;  x2hat := CrossProduct(y2hat, z2hat);    x2hatp := x2hat*x1hat*x1hat+x2hat * y1hat*y1hat+x2hat * z1hat*z1hat;  y2hatp := y2hat*x1hat*x1hat+y2hat * y1hat*y1hat+y2hat * z1hat*z1hat;  z2hatp := z2hat*x1hat*x1hat+z2hat * y1hat*y1hat+z2hat * z1hat*z1hat;      nb1x := sin(theta1)*cos(phi1)*x1hat;  nb1y := sin(theta1)*sin(phi1)*y1hat;  nb1z := cos(theta1)*z1hat;  nb1 := nb1x+nb1y+nb1z;    `#print`("x2hatp=",x2hatp);          `#print`("y2hatp=",y2hatp);  `#print`("z2hatP=",z2hatp);    #herebad  `#print`("sin(theta2)=",sin(theta2));  `#print` ("cos(theta2)=",cos(theta2));  `#print`("theta2=",theta2);    nb2x := sin(theta2)*cos(phi2)*x2hatp;  nb2y := sin(theta2)*sin(phi2)*y2hatp;  nb2z := cos(theta2)*z2hatp;  nb2 := nb2x+nb2y+nb2z;   `#print`(" nb2x=",nb2x," nb2y=",nb2y," nb2z=",nb2z);   #`nb1p := evalf`(subs(theta1 = theta1U, nb1));    #`nb2p := evalf`(subs(theta12 = theta12U, theta2 = theta2U, nb2));    test := nb2*nb1;     #`doa print`("nb1:",nb1);  #`doa print`("nb2:",nb2);  #`doa print`("test computed:",test);     `#memSolveBef`:=MemUse();  #`dMemToSolveFromB:=memSolveBef-memB2DecayAft;`   `#memToSolveFromBSum`:=memToSolveFromBSum+dMemToSolveFromB;     `#print`("solve: dMemToSolveFromB=",dMemToSolveFromB," memToSolveFromBSum=",memToSolveFromBSum);   qDoSolve:=false;  #` if qDoSolve then`  S2 := NLPSolve(test, phi1 = 0 .. 2*Pi, phi2 = 1.0*Pi .. 2*Pi);  `#doa print`("S2:",S2);    S1 := NLPSolve(test, phi1 = 0 .. 2*Pi, phi2 = 0.*Pi .. 1.0*Pi);  `#memSolveAft`:=MemUse();  #`dMemSolve:=memSolveAft-memSolveBef;`  `#memSolveSum`:=memSolveSum+dMemSolve;   `#print`("solve: dMemSolve=", dMemSolve," memSolveSum=",memSolveSum);  `#doa print`("S1:",S1);   `#doa print`("Solutions found");      phi1S1 := eval(phi1, S1[2]);  phi2S1 := eval(phi2, S1[2]);  phi1S2 := eval(phi1, S2[2]);  phi2S2 := eval(phi2, S2[2]);  nb1S1 := evalf(subs(phi1 = phi1S1, phi2 = phi2S1, nb1));  nb2S1 := evalf(subs(phi1 = phi1S1, phi2 = phi2S1, nb2));  nb1S2 := evalf(subs(phi1 = phi1S2, phi2 = phi2S, nb1));  nb2S2 := evalf(subs(phi1 = phi1S2, phi2 = phi2S2, nb2));   zTS1 := nHatB*nb1S1;  zTS2 := nHatB*nb1S2;    `#print`("doa loop  zZTS1,zTS2,i:",zTS1,zTS2,i);    zTS1List[i]:=zTS1;  zTS2List[i]:=zTS2;  if zTS1<zTS2 then zTS1Or2List[i]:=zTS1 else zTS1Or2List[i]:=zTS2 end if;   deltazTS:=zTS1-zTS2;  #dzList[i]:=deltazTS;  #fillHist(hDeltaTS,deltazTS); if zTS1> 0.99 then   #`n1Match:=n1Match+1; `  end if;  if zTS2>0.99 then   #`n2Match:=n2Match+1;`   end if;    #`end if #qDoSolve`       #`doa print`("doa: dB1Time:=",dB1Time," dB2Time=",dB2Time," drecPart:=",dRecoPart);   #`doa print`("doa: mStartLoop=",mStartLoop, " dMemEndLoop=",dMemLoop," mLoop:=",mLoop, " mEndLoop-mStart=",mEndLoop-mStart);      memEndLoop:=MemUse();    dMemLoop:=memEndLoop-memStartLoop;      print("dMemLoop=",dMemLoop," memEndLoop=",memEndLoop," dMemStartLoop=",dMemStartLoop):      #`dMemPostBDecays:=memEndLoop-memB2DecayAft;`    #`memPostBDecaysSum:=memPostBDecaysSum+dMemPostBDecays;`     `#print`("memEndLoop=",memEndLoop," dMemPostBDecays=",dMemPostBDecays," memPostBDecaysSum=",memPostBDecaysSum);    until i>nExp-1: "

" doa loop i:", 1

 

"dMemLoop=", 203872, " memEndLoop=", 15298560, " dMemStartLoop=", 15094688

 

" doa loop i:", 2

 

"dMemLoop=", 41544, " memEndLoop=", 15330860, " dMemStartLoop=", -9244

 

" doa loop i:", 3

 

"dMemLoop=", 42440, " memEndLoop=", 15363892, " dMemStartLoop=", -9408

 

" doa loop i:", 4

 

"dMemLoop=", 34420, " memEndLoop=", 15388916, " dMemStartLoop=", -9396

 

" doa loop i:", 5

 

"dMemLoop=", 32160, " memEndLoop=", 15411744, " dMemStartLoop=", -9332

 

" doa loop i:", 6

 

"dMemLoop=", 30168, " memEndLoop=", 15432460, " dMemStartLoop=", -9452

 

" doa loop i:", 7

 

"dMemLoop=", 30284, " memEndLoop=", 15453432, " dMemStartLoop=", -9312

 

" doa loop i:", 8

 

"dMemLoop=", 30256, " memEndLoop=", 15474316, " dMemStartLoop=", -9372

 

" doa loop i:", 9

 

"dMemLoop=", 29980, " memEndLoop=", 15494972, " dMemStartLoop=", -9324

 

" doa loop i:", 10

 

"dMemLoop=", 29604, " memEndLoop=", 15515140, " dMemStartLoop=", -9436

 

" doa loop i:", 11

 

"dMemLoop=", 29552, " memEndLoop=", 15535352, " dMemStartLoop=", -9340

 

" doa loop i:", 12

 

"dMemLoop=", 28640, " memEndLoop=", 15554608, " dMemStartLoop=", -9384

 

" doa loop i:", 13

 

"dMemLoop=", 28156, " memEndLoop=", 15573464, " dMemStartLoop=", -9300

 

" doa loop i:", 14

 

"dMemLoop=", 29600, " memEndLoop=", 15593676, " dMemStartLoop=", -9388

 

" doa loop i:", 15

 

"dMemLoop=", 29152, " memEndLoop=", 15613444, " dMemStartLoop=", -9384

 

" doa loop i:", 16

 

"dMemLoop=", 28660, " memEndLoop=", 15632688, " dMemStartLoop=", -9416

 

" doa loop i:", 17

 

"dMemLoop=", 29016, " memEndLoop=", 15652268, " dMemStartLoop=", -9436

 

" doa loop i:", 18

 

"dMemLoop=", 30168, " memEndLoop=", 15673116, " dMemStartLoop=", -9320

 

" doa loop i:", 19

 

"dMemLoop=", 28916, " memEndLoop=", 15692616, " dMemStartLoop=", -9416

 

" doa loop i:", 20

 

"dMemLoop=", 27800, " memEndLoop=", 15711056, " dMemStartLoop=", -9360

 

" doa loop i:", 21

 

"dMemLoop=", 29564, " memEndLoop=", 15731360, " dMemStartLoop=", -9260

 

" doa loop i:", 22

 

"dMemLoop=", 27996, " memEndLoop=", 15750060, " dMemStartLoop=", -9296

 

" doa loop i:", 23

 

"dMemLoop=", 28624, " memEndLoop=", 15769312, " dMemStartLoop=", -9372

 

" doa loop i:", 24

 

"dMemLoop=", 28828, " memEndLoop=", 15788768, " dMemStartLoop=", -9372

 

" doa loop i:", 25

 

"dMemLoop=", 28540, " memEndLoop=", 15808016, " dMemStartLoop=", -9292

 

" doa loop i:", 26

 

"dMemLoop=", 28208, " memEndLoop=", 15826852, " dMemStartLoop=", -9372

 

" doa loop i:", 27

 

"dMemLoop=", 30684, " memEndLoop=", 15848208, " dMemStartLoop=", -9328

 

" doa loop i:", 28

 

"dMemLoop=", 29672, " memEndLoop=", 15868572, " dMemStartLoop=", -9308

 

" doa loop i:", 29

 

"dMemLoop=", 27628, " memEndLoop=", 15886852, " dMemStartLoop=", -9348

 

" doa loop i:", 30

(67)

NULL

HandCalcZ

v2

p4Nu2

Mass(p4Nu2)

p4Nu2P

NULL

p4NuB2Lab

Mass(p4NuB2CM)

Mass(p4NuB2Lab)

p4DStarLepB2CM

p4BRest

p4TestNu2 := p4BRest-p4DB2CM-p4LepB2CM-p4PiB2CM

p4Nu2

p4Test2

p4NuB2CM

B2Decay[4]

eB, mB

pB := sqrt(eB^2-mB^2)

v2

M2 := Mass(v2)

E2 := v2[1]

P2 := Norm(P3(v2), Euclidean)

zThetaC(eB, mB, v2)

Numerator := -2*E2*eB+M2^2+mB^2

Denom := 2*pB*P2

Numerator/Denom

``

``

print("mPostLoop=", mPostLoop, " mPostLoop-mStart=", mPostLoop-mStart)

``

NULL

``

NULL

n1Match; n2Match; n2Match-n1Match

zTS2List

i := 0

help("write")

sid := open("myfile.txt", WRITE)

Write(sid, output)

output := zTS1Or2List

NULL

``

help("write")

H12 := Histogram(zTS1Or2List, range = -1.0 .. 1.0, title = "z1 or z2", frequencyscale = absolute)

H12BlowUp := Histogram(zTS1Or2List, range = .70 .. 1.0, title = "z1 or z2 (magnified)", frequencyscale = absolute)

NULL

H1 := Histogram(zTS1List, range = -1.0 .. 1.0, title = "zTS1", frequencyscale = absolute)

H2 := Histogram(zTS2List, range = -1.0 .. 1.0, title = "zTS2", frequencyscale = absolute)

Threads[Sleep](10)

NULL

ScatterPlot(dzList, zTS1List, view = [-0.1e-13 .. 0.1e-13, .4 .. .99])

ScatterPlot(zTS1List, zTS2List)

bins := [1, 2, 3, 4, 5]

dataplot(bins, bar)

hTest := Sample(0, 10)

A := Array([])

dohist(hTest, 0., 2.0, .1, A)

NULL

 

 

v1 := boost(beta, 3, 1, v1BCM)

v1hat := nHat(v1)

v2BbarCM := TwoBodyDecay(mB, MDl)

v2 := boost(beta, 3, -1, v2BbarCM)

v2hat := nHat(v2)

v1; v2

Mass(v1)

 

Mass(v2)

v2BbarCM

v2

v1

zHatBTrue := v1hat.nHatB

nHatB

nHatBbar := -nHatB

``

zHatB := zThetaC(eB, mB, v1)

theta1 := arccos(zHatB)

zHatB

theta1

zHatBbarTrue := v2hat.nHatBbar

zBBbar := nHatB.nHatBbar

zHatBbar := zThetaC(eB, mB, v2)

theta2 := arccos(zHatBbar)

contraint works!

zHatBbar

theta12 := arccos(z12)

z1hat := v1hat

y1hat := CrossProduct(v1hat, v2hat)

``

y1hat := y1hat/Norm(y1hat, Euclidean)

Norm(y1hat, Euclidean)

x1hat := CrossProduct(y1hat, z1hat)

magx1hat := Norm(x1hat, Euclidean)

``

z2hat := v2hat

y2hat := y1hat

x2hat := CrossProduct(y2hat, z2hat)

Norm(x2hat, Euclidean)

transformation!

x2hatp := (x2hat.x1hat)*x1hat+(x2hat.y1hat)*y1hat+(x2hat.z1hat)*z1hat

y2hatp := (y2hat.x1hat)*x1hat+(y2hat.y1hat)*y1hat+(y2hat.z1hat)*z1hat

z2hatp := (z2hat.x1hat)*x1hat+(z2hat.y1hat)*y1hat+(z2hat.z1hat)*z1hat

Norm(x1hat, Euclidean)

 

``

nb1x := sin(theta1)*cos(phi1)*x1hat

nb1y := sin(theta1)*sin(phi1)*y1hat

nb1z := cos(theta1)*z1hat

nb1 := nb1x+nb1y+nb1z

nb2x := sin(theta2)*cos(phi2)*x2hatp

nb2y := sin(theta2)*sin(phi2)*y2hatp

nb2z := cos(theta2)*z2hatp

nb2 := nb2x+nb2y+nb2z

Here need to compute theta1U and theta2U from the kinematics...

nb1p := evalf(subs(theta1 = theta1U, nb1))

``

nb2p := evalf(subs(theta12 = theta12U, theta2 = theta2U, nb2))

 

test := nb2.nb1

NULL

``

``

NULL

plot1 := plot3d(evalf(test), phi1 = 0 .. 2*Pi, phi2 = 0 .. 2*Pi)

``

S2 := NLPSolve(test, phi1 = 0 .. 2*Pi, phi2 = 1.0*Pi .. 2*Pi)

``

S1 := NLPSolve(test, phi1 = 0 .. 2*Pi, phi2 = 0.*Pi .. 1.0*Pi)

``

``

phi1S1 := eval(phi1, S1[2])

phi2S1 := eval(phi2, S1[2])

phi1S2 := eval(phi1, S2[2])

phi2S2 := eval(phi2, S2[2])

nb1S1 := evalf(subs(phi1 = phi1S1, phi2 = phi2S1, nb1))

nb2S1 := evalf(subs(phi1 = phi1S1, phi2 = phi2S1, nb2))

nb1S2 := evalf(subs(phi1 = phi1S2, phi2 = phi2S, nb1))

nb2S2 := evalf(subs(phi1 = phi1S2, phi2 = phi2S2, nb2))

So solution 1 is far from the orignal input, but solution 2 virtually perfect

zTS1 := nHatB.nb1S1

zTS2 := nHatB.nb1S2

here I have B-reco BTrue comparison

 

 

``

S1[2, 1]/Pi

S1[2, 2]/Pi

S2[2, 1]/Pi

S2[2, 2]/Pi

``

``

nb1p

nb1pphi := subs(phi1 = .6*Pi, nb1p)

nb2pphi := subs(phi2 = .2*Pi, nb2p)

NULL

``

NULL

``

``

NULL

NULL

``

nPhi := 40

v2hatp := 1.2*subs(theta12 = theta12U, v2hat)

VList := [1.2*v1hat, v2hatp]

``

PlotVector(VList)

numelems(VList)

nPhi

for i from 0 to nPhi-1 do phiU := 2.0*i*Pi/nPhi; VList := [VList[], i+3]; nb1pphi := subs(phi1 = phiU, nb1p); VList[i+3] := nb1pphi end do

VList[3]

PlotVector(VList)

nVList := numelems(VList)

nVList

for i from 0 to nPhi-1 do phiU := 2.0*i*Pi/nPhi; VList := [VList[], i+1+nVlist]; nb2pphi := evalf(subs(phi2 = phiU, nb2p)); VList[i+1+nVList] := nb2pphi end do

``

numelems(VList)

VList[1]

PlotVector(VList)

plot1

``

theta12/Pi; theta1/Pi; theta2/Pi

S1[1]; S1[2, 1]/Pi; S1[2, 2]/Pi; S2[1]; S2[2, 1]/Pi; S2[2, 2]/Pi

``

 Hp :=1.0;   Hm:=1.0; H0:=1.0;        

temp := ProbDStarLNu(Hp, Hm, H0, thetal, thetav, 3.5*((1/2)*Pi))

plot3 := plot3d(temp, thetal = 0 .. Pi, thetav = 0 .. Pi)

 

NULL

``

``

nMax := 100

Al := Sample(0, nMax)

AV := Sample(0, nMax)

AChi := Sample(0, nMax)

n := 0

"do   n:=n+1;   #`#doa print`(n);   angles:=PickAngles(Hp,Hm,H0);   thetal:=angles[1];   thetav:=angles[2];   chi:=angles[3];    cL:=cos(thetal);    Al[n]:=cL;   AV[n]:=cos(thetav);   AChi[n]:=chi;   #hist(Al,-1.0,1.0,cL);  #print("n:",n,"cL:",cL);  until n > nMax-1:   "

Histogram(Al, range = -1.1 .. 1.1, title = "H+=H-, cos(thetaL)", frequencyscale = absolute)

Histogram(AV, range = -1.1 .. 1.1, title = "H+=H- cos(thetaV)", frequencyscale = absolute)

Histogram(AChi, range = 0. .. 1.0*Pi, title = "H+=H-, Chi", frequencyscale = absolute)

``

``

``


 

Download DStar3DKinRecoLoopDebug.mw

 

it. Maybe I'll get a chance to do it when I exit Maple...DStar3DKinRecoLoopDebug.mw

@Carl Love

In my event loop occasionally only very large additions to memory. Typically, a single pass through the loop adds about 30KB according to 'MemUse()'. Event 46 the snapshot below is different.

dMemLoop is memory added in one iteration of the event loop. dMemStartLoop is memory change at the start of iteration (from the end of the previous one). It typically gives back some memory.

Another odd thing si that while 'MemUse()' indicates 20MB being used Task Manger indicates 1000s of MB. Could this be a Windows/Java problem rather than a Maple problem? 

Another>MB single iteration bump occurs a few events before the crash. The crash might be caused by such a bump, perhaps a bigger one that doesn't get printed could have caused the crash.