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
EvtSTSCP.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"
32
33#include <stdlib.h>
34#include <string>
35
36std::string EvtSTSCP::getName() const
37{
38 return "STS_CP";
39}
40
42{
43 //This is probably not quite right, but it should do as a start...
44 //Anders
45
46 setProbMax( 20 * ( getArg( 3 ) * getArg( 3 ) + getArg( 5 ) * getArg( 5 ) ) );
47}
48
50{
51 return new EvtSTSCP;
52}
53
55{
56 // check that there are 7 arguments
57 checkNArg( 7 );
58 checkNDaug( 2 );
59
61
64}
65
67{
68 //added by Lange Jan4,2000
69 static const EvtId B0 = EvtPDL::getId( "B0" );
70 static const EvtId B0B = EvtPDL::getId( "anti-B0" );
71
72 double t;
73 EvtId other_b;
74
75 EvtParticle* t1;
77 t1 = p->getDaug( 0 );
78 EvtVector4R momt = t1->getP4();
79 EvtVector4R moms = p->getDaug( 1 )->getP4();
80 double masst = t1->mass();
81
82 EvtCPUtil::getInstance()->OtherB( p, t, other_b, 0.5 );
83
84 EvtComplex amp;
85
86 EvtComplex A, Abar;
87
88 A = EvtComplex( getArg( 3 ) * cos( getArg( 4 ) ),
89 getArg( 3 ) * sin( getArg( 4 ) ) );
90 Abar = EvtComplex( getArg( 5 ) * cos( getArg( 6 ) ),
91 getArg( 5 ) * sin( getArg( 6 ) ) );
92
93 if ( other_b == B0B ) {
94 amp = A * cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) +
95 EvtComplex( cos( -2.0 * getArg( 0 ) ), sin( -2.0 * getArg( 0 ) ) ) *
96 getArg( 2 ) * EvtComplex( 0.0, 1.0 ) * Abar *
97 sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) );
98 }
99 if ( other_b == B0 ) {
100 amp = A * EvtComplex( cos( 2.0 * getArg( 0 ) ), sin( 2.0 * getArg( 0 ) ) ) *
101 EvtComplex( 0.0, 1.0 ) *
102 sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) +
103 getArg( 2 ) * Abar * cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) );
104 }
105
106 EvtVector4R p4_parent;
107
108 p4_parent = momt + moms;
109
110 double norm = masst * masst / ( p->mass() * momt.d3mag() * momt.d3mag() );
111
112 vertex( 0, amp * norm * t1->epsTensorParent( 0 ).cont1( p4_parent ) *
113 p4_parent );
114 vertex( 1, amp * norm * t1->epsTensorParent( 1 ).cont1( p4_parent ) *
115 p4_parent );
116 vertex( 2, amp * norm * t1->epsTensorParent( 2 ).cont1( p4_parent ) *
117 p4_parent );
118 vertex( 3, amp * norm * t1->epsTensorParent( 3 ).cont1( p4_parent ) *
119 p4_parent );
120 vertex( 4, amp * norm * t1->epsTensorParent( 4 ).cont1( p4_parent ) *
121 p4_parent );
122
123 return;
124}
125
126std::string EvtSTSCP::getParamName( int i )
127{
128 switch ( i ) {
129 case 0:
130 return "weakPhase";
131 case 1:
132 return "deltaM";
133 case 2:
134 return "finalStateCP";
135 case 3:
136 return "Af";
137 case 4:
138 return "AfPhase";
139 case 5:
140 return "Abarf";
141 case 6:
142 return "AbarfPhase";
143 default:
144 return "";
145 }
146}
147
148std::string EvtSTSCP::getParamDefault( int i )
149{
150 switch ( i ) {
151 case 3:
152 return "1.0";
153 case 4:
154 return "0.0";
155 case 5:
156 return "1.0";
157 case 6:
158 return "0.0";
159 default:
160 return "";
161 }
162}
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
virtual EvtTensor4C epsTensorParent(int i) const
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)
double mass() const
std::string getParamName(int i) override
Definition EvtSTSCP.cpp:126
EvtDecayBase * clone() const override
Definition EvtSTSCP.cpp:49
void initProbMax() override
Definition EvtSTSCP.cpp:41
std::string getParamDefault(int i) override
Definition EvtSTSCP.cpp:148
std::string getName() const override
Definition EvtSTSCP.cpp:36
void init() override
Definition EvtSTSCP.cpp:54
void decay(EvtParticle *p) override
Definition EvtSTSCP.cpp:66
EvtVector4C cont1(const EvtVector4C &v4) const
double d3mag() const