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