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
EvtBTo3piCP.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"
29
30#include <stdlib.h>
31#include <string>
32
33std::string EvtBTo3piCP::getName() const
34{
35 return "BTO3PI_CP";
36}
37
39{
40 return new EvtBTo3piCP;
41}
42
44{
45 // check that there are 2 arguments
46 checkNArg( 2 );
47 checkNDaug( 3 );
48
50
54}
55
57{
58 // perform common blocks initialization before
59 // first use
60 double alpha = getArg( 1 );
61 int iset;
62
63 iset = 10000;
64
65 EvtVector4R p4piplus, p4piminus, p4gamm1, p4gamm2;
66
67 double realA, imgA, realbarA, imgbarA;
68
69 m_generator.Evt3pi( alpha, iset, p4piplus, p4piminus, p4gamm1, p4gamm2,
70 realA, imgA, realbarA, imgbarA );
71
72 setProbMax( 1.5 );
73}
74
76{
77 //added by Lange Jan4,2000
78 static const EvtId B0 = EvtPDL::getId( "B0" );
79 static const EvtId B0B = EvtPDL::getId( "anti-B0" );
80
81 double t;
82 EvtId other_b;
83
84 EvtCPUtil::getInstance()->OtherB( p, t, other_b, 0.5 );
85
86 EvtParticle *pip, *pim, *pi0;
87
89
90 // p->init_daug(SCALAR,&pip,SCALAR,&pim,SCALAR,&pi0);
91 pip = p->getDaug( 0 );
92 pim = p->getDaug( 1 );
93 pi0 = p->getDaug( 2 );
94
95 EvtVector4R p4[3];
96
97 double dm = getArg( 0 );
98 double alpha = getArg( 1 );
99 int iset;
100
101 iset = 0;
102
103 EvtVector4R p4piplus, p4piminus, p4gamm1, p4gamm2;
104
105 double realA, imgA, realbarA, imgbarA;
106
107 m_generator.Evt3pi( alpha, iset, p4[0], p4[1], p4gamm1, p4gamm2, realA,
108 imgA, realbarA, imgbarA );
109
110 p4[2] = p4gamm1 + p4gamm2;
111
112 if ( pip->getId() == EvtPDL::getId( "pi+" ) ) {
113 pip->init( getDaug( 0 ), p4[0] );
114 pim->init( getDaug( 1 ), p4[1] );
115 } else {
116 pip->init( getDaug( 0 ), p4[1] );
117 pim->init( getDaug( 1 ), p4[0] );
118 }
119
120 pi0->init( getDaug( 2 ), p4[2] );
121
122 EvtComplex amp;
123
124 EvtComplex A( realA, imgA );
125 EvtComplex Abar( realbarA, imgbarA );
126
127 if ( other_b == B0B ) {
128 amp = A * cos( dm * t / ( 2 * EvtConst::c ) ) +
129 EvtComplex( 0., 1. ) * Abar * sin( dm * t / ( 2 * EvtConst::c ) );
130 }
131 if ( other_b == B0 ) {
132 amp = Abar * cos( dm * t / ( 2 * EvtConst::c ) ) +
133 EvtComplex( 0., 1. ) * A * sin( dm * t / ( 2 * EvtConst::c ) );
134 }
135
136 vertex( amp );
137
138 return;
139}
EvtBTo3hCP m_generator
void init() override
std::string getName() const override
void decay(EvtParticle *p) override
EvtBTo3piCP * clone() const override
void initProbMax() override
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)
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
EvtId getId() const
EvtParticle * getDaug(const int i)
void makeDaughters(size_t ndaug, const EvtId *id)