Belle II Software development
EvtVSSBMixSD Class Reference

Routine to decay vector -> scalar scalar with Spontaneous Disentanglement. More...

#include <EvtVSSBMixSD.h>

Inheritance diagram for EvtVSSBMixSD:

Public Member Functions

 EvtVSSBMixSD ()
 Constructor.
 
virtual ~EvtVSSBMixSD ()
 Destructor.
 
std::string getName () override
 The function which returns the name of the model.
 
EvtDecayBase * clone () override
 The function which makes a copy of the model.
 
void decay (EvtParticle *p) override
 The function to calculate a quark decay amplitude.
 
void init () override
 The function for an initialization.
 
void initProbMax () override
 The function to sets a maximum probability.
 
int nRealDaughters () override
 The number of real daughters.
 

Private Attributes

double _freq
 mixing frequency in hbar/mm
 
double _sdprob
 probability of the spontaneous disentanglement [0,1]
 

Detailed Description

Routine to decay vector -> scalar scalar with Spontaneous Disentanglement.

The model name is VSS_BMIX_SD.

Definition at line 18 of file EvtVSSBMixSD.h.

Constructor & Destructor Documentation

◆ EvtVSSBMixSD()

EvtVSSBMixSD ( )
inline

Constructor.

Definition at line 24 of file EvtVSSBMixSD.h.

24{}

◆ ~EvtVSSBMixSD()

~EvtVSSBMixSD ( )
virtual

Destructor.

Definition at line 28 of file EvtVSSBMixSD.cc.

28{}

Member Function Documentation

◆ clone()

EvtDecayBase * clone ( )
override

The function which makes a copy of the model.

Definition at line 35 of file EvtVSSBMixSD.cc.

36{
37 return new EvtVSSBMixSD;
38}
EvtVSSBMixSD()
Constructor.

◆ decay()

void decay ( EvtParticle * p)
override

The function to calculate a quark decay amplitude.

Definition at line 141 of file EvtVSSBMixSD.cc.

142{
143 static EvtId B0 = EvtPDL::getId("B0");
144 static EvtId B0B = EvtPDL::getId("anti-B0");
145
146 // generate a final state according to phase space
147
148 double rndm = EvtRandom::random();
149
150 if (getNDaug() == 4) {
151 EvtId tempDaug[2];
152
153 if (rndm < 0.5) {
154 tempDaug[0] = getDaug(0);
155 tempDaug[1] = getDaug(3);
156 } else {
157 tempDaug[0] = getDaug(2);
158 tempDaug[1] = getDaug(1);
159 }
160
161 p->initializePhaseSpace(2, tempDaug);
162 } else { //nominal case.
163 p->initializePhaseSpace(2, getDaugs());
164 }
165
166 EvtParticle* s1, *s2;
167
168 s1 = p->getDaug(0);
169 s2 = p->getDaug(1);
170 //delete any daughters - if there are daughters, they
171 //are from the initialization and will be redone later
172 if (s1->getNDaug() > 0) {
173 s1->deleteDaughters();
174 }
175 if (s2->getNDaug() > 0) {
176 s2->deleteDaughters();
177 }
178
179 EvtVector4R p1 = s1->getP4();
180 EvtVector4R p2 = s2->getP4();
181
182 // throw a random number to decide if this final state should be mixed
183 rndm = EvtRandom::random();
184 int mixed = (rndm < 0.5) ? 1 : 0;
185
186 // if this decay is mixed, choose one of the 2 possible final states
187 // with equal probability (re-using the same random number)
188 if (mixed == 1) {
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);
197 }
198
199 // if this decay is unmixed, choose one of the 2 possible final states
200 // with equal probability (re-using the same random number)
201 if (mixed == 0) {
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);
210 }
211
212 // choose a decay time for each final state particle using the
213 // lifetime (which must be the same for both particles) in pdt.table
214 // and calculate the lifetime difference for this event
215 s1->setLifetime();
216 s2->setLifetime();
217
218 // calculate the oscillation amplitude, based on wether this event is mixed or not
219 EvtComplex osc_amp;
220
221 if (EvtRandom::random() < _sdprob) {
222 double t1 = s1->getLifetime();
223 double t2 = s2->getLifetime();
224
225 EvtComplex exp1(0, 0.5 * _freq * t1);
226 EvtComplex exp2(0, 0.5 * _freq * t2);
227
228 EvtId finalBsig = (EvtRandom::random() > 0.5) ? B0B : B0;
229
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));
234
235 EvtComplex BB = g1p * g2p; // <B0|B0(t)>
236 EvtComplex barBB = g1m * g2p; // <B0bar|B0(t)>
237 EvtComplex BbarB = g1p * g2m; // <B0|B0bar(t)>
238 EvtComplex barBbarB = g1m * g2m; // <B0bar|B0bar(t)>
239
240 if (!mixed && finalBsig == B0) {
241 osc_amp = BB;
242 }
243 if (!mixed && finalBsig == B0B) {
244 osc_amp = barBbarB;
245 }
246 if (mixed && finalBsig == B0) {
247 osc_amp = barBB;
248 }
249 if (mixed && finalBsig == B0B) {
250 osc_amp = BbarB;
251 }
252 } else {
253 double dct = s1->getLifetime() - s2->getLifetime(); // in mm
254
255 EvtComplex exp1(0, 0.5 * _freq * dct);
256
257 EvtId stateAtDeltaTeq0 = (s2->getId() == B0) ? B0B : B0;
258
259 //define some useful functions: (see BAD #188 eq. 39 for ref.)
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));
263
264 EvtComplex BB = gp; // <B0|B0(t)>
265 EvtComplex barBB = -sqz * gm; // <B0bar|B0(t)>
266 EvtComplex BbarB = -sqz * gm; // <B0|B0bar(t)>
267 EvtComplex barBbarB = gp; // <B0bar|B0bar(t)>
268
269 if (!mixed && stateAtDeltaTeq0 == B0) {
270 osc_amp = BB;
271 }
272 if (!mixed && stateAtDeltaTeq0 == B0B) {
273 osc_amp = barBbarB;
274 }
275
276 if (mixed && stateAtDeltaTeq0 == B0) {
277 osc_amp = barBB;
278 }
279 if (mixed && stateAtDeltaTeq0 == B0B) {
280 osc_amp = BbarB;
281 }
282
283 }
284 // store the amplitudes for each parent spin basis state
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)));
289
290 return;
291}
double _sdprob
probability of the spontaneous disentanglement [0,1]
double _freq
mixing frequency in hbar/mm

