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
EvtBToKpipiCP.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
25#include "EvtGenBase/EvtId.hh"
26#include "EvtGenBase/EvtPDL.hh"
30
31#include <stdlib.h>
32#include <string>
33
34std::string EvtBToKpipiCP::getName() const
35{
36 return "BTOKPIPI_CP";
37}
38
40{
41 return new EvtBToKpipiCP;
42}
43
45{
46 // check that there are 3 arguments
47 checkNArg( 3 );
48 checkNDaug( 3 );
49
51
55
56 double alpha = getArg( 1 );
57 double beta = getArg( 2 );
58 int iset;
59 iset = 10000;
60
61 EvtVector4R p4Kplus, p4piminus, p4gamm1, p4gamm2;
62
63 double realA, imgA, realbarA, imgbarA;
64
65 m_generator.EvtKpipi( alpha, beta, iset, p4Kplus, p4piminus, p4gamm1,
66 p4gamm2, realA, imgA, realbarA, imgbarA );
67}
68
70{
71 setProbMax( 1.2 );
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
85 EvtParticle *Kp, *pim, *pi0;
86
88 Kp = p->getDaug( 0 );
89 pim = p->getDaug( 1 );
90 pi0 = p->getDaug( 2 );
91
92 EvtVector4R p4[3];
93
94 //double dm=getArg(0);
95 double alpha = getArg( 1 );
96 double beta = getArg( 2 );
97 int iset;
98
99 iset = 0;
100
101 EvtVector4R p4Kplus, p4piminus, p4gamm1, p4gamm2;
102
103 double realA, imgA, realbarA, imgbarA;
104
105 m_generator.EvtKpipi( alpha, beta, iset, p4[0], p4[1], p4gamm1, p4gamm2,
106 realA, imgA, realbarA, imgbarA );
107
108 p4[2] = p4gamm1 + p4gamm2;
109
110 Kp->init( getDaug( 0 ), p4[0] );
111 pim->init( getDaug( 1 ), p4[1] );
112 pi0->init( getDaug( 2 ), p4[2] );
113
114 EvtComplex amp;
115
116 EvtComplex A( realA, imgA );
117 EvtComplex Abar( realbarA, imgbarA );
118
119 if ( other_b == B0B ) {
120 amp = Abar;
121 }
122 if ( other_b == B0 ) {
123 amp = A;
124 }
125
126 vertex( amp );
127
128 return;
129}
EvtBTo3hCP m_generator
EvtBToKpipiCP * clone() const override
void init() override
std::string getName() const override
void initProbMax() override
void decay(EvtParticle *p) override
static EvtCPUtil * getInstance()
Definition EvtCPUtil.cpp:42
void OtherB(EvtParticle *p, double &t, EvtId &otherb)
void vertex(const EvtComplex &amp)
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
int getNDaug() const
void checkSpinParent(EvtSpinType::spintype sp)
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)
const EvtId * getDaugs() const
Definition EvtId.hh:27
static EvtId getId(const std::string &name)
Definition EvtPDL.cpp:283
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtParticle * getDaug(const int i)
void makeDaughters(size_t ndaug, const EvtId *id)