evtgen is hosted by Hepforge, IPPP Durham
EvtGen  2.0.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
EvtSLBKPoleFF.cpp
Go to the documentation of this file.
1 
2 /***********************************************************************
3 * Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4 * *
5 * This file is part of EvtGen. *
6 * *
7 * EvtGen is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * EvtGen is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU General Public License *
18 * along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19 ***********************************************************************/
20 
21 #include "EvtGenModels/EvtSLBKPoleFF.hh" //modified
22 
23 #include "EvtGenBase/EvtPDL.hh"
24 #include "EvtGenBase/EvtPatches.hh"
25 #include "EvtGenBase/EvtReport.hh"
26 
27 #include <math.h>
28 #include <stdlib.h>
29 #include <string>
30 
31 EvtSLBKPoleFF::EvtSLBKPoleFF( int numarg, double* arglist )
32 { //modified
33  numSLBKPoleargs = numarg; //modified
34  for ( int i = 0; i < numarg; i++ ) {
35  SLBKPoleargs[i] = arglist[i];
36  } //modified
37 
38  return;
39 }
40 
41 void EvtSLBKPoleFF::getscalarff( EvtId parent, EvtId daught, double t,
42  double /*mass*/, double* fpf, double* f0f )
43 {
44  // Form factors have a general form, with parameters passed in
45  // from the arguments.
46 
47  if ( numSLBKPoleargs != 4 ) { //modified
48  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
49  << "Problem in EvtSLBKPoleFF::getscalarff\n";
50  EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << "wrong number of arguments!\n";
51  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
52  << "number args:" << numSLBKPoleargs << " (expected 4)\n";
53  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
54  << "Parent:" << EvtPDL::name( parent ) << "\n";
55  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
56  << "Daughter:" << EvtPDL::name( daught ) << "\n";
57  }
58 
59  double f0, af, powf;
60 
61  //double a_0, a_1, a_2, a_3, a_4, a_5, a_6, a_7;
62 
63  f0 = SLBKPoleargs[0]; //f0
64  af = SLBKPoleargs[1]; //alpha
65  //bf = SLBKPoleargs[2];
66  double mass_star2 = SLBKPoleargs[3] * SLBKPoleargs[3];
67  powf = 1.0;
68  *fpf = f0 / ( pow( 1.0 - ( 1.0 + af ) * ( t / mass_star2 ) +
69  ( af * ( ( t / mass_star2 ) * ( t / mass_star2 ) ) ),
70  powf ) ); //modified
71 
72  f0 = SLBKPoleargs[0]; //f0
73  af = SLBKPoleargs[2]; //beta
74  //bf = SLBKPoleargs[6];
75  powf = 1.0;
76 
77  *f0f = f0 / ( pow( 1.0 - ( t / mass_star2 / af ), powf ) ); //modified
78 
79  return;
80 }
81 
82 void EvtSLBKPoleFF::getvectorff( EvtId parent, EvtId /*daught*/, double t,
83  double /*mass*/, double* a1f, double* a2f,
84  double* vf, double* a0f )
85 {
86  if ( numSLBKPoleargs != 8 ) { //modified
87  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
88  << "Problem in EvtSLBKPoleFF::getvectorff\n"; //modified
89  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
90  << "wrong number of arguements!!!\n";
91  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
92  << numSLBKPoleargs << "\n"; //modified
93  // printf("\n*********************%d*********************",numSLBKPoleargs);
94  }
95 
96  EvtGenReport( EVTGEN_INFO, "EvtGen" )
97  << "Check the implementation of EvtSLBKPoleFF::getvectorff()!\n";
98 
99  double mb = EvtPDL::getMeanMass( parent );
100  double mb2 = mb * mb;
101 
102  //modified-begin
103  static EvtId B0 = EvtPDL::getId( "B0" );
104  static EvtId B0B = EvtPDL::getId( "anti-B0" );
105  static EvtId BP = EvtPDL::getId( "B+" );
106  static EvtId BM = EvtPDL::getId( "B-" );
107  static EvtId BS0 = EvtPDL::getId( "B_s0" );
108 
109  static EvtId B0S = EvtPDL::getId( "B*0" );
110  static EvtId BPMS = EvtPDL::getId( "B*+" );
111  static EvtId BS0S = EvtPDL::getId( "B_s*0" );
112 
113  static EvtId D0 = EvtPDL::getId( "D0" );
114  static EvtId D0B = EvtPDL::getId( "anti-D0" );
115  static EvtId DP = EvtPDL::getId( "D+" );
116  static EvtId DM = EvtPDL::getId( "D-" );
117  static EvtId DSP = EvtPDL::getId( "D_s+" );
118  static EvtId DSM = EvtPDL::getId( "D_s-" );
119 
120  static EvtId D0S = EvtPDL::getId( "D*0" );
121  static EvtId DPMS = EvtPDL::getId( "D*+" );
122  static EvtId DSPMS = EvtPDL::getId( "D_s*+" );
123 
124  double mass_star = 0.0;
125  double mass_star2 = 0.0;
126  if ( parent == B0 || parent == B0B ) {
127  mass_star = EvtPDL::getMeanMass( B0S );
128  mass_star2 = mass_star * mass_star;
129  }
130  if ( parent == BP || parent == BM ) {
131  mass_star = EvtPDL::getMeanMass( BPMS );
132  mass_star2 = mass_star * mass_star;
133  }
134  if ( parent == BS0 ) {
135  mass_star = EvtPDL::getMeanMass( BS0S );
136  mass_star2 = mass_star * mass_star;
137  }
138 
139  if ( parent == D0 || parent == D0B ) {
140  mass_star = EvtPDL::getMeanMass( D0S );
141  mass_star2 = mass_star * mass_star;
142  }
143  if ( parent == DP || parent == DM ) {
144  mass_star = EvtPDL::getMeanMass( DPMS );
145  mass_star2 = mass_star * mass_star;
146  }
147  if ( parent == DSP || parent == DSM ) {
148  mass_star = EvtPDL::getMeanMass( DSPMS );
149  mass_star2 = mass_star * mass_star;
150  }
151  //modified-end
152 
153  double f0, af, bf, powf;
154 
155  f0 = SLBKPoleargs[2]; //A1
156  af = SLBKPoleargs[6]; //b'
157  bf = 0; //0
158  powf = 1.0; //1.0
159  *a1f = f0 / ( pow( 1.0 - af * t / mass_star2, powf ) ); //modified
160 
161  f0 = SLBKPoleargs[3]; //A2
162  af = SLBKPoleargs[6]; //b'
163  bf = SLBKPoleargs[7]; //b''==0
164  powf = 1.0; //1.0
165 
166  *a2f = f0 /
167  ( pow( 1.0 - ( af + bf ) * ( t / mass_star2 ) +
168  ( af * bf ) * ( ( t / mass_star2 ) * ( t / mass_star2 ) ),
169  powf ) ); //modified
170 
171  f0 = SLBKPoleargs[0]; //V0
172  af = SLBKPoleargs[4]; //a
173  bf = 0; //0
174  powf = 1.0; //1.0
175 
176  *vf = f0 / ( pow( 1.0 - ( 1.0 + af ) * ( t / mass_star2 ) +
177  af * ( t / mass_star2 ) * ( t / mass_star2 ),
178  powf ) ); //modified
179 
180  f0 = SLBKPoleargs[1]; //A0
181  af = SLBKPoleargs[5]; //a'
182  bf = 0; //0
183  powf = 1.0; //1.0
184 
185  *a0f = f0 / ( pow( 1.0 - ( 1.0 + af ) * ( t / mb2 ) +
186  af * ( ( t / mb2 ) * ( t / mb2 ) ),
187  powf ) ); //modified
188  return;
189 }
190 
191 void EvtSLBKPoleFF::gettensorff( EvtId parent, EvtId /*daught*/, double t,
192  double /*mass*/, double* hf, double* kf,
193  double* bpf, double* bmf )
194 {
195  if ( numSLBKPoleargs != 16 ) {
196  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
197  << "Problem in EvtSLBKPoleFF::gettensorff\n";
198  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
199  << "wrong number of arguements!!!\n";
200  }
201 
202  EvtGenReport( EVTGEN_INFO, "EvtGen" )
203  << "Check the implementation of EvtSLBKPoleFF::gettensorff()!\n";
204 
205  double mb = EvtPDL::getMeanMass( parent );
206  double mb2 = mb * mb;
207 
208  double f0, af, bf, powf;
209 
210  f0 = SLBKPoleargs[0];
211  af = SLBKPoleargs[1];
212  bf = SLBKPoleargs[2];
213  powf = SLBKPoleargs[3];
214  *hf = f0 /
215  ( pow( 1.0 + ( af * t / mb2 ) + ( bf * ( ( t / mb2 ) * ( t / mb2 ) ) ),
216  powf ) );
217 
218  f0 = SLBKPoleargs[4];
219  af = SLBKPoleargs[5];
220  bf = SLBKPoleargs[6];
221  powf = SLBKPoleargs[7];
222 
223  *kf = f0 /
224  ( pow( 1.0 + ( af * t / mb2 ) + ( bf * ( ( t / mb2 ) * ( t / mb2 ) ) ),
225  powf ) );
226 
227  f0 = SLBKPoleargs[8];
228  af = SLBKPoleargs[9];
229  bf = SLBKPoleargs[10];
230  powf = SLBKPoleargs[11];
231 
232  *bpf = f0 /
233  ( pow( 1.0 + ( af * t / mb2 ) + ( bf * ( ( t / mb2 ) * ( t / mb2 ) ) ),
234  powf ) );
235 
236  f0 = SLBKPoleargs[12];
237  af = SLBKPoleargs[13];
238  bf = SLBKPoleargs[14];
239  powf = SLBKPoleargs[15];
240 
241  *bmf = f0 /
242  ( pow( 1.0 + ( af * t / mb2 ) + ( bf * ( ( t / mb2 ) * ( t / mb2 ) ) ),
243  powf ) );
244  return;
245 }
246 
247 void EvtSLBKPoleFF::getbaryonff( EvtId, EvtId, double, double, double*, double*,
248  double*, double* )
249 {
250  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
251  << "Not implemented :getbaryonff in EvtSLBKPoleFF.\n";
252  ::abort();
253 }
254 
255 void EvtSLBKPoleFF::getdiracff( EvtId, EvtId, double, double, double*, double*,
256  double*, double*, double*, double* )
257 {
258  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
259  << "Not implemented :getdiracff in EvtSLBKPoleFF.\n";
260  ::abort();
261 }
262 
263 void EvtSLBKPoleFF::getraritaff( EvtId, EvtId, double, double, double*, double*,
264  double*, double*, double*, double*, double*,
265  double* )
266 {
267  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
268  << "Not implemented :getraritaff in EvtSLBKPoleFF.\n";
269  ::abort();
270 }
void gettensorff(EvtId parent, EvtId daught, double t, double mass, double *hf, double *kf, double *bp, double *bm) override
EvtSLBKPoleFF(int numarg, double *arglist)
static std::string name(EvtId i)
Definition: EvtPDL.cpp:382
void getraritaff(EvtId, EvtId, double, double, double *, double *, double *, double *, double *, double *, double *, double *) override
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
void getscalarff(EvtId parent, EvtId daught, double t, double mass, double *fpf, double *f0f) override
double SLBKPoleargs[16]
static double getMeanMass(EvtId i)
Definition: EvtPDL.cpp:314
Definition: EvtId.hh:27
static EvtId getId(const std::string &name)
Definition: EvtPDL.cpp:287
void getvectorff(EvtId parent, EvtId daught, double t, double mass, double *a1f, double *a2f, double *vf, double *a0f) override
void getbaryonff(EvtId, EvtId, double, double, double *, double *, double *, double *) override
void getdiracff(EvtId, EvtId, double, double, double *, double *, double *, double *, double *, double *) override