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