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.
EvtSVSCPLH.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/EvtConst.hh"
25 #include "EvtGenBase/EvtGenKine.hh"
26 #include "EvtGenBase/EvtId.hh"
27 #include "EvtGenBase/EvtPDL.hh"
29 #include "EvtGenBase/EvtPatches.hh"
30 #include "EvtGenBase/EvtReport.hh"
32 
33 #include <stdlib.h>
34 #include <string>
35 using std::endl;
36 
37 std::string EvtSVSCPLH::getName()
38 {
39  return "SVS_CPLH";
40 }
41 
43 {
44  return new EvtSVSCPLH;
45 }
46 
48 {
49  // check that there are 8 arguments
50  checkNArg( 8 );
51  checkNDaug( 2 );
52 
54 
57 
58  static double ctau = EvtPDL::getctau( EvtPDL::getId( "B0" ) );
59 
60  // hbar/s
61  _dm = getArg( 0 );
62  _dgamma = EvtConst::c * getArg( 1 ) / ctau;
63 
64  _qop = getArg( 2 ) * exp( EvtComplex( 0.0, getArg( 3 ) ) );
65 
66  _poq = 1.0 / _qop;
67 
68  _Af = getArg( 4 ) * exp( EvtComplex( 0.0, getArg( 5 ) ) );
69  _Abarf = getArg( 6 ) * exp( EvtComplex( 0.0, getArg( 7 ) ) );
70 
71  if ( verbose() ) {
72  EvtGenReport( EVTGEN_INFO, "EvtGen" ) << ":EvtSVSCPLH:dm=" << _dm << endl;
73  EvtGenReport( EVTGEN_INFO, "EvtGen" )
74  << ":EvtSVSCPLH:dGamma=" << _dgamma << endl;
75  EvtGenReport( EVTGEN_INFO, "EvtGen" )
76  << ":EvtSVSCPLH:q/p=" << _qop << endl;
77  EvtGenReport( EVTGEN_INFO, "EvtGen" ) << ":EvtSVSCPLH:Af=" << _Af << endl;
78  EvtGenReport( EVTGEN_INFO, "EvtGen" )
79  << ":EvtSVSCPLH:Abarf=" << _Abarf << endl;
80  }
81 }
82 
84 {
85  //This is probably not quite right, but it should do as a start...
86  //Anders
87 
88  setProbMax( 4.0 * ( getArg( 4 ) * getArg( 4 ) + getArg( 6 ) * getArg( 6 ) ) );
89 }
90 
92 {
94 
95  static EvtId B0 = EvtPDL::getId( "B0" );
96  static EvtId B0B = EvtPDL::getId( "anti-B0" );
97 
98  double t;
99  EvtId other_b;
100 
101  EvtCPUtil::getInstance()->OtherB( p, t, other_b, 0.5 );
102 
103  //convert time from mm to seconds
104  t /= EvtConst::c;
105 
106  //sign convention is dm=Mheavy-Mlight
107  // dGamma=Gammalight-Gammaheavy
108  //such that in the standard model both of these are positive.
109  EvtComplex gp = 0.5 *
110  ( exp( EvtComplex( 0.25 * t * _dgamma, -0.5 * t * _dm ) ) +
111  exp( EvtComplex( -0.25 * t * _dgamma, 0.5 * t * _dm ) ) );
112  EvtComplex gm = 0.5 *
113  ( exp( EvtComplex( 0.25 * t * _dgamma, -0.5 * t * _dm ) ) -
114  exp( EvtComplex( -0.25 * t * _dgamma, 0.5 * t * _dm ) ) );
115 
116  EvtComplex amp;
117 
118  if ( other_b == B0B ) {
119  amp = gp * _Af + _qop * gm * _Abarf;
120  } else if ( other_b == B0 ) {
121  amp = gp * _Abarf + _poq * gm * _Af;
122  } else {
123  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
124  << "other_b was not B0 or B0B!" << endl;
125  ::abort();
126  }
127 
128  EvtVector4R p4_parent = p->getP4Restframe();
129  ;
130 
131  double norm = p->getDaug( 0 )->mass() /
132  ( p->getDaug( 0 )->getP4().d3mag() * p4_parent.mass() );
133 
134  EvtParticle* v = p->getDaug( 0 );
135 
136  vertex( 0, amp * norm * ( p4_parent * ( v->epsParent( 0 ) ) ) );
137  vertex( 1, amp * norm * ( p4_parent * ( v->epsParent( 1 ) ) ) );
138  vertex( 2, amp * norm * ( p4_parent * ( v->epsParent( 2 ) ) ) );
139 
140  return;
141 }
void initProbMax() override
Definition: EvtSVSCPLH.cpp:83
EvtComplex _qop
Definition: EvtSVSCPLH.hh:45
void decay(EvtParticle *p) override
Definition: EvtSVSCPLH.cpp:91
double getArg(unsigned int j)
EvtComplex _Abarf
Definition: EvtSVSCPLH.hh:44
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
EvtComplex _poq
Definition: EvtSVSCPLH.hh:45
double mass() const
Definition: EvtVector4R.cpp:49
static double getctau(EvtId i)
Definition: EvtPDL.cpp:357
EvtDecayBase * clone() override
Definition: EvtSVSCPLH.cpp:42
double _dgamma
Definition: EvtSVSCPLH.hh:48
void OtherB(EvtParticle *p, double &t, EvtId &otherb)
Definition: EvtCPUtil.cpp:372
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
void setProbMax(double prbmx)
Definition: EvtId.hh:27
void vertex(const EvtComplex &amp)
Definition: EvtDecayAmp.hh:37
double initializePhaseSpace(unsigned int numdaughter, EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
virtual EvtVector4C epsParent(int i) const
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 const double c
Definition: EvtConst.hh:30
static EvtId getId(const std::string &name)
Definition: EvtPDL.cpp:287
const EvtVector4R & getP4() const
double _dm
Definition: EvtSVSCPLH.hh:47
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
double mass() const
double d3mag() const
int getNDaug() const
Definition: EvtDecayBase.hh:65
void init() override
Definition: EvtSVSCPLH.cpp:47
EvtComplex exp(const EvtComplex &c)
Definition: EvtComplex.hh:240
static EvtCPUtil * getInstance()
Definition: EvtCPUtil.cpp:43
EvtComplex _Af
Definition: EvtSVSCPLH.hh:44
int verbose() const
Definition: EvtDecayBase.hh:82
EvtParticle * getDaug(int i)
Definition: EvtParticle.cpp:91
std::string getName() override
Definition: EvtSVSCPLH.cpp:37
EvtVector4R getP4Restframe() const