47 EvtGenReport(EVTGEN_ERROR,
"EvtGen")
48 <<
"EvtVSSBMix generator expected "
49 <<
" at least 1 argument (deltam) but found:" << getNArg() << endl;
50 EvtGenReport(EVTGEN_ERROR,
"EvtGen")
51 <<
"Will terminate execution!" << endl;
58 if (getNDaug() == 4) {
59 if (getDaug(0) != getDaug(2) || getDaug(1) != getDaug(3)) {
60 EvtGenReport(EVTGEN_ERROR,
"EvtGen")
61 <<
"EvtVSSBMixSD generator allows "
62 <<
" 4 daughters only if 1=3 and 2=4"
63 <<
" (but 3 and 4 are aliased " << endl;
64 EvtGenReport(EVTGEN_ERROR,
"EvtGen")
65 <<
"Will terminate execution!" << endl;
72 checkSpinParent(EvtSpinType::VECTOR);
74 checkSpinDaughter(0, EvtSpinType::SCALAR);
75 checkSpinDaughter(1, EvtSpinType::SCALAR);
78 if (!(EvtPDL::chargeConj(getDaug(0)) == getDaug(1))) {
79 EvtGenReport(EVTGEN_ERROR,
"EvtGen")
80 <<
"EvtVSSBMixSD generator expected daughters "
81 <<
"to be charge conjugate." << endl
82 <<
" Found " << EvtPDL::name(getDaug(0)).c_str() <<
" and "
83 << EvtPDL::name(getDaug(1)).c_str() << endl;
84 EvtGenReport(EVTGEN_ERROR,
"EvtGen")
85 <<
"Will terminate execution!" << endl;
89 if (EvtPDL::getctau(getDaug(0)) != EvtPDL::getctau(getDaug(1))) {
90 EvtGenReport(EVTGEN_ERROR,
"EvtGen")
91 <<
"EvtVSSBMixSD generator expected daughters "
92 <<
"to have the same lifetime." << endl
93 <<
" Found ctau = " << EvtPDL::getctau(getDaug(0))
94 <<
" mm and " << EvtPDL::getctau(getDaug(1)) <<
" mm" << endl;
95 EvtGenReport(EVTGEN_ERROR,
"EvtGen")
96 <<
"Will terminate execution!" << endl;
103 _freq = getArg(0) / EvtConst::c;
111 double tau = 1e12 * EvtPDL::getctau(getDaug(0)) / EvtConst::c;
112 double dm = 1e-12 * getArg(0);
116 EvtGenReport(EVTGEN_INFO,
"EvtGen")
117 <<
"VSS_BMix_SD will generate mixing with Spontanous Disentanglement:"
120 <<
" " << EvtPDL::name(getParentId()).c_str() <<
" --> "
121 << EvtPDL::name(getDaug(0)).c_str() <<
" + "
122 << EvtPDL::name(getDaug(1)).c_str() << endl
124 <<
"using parameters:" << endl
126 <<
" delta(m) = " << dm <<
" hbar/ps" << endl
127 <<
" _freq = " <<
_freq <<
" hbar/mm" << endl
128 <<
" probSD = " <<
_sdprob << endl
129 <<
" tau = " << tau <<
" ps" << endl
130 <<
" x = " << x << endl
143 static EvtId B0 = EvtPDL::getId(
"B0");
144 static EvtId B0B = EvtPDL::getId(
"anti-B0");
148 double rndm = EvtRandom::random();
150 if (getNDaug() == 4) {
154 tempDaug[0] = getDaug(0);
155 tempDaug[1] = getDaug(3);
157 tempDaug[0] = getDaug(2);
158 tempDaug[1] = getDaug(1);
161 p->initializePhaseSpace(2, tempDaug);
163 p->initializePhaseSpace(2, getDaugs());
166 EvtParticle* s1, *s2;
172 if (s1->getNDaug() > 0) {
173 s1->deleteDaughters();
175 if (s2->getNDaug() > 0) {
176 s2->deleteDaughters();
179 EvtVector4R p1 = s1->getP4();
180 EvtVector4R p2 = s2->getP4();
183 rndm = EvtRandom::random();
184 int mixed = (rndm < 0.5) ? 1 : 0;
189 EvtId mixedId = (rndm < 0.25) ? getDaug(0) : getDaug(1);
190 EvtId mixedId2 = mixedId;
191 if (getNDaug() == 4 && rndm < 0.25)
192 mixedId2 = getDaug(2);
193 if (getNDaug() == 4 && rndm > 0.25)
194 mixedId2 = getDaug(3);
195 s1->init(mixedId, p1);
196 s2->init(mixedId2, p2);
202 EvtId unmixedId = (rndm < 0.75) ? getDaug(0) : getDaug(1);
203 EvtId unmixedId2 = (rndm < 0.75) ? getDaug(1) : getDaug(0);
204 if (getNDaug() == 4 && rndm < 0.75)
205 unmixedId2 = getDaug(3);
206 if (getNDaug() == 4 && rndm > 0.75)
207 unmixedId2 = getDaug(2);
208 s1->init(unmixedId, p1);
209 s2->init(unmixedId2, p2);
221 if (EvtRandom::random() <
_sdprob) {
222 double t1 = s1->getLifetime();
223 double t2 = s2->getLifetime();
225 EvtComplex exp1(0, 0.5 *
_freq * t1);
226 EvtComplex exp2(0, 0.5 *
_freq * t2);
228 EvtId finalBsig = (EvtRandom::random() > 0.5) ? B0B : B0;
230 EvtComplex g1p = 0.5 * (exp(-exp1) + exp(exp1));
231 EvtComplex g1m = 0.5 * (exp(-exp1) - exp(exp1));
232 EvtComplex g2p = 0.5 * (exp(-exp2) + exp(exp2));
233 EvtComplex g2m = 0.5 * (exp(-exp2) - exp(exp2));
235 EvtComplex BB = g1p * g2p;
236 EvtComplex barBB = g1m * g2p;
237 EvtComplex BbarB = g1p * g2m;
238 EvtComplex barBbarB = g1m * g2m;
240 if (!mixed && finalBsig == B0) {
243 if (!mixed && finalBsig == B0B) {
246 if (mixed && finalBsig == B0) {
249 if (mixed && finalBsig == B0B) {
253 double dct = s1->getLifetime() - s2->getLifetime();
255 EvtComplex exp1(0, 0.5 *
_freq * dct);
257 EvtId stateAtDeltaTeq0 = (s2->getId() == B0) ? B0B : B0;
260 EvtComplex gp = 0.5 * (exp(-1.0 * exp1) + exp(exp1));
261 EvtComplex gm = 0.5 * (exp(-1.0 * exp1) - exp(exp1));
262 EvtComplex sqz = exp(EvtComplex(0, 0.5));
265 EvtComplex barBB = -sqz * gm;
266 EvtComplex BbarB = -sqz * gm;
267 EvtComplex barBbarB = gp;
269 if (!mixed && stateAtDeltaTeq0 == B0) {
272 if (!mixed && stateAtDeltaTeq0 == B0B) {
276 if (mixed && stateAtDeltaTeq0 == B0) {
279 if (mixed && stateAtDeltaTeq0 == B0B) {
285 double norm = 1.0 / p1.d3mag();
286 vertex(0, norm * osc_amp * p1 * (p->eps(0)));
287 vertex(1, norm * osc_amp * p1 * (p->eps(1)));
288 vertex(2, norm * osc_amp * p1 * (p->eps(2)));