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
EvtTVSPwave.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>
32
33std::string EvtTVSPwave::getName() const
34{
35 return "TVS_PWAVE";
36}
37
39{
40 return new EvtTVSPwave;
41}
42
44{
45 // check that there are 6 arguments
46 checkNArg( 6 );
47 checkNDaug( 2 );
48
50
53}
54
56{
57 setProbMax( 0.5 );
58}
59
61{
62 EvtComplex ap( getArg( 0 ) * cos( getArg( 1 ) ),
63 getArg( 0 ) * sin( getArg( 1 ) ) );
64 EvtComplex ad( getArg( 2 ) * cos( getArg( 3 ) ),
65 getArg( 2 ) * sin( getArg( 3 ) ) );
66 EvtComplex af( getArg( 4 ) * cos( getArg( 5 ) ),
67 getArg( 4 ) * sin( getArg( 5 ) ) );
68
69 if ( ap != EvtComplex( 0.0, 0.0 ) || af != EvtComplex( 0.0, 0.0 ) ) {
70 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
71 << "dfslkh8945wqh:In EvtTensorToVectorScalar.c\n";
72 EvtGenReport( EVTGEN_ERROR, "EvtGen" )
73 << "P or F wave not yet implemented!! (ryd) \n";
74 }
75
77
78 EvtParticle* v;
79 v = p->getDaug( 0 );
80 EvtVector4R momv = v->getP4();
81 double massv = v->mass();
82
83 EvtComplex temp;
84 temp = ad;
85 double parentMass = p->mass();
86
87 EvtVector4R p_parent;
88
89 p_parent.set( parentMass, 0.0, 0.0, 0.0 );
90
91 EvtVector4C pep0, pep1, pep2, pep3, pep4;
92 EvtTensor4C pdual;
93
94 EvtVector4C epsdual0, epsdual1, epsdual2;
95
96 double norm = massv /
97 ( parentMass * momv.get( 0 ) * momv.d3mag() * momv.d3mag() );
98 pdual = dual( EvtGenFunctions::directProd( norm * p_parent, momv ) );
99
100 epsdual0 = pdual.cont1( v->epsParent( 0 ).conj() );
101 epsdual1 = pdual.cont1( v->epsParent( 1 ).conj() );
102 epsdual2 = pdual.cont1( v->epsParent( 2 ).conj() );
103
104 pep0 = p->epsTensor( 0 ).cont1( momv );
105 pep1 = p->epsTensor( 1 ).cont1( momv );
106 pep2 = p->epsTensor( 2 ).cont1( momv );
107 pep3 = p->epsTensor( 3 ).cont1( momv );
108 pep4 = p->epsTensor( 4 ).cont1( momv );
109
110 vertex( 0, 0, pep0 * epsdual0 );
111 vertex( 1, 0, pep1 * epsdual0 );
112 vertex( 2, 0, pep2 * epsdual0 );
113 vertex( 3, 0, pep3 * epsdual0 );
114 vertex( 4, 0, pep4 * epsdual0 );
115
116 vertex( 0, 1, pep0 * epsdual1 );
117 vertex( 1, 1, pep1 * epsdual1 );
118 vertex( 2, 1, pep2 * epsdual1 );
119 vertex( 3, 1, pep3 * epsdual1 );
120 vertex( 4, 1, pep4 * epsdual1 );
121
122 vertex( 0, 2, pep0 * epsdual2 );
123 vertex( 1, 2, pep1 * epsdual2 );
124 vertex( 2, 2, pep2 * epsdual2 );
125 vertex( 3, 2, pep3 * epsdual2 );
126 vertex( 4, 2, pep4 * epsdual2 );
127
128 return;
129}
130
131std::string EvtTVSPwave::getParamName( int i )
132{
133 switch ( i ) {
134 case 0:
135 return "PWave";
136 case 1:
137 return "PWavePhase";
138 case 2:
139 return "DWave";
140 case 3:
141 return "DWavePhase";
142 case 4:
143 return "FWave";
144 case 5:
145 return "FWavePhase";
146 default:
147 return "";
148 }
149}
150
152{
153 switch ( i ) {
154 case 0:
155 return "0.0";
156 case 1:
157 return "0.0";
158 case 2:
159 return "1.0";
160 case 3:
161 return "0.0";
162 case 4:
163 return "0.0";
164 case 5:
165 return "0.0";
166 default:
167 return "";
168 }
169}
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=nullptr)
Definition EvtReport.cpp:32
@ EVTGEN_ERROR
Definition EvtReport.hh:49
EvtTensor4C dual(const EvtTensor4C &t2)
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
virtual EvtVector4C epsParent(int i) 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)
double mass() const
virtual EvtTensor4C epsTensor(int i) const
void decay(EvtParticle *p) override
void initProbMax() override
EvtDecayBase * clone() const override
void init() override
std::string getName() const override
std::string getParamName(int i) override
std::string getParamDefault(int i) override
EvtVector4C cont1(const EvtVector4C &v4) const
EvtVector4C conj() const
double get(int i) const
double d3mag() const
void set(int i, double d)
EvtTensor3C directProd(const EvtVector3C &c1, const EvtVector3C &c2)