evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
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 
23 #include "EvtGenBase/EvtGenKine.hh"
24 #include "EvtGenBase/EvtId.hh"
25 #include "EvtGenBase/EvtPDL.hh"
27 #include "EvtGenBase/EvtPatches.hh"
28 #include "EvtGenBase/EvtReport.hh"
29 
30 #include <stdlib.h>
31 #include <string>
32 
34 {
35  return "CB3PI-MPP";
36 }
37 
39 {
40  return new EvtCBTo3piMPP;
41 }
42 
44 {
45  // check that there are 1 argument
46  checkNArg( 1 );
47  checkNDaug( 3 );
48 
50 
54 
55  EvtVector4R p4[3];
56  double alpha = getArg( 0 );
57 
58  int iset( 10000 );
59  double realA, imgA, realbarA, imgbarA;
60 
61  generator.Evt3piMPP( alpha, iset, p4[0], p4[1], p4[2], realA, imgA,
62  realbarA, imgbarA );
63 }
64 
66 {
67  setProbMax( 1.5 );
68 }
69 
71 {
72  //added by Lange Jan4,2000
73  static EvtId BM = EvtPDL::getId( "B-" );
74  static EvtId BP = EvtPDL::getId( "B+" );
75 
76  EvtParticle *pi1, *pi2, *pi3;
77 
78  p->makeDaughters( getNDaug(), getDaugs() );
79  pi1 = p->getDaug( 0 );
80  pi2 = p->getDaug( 1 );
81  pi3 = p->getDaug( 2 );
82 
83  EvtVector4R p4[3];
84  double alpha = getArg( 0 );
85 
86  int iset( 0 );
87  double realA, imgA, realbarA, imgbarA;
88 
89  generator.Evt3piMPP( alpha, iset, p4[0], p4[1], p4[2], realA, imgA,
90  realbarA, imgbarA );
91 
92  pi1->init( getDaug( 0 ), p4[0] );
93  pi2->init( getDaug( 1 ), p4[1] );
94  pi3->init( getDaug( 2 ), p4[2] );
95 
96  EvtComplex A( realA, imgA );
97  EvtComplex Abar( realbarA, imgbarA );
98 
99  //amp is filled just to make sure the compiler will
100  //do its job!! but one has to define amp differently
101  // if one wants the B+ or the B- to decay to 3pi!
102  //
103 
104  EvtComplex amp;
105  if ( p->getId() == BP ) {
106  amp = A;
107  }
108  if ( p->getId() == BM ) {
109  amp = Abar;
110  }
111 
112  vertex( amp );
113 
114  return;
115 }
EvtBTo3hCP generator
void initProbMax() override
void Evt3piMPP(double alpha, int iset, EvtVector4R &p_p1, EvtVector4R &p_p2, EvtVector4R &p_p3, double &Real_B0, double &Imag_B0, double &Real_B0bar, double &Imag_B0bar)
Definition: EvtBTo3hCP.cpp:210
double getArg(unsigned int j)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
void init() override
EvtId getId() const
void makeDaughters(unsigned int ndaug, EvtId *id)
std::string getName() override
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
void setProbMax(double prbmx)
Definition: EvtId.hh:27
void decay(EvtParticle *p) override
void vertex(const EvtComplex &amp)
Definition: EvtDecayAmp.hh:37
void checkNDaug(int d1, int d2=-1)
void checkSpinParent(EvtSpinType::spintype sp)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
static EvtId getId(const std::string &name)
Definition: EvtPDL.cpp:287
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
int getNDaug() const
Definition: EvtDecayBase.hh:65
EvtParticle * getDaug(int i)
Definition: EvtParticle.cpp:91
EvtCBTo3piMPP * clone() override
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67