]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TEvtGen/EvtGenModels/EvtVVSPwave.cpp
Updates EvtGen Code
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenModels / EvtVVSPwave.cpp
CommitLineData
da0e9ce3 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// RYD November 24, 1996 Module created
20//
21//------------------------------------------------------------------------
22//
23#include "EvtGenBase/EvtPatches.hh"
24#include <stdlib.h>
25#include "EvtGenBase/EvtParticle.hh"
26#include "EvtGenBase/EvtGenKine.hh"
27#include "EvtGenBase/EvtPDL.hh"
28#include "EvtGenBase/EvtVector4C.hh"
29#include "EvtGenBase/EvtTensor4C.hh"
30#include "EvtGenBase/EvtReport.hh"
31#include "EvtGenModels/EvtVVSPwave.hh"
32#include <string>
33using std::endl;
34
35EvtVVSPwave::~EvtVVSPwave() {}
36
37std::string EvtVVSPwave::getName(){
38
39 return "VVS_PWAVE";
40
41}
42
43
44EvtDecayBase* EvtVVSPwave::clone(){
45
46 return new EvtVVSPwave;
47
48}
49
50void EvtVVSPwave::init(){
51
52 // check that there are 6 arguments
53 checkNArg(6);
54 checkNDaug(2);
55
56 checkSpinParent(EvtSpinType::VECTOR);
57 checkSpinDaughter(0,EvtSpinType::VECTOR);
58 checkSpinDaughter(1,EvtSpinType::SCALAR);
59}
60
61void EvtVVSPwave::initProbMax() {
62
63 //probmax is 1.0 for all possible decays I think!
64
65 setProbMax(1.0);
66
67}
68
69void EvtVVSPwave::decay( EvtParticle *p){
70
71 p->initializePhaseSpace(getNDaug(),getDaugs());
72
73 EvtComplex as(getArg(0)*cos(getArg(1)),getArg(0)*sin(getArg(1)));
74 EvtComplex ap(getArg(2)*cos(getArg(3)),getArg(2)*sin(getArg(3)));
75 EvtComplex ad(getArg(4)*cos(getArg(5)),getArg(4)*sin(getArg(5)));
76
77 if (ap!=EvtComplex(0.0,0.0)) {
78 report(ERROR,"EvtGen") << "In EvtVectorToVectorScalar.cc"<<endl;
79 report(ERROR,"EvtGen") << "P wave not yet implemented!!"<<endl;
80 ::abort();
81 }
82
0ca57c2f 83 EvtParticle *v;
da0e9ce3 84 v=p->getDaug(0);
da0e9ce3 85
86 EvtTensor4C d,g;
87
88 g.setdiag(1.0,-1.0,-1.0,-1.0);
89
0ca57c2f 90 d=ad*((1.0/(v->getP4().d3mag()*v->getP4().d3mag()))*
91 EvtGenFunctions::directProd(v->getP4(),v->getP4())+(1/3.0)*g)+
da0e9ce3 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
114}