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