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
EvtCBTo3piP00.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
24#include "EvtGenBase/EvtPDL.hh"
27
28#include <stdlib.h>
29#include <string>
30
31std::string EvtCBTo3piP00::getName() const
32{
33 return "CB3PI-P00";
34}
35
37{
38 return new EvtCBTo3piP00;
39}
40
42{
43 // check that there are 1 argument
44 checkNArg( 1 );
45 checkNDaug( 3 );
46
48
52
53 int iset( 10000 );
54 double alpha = getArg( 0 );
55 EvtVector4R pin, p4pi1, p4Gamma11, p4Gamma12;
56 EvtVector4R p4Gamma21, p4Gamma22;
57 double realA, imgA, realbarA, imgbarA;
58 m_generator.Evt3piP00( alpha, iset, pin, p4Gamma11, p4Gamma12, p4Gamma21,
59 p4Gamma22, realA, imgA, realbarA, imgbarA );
60}
61
63{
64 setProbMax( 1.5 );
65}
66
68{
69 //added by Lange Jan4,2000
70 static const EvtId BM = EvtPDL::getId( "B-" );
71 static const EvtId BP = EvtPDL::getId( "B+" );
72
73 EvtParticle *pi1, *pi2, *pi3;
74
76 pi1 = p->getDaug( 0 );
77 pi2 = p->getDaug( 1 );
78 pi3 = p->getDaug( 2 );
79
80 EvtVector4R p4[3];
81 double alpha = getArg( 0 );
82 int iset( 0 );
83
84 EvtVector4R p4pi1, p4Gamma11, p4Gamma12;
85 EvtVector4R p4Gamma21, p4Gamma22;
86
87 double realA, imgA, realbarA, imgbarA;
88 m_generator.Evt3piP00( alpha, iset, p4[0], p4Gamma11, p4Gamma12, p4Gamma21,
89 p4Gamma22, realA, imgA, realbarA, imgbarA );
90
91 p4[1] = p4Gamma11 + p4Gamma12;
92 p4[2] = p4Gamma21 + p4Gamma22;
93 pi1->init( getDaug( 0 ), p4[0] );
94 pi2->init( getDaug( 1 ), p4[1] );
95 pi3->init( getDaug( 2 ), p4[2] );
96
97 EvtComplex A( realA, imgA );
98 EvtComplex Abar( realbarA, imgbarA );
99
100 EvtComplex amp;
101 if ( p->getId() == BP ) {
102 amp = A;
103 }
104 if ( p->getId() == BM ) {
105 amp = Abar;
106 }
107
108 vertex( amp );
109
110 return;
111}
void decay(EvtParticle *p) override
void init() override
void initProbMax() override
std::string getName() const override
EvtCBTo3piP00 * clone() const override
EvtBTo3hCP m_generator
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)