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.
EvtSVVCPLH.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 
33 
34 #include <stdlib.h>
35 #include <string>
36 using std::endl;
37 
38 std::string EvtSVVCPLH::getName()
39 {
40  return "SVV_CPLH";
41 }
42 
44 {
45  return new EvtSVVCPLH;
46 }
47 
49 {
50  // check that there are 9 arguments
51  checkNArg( 9 );
52  checkNDaug( 2 );
53 
55 
58 }
59 
61 {
62  //This is probably not quite right, but it should do as a start...
63  //Anders
64 
65  setProbMax( 2 * ( getArg( 3 ) * getArg( 3 ) + getArg( 5 ) * getArg( 5 ) +
66  getArg( 7 ) * getArg( 7 ) ) );
67 }
68 
70 {
71  //added by Lange Jan4,2000
72  static EvtId BS0 = EvtPDL::getId( "B_s0" );
73  static EvtId BSB = EvtPDL::getId( "anti-B_s0" );
74 
75  double t;
76  EvtId other_b;
77 
78  EvtCPUtil::getInstance()->OtherB( p, t, other_b );
79 
80  EvtComplex G0P, G1P, G1M;
81 
82  G1P = EvtComplex( getArg( 3 ) * cos( getArg( 4 ) ),
83  getArg( 3 ) * sin( getArg( 4 ) ) );
84  G0P = EvtComplex( getArg( 5 ) * cos( getArg( 6 ) ),
85  getArg( 5 ) * sin( getArg( 6 ) ) );
86  G1M = EvtComplex( getArg( 7 ) * cos( getArg( 8 ) ),
87  getArg( 7 ) * sin( getArg( 8 ) ) );
88 
89  EvtComplex lambda_km = EvtComplex( cos( 2 * getArg( 0 ) ),
90  sin( 2 * getArg( 0 ) ) );
91 
92  double cdmt = cos( getArg( 1 ) * t / ( 2 * EvtConst::c ) );
93  double sdmt = sin( getArg( 1 ) * t / ( 2 * EvtConst::c ) );
94 
95  EvtComplex cG0P, cG1P, cG1M;
96 
97  static double ctauL = EvtPDL::getctau( EvtPDL::getId( "B_s0L" ) );
98  static double ctauH = EvtPDL::getctau( EvtPDL::getId( "B_s0H" ) );
99 
100  //I'm not sure if the fabs() is right when t can be
101  //negative as in the case of Bs produced coherently.
102  double pt = 1;
103  double mt = exp( -fabs( t * ( ctauL - ctauH ) / ( ctauL * ctauH ) ) );
104 
105  if ( other_b == BSB ) {
106  cG0P = pt * G0P *
107  ( cdmt + lambda_km * EvtComplex( 0.0, getArg( 2 ) * sdmt ) );
108  cG1P = pt * G1P *
109  ( cdmt + lambda_km * EvtComplex( 0.0, getArg( 2 ) * sdmt ) );
110  cG1M = mt * G1M *
111  ( cdmt - lambda_km * EvtComplex( 0.0, getArg( 2 ) * sdmt ) );
112  } else if ( other_b == BS0 ) {
113  cG0P = pt * G0P *
114  ( cdmt +
115  ( 1.0 / lambda_km ) * EvtComplex( 0.0, getArg( 2 ) * sdmt ) );
116  cG1P = pt * G1P *
117  ( cdmt +
118  ( 1.0 / lambda_km ) * EvtComplex( 0.0, getArg( 2 ) * sdmt ) );
119  cG1M = -mt * G1M *
120  ( cdmt -
121  ( 1.0 / lambda_km ) * EvtComplex( 0.0, getArg( 2 ) * sdmt ) );
122  } else {
123  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
124  << "other_b was not BSB or BS0!" << endl;
125  ::abort();
126  }
127 
128  EvtComplex A0, AP, AM;
129 
130  A0 = cG0P / sqrt( 2.0 );
131  AP = ( cG1P + cG1M ) / sqrt( 2.0 );
132  AM = ( cG1P - cG1M ) / sqrt( 2.0 );
133 
134  EvtSVVHelAmp::SVVHel( p, _amp2, getDaug( 0 ), getDaug( 1 ), AP, A0, AM );
135 
136  return;
137 }
void init() override
Definition: EvtSVVCPLH.cpp:48
EvtDecayBase * clone() override
Definition: EvtSVVCPLH.cpp:43
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)
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
void decay(EvtParticle *p) override
Definition: EvtSVVCPLH.cpp:69
static double getctau(EvtId i)
Definition: EvtPDL.cpp:357
void OtherB(EvtParticle *p, double &t, EvtId &otherb)
Definition: EvtCPUtil.cpp:372
void setProbMax(double prbmx)
std::string getName() override
Definition: EvtSVVCPLH.cpp:38
Definition: EvtId.hh:27
void initProbMax() override
Definition: EvtSVVCPLH.cpp:60
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)
EvtComplex exp(const EvtComplex &c)
Definition: EvtComplex.hh:240
static EvtCPUtil * getInstance()
Definition: EvtCPUtil.cpp:43
EvtAmp _amp2
Definition: EvtDecayAmp.hh:73
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67