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
EvtVVSPwave.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/EvtPDL.hh"
29
30#include <stdlib.h>
31#include <string>
32using std::endl;
33
34std::string EvtVVSPwave::getName() const
35{
36 return "VVS_PWAVE";
37}
38
40{
41 return new EvtVVSPwave;
42}
43
45{
46 // check that there are 6 arguments
47 checkNArg( 6 );
48 checkNDaug( 2 );
49
53}
54
56{
57 //probmax is 1.0 for all possible decays I think!
58
59 setProbMax( 1.0 );
60}
61
63{
65
66 EvtComplex as( getArg( 0 ) * cos( getArg( 1 ) ),
67 getArg( 0 ) * sin( getArg( 1 ) ) );
68 EvtComplex ap( getArg( 2 ) * cos( getArg( 3 ) ),
69 getArg( 2 ) * sin( getArg( 3 ) ) );
70 EvtComplex ad( getArg( 4 ) * cos( getArg( 5 ) ),
71 getArg( 4 ) * sin( getArg( 5 ) ) );
72
73 if ( ap != EvtComplex( 0.0, 0.0 ) ) {
74 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
75 << "In EvtVectorToVectorScalar.cc" << endl;
76 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
77 << "P wave not yet implemented!!" << endl;
78 ::abort();
79 }
80
81 EvtParticle* v;
82 v = p->getDaug( 0 );
83
84 EvtTensor4C d, g;
85
86 g.setdiag( 1.0, -1.0, -1.0, -1.0 );
87
88 d = ad * ( ( 1.0 / ( v->getP4().d3mag() * v->getP4().d3mag() ) ) *
90 ( 1 / 3.0 ) * g ) +
91 as * g;
92
93 EvtVector4C ep0, ep1, ep2;
94
95 ep0 = d.cont1( p->eps( 0 ) );
96 ep1 = d.cont1( p->eps( 1 ) );
97 ep2 = d.cont1( p->eps( 2 ) );
98
99 vertex( 0, 0, ep0.cont( v->eps( 0 ).conj() ) );
100 vertex( 0, 1, ep0.cont( v->eps( 1 ).conj() ) );
101 vertex( 0, 2, ep0.cont( v->eps( 2 ).conj() ) );
102
103 vertex( 1, 0, ep1.cont( v->eps( 0 ).conj() ) );
104 vertex( 1, 1, ep1.cont( v->eps( 1 ).conj() ) );
105 vertex( 1, 2, ep1.cont( v->eps( 2 ).conj() ) );
106
107 vertex( 2, 0, ep2.cont( v->eps( 0 ).conj() ) );
108 vertex( 2, 1, ep2.cont( v->eps( 1 ).conj() ) );
109 vertex( 2, 2, ep2.cont( v->eps( 2 ).conj() ) );
110
111 return;
112}
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition EvtReport.cpp:32
@ EVTGEN_ERROR
Definition EvtReport.hh:49
void vertex(const EvtComplex &amp)
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
EvtDecayBase()=default
int getNDaug() const
void checkSpinParent(EvtSpinType::spintype sp)
double getArg(unsigned int j)
void setProbMax(double prbmx)
void checkNDaug(int d1, int d2=-1)
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
const EvtId * getDaugs() const
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 eps(int i) const
void setdiag(double t00, double t11, double t22, double t33)
EvtVector4C cont1(const EvtVector4C &v4) const
void initProbMax() override
void decay(EvtParticle *p) override
std::string getName() const override
EvtDecayBase * clone() const override
void init() override
EvtVector4C conj() const
EvtComplex cont(const EvtVector4C &v4) const
double d3mag() const
EvtTensor3C directProd(const EvtVector3C &c1, const EvtVector3C &c2)