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
EvtSVSNONCPEIGEN.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
32#include <stdlib.h>
33#include <string>
34
35std::string EvtSVSNONCPEIGEN::getName() const
36{
37 return "SVS_NONCPEIGEN";
38}
39
44
46{
47 // check that there are 11 arguments
48 checkNArg( 11, 7 );
49 checkNDaug( 2 );
50
53
54 m_dm = getArg( 1 );
55 m_phickm = 2 * getArg( 0 ) + getArg( 2 );
56
57 m_A_f = EvtComplex( getArg( 3 ) * cos( getArg( 4 ) ),
58 getArg( 3 ) * sin( getArg( 4 ) ) );
59 m_Abar_f = EvtComplex( getArg( 5 ) * cos( getArg( 6 ) ),
60 getArg( 5 ) * sin( getArg( 6 ) ) );
61
64
65 if ( getNArg() == 11 ) {
66 m_A_fbar = EvtComplex( getArg( 7 ) * cos( getArg( 8 ) ),
67 getArg( 7 ) * sin( getArg( 8 ) ) );
68 m_Abar_fbar = EvtComplex( getArg( 9 ) * cos( getArg( 10 ) ),
69 getArg( 9 ) * sin( getArg( 10 ) ) );
70 }
71}
72
74{
75 double theProbMax = abs( m_A_f ) * abs( m_A_f ) +
76 abs( m_Abar_f ) * abs( m_Abar_f ) +
77 abs( m_A_fbar ) * abs( m_A_fbar ) +
79
80 setProbMax( theProbMax );
81}
82
84{
85 //added by Lange Jan4,2000
86 static const EvtId B0 = EvtPDL::getId( "B0" );
87 static const EvtId B0B = EvtPDL::getId( "anti-B0" );
88
89 double t;
90 EvtId other_b;
91 EvtId daugs[2];
92
93 // MB: flip selects the final of the decay
94 int flip = ( ( p->getId() == B0 ) ? 0 : 1 );
95 daugs[0] = getDaug( 0 );
96 daugs[1] = getDaug( 1 );
97 p->initializePhaseSpace( 2, daugs );
98
99 EvtCPUtil::getInstance()->OtherB( p, t, other_b, 0.5 );
100
101 EvtComplex amp;
102 double dmt2 = ( m_dm * t ) / ( 2 * EvtConst::c );
103 EvtComplex ePlusIPhi( cos( m_phickm ), sin( m_phickm ) );
104 EvtComplex eMinusIPhi( cos( -m_phickm ), -sin( m_phickm ) );
105
106 // flip == 0 : D-rho+
107 // flip == 1 : D+rho-
108
109 if ( !flip ) {
110 if ( other_b == B0B ) {
111 // At t=0 we have a B0
112 amp = cos( dmt2 ) * m_A_f +
113 eMinusIPhi * EvtComplex( 0.0, sin( dmt2 ) ) * m_Abar_f;
114 }
115 if ( other_b == B0 ) {
116 // At t=0 we have a B0bar
117 amp = ePlusIPhi * EvtComplex( 0.0, sin( dmt2 ) ) * m_A_f +
118 cos( dmt2 ) * m_Abar_f;
119 }
120 } else {
121 if ( other_b == B0B ) {
122 // At t=0 we have a B0
123 amp = cos( dmt2 ) * m_A_fbar +
124 eMinusIPhi * EvtComplex( 0.0, sin( dmt2 ) ) * m_Abar_fbar;
125 }
126 if ( other_b == B0 ) {
127 // At t=0 we have a B0bar
128 amp = ePlusIPhi * EvtComplex( 0.0, sin( dmt2 ) ) * m_A_fbar +
129 cos( dmt2 ) * m_Abar_fbar;
130 }
131 }
132
133 EvtParticle* v;
134 v = p->getDaug( 0 );
135
136 EvtVector4R momv = p->getDaug( 0 )->getP4();
137 EvtVector4R moms = p->getDaug( 1 )->getP4();
138 EvtVector4R p4_parent = momv + moms;
139
140 double norm = momv.mass() / ( momv.d3mag() * p->mass() );
141
142 vertex( 0, amp * norm * p4_parent * ( v->epsParent( 0 ) ) );
143 vertex( 1, amp * norm * p4_parent * ( v->epsParent( 1 ) ) );
144 vertex( 2, amp * norm * p4_parent * ( v->epsParent( 2 ) ) );
145
146 return;
147}
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
void vertex(const EvtComplex &amp)
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
virtual EvtVector4C epsParent(int i) const
double initializePhaseSpace(size_t numdaughter, const EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
EvtId getId() const
const EvtVector4R & getP4() const
EvtParticle * getDaug(const int i)
double mass() const
EvtDecayBase * clone() const override
void initProbMax() override
std::string getName() const override
void init() override
void decay(EvtParticle *p) override
double mass() const
double d3mag() const