Line data Source code
1 : //-----------------------------------------------------------------------
2 : // File and Version Information:
3 : //
4 : // Copyright Information: See EvtGen/COPYRIGHT
5 : //
6 : //
7 : // Description:
8 : // DFN model:
9 : // F(k+) = N (1-x)^a exp((1+a)x) ,x=k+/(mB-mb)
10 : // the fermi motion distribution according to
11 : // hep-ph/9905351 v2
12 : // BLNP model:
13 : // F(wtilde,Lambda,b) = pow(_b,_b)/(tgamma(_b)*_Lambda)*pow(wtilde/_Lambda,_b-1)*
14 : // exp(-_b*wtilde/Lambda);
15 : // the leading order shape function (exp) (hep-ph/0504071)
16 : // Environment:
17 : // Software developed for the BaBar Detector at the SLAC B-Factory.
18 : //
19 : // Author List:
20 : // Sven Menke (DFN model)
21 : // Alexei Volk (BLNP model)
22 : //-----------------------------------------------------------------------
23 : //-----------------------
24 : // This Class's Header --
25 : //-----------------------
26 : #include "EvtGenBase/EvtPatches.hh"
27 : #include "EvtGenModels/EvtPFermi.hh"
28 : #include "EvtGenBase/EvtReport.hh"
29 : //---------------
30 : // C Headers --
31 : //---------------
32 : #include <math.h>
33 : #include <stdlib.h>
34 :
35 : //----------------
36 : // Constructors --
37 : //----------------
38 :
39 : //for DFN model
40 : EvtPFermi::EvtPFermi(const double &a, const double &mB, const double &mb)
41 0 : {
42 0 : _a = a;
43 0 : _mb = mb;
44 0 : _mB = mB;
45 0 : }
46 :
47 : // for BLNP modell
48 : EvtPFermi::EvtPFermi(const double &Lambda, const double &b)
49 0 : {
50 0 : _Lambda = Lambda;
51 0 : _b = b;
52 0 : }
53 :
54 :
55 : //--------------
56 : // Destructor --
57 : //--------------
58 :
59 : EvtPFermi::~EvtPFermi( )
60 0 : {
61 0 : }
62 :
63 : //-----------
64 : // Methods --
65 : //-----------
66 :
67 : double EvtPFermi::getFPFermi(const double &kplus)
68 : {
69 : double FKplus;
70 0 : double x = kplus/(_mB-_mb);
71 :
72 0 : if ( x >= 1) return 0;
73 0 : if ( kplus <= -_mb) return 0;
74 :
75 0 : FKplus = pow(1-x,_a)*exp((1+_a)*x);
76 :
77 0 : return FKplus;
78 0 : }
79 :
80 : // get value for the leading order exponential SF
81 : double EvtPFermi::getSFBLNP(const double &what)
82 : {
83 : double SF;
84 : double massB = 5.2792;
85 :
86 :
87 0 : if ( what > massB ) return 0;
88 0 : if ( what < 0 ) return 0;
89 :
90 : #if defined(__SUNPRO_CC)
91 : report(Severity::Error,"EvtGen") << "The tgamma function is not available on this platform\n";
92 : report(Severity::Error,"EvtGen") <<"Presumably, you are getting the wrong answer, so I abort..";
93 : ::abort();
94 : #else
95 0 : SF = pow(_b,_b)/(tgamma(_b)*_Lambda)*pow(what/_Lambda,_b-1)*exp(-_b*what/_Lambda);
96 : #endif
97 :
98 0 : return SF;
99 0 : }
100 :
|