◆ getName()

std::string getName ( )
override

The function which returns the name of the model.

Definition at line 30 of file EvtVSSBMixSD.cc.

31{
32 return "VSS_BMIX_SD";
33}

◆ init()

void init ( )
override

The function for an initialization.

Definition at line 40 of file EvtVSSBMixSD.cc.

41{
42
43 if (getNArg() > 4)
44 checkNArg(14, 12, 8);
45
46 if (getNArg() < 1) {
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;
52 ::abort();
53 }
54 // check that we are asked to produced exactly 2 daughters
55 //4 are allowed if they are aliased..
56 checkNDaug(2, 4);
57
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;
66 ::abort();
67 }
68 }
69 // check that we are asked to decay a vector particle into a pair
70 // of scalar particles
71
72 checkSpinParent(EvtSpinType::VECTOR);
73
74 checkSpinDaughter(0, EvtSpinType::SCALAR);
75 checkSpinDaughter(1, EvtSpinType::SCALAR);
76
77 // check that our daughter particles are charge conjugates of each other
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;
86 ::abort();
87 }
88 // check that both daughter particles have the same lifetime
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;
97 ::abort();
98 }
99 // precompute quantities that will be used to generate events
100 // and print out a summary of parameters for this decay
101
102 // mixing frequency in hbar/mm
103 _freq = getArg(0) / EvtConst::c;
104
105 _sdprob = 0.0;
106 if (getNArg() > 1) {
107 _sdprob = getArg(1);
108 }
109
110 // some printout
111 double tau = 1e12 * EvtPDL::getctau(getDaug(0)) / EvtConst::c; // in ps
112 double dm = 1e-12 * getArg(0); // B0/anti-B0 mass difference in hbar/ps
113 double x = dm * tau;
114
115 if (verbose()) {
116 EvtGenReport(EVTGEN_INFO, "EvtGen")
117 << "VSS_BMix_SD will generate mixing with Spontanous Disentanglement:"
118 << endl
119 << endl
120 << " " << EvtPDL::name(getParentId()).c_str() << " --> "
121 << EvtPDL::name(getDaug(0)).c_str() << " + "
122 << EvtPDL::name(getDaug(1)).c_str() << endl
123 << endl
124 << "using parameters:" << endl
125 << 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
131 << endl;
132 }
133}

◆ initProbMax()

void initProbMax ( )
override

The function to sets a maximum probability.

Definition at line 135 of file EvtVSSBMixSD.cc.

136{
137 // this value is ok for reasonable values of all the parameters
138 setProbMax(4.0);
139}

◆ nRealDaughters()

int nRealDaughters ( )
inlineoverride

The number of real daughters.

Definition at line 59 of file EvtVSSBMixSD.h.

59{ return 2; }

Member Data Documentation

◆ _freq

double _freq
private

mixing frequency in hbar/mm

Definition at line 63 of file EvtVSSBMixSD.h.

◆ _sdprob

double _sdprob
private

probability of the spontaneous disentanglement [0,1]

Definition at line 65 of file EvtVSSBMixSD.h.


The documentation for this class was generated from the following files: