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.
EvtSVPCP.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 
21 #include "EvtGenModels/EvtSVPCP.hh"
22 
23 #include "EvtGenBase/EvtCPUtil.hh"
24 #include "EvtGenBase/EvtComplex.hh"
25 #include "EvtGenBase/EvtConst.hh"
26 #include "EvtGenBase/EvtGenKine.hh"
27 #include "EvtGenBase/EvtId.hh"
28 #include "EvtGenBase/EvtPDL.hh"
30 #include "EvtGenBase/EvtPatches.hh"
31 #include "EvtGenBase/EvtReport.hh"
36 
37 #include <stdlib.h>
38 #include <string>
39 
40 std::string EvtSVPCP::getName()
41 {
42  return "SVP_CP";
43 }
44 
46 {
47  return new EvtSVPCP;
48 }
49 
51 {
52  setProbMax( 2 * ( getArg( 3 ) * getArg( 3 ) + getArg( 5 ) * getArg( 5 ) ) );
53 }
54 
56 {
57  // check that there are 7 arguments
58  checkNArg( 7 );
59  checkNDaug( 2 );
60 
62 
65 }
66 
68 {
69  static EvtId B0 = EvtPDL::getId( "B0" );
70  static EvtId B0B = EvtPDL::getId( "anti-B0" );
71 
72  double t;
73  EvtId other_b;
74 
75  EvtCPUtil::getInstance()->OtherB( p, t, other_b, 0.5 );
76 
77  EvtComplex G1P, G1M, G1_T_even, G1_T_odd;
78 
79  double norm = getArg( 3 ) * getArg( 3 ) + getArg( 5 ) * getArg( 5 );
80 
81  G1P = EvtComplex( getArg( 3 ) * cos( getArg( 4 ) ) / norm,
82  getArg( 3 ) * sin( getArg( 4 ) ) / norm );
83  G1M = EvtComplex( getArg( 5 ) * cos( getArg( 6 ) ) / norm,
84  getArg( 5 ) * sin( getArg( 6 ) ) / norm );
85 
86  G1_T_even = ( G1P + G1M ) / sqrt( 2.0 );
87  G1_T_odd = ( G1P - G1M ) / sqrt( 2.0 );
88 
89  EvtComplex lambda_km = EvtComplex( cos( -2 * getArg( 0 ) ),
90  sin( -2 * getArg( 0 ) ) );
91 
92  double cdmt = cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) );
93  double sdmt = sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) );
94 
95  EvtComplex cG1_T_even, cG1_T_odd;
96 
97  if ( other_b == B0B ) {
98  cG1_T_even = G1_T_even *
99  ( cdmt + lambda_km * EvtComplex( 0.0, getArg( 2 ) * sdmt ) );
100  cG1_T_odd = G1_T_odd *
101  ( cdmt - lambda_km * EvtComplex( 0.0, getArg( 2 ) * sdmt ) );
102  }
103  if ( other_b == B0 ) {
104  cG1_T_even = G1_T_even *
105  ( cdmt + ( 1.0 / lambda_km ) *
106  EvtComplex( 0.0, getArg( 2 ) * sdmt ) );
107  cG1_T_odd = -G1_T_odd *
108  ( cdmt - ( 1.0 / lambda_km ) *
109  EvtComplex( 0.0, getArg( 2 ) * sdmt ) );
110  }
111 
112  EvtComplex hp, hm, h0;
113 
114  // This part is adopted from EvtSVVHel and since there is
115  // a photon that can not have helicity 0 this is put in by
116  // setting the h0 amplitude to 0.
117  hm = ( cG1_T_even - cG1_T_odd ) / sqrt( 2.0 );
118  hp = ( cG1_T_even + cG1_T_odd ) / sqrt( 2.0 );
119  h0 = EvtComplex( 0.0, 0.0 );
120 
121  EvtParticle *v1, *ph;
122 
124  v1 = p->getDaug( 0 );
125  ph = p->getDaug( 1 );
126  EvtVector4R momv1 = v1->getP4();
127  EvtVector4R momph = ph->getP4();
128 
129  EvtTensor4C d, g;
130 
131  g.setdiag( 1.0, -1.0, -1.0, -1.0 );
132 
133  EvtVector4R v, vp;
134 
135  v = momv1 / momv1.d3mag();
136  vp = ( momv1 + momph ) / ( momv1 + momph ).mass();
137 
138  d = ( ( 1.0 / sqrt( 3.0 ) ) * ( h0 - ( hp + hm ) ) * ( -1.0 / sqrt( 3.0 ) ) ) *
139  g +
140  ( ( 1.0 / sqrt( 2.0 ) ) * ( hp - hm ) * EvtComplex( 0.0, 1.0 ) *
141  ( sqrt( 1.0 / 2.0 ) ) ) *
142  dual( EvtGenFunctions::directProd( v, vp ) ) +
143  ( sqrt( 2.0 / 3.0 ) * ( h0 + 0.5 * ( hp + hm ) ) * sqrt( 3.0 / 2.0 ) ) *
144  ( EvtGenFunctions::directProd( v, v ) + ( 1.0 / 3.0 ) * g );
145 
146  EvtVector4C ep0, ep1, ep2;
147 
148  ep0 = d.cont1( v1->eps( 0 ).conj() );
149  ep1 = d.cont1( v1->eps( 1 ).conj() );
150  ep2 = d.cont1( v1->eps( 2 ).conj() );
151 
152  EvtVector4C ep20, ep21, ep22;
153 
154  ep20 = ph->epsParentPhoton( 0 ).conj();
155  ep21 = ph->epsParentPhoton( 1 ).conj();
156 
157  vertex( 0, 0, ep0 * ep20 );
158  vertex( 0, 1, ep0 * ep21 );
159 
160  vertex( 1, 0, ep1 * ep20 );
161  vertex( 1, 1, ep1 * ep21 );
162 
163  vertex( 2, 0, ep2 * ep20 );
164  vertex( 2, 1, ep2 * ep21 );
165 
166  return;
167 }
168 
169 std::string EvtSVPCP::getParamName( int i )
170 {
171  switch ( i ) {
172  case 0:
173  return "weakPhase";
174  case 1:
175  return "deltaM";
176  case 2:
177  return "finalStateCP";
178  case 3:
179  return "Af";
180  case 4:
181  return "AfPhase";
182  case 5:
183  return "Abarf";
184  case 6:
185  return "AbarfPhase";
186  default:
187  return "";
188  }
189 }
190 
191 std::string EvtSVPCP::getParamDefault( int i )
192 {
193  switch ( i ) {
194  case 3:
195  return "1.0";
196  case 4:
197  return "0.0";
198  case 5:
199  return "1.0";
200  case 6:
201  return "0.0";
202  default:
203  return "";
204  }
205 }
EvtTensor3C directProd(const EvtVector3C &c1, const EvtVector3C &c2)
void setdiag(double t00, double t11, double t22, double t33)
virtual EvtVector4C eps(int i) const
double getArg(unsigned int j)
std::string getParamName(int i) override
Definition: EvtSVPCP.cpp:169
EvtDecayBase * clone() override
Definition: EvtSVPCP.cpp:45
EvtTensor4C dual(const EvtTensor4C &t2)
std::string getName() override
Definition: EvtSVPCP.cpp:40
double mass() const
Definition: EvtVector4R.cpp:49
void decay(EvtParticle *p) override
Definition: EvtSVPCP.cpp:67
EvtVector4C cont1(const EvtVector4C &v4) const
virtual EvtVector4C epsParentPhoton(int i)
void initProbMax() override
Definition: EvtSVPCP.cpp:50
void OtherB(EvtParticle *p, double &t, EvtId &otherb)
Definition: EvtCPUtil.cpp:372
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
void setProbMax(double prbmx)
Definition: EvtId.hh:27
void vertex(const EvtComplex &amp)
Definition: EvtDecayAmp.hh:37
double initializePhaseSpace(unsigned int numdaughter, EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
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)
static const double c
Definition: EvtConst.hh:30
static EvtId getId(const std::string &name)
Definition: EvtPDL.cpp:287
const EvtVector4R & getP4() const
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
double d3mag() const
int getNDaug() const
Definition: EvtDecayBase.hh:65
static EvtCPUtil * getInstance()
Definition: EvtCPUtil.cpp:43
EvtParticle * getDaug(int i)
Definition: EvtParticle.cpp:91
std::string getParamDefault(int i) override
Definition: EvtSVPCP.cpp:191
EvtVector4C conj() const
Definition: EvtVector4C.hh:202
void init() override
Definition: EvtSVPCP.cpp:55