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
EvtSVVNONCPEIGEN.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
26#include "EvtGenBase/EvtPDL.hh"
31
33
34#include <stdlib.h>
35#include <string>
36
37std::string EvtSVVNONCPEIGEN::getName() const
38{
39 return "SVV_NONCPEIGEN";
40}
41
46
48{
49 // check that there are 27 arguments
50 checkNArg( 27, 15 );
51 checkNDaug( 2 );
52
55
56 // The ordering of A_f is :
57 // A_f[0-2] = A_f
58 // A_f[3-5] = Abar_f
59 // A_f[6-8] = A_fbar
60 // A_f[9-11] = Abar_fbar
61 //
62 // Each of the 4 amplitudes include the 3 different helicity states in
63 // the order +, 0, -. See more about helicity amplitude ordering in ::decay
64
65 int i = 0;
66 int j = ( getNArg() - 3 ) / 2;
67
68 for ( i = 0; i < j; ++i ) {
69 m_A_f[i] = getArg( ( 2 * i ) + 3 ) *
70 EvtComplex( cos( getArg( ( 2 * i ) + 4 ) ),
71 sin( getArg( ( 2 * i ) + 4 ) ) );
72 }
73
74 // If only 6 amplitudes are specified, calculate the last 6 from the first 6:
75 if ( 6 == j ) {
76 for ( i = 0; i < 3; ++i ) {
77 m_A_f[6 + i] = m_A_f[3 + i];
78 m_A_f[9 + i] = m_A_f[i];
79 }
80 }
81}
82
84{
85 double probMax = 0;
86 for ( int i = 0; i < 12; ++i ) {
87 double amp = abs( m_A_f[i] );
88 probMax += amp * amp;
89 }
90
91 setProbMax( probMax );
92}
93
95{
96 //added by Lange Jan4,2000
97 static const EvtId B0 = EvtPDL::getId( "B0" );
98 static const EvtId B0B = EvtPDL::getId( "anti-B0" );
99
100 double t;
101 EvtId other_b;
102 EvtId daugs[2];
103
104 // MB: flip selects the final of the decay
105 int flip = ( ( p->getId() == B0 ) ? 0 : 1 );
106 daugs[0] = getDaug( 0 );
107 daugs[1] = getDaug( 1 );
108 p->initializePhaseSpace( 2, daugs );
109
110 EvtCPUtil::getInstance()->OtherB( p, t, other_b, 0.5 );
111
112 EvtComplex amp[3];
113
114 double dmt2 = getArg( 0 ) * t / ( 2 * EvtConst::c );
115 double phiCKM = ( 2.0 * getArg( 1 ) + getArg( 2 ) ); // 2b+g
116 EvtComplex ePlusIPhi( cos( phiCKM ), sin( phiCKM ) );
117 EvtComplex eMinusIPhi( cos( -phiCKM ), sin( -phiCKM ) );
118
119 // flip == 0 : D*-rho+
120 // flip == 1 : D*+rho-
121
122 if ( !flip ) {
123 if ( other_b == B0B ) {
124 // At t=0 we have a B0
125 for ( int i = 0; i < 3; ++i ) {
126 amp[i] = m_A_f[i] * cos( dmt2 ) +
127 eMinusIPhi * EvtComplex( 0.0, sin( dmt2 ) ) *
128 m_A_f[i + 3];
129 }
130 }
131 if ( other_b == B0 ) {
132 // At t=0 we have a B0bar
133 for ( int i = 0; i < 3; ++i ) {
134 amp[i] = m_A_f[i] * ePlusIPhi * EvtComplex( 0.0, sin( dmt2 ) ) +
135 m_A_f[i + 3] * cos( dmt2 );
136 }
137 }
138 } else {
139 if ( other_b == B0B ) {
140 // At t=0 we have a B0
141
142 // M.Baak 01/16/2004
143 // Note: \bar{H}+- = H-+
144 // If one wants to use the correct helicities for B0 and B0bar decays but the same formula-notation (as done in EvtSVV_HelAmp),
145 // count the B0bar helicities backwards. (Equivalently, one could flip the chi angle.)
146
147 for ( int i = 0; i < 3; ++i ) {
148 amp[i] = m_A_f[8 - i] * cos( dmt2 ) +
149 eMinusIPhi * EvtComplex( 0.0, sin( dmt2 ) ) *
150 m_A_f[11 - i];
151 }
152 }
153 if ( other_b == B0 ) {
154 // At t=0 we have a B0bar
155 for ( int i = 0; i < 3; ++i ) {
156 amp[i] = m_A_f[8 - i] * ePlusIPhi *
157 EvtComplex( 0.0, sin( dmt2 ) ) +
158 m_A_f[11 - i] * cos( dmt2 );
159 }
160 }
161 }
162
163 EvtSVVHelAmp::SVVHel( p, m_amp2, daugs[0], daugs[1], amp[0], amp[1], amp[2] );
164
165 return;
166}
167
169{
170 switch ( i ) {
171 case 0:
172 return "deltaM";
173 case 1:
174 return "weakPhase1";
175 case 2:
176 return "weakPhase2";
177 case 3:
178 return "AfPlusHelAmp";
179 case 4:
180 return "AfPlusHelAmpPhase";
181 case 5:
182 return "AfZeroHelAmp";
183 case 6:
184 return "AfZeroHelAmpPhase";
185 case 7:
186 return "AfMinusHelAmp";
187 case 8:
188 return "AfMinusHelAmpPhase";
189 case 9:
190 return "AbarfPlusHelAmp";
191 case 10:
192 return "AbarfPlusHelAmpPhase";
193 case 11:
194 return "AbarfZeroHelAmp";
195 case 12:
196 return "AbarfZeroHelAmpPhase";
197 case 13:
198 return "AbarfMinusHelAmp";
199 case 14:
200 return "AbarfMinusHelAmpPhase";
201 case 15:
202 return "AfbarPlusHelAmp";
203 case 16:
204 return "AfbarPlusHelAmpPhase";
205 case 17:
206 return "AfbarZeroHelAmp";
207 case 18:
208 return "AfbarZeroHelAmpPhase";
209 case 19:
210 return "AfbarMinusHelAmp";
211 case 20:
212 return "AfbarMinusHelAmpPhase";
213 case 21:
214 return "AbarfbarPlusHelAmp";
215 case 22:
216 return "AbarfbarPlusHelAmpPhase";
217 case 23:
218 return "AbarfbarZeroHelAmp";
219 case 24:
220 return "AbarfbarZeroHelAmpPhase";
221 case 25:
222 return "AbarfbarMinusHelAmp";
223 case 26:
224 return "AbarfbarMinusHelAmpPhase";
225 default:
226 return "";
227 }
228}
229
231{
232 switch ( i ) {
233 case 3:
234 return "1.0";
235 case 4:
236 return "0.0";
237 case 5:
238 return "1.0";
239 case 6:
240 return "0.0";
241 case 7:
242 return "1.0";
243 case 8:
244 return "0.0";
245 case 9:
246 return "1.0";
247 case 10:
248 return "0.0";
249 case 11:
250 return "1.0";
251 case 12:
252 return "0.0";
253 case 13:
254 return "1.0";
255 case 14:
256 return "0.0";
257 default:
258 return "";
259 }
260}
double abs(const EvtComplex &c)
static EvtCPUtil * getInstance()
Definition EvtCPUtil.cpp:42
void OtherB(EvtParticle *p, double &t, EvtId &otherb)
static const double c
Definition EvtConst.hh:30
EvtAmp m_amp2
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
EvtDecayBase()=default
int getNArg() const
double getArg(unsigned int j)
void setProbMax(double prbmx)
EvtId getDaug(int i) const
void checkNDaug(int d1, int d2=-1)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
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)
EvtId getId() const
static void SVVHel(EvtParticle *parent, EvtAmp &amp, EvtId n_v1, EvtId n_v2, const EvtComplex &hp, const EvtComplex &h0, const EvtComplex &hm)
std::string getName() const override
std::string getParamName(int i) override
EvtDecayBase * clone() const override
EvtComplex m_A_f[12]
void init() override
void initProbMax() override
void decay(EvtParticle *p) override
std::string getParamDefault(int i) override