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
EvtCBTo3piMPP.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/EvtId.hh"
25#include "EvtGenBase/EvtPDL.hh"
28
29#include <stdlib.h>
30#include <string>
31
32std::string EvtCBTo3piMPP::getName() const
33{
34 return "CB3PI-MPP";
35}
36
38{
39 return new EvtCBTo3piMPP;
40}
41
43{
44 // check that there are 1 argument
45 checkNArg( 1 );
46 checkNDaug( 3 );
47
49
53
54 EvtVector4R p4[3];
55 double alpha = getArg( 0 );
56
57 int iset( 10000 );
58 double realA, imgA, realbarA, imgbarA;
59
60 m_generator.Evt3piMPP( alpha, iset, p4[0], p4[1], p4[2], realA, imgA,
61 realbarA, imgbarA );
62}
63
65{
66 setProbMax( 1.5 );
67}
68
70{
71 //added by Lange Jan4,2000
72 static const EvtId BM = EvtPDL::getId( "B-" );
73 static const EvtId BP = EvtPDL::getId( "B+" );
74
75 EvtParticle *pi1, *pi2, *pi3;
76
78 pi1 = p->getDaug( 0 );
79 pi2 = p->getDaug( 1 );
80 pi3 = p->getDaug( 2 );
81
82 EvtVector4R p4[3];
83 double alpha = getArg( 0 );
84
85 int iset( 0 );
86 double realA, imgA, realbarA, imgbarA;
87
88 m_generator.Evt3piMPP( alpha, iset, p4[0], p4[1], p4[2], realA, imgA,
89 realbarA, imgbarA );
90
91 pi1->init( getDaug( 0 ), p4[0] );
92 pi2->init( getDaug( 1 ), p4[1] );
93 pi3->init( getDaug( 2 ), p4[2] );
94
95 EvtComplex A( realA, imgA );
96 EvtComplex Abar( realbarA, imgbarA );
97
98 //amp is filled just to make sure the compiler will
99 //do its job!! but one has to define amp differently
100 // if one wants the B+ or the B- to decay to 3pi!
101 //
102
103 EvtComplex amp;
104 if ( p->getId() == BP ) {
105 amp = A;
106 }
107 if ( p->getId() == BM ) {
108 amp = Abar;
109 }
110
111 vertex( amp );
112
113 return;
114}
EvtBTo3hCP m_generator
void initProbMax() override
std::string getName() const override
void init() override
void decay(EvtParticle *p) override
EvtCBTo3piMPP * clone() const override
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)