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.
EvtSSSCP.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/EvtSSSCP.hh"
22 
23 #include "EvtGenBase/EvtCPUtil.hh"
24 #include "EvtGenBase/EvtConst.hh"
25 #include "EvtGenBase/EvtGenKine.hh"
26 #include "EvtGenBase/EvtPDL.hh"
28 #include "EvtGenBase/EvtPatches.hh"
29 #include "EvtGenBase/EvtReport.hh"
30 
31 #include <stdlib.h>
32 #include <string>
33 
34 std::string EvtSSSCP::getName()
35 {
36  return "SSS_CP";
37 }
38 
40 {
41  return new EvtSSSCP;
42 }
43 
45 {
46  // check that there are 7 arguments
47  checkNArg( 7 );
48  checkNDaug( 2 );
50 
53 }
54 
56 {
57  //This is probably not quite right, but it should do as a start...
58  //Anders
59 
60  setProbMax( 2 * ( getArg( 3 ) * getArg( 3 ) + getArg( 5 ) * getArg( 5 ) ) );
61 }
62 
64 {
65  //added by Lange Jan4,2000
66  static EvtId B0 = EvtPDL::getId( "B0" );
67  static EvtId B0B = EvtPDL::getId( "anti-B0" );
68 
69  double t;
70  EvtId other_b;
71 
72  EvtCPUtil::getInstance()->OtherB( p, t, other_b, 0.5 );
73 
75 
76  EvtComplex amp;
77 
78  EvtComplex A, Abar;
79 
80  A = EvtComplex( getArg( 3 ) * cos( getArg( 4 ) ),
81  getArg( 3 ) * sin( getArg( 4 ) ) );
82  Abar = EvtComplex( getArg( 5 ) * cos( getArg( 6 ) ),
83  getArg( 5 ) * sin( getArg( 6 ) ) );
84 
85  if ( other_b == B0B ) {
86  amp = A * cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) +
87  EvtComplex( cos( -2.0 * getArg( 0 ) ), sin( -2.0 * getArg( 0 ) ) ) *
88  getArg( 2 ) * EvtComplex( 0.0, 1.0 ) * Abar *
89  sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) );
90  }
91  if ( other_b == B0 ) {
92  amp = A * EvtComplex( cos( 2.0 * getArg( 0 ) ), sin( 2.0 * getArg( 0 ) ) ) *
93  EvtComplex( 0.0, 1.0 ) *
94  sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) ) +
95  getArg( 2 ) * Abar * cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) );
96  }
97 
98  vertex( amp );
99 
100  return;
101 }
102 
103 std::string EvtSSSCP::getParamName( int i )
104 {
105  switch ( i ) {
106  case 0:
107  return "weakPhase";
108  case 1:
109  return "deltaM";
110  case 2:
111  return "finalStateCP";
112  case 3:
113  return "Af";
114  case 4:
115  return "AfPhase";
116  case 5:
117  return "Abarf";
118  case 6:
119  return "AbarfPhase";
120  default:
121  return "";
122  }
123 }
124 
125 std::string EvtSSSCP::getParamDefault( int i )
126 {
127  switch ( i ) {
128  case 3:
129  return "1.0";
130  case 4:
131  return "0.0";
132  case 5:
133  return "1.0";
134  case 6:
135  return "0.0";
136  default:
137  return "";
138  }
139 }
void init() override
Definition: EvtSSSCP.cpp:44
std::string getName() override
Definition: EvtSSSCP.cpp:34
double getArg(unsigned int j)
std::string getParamName(int i) override
Definition: EvtSSSCP.cpp:103
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)
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
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
void initProbMax() override
Definition: EvtSSSCP.cpp:55
int getNDaug() const
Definition: EvtDecayBase.hh:65
static EvtCPUtil * getInstance()
Definition: EvtCPUtil.cpp:43
void decay(EvtParticle *p) override
Definition: EvtSSSCP.cpp:63
std::string getParamDefault(int i) override
Definition: EvtSSSCP.cpp:125
EvtDecayBase * clone() override
Definition: EvtSSSCP.cpp:39