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.
EvtSSSCPT.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"
31 
32 #include <stdlib.h>
33 #include <string>
34 
35 std::string EvtSSSCPT::getName()
36 {
37  return "SSS_CPT";
38 }
39 
41 {
42  return new EvtSSSCPT;
43 }
44 
46 {
47  // check that there are 8 arguments
48  checkNArg( 8 );
49  checkNDaug( 2 );
50 }
51 
53 {
54  //added by Lange Jan4,2000
55  static EvtId B0 = EvtPDL::getId( "B0" );
56  static EvtId B0B = EvtPDL::getId( "anti-B0" );
57 
58  double t;
59  EvtId other_b;
60 
61  EvtCPUtil::getInstance()->OtherB( p, t, other_b, 0.5 );
62 
64 
65  EvtComplex amp;
66 
67  EvtComplex A, Abar;
68  EvtComplex P, Q, D, Im;
69 
70  P = EvtComplex( cos( -getArg( 0 ) ), sin( -getArg( 0 ) ) );
71  Q = EvtComplex( cos( getArg( 0 ) ), sin( getArg( 0 ) ) );
72  D = EvtComplex( getArg( 6 ) * cos( getArg( 7 ) ),
73  getArg( 6 ) * sin( getArg( 7 ) ) );
74  Im = EvtComplex( 0.0, 1.0 );
75 
76  A = EvtComplex( getArg( 2 ) * cos( getArg( 3 ) ),
77  getArg( 2 ) * sin( getArg( 3 ) ) );
78  Abar = EvtComplex( getArg( 4 ) * cos( getArg( 5 ) ),
79  getArg( 4 ) * sin( getArg( 5 ) ) );
80 
81  if ( other_b == B0B ) {
82  amp = A * cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) +
83  Im * sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) *
84  ( Q / P * A + 2.0 * D * Abar );
85  }
86  if ( other_b == B0 ) {
87  amp = Abar * cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) +
88  Im * sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) *
89  ( P / Q * A - 2.0 * D * Abar );
90  }
91 
92  vertex( amp );
93 
94  return;
95 }
void init() override
Definition: EvtSSSCPT.cpp:45
std::string getName() override
Definition: EvtSSSCPT.cpp:35
double getArg(unsigned int j)
void OtherB(EvtParticle *p, double &t, EvtId &otherb)
Definition: EvtCPUtil.cpp:372
EvtId * getDaugs()
Definition: EvtDecayBase.hh:66
void decay(EvtParticle *p) override
Definition: EvtSSSCPT.cpp:52
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)
void checkNDaug(int d1, int d2=-1)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
static const double c
Definition: EvtConst.hh:30
EvtDecayBase * clone() override
Definition: EvtSSSCPT.cpp:40
static EvtId getId(const std::string &name)
Definition: EvtPDL.cpp:287
int getNDaug() const
Definition: EvtDecayBase.hh:65
static EvtCPUtil * getInstance()
Definition: EvtCPUtil.cpp:43