]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TEvtGen/EvtGenModels/EvtSTS.cxx
Removing the flat makefiles
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenModels / EvtSTS.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: EvtSTS.cc
12 //
13 // Description: Routine to decay scalar -> tensor scalar.
14 //
15 //
16 // Modification history:
17 //
18 //    RYD       Aug  21, 1998       Module created
19 //
20 //------------------------------------------------------------------------
21 // 
22 #include "EvtGenBase/EvtPatches.hh"
23 #include <stdlib.h>
24 #include "EvtGenBase/EvtParticle.hh"
25 #include "EvtGenBase/EvtGenKine.hh"
26 #include "EvtGenBase/EvtTensor4C.hh"
27 #include "EvtGenBase/EvtVector4C.hh"
28 #include "EvtGenBase/EvtPDL.hh"
29 #include "EvtGenBase/EvtReport.hh"
30 #include "EvtGenModels/EvtSTS.hh"
31 #include "EvtGenBase/EvtId.hh"
32 #include <string>
33
34 EvtSTS::~EvtSTS() {}
35
36 std::string EvtSTS::getName(){
37
38   return "STS";     
39
40 }
41
42
43 EvtDecayBase* EvtSTS::clone(){
44
45   return new EvtSTS;
46
47 }
48
49 void EvtSTS::initProbMax(){
50
51   setProbMax(20.0);
52
53 }
54
55 void EvtSTS::init(){
56
57   // check that there are 0 arguments
58   checkNArg(0);
59   checkNDaug(2);
60     
61   checkSpinParent(EvtSpinType::SCALAR);
62
63   checkSpinDaughter(0,EvtSpinType::TENSOR);
64   checkSpinDaughter(1,EvtSpinType::SCALAR);
65
66 }
67
68
69 void EvtSTS::decay( EvtParticle *p){
70
71   p->initializePhaseSpace(getNDaug(),getDaugs());
72
73   EvtParticle* t1=p->getDaug(0);
74
75   EvtVector4R momt = t1->getP4();
76   EvtVector4R moms = p->getDaug(1)->getP4();
77   double masst = t1->mass();
78
79   EvtVector4R p4_parent=momt+moms;
80
81   double m_parent=p4_parent.mass();
82
83   double norm=masst*masst/(m_parent*momt.d3mag()*momt.d3mag());
84    
85   vertex(0,norm*t1->epsTensorParent(0).cont1(p4_parent)*p4_parent);
86   vertex(1,norm*t1->epsTensorParent(1).cont1(p4_parent)*p4_parent);
87   vertex(2,norm*t1->epsTensorParent(2).cont1(p4_parent)*p4_parent);
88   vertex(3,norm*t1->epsTensorParent(3).cont1(p4_parent)*p4_parent);
89   vertex(4,norm*t1->epsTensorParent(4).cont1(p4_parent)*p4_parent);
90
91   return ;
92 }
93