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.
EvtSVVHelAmp.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/EvtGenKine.hh"
24 #include "EvtGenBase/EvtId.hh"
25 #include "EvtGenBase/EvtPDL.hh"
27 #include "EvtGenBase/EvtPatches.hh"
28 #include "EvtGenBase/EvtReport.hh"
34 
35 #include <stdlib.h>
36 #include <string>
37 
38 std::string EvtSVVHelAmp::getName()
39 {
40  return "SVV_HELAMP";
41 }
42 
44 {
45  return new EvtSVVHelAmp;
46 }
47 
49 {
50  // check that there are 6 arguments
51  checkNArg( 6 );
52  checkNDaug( 2 );
53 
55 
58 }
59 
61 {
62  setProbMax( getArg( 0 ) * getArg( 0 ) + getArg( 2 ) * getArg( 2 ) +
63  getArg( 4 ) * getArg( 4 ) );
64 }
65 
67 {
68  SVVHel( p, _amp2, getDaug( 0 ), getDaug( 1 ),
69  EvtComplex( getArg( 0 ) * cos( getArg( 1 ) ),
70  getArg( 0 ) * sin( getArg( 1 ) ) ),
71  EvtComplex( getArg( 2 ) * cos( getArg( 3 ) ),
72  getArg( 2 ) * sin( getArg( 3 ) ) ),
73  EvtComplex( getArg( 4 ) * cos( getArg( 5 ) ),
74  getArg( 4 ) * sin( getArg( 5 ) ) ) );
75 
76  return;
77 }
78 
79 void EvtSVVHelAmp::SVVHel( EvtParticle* parent, EvtAmp& amp, EvtId n_v1,
80  EvtId n_v2, const EvtComplex& hp,
81  const EvtComplex& h0, const EvtComplex& hm )
82 {
83  // Routine to decay a vector into a vector and scalar. Started
84  // by ryd on Oct 17, 1996.
85 
86  int tndaug = 2;
87  EvtId tdaug[2];
88  tdaug[0] = n_v1;
89  tdaug[1] = n_v2;
90 
91  parent->initializePhaseSpace( tndaug, tdaug );
92 
93  EvtParticle *v1, *v2;
94  v1 = parent->getDaug( 0 );
95  v2 = parent->getDaug( 1 );
96 
97  EvtVector4R momv1 = v1->getP4();
98  //EvtVector4R momv2 = v2->getP4();
99 
100  EvtVector3R v1dir( momv1.get( 1 ), momv1.get( 2 ), momv1.get( 3 ) );
101  v1dir = v1dir / v1dir.d3mag();
102 
103  EvtComplex a = -0.5 * ( hp + hm );
104  EvtComplex b = EvtComplex( 0.0, 0.5 ) * ( hp - hm );
105  EvtComplex c = h0 + 0.5 * ( hp + hm );
106 
107  EvtTensor3C M = a * EvtTensor3C::id() + b * EvtGenFunctions::eps( v1dir ) +
108  c * EvtGenFunctions::directProd( v1dir, v1dir );
109 
110  EvtVector3C t0 = M.cont1( v1->eps( 0 ).vec().conj() );
111  EvtVector3C t1 = M.cont1( v1->eps( 1 ).vec().conj() );
112  EvtVector3C t2 = M.cont1( v1->eps( 2 ).vec().conj() );
113 
114  EvtVector3C eps0 = v2->eps( 0 ).vec().conj();
115  EvtVector3C eps1 = v2->eps( 1 ).vec().conj();
116  EvtVector3C eps2 = v2->eps( 2 ).vec().conj();
117 
118  amp.vertex( 0, 0, t0 * eps0 );
119  amp.vertex( 0, 1, t0 * eps1 );
120  amp.vertex( 0, 2, t0 * eps2 );
121 
122  amp.vertex( 1, 0, t1 * eps0 );
123  amp.vertex( 1, 1, t1 * eps1 );
124  amp.vertex( 1, 2, t1 * eps2 );
125 
126  amp.vertex( 2, 0, t2 * eps0 );
127  amp.vertex( 2, 1, t2 * eps1 );
128  amp.vertex( 2, 2, t2 * eps2 );
129 
130  return;
131 }
132 
133 std::string EvtSVVHelAmp::getParamName( int i )
134 {
135  switch ( i ) {
136  case 0:
137  return "plusHelAmp";
138  case 1:
139  return "plusHelAmpPhase";
140  case 2:
141  return "zeroHelAmp";
142  case 3:
143  return "zeroHelAmpPhase";
144  case 4:
145  return "minusHelAmp";
146  case 5:
147  return "minusHelAmpPhase";
148  default:
149  return "";
150  }
151 }
152 
153 std::string EvtSVVHelAmp::getParamDefault( int i )
154 {
155  switch ( i ) {
156  case 0:
157  return "1.0";
158  case 1:
159  return "0.0";
160  case 2:
161  return "1.0";
162  case 3:
163  return "0.0";
164  case 4:
165  return "1.0";
166  case 5:
167  return "0.0";
168  default:
169  return "";
170  }
171 }
EvtTensor3C directProd(const EvtVector3C &c1, const EvtVector3C &c2)
void decay(EvtParticle *p) override
std::string getName() override
virtual EvtVector4C eps(int i) const
double d3mag() const
Definition: EvtVector3R.cpp:89
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)
static const EvtTensor3C & id()
EvtVector3C cont1(const EvtVector3C &v) const
std::string getParamName(int i) override
void initProbMax() override
EvtVector3C vec() const
Definition: EvtVector4C.hh:103
void setProbMax(double prbmx)
EvtVector3C conj() const
Definition: EvtVector3C.hh:176
Definition: EvtId.hh:27
void vertex(const EvtComplex &amp)
Definition: EvtAmp.cpp:454
double get(int i) const
Definition: EvtVector4R.hh:162
double initializePhaseSpace(unsigned int numdaughter, EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
Definition: EvtAmp.hh:30
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)
const EvtVector4R & getP4() const
void init() override
EvtTensor3C eps(const EvtVector3R &v)
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
std::string getParamDefault(int i) override
EvtParticle * getDaug(int i)
Definition: EvtParticle.cpp:91
EvtAmp _amp2
Definition: EvtDecayAmp.hh:73
EvtDecayBase * clone() override
EvtId getDaug(int i) const
Definition: EvtDecayBase.hh:67