Line data Source code
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: EvtSSSCP.cc
12 : //
13 : // Description: Routine to decay scalar -> 2 scalars
14 : //
15 : // Modification history:
16 : //
17 : // RYD November 24, 1996 Module created
18 : //
19 : //------------------------------------------------------------------------
20 : //
21 : #include "EvtGenBase/EvtPatches.hh"
22 : #include <stdlib.h>
23 : #include "EvtGenBase/EvtParticle.hh"
24 : #include "EvtGenBase/EvtGenKine.hh"
25 : #include "EvtGenBase/EvtCPUtil.hh"
26 : #include "EvtGenBase/EvtPDL.hh"
27 : #include "EvtGenBase/EvtReport.hh"
28 : #include "EvtGenModels/EvtSSSCP.hh"
29 : #include <string>
30 : #include "EvtGenBase/EvtConst.hh"
31 :
32 0 : EvtSSSCP::~EvtSSSCP() {}
33 :
34 : std::string EvtSSSCP::getName(){
35 :
36 0 : return "SSS_CP";
37 :
38 : }
39 :
40 :
41 : EvtDecayBase* EvtSSSCP::clone(){
42 :
43 0 : return new EvtSSSCP;
44 :
45 0 : }
46 :
47 : void EvtSSSCP::init(){
48 :
49 : // check that there are 7 arguments
50 0 : checkNArg(7);
51 0 : checkNDaug(2);
52 0 : checkSpinParent(EvtSpinType::SCALAR);
53 :
54 0 : checkSpinDaughter(0,EvtSpinType::SCALAR);
55 0 : checkSpinDaughter(1,EvtSpinType::SCALAR);
56 :
57 0 : }
58 :
59 : void EvtSSSCP::initProbMax(){
60 :
61 : //This is probably not quite right, but it should do as a start...
62 : //Anders
63 :
64 0 : setProbMax(2*(getArg(3)*getArg(3)+getArg(5)*getArg(5)));
65 :
66 0 : }
67 :
68 : void EvtSSSCP::decay( EvtParticle *p ){
69 :
70 : //added by Lange Jan4,2000
71 0 : static EvtId B0=EvtPDL::getId("B0");
72 0 : static EvtId B0B=EvtPDL::getId("anti-B0");
73 :
74 0 : double t;
75 0 : EvtId other_b;
76 :
77 0 : EvtCPUtil::getInstance()->OtherB(p,t,other_b,0.5);
78 :
79 0 : p->initializePhaseSpace(getNDaug(),getDaugs());
80 :
81 :
82 0 : EvtComplex amp;
83 :
84 0 : EvtComplex A,Abar;
85 :
86 0 : A=EvtComplex(getArg(3)*cos(getArg(4)),getArg(3)*sin(getArg(4)));
87 0 : Abar=EvtComplex(getArg(5)*cos(getArg(6)),getArg(5)*sin(getArg(6)));
88 :
89 0 : if (other_b==B0B){
90 0 : amp=A*cos(getArg(1)*t/(2*EvtConst::c))+
91 0 : EvtComplex(cos(-2.0*getArg(0)),sin(-2.0*getArg(0)))*
92 0 : getArg(2)*EvtComplex(0.0,1.0)*Abar*sin(getArg(1)*t/(2*EvtConst::c));
93 0 : }
94 0 : if (other_b==B0){
95 0 : amp=A*EvtComplex(cos(2.0*getArg(0)),sin(2.0*getArg(0)))*
96 0 : EvtComplex(0.0,1.0)*sin(getArg(1)*t/(2*EvtConst::c))+
97 0 : getArg(2)*Abar*cos(getArg(1)*t/(2*EvtConst::c));
98 0 : }
99 :
100 0 : vertex(amp);
101 :
102 : return ;
103 0 : }
104 :
105 : std::string EvtSSSCP::getParamName(int i) {
106 0 : switch(i) {
107 : case 0:
108 0 : return "weakPhase";
109 : case 1:
110 0 : return "deltaM";
111 : case 2:
112 0 : return "finalStateCP";
113 : case 3:
114 0 : return "Af";
115 : case 4:
116 0 : return "AfPhase";
117 : case 5:
118 0 : return "Abarf";
119 : case 6:
120 0 : return "AbarfPhase";
121 : default:
122 0 : return "";
123 : }
124 0 : }
125 :
126 : std::string EvtSSSCP::getParamDefault(int i) {
127 0 : switch(i) {
128 : case 3:
129 0 : return "1.0";
130 : case 4:
131 0 : return "0.0";
132 : case 5:
133 0 : return "1.0";
134 : case 6:
135 0 : return "0.0";
136 : default:
137 0 : return "";
138 : }
139 0 : }
|