]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TEvtGen/EvtGenModels/EvtVPHOtoV.cxx
AliDecayer realisation for the EvtGen code and EvtGen itself.
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenModels / EvtVPHOtoV.cxx
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) 2004      Cornell
10 //
11 // Module: EvtVPHOtoV.cc
12 //
13 // Description: Routine to decay vpho -> vector
14 //
15 // Modification history:
16 //
17 //    Ryd       March 9, 2004       Module created
18 //
19 //------------------------------------------------------------------------
20 // 
21 #include <stdlib.h>
22 #include "EvtGenBase/EvtParticle.hh"
23 #include "EvtGenBase/EvtGenKine.hh"
24 #include "EvtGenBase/EvtPDL.hh"
25 #include "EvtGenBase/EvtVector4C.hh"
26 #include "EvtGenBase/EvtVector4R.hh"
27 #include "EvtGenBase/EvtReport.hh"
28 #include "EvtGenModels/EvtVPHOtoV.hh"
29 #include <string>
30
31 EvtVPHOtoV::~EvtVPHOtoV() {}
32
33 std::string EvtVPHOtoV::getName(){
34
35   return "VPHOTOV"; 
36     
37 }
38
39
40 EvtDecayBase* EvtVPHOtoV::clone(){
41
42   return new EvtVPHOtoV;
43
44 }
45
46 void EvtVPHOtoV::init(){
47
48   // check that there are 0 arguments
49   checkNArg(0);
50
51   // check that there are 1 daughters
52   checkNDaug(1);
53
54   // check the parent and daughter spins
55   checkSpinParent(EvtSpinType::VECTOR);
56   checkSpinDaughter(0,EvtSpinType::VECTOR);
57 }
58
59 void EvtVPHOtoV::initProbMax() {
60
61    setProbMax(1.0);
62
63 }      
64
65 void EvtVPHOtoV::decay( EvtParticle *p){
66
67   p->initializePhaseSpace(getNDaug(),getDaugs());
68
69   EvtParticle* d=p->getDaug(0);
70
71   d->setP4(p->getP4Restframe());  
72
73   vertex(0,0,p->eps(0)*p->epsParent(0).conj());
74   vertex(1,0,p->eps(1)*p->epsParent(0).conj());
75   vertex(2,0,p->eps(2)*p->epsParent(0).conj());
76
77   vertex(0,1,p->eps(0)*p->epsParent(1).conj());
78   vertex(1,1,p->eps(1)*p->epsParent(1).conj());
79   vertex(2,1,p->eps(2)*p->epsParent(1).conj());
80
81   vertex(0,2,p->eps(0)*p->epsParent(2).conj());
82   vertex(1,2,p->eps(1)*p->epsParent(2).conj());
83   vertex(2,2,p->eps(2)*p->epsParent(2).conj());
84
85   return;
86 }
87