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
EvtSSSCPT.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/EvtId.hh"
27#include "EvtGenBase/EvtPDL.hh"
30
31#include <stdlib.h>
32#include <string>
33
34std::string EvtSSSCPT::getName() const
35{
36 return "SSS_CPT";
37}
38
40{
41 return new EvtSSSCPT;
42}
43
45{
46 // check that there are 8 arguments
47 checkNArg( 8 );
48 checkNDaug( 2 );
49
50 // Set amplitude coeffs
52}
53
55{
56 m_P = EvtComplex( cos( -getArg( 0 ) ), sin( -getArg( 0 ) ) );
57 m_Q = EvtComplex( cos( getArg( 0 ) ), sin( getArg( 0 ) ) );
58 m_D = EvtComplex( getArg( 6 ) * cos( getArg( 7 ) ),
59 getArg( 6 ) * sin( getArg( 7 ) ) );
60 m_Im = EvtComplex( 0.0, 1.0 );
61
62 m_A = EvtComplex( getArg( 2 ) * cos( getArg( 3 ) ),
63 getArg( 2 ) * sin( getArg( 3 ) ) );
64 m_Abar = EvtComplex( getArg( 4 ) * cos( getArg( 5 ) ),
65 getArg( 4 ) * sin( getArg( 5 ) ) );
66}
67
69{
70 const double maxProb = 2.0 * abs2( m_A ) + 4.0 * abs2( m_Abar ) * abs2( m_D );
71 setProbMax( maxProb );
72}
73
75{
76 //added by Lange Jan4,2000
77 static const EvtId B0 = EvtPDL::getId( "B0" );
78 static const EvtId B0B = EvtPDL::getId( "anti-B0" );
79
80 double t;
81 EvtId other_b;
82
83 EvtCPUtil::getInstance()->OtherB( p, t, other_b, 0.5 );
84
86
87 EvtComplex amp;
88
89 if ( other_b == B0B ) {
90 amp = m_A * cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) +
91 m_Im * sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) *
92 ( m_Q / m_P * m_A + 2.0 * m_D * m_Abar );
93 }
94 if ( other_b == B0 ) {
95 amp = m_Abar * cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) +
96 m_Im * sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) *
97 ( m_P / m_Q * m_A - 2.0 * m_D * m_Abar );
98 }
99
100 vertex( amp );
101
102 return;
103}
double abs2(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)
EvtDecayBase()=default
int getNDaug() const
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)
void initProbMax() override
Definition EvtSSSCPT.cpp:68
EvtComplex m_A
Definition EvtSSSCPT.hh:39
EvtComplex m_P
Definition EvtSSSCPT.hh:40
void setAmpCoeffs()
Definition EvtSSSCPT.cpp:54
EvtDecayBase * clone() const override
Definition EvtSSSCPT.cpp:39
EvtComplex m_Abar
Definition EvtSSSCPT.hh:39
EvtComplex m_Q
Definition EvtSSSCPT.hh:40
std::string getName() const override
Definition EvtSSSCPT.cpp:34
void decay(EvtParticle *p) override
Definition EvtSSSCPT.cpp:74
EvtComplex m_Im
Definition EvtSSSCPT.hh:40
void init() override
Definition EvtSSSCPT.cpp:44
EvtComplex m_D
Definition EvtSSSCPT.hh:40