evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
EvtSVVHelCPMix.cpp
Go to the documentation of this file.
1 
2 /***********************************************************************
3 * Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4 * *
5 * This file is part of EvtGen. *
6 * *
7 * EvtGen is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * EvtGen is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU General Public License *
18 * along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19 ***********************************************************************/
20 
22 
23 #include "EvtGenBase/EvtGenKine.hh"
24 #include "EvtGenBase/EvtId.hh"
25 #include "EvtGenBase/EvtPDL.hh"
27 #include "EvtGenBase/EvtReport.hh"
33 
34 #include <ctype.h>
35 #include <fstream>
36 #include <iostream>
37 #include <stdlib.h>
38 #include <string>
39 
41 {
42  return "SVVHELCPMIX";
43 }
44 
46 {
47  return new EvtSVVHelCPMix;
48 }
49 
51 {
52  // check that there are 12 arguments
53  checkNArg( 12 );
54  checkNDaug( 2 );
55 
57 
60 
61  hp = EvtComplex( getArg( 0 ) * cos( getArg( 1 ) ),
62  getArg( 0 ) * sin( getArg( 1 ) ) );
63  h0 = EvtComplex( getArg( 2 ) * cos( getArg( 3 ) ),
64  getArg( 2 ) * sin( getArg( 3 ) ) );
65  hm = EvtComplex( getArg( 4 ) * cos( getArg( 5 ) ),
66  getArg( 4 ) * sin( getArg( 5 ) ) );
67  averageM = getArg( 6 );
68  deltaM = getArg( 7 );
69  gamma = getArg( 8 );
70  deltagamma = getArg( 9 );
71  weakmixingphase = EvtComplex( cos( getArg( 10 ) ), sin( getArg( 10 ) ) );
72  weakdirectphase = EvtComplex( cos( getArg( 11 ) ), sin( getArg( 11 ) ) );
73 }
74 
76 {
77  setProbMax( getArg( 0 ) * getArg( 0 ) + getArg( 2 ) * getArg( 2 ) +
78  getArg( 4 ) * getArg( 4 ) );
79 }
80 
82 {
83  EvtParticle* parent = p;
84  EvtAmp& amp = _amp2;
85  EvtId n_v1 = getDaug( 0 );
86  EvtId n_v2 = getDaug( 1 );
87 
88  // Routine to decay a vector into a vector and scalar. Started
89  // by ryd on Oct 17, 1996.
90  // Modified by J.Catmore to take account of CP-violation and mixing
91 
92  int tndaug = 2;
93  EvtId tdaug[2];
94  EvtId Bs = EvtPDL::getId( "B_s0" );
95  EvtId antiBs = EvtPDL::getId( "anti-B_s0" );
96  tdaug[0] = n_v1;
97  tdaug[1] = n_v2;
98 
99  // Phase space and kinematics
100 
101  parent->initializePhaseSpace( tndaug, tdaug );
102 
103  EvtParticle *v1, *v2;
104  v1 = parent->getDaug( 0 );
105  v2 = parent->getDaug( 1 );
106 
107  EvtVector4R momv1 = v1->getP4();
108 
109  EvtVector3R v1dir( momv1.get( 1 ), momv1.get( 2 ), momv1.get( 3 ) );
110  v1dir = v1dir / v1dir.d3mag();
111 
112  // Definition of quantities used in construction of complex amplitudes:
113 
114  EvtTensor3C M; // Tensor as defined in EvtGen manual, equ 117
115  EvtComplex a, b,
116  c; // Helicity amplitudes; EvtGen manual eqns 126-128, also see Phys Lett B 369 p144-150 eqn 15
117  //EvtComplex deltamu = EvtComplex(deltaM, -0.5*deltagamma); // See Phys Rev D 34 p1404
118 
119  // conversion from times in mm/c to natural units [GeV]^-1
120  double t = ( ( parent->getLifetime() ) / 2.998e11 ) * 6.58e-25;
121 
122  // The following two quantities defined in Phys Rev D 34 p1404
123  EvtComplex fplus = EvtComplex( cos( averageM * t ),
124  -1. * sin( averageM * t ) ) *
125  exp( -( gamma / 2.0 ) * t ) *
126  ( cos( 0.5 * deltaM * t ) * cosh( 0.25 * deltagamma * t ) +
127  EvtComplex( 0.0, sin( 0.5 * deltaM * t ) *
128  sinh( 0.25 * deltagamma * t ) ) );
129  EvtComplex fminus =
130  EvtComplex( cos( averageM * t ), -1. * sin( averageM * t ) ) *
131  exp( -( gamma / 2.0 ) * t ) * EvtComplex( 0.0, 1.0 ) *
132  ( sin( 0.5 * deltaM * t ) * cosh( 0.25 * deltagamma * t ) -
133  EvtComplex( 0.0, 1.0 ) * sinh( 0.25 * deltagamma * t ) *
134  cos( 0.5 * deltaM * t ) );
135 
136  // See EvtGen manual pp 106-107
137 
138  a = -0.5 * ( hp + hm );
139  b = EvtComplex( 0.0, 0.5 ) * ( hp - hm );
140  c = ( h0 + 0.5 * ( hp + hm ) );
141 
142  M = a * EvtTensor3C::id() + b * EvtGenFunctions::eps( v1dir ) +
143  c * EvtGenFunctions::directProd( v1dir, v1dir );
144 
145  EvtVector3C t0 = M.cont1( v1->eps( 0 ).vec().conj() );
146  EvtVector3C t1 = M.cont1( v1->eps( 1 ).vec().conj() );
147  EvtVector3C t2 = M.cont1( v1->eps( 2 ).vec().conj() );
148 
149  EvtVector3C eps0 = v2->eps( 0 ).vec().conj();
150  EvtVector3C eps1 = v2->eps( 1 ).vec().conj();
151  EvtVector3C eps2 = v2->eps( 2 ).vec().conj();
152 
153  // We need two sets of equations, one for mesons which were in the Bs state at t=0, and another
154  // for those which were in the antiBs state. Each equation consists of a sum of amplitudes - mod-squaring gives the interference terms.
155 
156  EvtComplex amplSum00, amplSum01, amplSum02;
157  EvtComplex amplSum10, amplSum11, amplSum12;
158  EvtComplex amplSum20, amplSum21, amplSum22;
159 
160  // First the Bs state:
161 
162  if ( parent->getId() == Bs ) {
163  amplSum00 = ( fplus * weakdirectphase * t0 * eps0 ) +
164  ( fminus * ( 1.0 / weakdirectphase ) * weakmixingphase *
165  t0 * eps0 );
166  amplSum01 = ( fplus * weakdirectphase * t0 * eps1 ) +
167  ( fminus * ( 1.0 / weakdirectphase ) * weakmixingphase *
168  t0 * eps1 );
169  amplSum02 = ( fplus * weakdirectphase * t0 * eps2 ) +
170  ( fminus * ( 1.0 / weakdirectphase ) * weakmixingphase *
171  t0 * eps2 );
172 
173  amplSum10 = ( fplus * weakdirectphase * t1 * eps0 ) +
174  ( fminus * ( 1.0 / weakdirectphase ) * weakmixingphase *
175  t1 * eps0 );
176  amplSum11 = ( fplus * weakdirectphase * t1 * eps1 ) +
177  ( fminus * ( 1.0 / weakdirectphase ) * weakmixingphase *
178  t1 * eps1 );
179  amplSum12 = ( fplus * weakdirectphase * t1 * eps2 ) +
180  ( fminus * ( 1.0 / weakdirectphase ) * weakmixingphase *
181  t1 * eps2 );
182 
183  amplSum20 = ( fplus * weakdirectphase * t2 * eps0 ) +
184  ( fminus * ( 1.0 / weakdirectphase ) * weakmixingphase *
185  t2 * eps0 );
186  amplSum21 = ( fplus * weakdirectphase * t2 * eps1 ) +
187  ( fminus * ( 1.0 / weakdirectphase ) * weakmixingphase *
188  t2 * eps1 );
189  amplSum22 = ( fplus * weakdirectphase * t2 * eps2 ) +
190  ( fminus * ( 1.0 / weakdirectphase ) * weakmixingphase *
191  t2 * eps2 );
192  }
193 
194  // Now the anti-Bs state:
195 
196  if ( parent->getId() == antiBs ) {
197  amplSum00 = ( fminus * weakdirectphase * ( 1.0 / weakmixingphase ) *
198  t0 * eps0 ) +
199  ( fplus * ( 1.0 / weakdirectphase ) * t0 * eps0 );
200  amplSum01 = ( fminus * weakdirectphase * ( 1.0 / weakmixingphase ) *
201  t0 * eps1 ) +
202  ( fplus * ( 1.0 / weakdirectphase ) * t0 * eps1 );
203  amplSum02 = ( fminus * weakdirectphase * ( 1.0 / weakmixingphase ) *
204  t0 * eps2 ) +
205  ( fplus * ( 1.0 / weakdirectphase ) * t0 * eps2 );
206 
207  amplSum10 = ( fminus * weakdirectphase * ( 1.0 / weakmixingphase ) *
208  t1 * eps0 ) +
209  ( fplus * ( 1.0 / weakdirectphase ) * t1 * eps0 );
210  amplSum11 = ( fminus * weakdirectphase * ( 1.0 / weakmixingphase ) *
211  t1 * eps1 ) +
212  ( fplus * ( 1.0 / weakdirectphase ) * t1 * eps1 );
213  amplSum12 = ( fminus * weakdirectphase * ( 1.0 / weakmixingphase ) *
214  t1 * eps2 ) +
215  ( fplus * ( 1.0 / weakdirectphase ) * t1 * eps2 );
216 
217  amplSum20 = ( fminus * weakdirectphase * ( 1.0 / weakmixingphase ) *
218  t2 * eps0 ) +
219  ( fplus * ( 1.0 / weakdirectphase ) * t2 * eps0 );
220  amplSum21 = ( fminus * weakdirectphase * ( 1.0 / weakmixingphase ) *
221  t2 * eps1 ) +
222  ( fplus * ( 1.0 / weakdirectphase ) * t2 * eps1 );
223  amplSum22 = ( fminus * weakdirectphase * ( 1.0 / weakmixingphase ) *
224  t2 * eps2 ) +
225  ( fplus * ( 1.0 / weakdirectphase ) * t2 * eps2 );
226  }
227 
228  // Now set the amplitude
229 
230  amp.vertex( 0, 0, amplSum00 );
231  EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "00: " << amplSum00 << std::endl;
232  amp.vertex( 0, 1, amplSum01 );
233  EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "01: " << amplSum01 << std::endl;
234  amp.vertex( 0, 2, amplSum02 );
235  EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "02: " << amplSum02 << std::endl;
236 
237  amp.vertex( 1, 0, amplSum10 );
238  EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "10: " << amplSum10 << std::endl;
239  amp.vertex( 1, 1, amplSum11 );
240  EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "11: " << amplSum11 << std::endl;
241  amp.vertex( 1, 2, amplSum12 );
242  EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "12: " << amplSum12 << std::endl;
243 
244  amp.vertex( 2, 0, amplSum20 );
245  EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "20: " << amplSum20 << std::endl;
246  amp.vertex( 2, 1, amplSum21 );
247  EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "21: " << amplSum21 << std::endl;
248  amp.vertex( 2, 2, amplSum22 );
249  EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "22: " << amplSum22 << std::endl;
250 
251  return;
252 }
253 
254 std::string EvtSVVHelCPMix::getParamName( int i )
255 {
256  switch ( i ) {
257  case 0:
258  return "plusHelAmp";
259  case 1:
260  return "plusHelAmpPhase";
261  case 2:
262  return "zeroHelAmp";
263  case 3:
264  return "zeroHelAmpPhase";
265  case 4:
266  return "minusHelAmp";
267  case 5:
268  return "minusHelAmpPhase";
269  case 6:
270  return "averageM";
271  case 7:
272  return "deltaM";
273  case 8:
274  return "gamma";
275  case 9:
276  return "deltaGamma";
277  case 10:
278  return "weakMixPhase";
279  case 11:
280  return "weakDirectPhase";
281  default:
282  return "";
283  }
284 }
285 
287 {
288  switch ( i ) {
289  case 0:
290  return "1.0";
291  case 1:
292  return "0.0";
293  case 2:
294  return "1.0";
295  case 3:
296  return "0.0";
297  case 4:
298  return "1.0";
299  case 5:
300  return "0.0";
301  default:
302  return "";
303  }
304 }
EvtTensor3C directProd(const EvtVector3C &c1, const EvtVector3C &c2)
EvtComplex weakdirectphase
std::string getName() override
virtual EvtVector4C eps(int i) const
void initProbMax() override
double d3mag() const
Definition: EvtVector3R.cpp:89
double getArg(unsigned int j)
static const EvtTensor3C & id()
std::string getParamDefault(int i) override
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
EvtVector3C cont1(const EvtVector3C &v) const
EvtId getId() const
void init() override
EvtComplex weakmixingphase
EvtVector3C vec() const
Definition: EvtVector4C.hh:103
EvtDecayBase * clone() override
void setProbMax(double prbmx)
EvtVector3C conj() const
Definition: EvtVector3C.hh:176
Definition: EvtId.hh:27
void vertex(const EvtComplex &amp)
Definition: EvtAmp.cpp:454
double get(int i) const
Definition: EvtVector4R.hh:162
double initializePhaseSpace(unsigned int numdaughter, EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
Definition: EvtAmp.hh:30
void checkNDaug(int d1, int d2=-1)
void checkSpinParent(EvtSpinType::spintype sp)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
void decay(EvtParticle *p) override
static EvtId getId(const std::string &name)
Definition: EvtPDL.cpp:287
const EvtVector4R & getP4() const
EvtTensor3C eps(const EvtVector3R &v)
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
EvtComplex exp(const EvtComplex &c)
Definition: EvtComplex.hh:240
double getLifetime()
EvtParticle * getDaug(int i)
Definition: EvtParticle.cpp:91
EvtAmp _amp2
Definition: EvtDecayAmp.hh:73
std::string getParamName(int i) override
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67