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.
EvtSTSCP.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 
21 #include "EvtGenModels/EvtSTSCP.hh"
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"
33 
34 #include <stdlib.h>
35 #include <string>
36 
37 std::string EvtSTSCP::getName()
38 {
39  return "STS_CP";
40 }
41 
43 {
44  //This is probably not quite right, but it should do as a start...
45  //Anders
46 
47  setProbMax( 20 * ( getArg( 3 ) * getArg( 3 ) + getArg( 5 ) * getArg( 5 ) ) );
48 }
49 
51 {
52  return new EvtSTSCP;
53 }
54 
56 {
57  // check that there are 7 arguments
58  checkNArg( 7 );
59  checkNDaug( 2 );
60 
62 
65 }
66 
68 {
69  //added by Lange Jan4,2000
70  static EvtId B0 = EvtPDL::getId( "B0" );
71  static EvtId B0B = EvtPDL::getId( "anti-B0" );
72 
73  double t;
74  EvtId other_b;
75 
76  EvtParticle* t1;
78  t1 = p->getDaug( 0 );
79  EvtVector4R momt = t1->getP4();
80  EvtVector4R moms = p->getDaug( 1 )->getP4();
81  double masst = t1->mass();
82 
83  EvtCPUtil::getInstance()->OtherB( p, t, other_b, 0.5 );
84 
85  double m_parent = p->mass();
86 
87  EvtComplex amp;
88 
89  EvtComplex A, Abar;
90 
91  A = EvtComplex( getArg( 3 ) * cos( getArg( 4 ) ),
92  getArg( 3 ) * sin( getArg( 4 ) ) );
93  Abar = EvtComplex( getArg( 5 ) * cos( getArg( 6 ) ),
94  getArg( 5 ) * sin( getArg( 6 ) ) );
95 
96  if ( other_b == B0B ) {
97  amp = A * cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) +
98  EvtComplex( cos( -2.0 * getArg( 0 ) ), sin( -2.0 * getArg( 0 ) ) ) *
99  getArg( 2 ) * EvtComplex( 0.0, 1.0 ) * Abar *
100  sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) );
101  }
102  if ( other_b == B0 ) {
103  amp = A * EvtComplex( cos( 2.0 * getArg( 0 ) ), sin( 2.0 * getArg( 0 ) ) ) *
104  EvtComplex( 0.0, 1.0 ) *
105  sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) +
106  getArg( 2 ) * Abar * cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) );
107  }
108 
109  EvtVector4R p4_parent;
110 
111  p4_parent = momt + moms;
112 
113  double norm = masst * masst / ( m_parent * momt.d3mag() * momt.d3mag() );
114 
115  vertex( 0, amp * norm * t1->epsTensorParent( 0 ).cont1( p4_parent ) *
116  p4_parent );
117  vertex( 1, amp * norm * t1->epsTensorParent( 1 ).cont1( p4_parent ) *
118  p4_parent );
119  vertex( 2, amp * norm * t1->epsTensorParent( 2 ).cont1( p4_parent ) *
120  p4_parent );
121  vertex( 3, amp * norm * t1->epsTensorParent( 3 ).cont1( p4_parent ) *
122  p4_parent );
123  vertex( 4, amp * norm * t1->epsTensorParent( 4 ).cont1( p4_parent ) *
124  p4_parent );
125 
126  return;
127 }
128 
129 std::string EvtSTSCP::getParamName( int i )
130 {
131  switch ( i ) {
132  case 0:
133  return "weakPhase";
134  case 1:
135  return "deltaM";
136  case 2:
137  return "finalStateCP";
138  case 3:
139  return "Af";
140  case 4:
141  return "AfPhase";
142  case 5:
143  return "Abarf";
144  case 6:
145  return "AbarfPhase";
146  default:
147  return "";
148  }
149 }
150 
151 std::string EvtSTSCP::getParamDefault( int i )
152 {
153  switch ( i ) {
154  case 3:
155  return "1.0";
156  case 4:
157  return "0.0";
158  case 5:
159  return "1.0";
160  case 6:
161  return "0.0";
162  default:
163  return "";
164  }
165 }
virtual EvtTensor4C epsTensorParent(int i) const
double getArg(unsigned int j)
void init() override
Definition: EvtSTSCP.cpp:55
void decay(EvtParticle *p) override
Definition: EvtSTSCP.cpp:67
EvtVector4C cont1(const EvtVector4C &v4) const
std::string getName() override
Definition: EvtSTSCP.cpp:37
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
std::string getParamName(int i) override
Definition: EvtSTSCP.cpp:129
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)
std::string getParamDefault(int i) override
Definition: EvtSTSCP.cpp:151
void checkNDaug(int d1, int d2=-1)
EvtDecayBase * clone() override
Definition: EvtSTSCP.cpp:50
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
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
double mass() const
double d3mag() const
int getNDaug() const
Definition: EvtDecayBase.hh:65
static EvtCPUtil * getInstance()
Definition: EvtCPUtil.cpp:43
EvtParticle * getDaug(int i)
Definition: EvtParticle.cpp:91
void initProbMax() override
Definition: EvtSTSCP.cpp:42