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.
EvtSLPoleFF.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 
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 EvtSLPoleFF::EvtSLPoleFF( int numarg, double* arglist )
32 {
33  //arg - maybe ignore the last argument - if odd ... Sigh
34  numSLPoleargs = numarg - ( numarg % 2 );
35  for ( int i = 0; i < numSLPoleargs; i++ ) {
36  SLPoleargs[i] = arglist[i];
37  }
38 
39  return;
40 }
41 
42 void EvtSLPoleFF::getscalarff( EvtId parent, EvtId, double t, double,
43  double* fpf, double* f0f )
44 {
45  // Form factors have a general form, with parameters passed in
46  // from the arguements.
47 
48  if ( numSLPoleargs != 8 ) {
49  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
50  << "Problem in EvtSLPoleFF::getscalarff\n";
51  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
52  << "wrong number of arguements!!!\n";
53  }
54 
55  double mb = EvtPDL::getMeanMass( parent );
56  double mb2 = mb * mb;
57 
58  double f0, af, bf, powf;
59 
60  f0 = SLPoleargs[0];
61  af = SLPoleargs[1];
62  bf = SLPoleargs[2];
63  powf = SLPoleargs[3];
64  *fpf = f0 /
65  ( pow( 1.0 + ( af * t / mb2 ) + ( bf * ( ( t / mb2 ) * ( t / mb2 ) ) ),
66  powf ) );
67 
68  f0 = SLPoleargs[4];
69  af = SLPoleargs[5];
70  bf = SLPoleargs[6];
71  powf = SLPoleargs[7];
72 
73  *f0f = f0 /
74  ( pow( 1.0 + ( af * t / mb2 ) + ( bf * ( ( t / mb2 ) * ( t / mb2 ) ) ),
75  powf ) );
76 
77  return;
78 }
79 
80 void EvtSLPoleFF::getvectorff( EvtId parent, EvtId, double t, double,
81  double* a1f, double* a2f, double* vf, double* a0f )
82 {
83  if ( numSLPoleargs != 16 ) {
84  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
85  << "Problem in EvtSLPoleFF::getvectorff\n";
86  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
87  << "wrong number of arguements!!!\n";
88  EvtGenReport( EVTGEN_ERROR, "EvtGen" ) << numSLPoleargs << "\n";
89  }
90 
91  double mb = EvtPDL::getMeanMass( parent );
92  double mb2 = mb * mb;
93 
94  double f0, af, bf, powf;
95 
96  f0 = SLPoleargs[0];
97  af = SLPoleargs[1];
98  bf = SLPoleargs[2];
99  powf = SLPoleargs[3];
100  *a1f = f0 /
101  ( pow( 1.0 + ( af * t / mb2 ) + ( bf * ( ( t / mb2 ) * ( t / mb2 ) ) ),
102  powf ) );
103 
104  f0 = SLPoleargs[4];
105  af = SLPoleargs[5];
106  bf = SLPoleargs[6];
107  powf = SLPoleargs[7];
108 
109  *a2f = f0 /
110  ( pow( 1.0 + ( af * t / mb2 ) + ( bf * ( ( t / mb2 ) * ( t / mb2 ) ) ),
111  powf ) );
112 
113  f0 = SLPoleargs[8];
114  af = SLPoleargs[9];
115  bf = SLPoleargs[10];
116  powf = SLPoleargs[11];
117 
118  *vf = f0 /
119  ( pow( 1.0 + ( af * t / mb2 ) + ( bf * ( ( t / mb2 ) * ( t / mb2 ) ) ),
120  powf ) );
121 
122  f0 = SLPoleargs[12];
123  af = SLPoleargs[13];
124  bf = SLPoleargs[14];
125  powf = SLPoleargs[15];
126 
127  *a0f = f0 /
128  ( pow( 1.0 + ( af * t / mb2 ) + ( bf * ( ( t / mb2 ) * ( t / mb2 ) ) ),
129  powf ) );
130  return;
131 }
132 
133 void EvtSLPoleFF::gettensorff( EvtId parent, EvtId, double t, double,
134  double* hf, double* kf, double* bpf, double* bmf )
135 {
136  if ( numSLPoleargs != 16 ) {
137  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
138  << "Problem in EvtSLPoleFF::gettensorff\n";
139  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
140  << "wrong number of arguements!!!\n";
141  }
142 
143  double mb = EvtPDL::getMeanMass( parent );
144  double mb2 = mb * mb;
145 
146  double f0, af, bf, powf;
147 
148  f0 = SLPoleargs[0];
149  af = SLPoleargs[1];
150  bf = SLPoleargs[2];
151  powf = SLPoleargs[3];
152  *hf = f0 /
153  ( pow( 1.0 + ( af * t / mb2 ) + ( bf * ( ( t / mb2 ) * ( t / mb2 ) ) ),
154  powf ) );
155 
156  f0 = SLPoleargs[4];
157  af = SLPoleargs[5];
158  bf = SLPoleargs[6];
159  powf = SLPoleargs[7];
160 
161  *kf = f0 /
162  ( pow( 1.0 + ( af * t / mb2 ) + ( bf * ( ( t / mb2 ) * ( t / mb2 ) ) ),
163  powf ) );
164 
165  f0 = SLPoleargs[8];
166  af = SLPoleargs[9];
167  bf = SLPoleargs[10];
168  powf = SLPoleargs[11];
169 
170  *bpf = f0 /
171  ( pow( 1.0 + ( af * t / mb2 ) + ( bf * ( ( t / mb2 ) * ( t / mb2 ) ) ),
172  powf ) );
173 
174  f0 = SLPoleargs[12];
175  af = SLPoleargs[13];
176  bf = SLPoleargs[14];
177  powf = SLPoleargs[15];
178 
179  *bmf = f0 /
180  ( pow( 1.0 + ( af * t / mb2 ) + ( bf * ( ( t / mb2 ) * ( t / mb2 ) ) ),
181  powf ) );
182  return;
183 }
184 
185 void EvtSLPoleFF::getbaryonff( EvtId, EvtId, double, double, double*, double*,
186  double*, double* )
187 {
188  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
189  << "Not implemented :getbaryonff in EvtSLPoleFF.\n";
190  ::abort();
191 }
192 
193 void EvtSLPoleFF::getdiracff( EvtId, EvtId, double, double, double*, double*,
194  double*, double*, double*, double* )
195 {
196  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
197  << "Not implemented :getdiracff in EvtSLPoleFF.\n";
198  ::abort();
199 }
200 
201 void EvtSLPoleFF::getraritaff( EvtId, EvtId, double, double, double*, double*,
202  double*, double*, double*, double*, double*,
203  double* )
204 {
205  EvtGenReport( EVTGEN_ERROR, "EvtGen" )
206  << "Not implemented :getraritaff in EvtSLPoleFF.\n";
207  ::abort();
208 }
void getvectorff(EvtId parent, EvtId daught, double t, double mass, double *a1f, double *a2f, double *vf, double *a0f) override
Definition: EvtSLPoleFF.cpp:80
void gettensorff(EvtId parent, EvtId daught, double t, double mass, double *hf, double *kf, double *bp, double *bm) override
std::ostream & EvtGenReport(EvtGenSeverity severity, const char *facility=0)
Definition: EvtReport.cpp:33
static double getMeanMass(EvtId i)
Definition: EvtPDL.cpp:314
EvtSLPoleFF(int numarg, double *arglist)
Definition: EvtSLPoleFF.cpp:31
Definition: EvtId.hh:27
void getscalarff(EvtId parent, EvtId daught, double t, double mass, double *fpf, double *f0f) override
Definition: EvtSLPoleFF.cpp:42
void getbaryonff(EvtId, EvtId, double, double, double *, double *, double *, double *) override
void getraritaff(EvtId, EvtId, double, double, double *, double *, double *, double *, double *, double *, double *, double *) override
void getdiracff(EvtId, EvtId, double, double, double *, double *, double *, double *, double *, double *) override
double SLPoleargs[16]
Definition: EvtSLPoleFF.hh:51
int numSLPoleargs
Definition: EvtSLPoleFF.hh:50