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.
EvtSVVCP.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/EvtSVVCP.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"
31 
33 
34 #include <stdlib.h>
35 #include <string>
36 
37 std::string EvtSVVCP::getName()
38 {
39  return "SVV_CP";
40 }
41 
43 {
44  return new EvtSVVCP;
45 }
46 
48 {
49  // check that there are 9 arguments
50  checkNArg( 9 );
51  checkNDaug( 2 );
52 
54 
57 }
58 
60 {
61  //This is probably not quite right, but it should do as a start...
62  //Anders
63 
64  setProbMax( 2 * ( getArg( 3 ) * getArg( 3 ) + getArg( 5 ) * getArg( 5 ) +
65  getArg( 7 ) * getArg( 7 ) ) );
66 }
67 
69 {
70  //added by Lange Jan4,2000
71  static EvtId B0 = EvtPDL::getId( "B0" );
72  static EvtId B0B = EvtPDL::getId( "anti-B0" );
73 
74  double t;
75  EvtId other_b;
76 
77  EvtCPUtil::getInstance()->OtherB( p, t, other_b, 0.5 );
78 
79  EvtComplex G0P, G1P, G1M;
80 
81  G1P = EvtComplex( getArg( 3 ) * cos( getArg( 4 ) ),
82  getArg( 3 ) * sin( getArg( 4 ) ) );
83  G0P = EvtComplex( getArg( 5 ) * cos( getArg( 6 ) ),
84  getArg( 5 ) * sin( getArg( 6 ) ) );
85  G1M = EvtComplex( getArg( 7 ) * cos( getArg( 8 ) ),
86  getArg( 7 ) * sin( getArg( 8 ) ) );
87 
88  EvtComplex lambda_km = EvtComplex( cos( -2 * getArg( 0 ) ),
89  sin( -2 * getArg( 0 ) ) );
90 
91  double cdmt = cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) );
92  double sdmt = sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) );
93 
94  EvtComplex cG0P, cG1P, cG1M;
95 
96  if ( other_b == B0B ) {
97  cG0P = G0P * ( cdmt + lambda_km * EvtComplex( 0.0, getArg( 2 ) * sdmt ) );
98  cG1P = G1P * ( cdmt + lambda_km * EvtComplex( 0.0, getArg( 2 ) * sdmt ) );
99  cG1M = G1M * ( cdmt - lambda_km * EvtComplex( 0.0, getArg( 2 ) * sdmt ) );
100  }
101  if ( other_b == B0 ) {
102  cG0P = G0P * ( cdmt + ( 1.0 / lambda_km ) *
103  EvtComplex( 0.0, getArg( 2 ) * sdmt ) );
104  cG1P = G1P * ( cdmt + ( 1.0 / lambda_km ) *
105  EvtComplex( 0.0, getArg( 2 ) * sdmt ) );
106  cG1M = -G1M * ( cdmt - ( 1.0 / lambda_km ) *
107  EvtComplex( 0.0, getArg( 2 ) * sdmt ) );
108  }
109 
110  EvtComplex A0, AP, AM;
111 
112  A0 = cG0P / sqrt( 2.0 );
113  AP = ( cG1P + cG1M ) / sqrt( 2.0 );
114  AM = ( cG1P - cG1M ) / sqrt( 2.0 );
115 
116  EvtSVVHelAmp::SVVHel( p, _amp2, getDaug( 0 ), getDaug( 1 ), AP, A0, AM );
117 
118  return;
119 }
120 
121 std::string EvtSVVCP::getParamName( int i )
122 {
123  switch ( i ) {
124  case 0:
125  return "weakPhase";
126  case 1:
127  return "deltaM";
128  case 2:
129  return "eta";
130  case 3:
131  return "G1Plus";
132  case 4:
133  return "G1PlusPhase";
134  case 5:
135  return "G0Plus";
136  case 6:
137  return "G0PlusPhase";
138  case 7:
139  return "G1Minus";
140  case 8:
141  return "G1MinusPhase";
142  default:
143  return "";
144  }
145 }
146 
147 std::string EvtSVVCP::getParamDefault( int i )
148 {
149  switch ( i ) {
150  case 3:
151  return "1.0";
152  case 4:
153  return "0.0";
154  case 5:
155  return "1.0";
156  case 6:
157  return "0.0";
158  case 7:
159  return "1.0";
160  case 8:
161  return "0.0";
162  default:
163  return "";
164  }
165 }
std::string getParamDefault(int i) override
Definition: EvtSVVCP.cpp:147
double getArg(unsigned int j)
static void SVVHel(EvtParticle *parent, EvtAmp &amp, EvtId n_v1, EvtId n_v2, const EvtComplex &hp, const EvtComplex &h0, const EvtComplex &hm)
EvtDecayBase * clone() override
Definition: EvtSVVCP.cpp:42
void initProbMax() override
Definition: EvtSVVCP.cpp:59
void OtherB(EvtParticle *p, double &t, EvtId &otherb)
Definition: EvtCPUtil.cpp:372
void setProbMax(double prbmx)
Definition: EvtId.hh:27
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 init() override
Definition: EvtSVVCP.cpp:47
std::string getParamName(int i) override
Definition: EvtSVVCP.cpp:121
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
static EvtCPUtil * getInstance()
Definition: EvtCPUtil.cpp:43
std::string getName() override
Definition: EvtSVVCP.cpp:37
EvtAmp _amp2
Definition: EvtDecayAmp.hh:73
void decay(EvtParticle *p) override
Definition: EvtSVVCP.cpp:68
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67