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.
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 
23 #include "EvtGenBase/EvtGenKine.hh"
24 #include "EvtGenBase/EvtPDL.hh"
26 #include "EvtGenBase/EvtPatches.hh"
27 #include "EvtGenBase/EvtReport.hh"
28 
29 #include <stdlib.h>
30 #include <string>
31 
33 {
34  return "CB3PI-P00";
35 }
36 
38 {
39  return new EvtCBTo3piP00;
40 }
41 
43 {
44  // check that there are 1 argument
45  checkNArg( 1 );
46  checkNDaug( 3 );
47 
49 
53 
54  int iset( 10000 );
55  double alpha = getArg( 0 );
56  EvtVector4R pin, p4pi1, p4Gamma11, p4Gamma12;
57  EvtVector4R p4Gamma21, p4Gamma22;
58  double realA, imgA, realbarA, imgbarA;
59  generator.Evt3piP00( alpha, iset, pin, p4Gamma11, p4Gamma12, p4Gamma21,
60  p4Gamma22, realA, imgA, realbarA, imgbarA );
61 }
62 
64 {
65  setProbMax( 1.5 );
66 }
67 
69 {
70  //added by Lange Jan4,2000
71  static EvtId BM = EvtPDL::getId( "B-" );
72  static EvtId BP = EvtPDL::getId( "B+" );
73 
74  EvtParticle *pi1, *pi2, *pi3;
75 
76  p->makeDaughters( getNDaug(), getDaugs() );
77  pi1 = p->getDaug( 0 );
78  pi2 = p->getDaug( 1 );
79  pi3 = p->getDaug( 2 );
80 
81  EvtVector4R p4[3];
82  double alpha = getArg( 0 );
83  int iset( 0 );
84 
85  EvtVector4R p4pi1, p4Gamma11, p4Gamma12;
86  EvtVector4R p4Gamma21, p4Gamma22;
87 
88  double realA, imgA, realbarA, imgbarA;
89  generator.Evt3piP00( alpha, iset, p4[0], p4Gamma11, p4Gamma12, p4Gamma21,
90  p4Gamma22, realA, imgA, realbarA, imgbarA );
91 
92  p4[1] = p4Gamma11 + p4Gamma12;
93  p4[2] = p4Gamma21 + p4Gamma22;
94  pi1->init( getDaug( 0 ), p4[0] );
95  pi2->init( getDaug( 1 ), p4[1] );
96  pi3->init( getDaug( 2 ), p4[2] );
97 
98  EvtComplex A( realA, imgA );
99  EvtComplex Abar( realbarA, imgbarA );
100 
101  EvtComplex amp;
102  if ( p->getId() == BP ) {
103  amp = A;
104  }
105  if ( p->getId() == BM ) {
106  amp = Abar;
107  }
108 
109  vertex( amp );
110 
111  return;
112 }
void init() override
EvtCBTo3piP00 * clone() override
double getArg(unsigned int j)
virtual void init(EvtId part_n, const EvtVector4R &p4)=0
void initProbMax() override
EvtId getId() const
std::string getName() override
void makeDaughters(unsigned int ndaug, EvtId *id)
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
void setProbMax(double prbmx)
Definition: EvtId.hh:27
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 decay(EvtParticle *p) override
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
int getNDaug() const
Definition: EvtDecayBase.hh:65
EvtParticle * getDaug(int i)
Definition: EvtParticle.cpp:91
EvtBTo3hCP generator
void Evt3piP00(double alpha, int iset, EvtVector4R &p_p1, EvtVector4R &p_p1_gamma1, EvtVector4R &p_p1_gamma2, EvtVector4R &p_p2_gamma1, EvtVector4R &p_p2_gamma2, double &Real_B0, double &Imag_B0, double &Real_B0bar, double &Imag_B0bar)
Definition: EvtBTo3hCP.cpp:279
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67