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