48 EvtGenReport(EVTGEN_ERROR,
"EvtGen")
49 <<
"EvtVSSBMix generator expected "
50 <<
" at least 1 argument (deltam) but found:" << getNArg() << endl;
51 EvtGenReport(EVTGEN_ERROR,
"EvtGen")
52 <<
"Will terminate execution!" << endl;
59 if (getNDaug() == 4) {
60 if (getDaug(0) != getDaug(2) || getDaug(1) != getDaug(3)) {
61 EvtGenReport(EVTGEN_ERROR,
"EvtGen")
62 <<
"EvtVSSBMixNP generator allows "
63 <<
" 4 daughters only if 1=3 and 2=4"
64 <<
" (but 3 and 4 are aliased " << endl;
65 EvtGenReport(EVTGEN_ERROR,
"EvtGen")
66 <<
"Will terminate execution!" << endl;
73 checkSpinParent(EvtSpinType::VECTOR);
75 checkSpinDaughter(0, EvtSpinType::SCALAR);
76 checkSpinDaughter(1, EvtSpinType::SCALAR);
79 if (!(EvtPDL::chargeConj(getDaug(0)) == getDaug(1))) {
80 EvtGenReport(EVTGEN_ERROR,
"EvtGen")
81 <<
"EvtVSSBMixNP generator expected daughters "
82 <<
"to be charge conjugate." << endl
83 <<
" Found " << EvtPDL::name(getDaug(0)).c_str() <<
" and "
84 << EvtPDL::name(getDaug(1)).c_str() << endl;
85 EvtGenReport(EVTGEN_ERROR,
"EvtGen")
86 <<
"Will terminate execution!" << endl;
90 if (EvtPDL::getctau(getDaug(0)) != EvtPDL::getctau(getDaug(1))) {
91 EvtGenReport(EVTGEN_ERROR,
"EvtGen")
92 <<
"EvtVSSBMixNP generator expected daughters "
93 <<
"to have the same lifetime." << endl
94 <<
" Found ctau = " << EvtPDL::getctau(getDaug(0))
95 <<
" mm and " << EvtPDL::getctau(getDaug(1)) <<
" mm" << endl;
96 EvtGenReport(EVTGEN_ERROR,
"EvtGen")
97 <<
"Will terminate execution!" << endl;
104 _freq = getArg(0) / EvtConst::c;
107 double gamma = 1 / EvtPDL::getctau(getDaug(0));
109 if (getNArg() > 1)
_dGamma = getArg(1) * gamma;
113 if (getNArg() > 2)
_lambda = getArg(2) * (1 / EvtConst::c);
116 double dm = 1e-12 * getArg(0);
118 EvtGenReport(EVTGEN_INFO,
"EvtGen")
119 <<
"VSS_NP will generate mixing with possible decoherence:"
122 <<
" " << EvtPDL::name(getParentId()).c_str() <<
" --> "
123 << EvtPDL::name(getDaug(0)).c_str() <<
" + "
124 << EvtPDL::name(getDaug(1)).c_str() << endl
126 <<
"using parameters:" << endl
128 <<
" delta(m) = " << dm <<
" hbar/ps" << endl
129 <<
" dGamma = " <<
_dGamma <<
" hbar/mm" << endl
130 <<
" lambda = " <<
_lambda << endl
145 if (getNDaug() == 4) {
146 double rndm = EvtRandom::random();
149 tempDaug[0] = getDaug(0);
150 tempDaug[1] = getDaug(3);
152 tempDaug[0] = getDaug(2);
153 tempDaug[1] = getDaug(1);
155 p->initializePhaseSpace(2, tempDaug);
157 p->initializePhaseSpace(2, getDaugs());
160 EvtParticle* s1 = p->getDaug(0), *s2 = p->getDaug(1);
164 if (s1->getNDaug() > 0) s1->deleteDaughters();
165 if (s2->getNDaug() > 0) s2->deleteDaughters();
167 EvtVector4R p1 = s1->getP4();
172 double t0, t1, tl, tr, dt;
176 tl = s1->getLifetime();
177 tr = s2->getLifetime();
179 t0 = cosh(-0.5 *
_dGamma * dt);
180 }
while (EvtRandom::random() * 1.0001 > t0);
181 t1 = exp(-
_lambda * std::min(tl, tr)) * cos(
_freq * dt);
184 double fl = EvtRandom::random();
185 int flv = 2 * t0 * EvtRandom::random() < t0 - t1;
186 if (getNDaug() == 4) {
190 s1->setId(getDaug(0));
191 s2->setId(getDaug(2));
193 s1->setId(getDaug(3));
194 s2->setId(getDaug(1));
199 s1->setId(getDaug(0));
200 s2->setId(getDaug(3));
202 s1->setId(getDaug(2));
203 s2->setId(getDaug(1));
210 s1->setId(getDaug(0));
211 s2->setId(getDaug(0));
213 s1->setId(getDaug(1));
214 s2->setId(getDaug(1));
219 s1->setId(getDaug(0));
220 s2->setId(getDaug(1));
222 s1->setId(getDaug(1));
223 s2->setId(getDaug(0));
229 double norm = 1.0 / p1.d3mag();
230 vertex(0, norm * p1 * (p->eps(0)));
231 vertex(1, norm * p1 * (p->eps(1)));
232 vertex(2, norm * p1 * (p->eps(2)));