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