CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtVVSPwave.cc
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of the EvtGen package developed jointly
5// for the BaBar and CLEO collaborations. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/COPYRIGHT
9// Copyright (C) 1998 Caltech, UCSB
10//
11// Module: EvtVVSPwave.cc
12//
13// Description: Routine to decay vector-> vector scalar in Partial-wave
14// Routine to decay a vector into a vector and scalar. Started
15// by ryd on Aug 20, 1996.
16//
17// Modification history:
18//
19// Ping R.G. November 24, 2008 P-wave implement
20// RYD November 24, 1996 Module created
21//
22//------------------------------------------------------------------------
23//
25#include <stdlib.h>
28#include "EvtGenBase/EvtPDL.hh"
33#include <string>
34using std::endl;
35
37
38void EvtVVSPwave::getName(std::string& model_name){
39
40 model_name="VVS_PWAVE";
41
42}
43
44
46
47 return new EvtVVSPwave;
48
49}
50
52
53 // check that there are 6 arguments
54 checkNArg(6);
55 checkNDaug(2);
56
60}
61
63
64 //probmax is 1.0 for all possible decays I think!
65
66 setProbMax(1.0);
67
68}
69
71
73
74 EvtComplex as(getArg(0)*cos(getArg(1)),getArg(0)*sin(getArg(1)));
75 EvtComplex ap(getArg(2)*cos(getArg(3)),getArg(2)*sin(getArg(3)));
76 EvtComplex ad(getArg(4)*cos(getArg(5)),getArg(4)*sin(getArg(5)));
77
78 EvtParticle *v,*s;
79 v=p->getDaug(0);
80 s=p->getDaug(1);
81
82 if (ap!=EvtComplex(0.0,0.0)) { // implement P-wave pingrg,2008-11-24
83 EvtVector4C epi[3],epf[3];
84
85 epi[0] = p->eps(0); //for parent polarization
86 epi[1] = p->eps(1);
87 epi[2] = p->eps(2);
88
89 epf[0] = v->eps(0); //for sun vector polarization
90 epf[1] = v->eps(1);
91 epf[2] = v->eps(2);
92
93 EvtVector4R momv = p->getDaug(0)->getP4();
94 EvtVector3C p1(momv.get(1),momv.get(2),momv.get(3));
95
96 EvtVector3C ei0(epi[0].get(1),epi[0].get(2),epi[0].get(3));
97 EvtVector3C ei1(epi[1].get(1),epi[1].get(2),epi[1].get(3));
98 EvtVector3C ei2(epi[2].get(1),epi[2].get(2),epi[2].get(3));
99
100 EvtVector3C ef0(epf[0].get(1),epf[0].get(2),epf[0].get(3));
101 EvtVector3C ef1(epf[1].get(1),epf[1].get(2),epf[1].get(3));
102 EvtVector3C ef2(epf[2].get(1),epf[2].get(2),epf[2].get(3));
103
104 double norm = 1/momv.d3mag();
105 EvtVector3C q0 = p1.cross(ef0);
106 EvtVector3C q1 = p1.cross(ef1);
107 EvtVector3C q2 = p1.cross(ef2);
108
109 vertex(0,0,norm*ei0.conj()*q0);
110 vertex(0,1,norm*ei0.conj()*q1);
111 vertex(0,2,norm*ei0.conj()*q2);
112
113 vertex(1,0,norm*ei1.conj()*q0);
114 vertex(1,1,norm*ei1.conj()*q1);
115 vertex(1,2,norm*ei1.conj()*q2);
116
117 vertex(2,0,norm*ei2.conj()*q0);
118 vertex(2,1,norm*ei2.conj()*q1);
119 vertex(2,2,norm*ei2.conj()*q2);
120
121 } else if (as!=EvtComplex(0.0,0.0) || ad!=EvtComplex(0.0,0.0) ){// implemet s- and d-wave
122
123 // EvtParticle *v,*s;
124 // v=p->getDaug(0);
125 // s=p->getDaug(1);
126
127 EvtTensor4C d,g;
128
129 g.setdiag(1.0,-1.0,-1.0,-1.0);
130
131 d=ad*((1.0/(v->getP4().d3mag()*v->getP4().d3mag()))*directProd(v->getP4(),v->getP4())+(1/3.0)*g)+
132 as*g;
133
134 EvtVector4C ep0,ep1,ep2;
135
136 ep0=d.cont1(p->eps(0));
137 ep1=d.cont1(p->eps(1));
138 ep2=d.cont1(p->eps(2));
139
140 vertex(0,0,ep0.cont(v->eps(0).conj()));
141 vertex(0,1,ep0.cont(v->eps(1).conj()));
142 vertex(0,2,ep0.cont(v->eps(2).conj()));
143
144 vertex(1,0,ep1.cont(v->eps(0).conj()));
145 vertex(1,1,ep1.cont(v->eps(1).conj()));
146 vertex(1,2,ep1.cont(v->eps(2).conj()));
147
148 vertex(2,0,ep2.cont(v->eps(0).conj()));
149 vertex(2,1,ep2.cont(v->eps(1).conj()));
150 vertex(2,2,ep2.cont(v->eps(2).conj()));
151 } else
152 {
153 report(ERROR,"EvtGen") << "In EvtVectorToVectorScalar.cc"<<endl;
154 report(ERROR,"EvtGen") << "Not all zero value for parameters are need!!"<<endl;
155 ::abort();
156 }
157 return ;
158
159}
double sin(const BesAngle a)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213
Evt3Rank3C directProd(const EvtVector3C &c1, const EvtVector3C &c2, const EvtVector3C &c3)
ostream & report(Severity severity, const char *facility)
Definition: EvtReport.cc:36
@ ERROR
Definition: EvtReport.hh:49
XmlRpcServer s
Definition: HelloServer.cpp:11
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition: KarLud.h:35
void vertex(const EvtComplex &amp)
Definition: EvtDecayAmp.hh:37
void checkSpinDaughter(int d1, EvtSpinType::spintype sp)
void checkSpinParent(EvtSpinType::spintype sp)
double getArg(int j)
void setProbMax(double prbmx)
void checkNDaug(int d1, int d2=-1)
EvtId * getDaugs()
Definition: EvtDecayBase.hh:65
void checkNArg(int a1, int a2=-1, int a3=-1, int a4=-1)
const EvtVector4R & getP4() const
Definition: EvtParticle.cc:121
EvtParticle * getDaug(int i)
Definition: EvtParticle.cc:85
virtual EvtVector4C eps(int i) const
Definition: EvtParticle.cc:574
double initializePhaseSpace(int numdaughter, EvtId *daughters, double poleSize=-1., int whichTwo1=0, int whichTwo2=1)
void setdiag(double t00, double t11, double t22, double t33)
Definition: EvtTensor4C.cc:218
EvtVector4C cont1(const EvtVector4C &v4) const
Definition: EvtTensor4C.cc:461
EvtDecayBase * clone()
Definition: EvtVVSPwave.cc:45
void decay(EvtParticle *p)
Definition: EvtVVSPwave.cc:70
void initProbMax()
Definition: EvtVVSPwave.cc:62
virtual ~EvtVVSPwave()
Definition: EvtVVSPwave.cc:36
void init()
Definition: EvtVVSPwave.cc:51
void getName(std::string &name)
Definition: EvtVVSPwave.cc:38
EvtVector3C cross(const EvtVector3C &v2)
Definition: EvtVector3C.cc:48
EvtVector3C conj() const
Definition: EvtVector3C.hh:171
EvtComplex cont(const EvtVector4C &v4) const
Definition: EvtVector4C.hh:146
double get(int i) const
Definition: EvtVector4R.hh:179
double d3mag() const
Definition: EvtVector4R.cc:186