]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TEvtGen/EvtGenModels/EvtVVP.cxx
If default parameters are allowed and runNumber is provided, search first for the...
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenModels / EvtVVP.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) 1998      Caltech, UCSB
10 //
11 // Module: EvtVVP.cc
12 //
13 // Description: The decay Vector -> Vector gamma
14 //              E.g., CHI1->PSI GAMMA
15 //
16 // Modification history:
17 //
18 //    RYD       September 5, 1997       Module created
19 //
20 //------------------------------------------------------------------------
21 //
22 #include "EvtGenBase/EvtPatches.hh"
23 #include <stdlib.h>
24 #include <iostream>
25 #include <string>
26 #include "EvtGenBase/EvtVector3C.hh"
27 #include "EvtGenBase/EvtParticle.hh"
28 #include "EvtGenBase/EvtPDL.hh"
29 #include "EvtGenBase/EvtGenKine.hh"
30 #include "EvtGenBase/EvtVector4C.hh"
31 #include "EvtGenModels/EvtVVP.hh"
32 #include "EvtGenBase/EvtReport.hh"
33
34 EvtVVP::~EvtVVP() {}
35
36 std::string EvtVVP::getName(){
37
38   return "VVP";
39      
40 }
41
42
43 EvtDecayBase* EvtVVP::clone(){
44
45   return new EvtVVP;
46
47 }
48
49 void EvtVVP::init(){
50
51   // check that there are 8 arguments
52
53   checkNArg(8);
54   checkNDaug(2);
55
56   checkSpinParent(EvtSpinType::VECTOR);
57   checkSpinDaughter(0,EvtSpinType::VECTOR);
58   checkSpinDaughter(1,EvtSpinType::PHOTON);
59 }
60
61 void EvtVVP::initProbMax(){
62
63   setProbMax(4.0);
64
65 }
66
67 void EvtVVP::decay(EvtParticle *p){
68
69   p->initializePhaseSpace(getNDaug(),getDaugs());
70
71   EvtParticle *v,*ph;
72
73   v = p->getDaug(0);
74   ph = p->getDaug(1);
75
76   EvtVector3C epsp[3];
77   EvtVector3C epsv[3];
78   EvtVector3C epsph[2];
79
80   epsp[0]=p->eps(0).vec();
81   epsp[1]=p->eps(1).vec();
82   epsp[2]=p->eps(2).vec();
83
84   epsv[0]=v->eps(0).vec().conj();
85   epsv[1]=v->eps(1).vec().conj();
86   epsv[2]=v->eps(2).vec().conj();
87
88   epsph[0]=ph->epsParentPhoton(0).vec().conj();
89   epsph[1]=ph->epsParentPhoton(1).vec().conj();
90
91   int i,j,k;
92   for(i=0;i<3;i++){
93     for(j=0;j<3;j++){
94       for(k=0;k<2;k++){
95         vertex(i,j,k,epsp[i].cross(epsv[j])*epsph[k]);
96       }
97     }
98   }
99
100   return;
101
102 }
103