EvtGen 2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Loading...
Searching...
No Matches
EvtSVPHelAmp.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
24#include "EvtGenBase/EvtId.hh"
25#include "EvtGenBase/EvtPDL.hh"
33
34#include <stdlib.h>
35#include <string>
36
37std::string EvtSVPHelAmp::getName() const
38{
39 return "SVP_HELAMP";
40}
41
43{
44 return new EvtSVPHelAmp;
45}
46
48{
49 setProbMax( 2.0 * ( getArg( 0 ) * getArg( 0 ) + getArg( 2 ) * getArg( 2 ) ) );
50}
51
53{
54 // check that there are 4 arguments
55 checkNArg( 4 );
56 checkNDaug( 2 );
57
59
62}
63
65{
66 SVPHel( p, m_amp2, getDaug( 0 ), getDaug( 1 ),
67 EvtComplex( getArg( 0 ) * cos( getArg( 1 ) ),
68 getArg( 0 ) * sin( getArg( 1 ) ) ),
69 EvtComplex( getArg( 2 ) * cos( getArg( 3 ) ),
70 getArg( 2 ) * sin( getArg( 3 ) ) ) );
71
72 return;
73}
74
75void EvtSVPHelAmp::SVPHel( EvtParticle* parent, EvtAmp& amp, EvtId n_v1,
76 EvtId n_v2, const EvtComplex& hp, const EvtComplex& hm )
77{
78 // Routine to decay a vector into a vector and scalar. Started
79 // by ryd on Oct 17, 1996.
80
81 // This routine is adopted from EvtSVVHel and since there is
82 // a photon that can not have helicity 0 this is put in by
83 // setting the h0 amplitude to 0.
84 EvtComplex h0 = EvtComplex( 0.0, 0.0 );
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
99 EvtVector3R v1dir( momv1.get( 1 ), momv1.get( 2 ), momv1.get( 3 ) );
100 v1dir = v1dir / v1dir.d3mag();
101
102 EvtComplex a = -0.5 * ( hp + hm );
103 EvtComplex b = EvtComplex( 0.0, 0.5 ) * ( hp - hm );
104 EvtComplex c = h0 + 0.5 * ( hp + hm );
105
106 EvtTensor3C M = a * EvtTensor3C::id() + b * EvtGenFunctions::eps( v1dir ) +
107 c * EvtGenFunctions::directProd( v1dir, v1dir );
108
109 EvtVector3C t0 = M.cont1( v1->eps( 0 ).vec().conj() );
110 EvtVector3C t1 = M.cont1( v1->eps( 1 ).vec().conj() );
111 EvtVector3C t2 = M.cont1( v1->eps( 2 ).vec().conj() );
112
113 EvtVector3C eps0 = v2->epsParentPhoton( 0 ).vec().conj();
114 EvtVector3C eps1 = v2->epsParentPhoton( 1 ).vec().conj();
115
116 amp.vertex( 0, 0, t0 * eps0 );
117 amp.vertex( 0, 1, t0 * eps1 );
118 //amp.vertex(0,2,t1*eps0*0.);
119
120 amp.vertex( 1, 0, t1 * eps0 );
121 amp.vertex( 1, 1, t1 * eps1 );
122 //amp.vertex(1,2,t1*eps0*0.);
123
124 amp.vertex( 2, 0, t2 * eps0 );
125 amp.vertex( 2, 1, t2 * eps1 );
126 //amp.vertex(2,2,t1*eps0*0.);
127
128 return;
129}
void vertex(const EvtComplex &amp)
Definition EvtAmp.cpp:453
EvtAmp m_amp2
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
EvtDecayBase()=default
void checkSpinParent(EvtSpinType::spintype sp)
double getArg(unsigned int j)
void setProbMax(double prbmx)
EvtId getDaug(int i) const
void checkNDaug(int d1, int d2=-1)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
Definition EvtId.hh:27
double initializePhaseSpace(size_t numdaughter, const EvtId *daughters, bool forceResetMasses=false, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
const EvtVector4R & getP4() const
EvtParticle * getDaug(const int i)
virtual EvtVector4C epsParentPhoton(int i) const
virtual EvtVector4C eps(int i) const
EvtDecayBase * clone() const override
void initProbMax() override
void decay(EvtParticle *p) override
static void SVPHel(EvtParticle *parent, EvtAmp &amp, EvtId n_v1, EvtId n_ph, const EvtComplex &hp, const EvtComplex &hm)
std::string getName() const override
void init() override
static const EvtTensor3C & id()
EvtVector3C conj() const
double d3mag() const
EvtVector3C vec() const
double get(int i) const
EvtTensor3C eps(const EvtVector3R &v)
EvtTensor3C directProd(const EvtVector3C &c1, const EvtVector3C &c2)