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.
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 
23 #include "EvtGenBase/EvtCPUtil.hh"
24 #include "EvtGenBase/EvtGenKine.hh"
25 #include "EvtGenBase/EvtId.hh"
26 #include "EvtGenBase/EvtPDL.hh"
28 #include "EvtGenBase/EvtPatches.hh"
29 #include "EvtGenBase/EvtReport.hh"
31 
32 #include <stdlib.h>
33 #include <string>
34 
36 {
37  return "BTOKPIPI_CP";
38 }
39 
41 {
42  return new EvtBToKpipiCP;
43 }
44 
46 {
47  // check that there are 3 arguments
48  checkNArg( 3 );
49  checkNDaug( 3 );
50 
52 
56 
57  double alpha = getArg( 1 );
58  double beta = getArg( 2 );
59  int iset;
60  iset = 10000;
61 
62  EvtVector4R p4Kplus, p4piminus, p4gamm1, p4gamm2;
63 
64  double realA, imgA, realbarA, imgbarA;
65 
66  generator.EvtKpipi( alpha, beta, iset, p4Kplus, p4piminus, p4gamm1, p4gamm2,
67  realA, imgA, realbarA, imgbarA );
68 }
69 
71 {
72  //added by Lange Jan4,2000
73  static EvtId B0 = EvtPDL::getId( "B0" );
74  static EvtId B0B = EvtPDL::getId( "anti-B0" );
75 
76  double t;
77  EvtId other_b;
78 
79  EvtCPUtil::getInstance()->OtherB( p, t, other_b, 0.5 );
80 
81  EvtParticle *Kp, *pim, *pi0;
82 
83  p->makeDaughters( getNDaug(), getDaugs() );
84  Kp = p->getDaug( 0 );
85  pim = p->getDaug( 1 );
86  pi0 = p->getDaug( 2 );
87 
88  EvtVector4R p4[3];
89 
90  //double dm=getArg(0);
91  double alpha = getArg( 1 );
92  double beta = getArg( 2 );
93  int iset;
94 
95  iset = 0;
96 
97  EvtVector4R p4Kplus, p4piminus, p4gamm1, p4gamm2;
98 
99  double realA, imgA, realbarA, imgbarA;
100 
101  generator.EvtKpipi( alpha, beta, iset, p4[0], p4[1], p4gamm1, p4gamm2,
102  realA, imgA, realbarA, imgbarA );
103 
104  p4[2] = p4gamm1 + p4gamm2;
105 
106  Kp->init( getDaug( 0 ), p4[0] );
107  pim->init( getDaug( 1 ), p4[1] );
108  pi0->init( getDaug( 2 ), p4[2] );
109 
110  EvtComplex amp;
111 
112  EvtComplex A( realA, imgA );
113  EvtComplex Abar( realbarA, imgbarA );
114 
115  if ( other_b == B0B ) {
116  amp = Abar;
117  }
118  if ( other_b == B0 ) {
119  amp = A;
120  }
121 
122  vertex( amp );
123 
124  return;
125 }
void init() override
std::string getName() override
double getArg(unsigned int j)
void decay(EvtParticle *p) override
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
EvtBToKpipiCP * clone() override
void makeDaughters(unsigned int ndaug, EvtId *id)
void OtherB(EvtParticle *p, double &t, EvtId &otherb)
Definition: EvtCPUtil.cpp:372
void EvtKpipi(double alpha, double beta, int iset, EvtVector4R &p_K_plus, EvtVector4R &p_pi_minus, EvtVector4R &p_gamma_1, EvtVector4R &p_gamma_2, double &Real_B0, double &Imag_B0, double &Real_B0bar, double &Imag_B0bar)
Definition: EvtBTo3hCP.cpp:355
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
Definition: EvtId.hh:27
EvtBTo3hCP generator
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
static EvtCPUtil * getInstance()
Definition: EvtCPUtil.cpp:43
EvtParticle * getDaug(int i)
Definition: EvtParticle.cpp:91
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67