/*******************************************************************************
* Project: BaBar detector at the SLAC PEP-II B-factory
* Package: EvtGenBase
- * File: $Id: EvtBlattWeisskopf.cc,v 1.6 2004/12/21 19:58:41 ryd Exp $
+ * File: $Id: EvtBlattWeisskopf.cpp,v 1.3 2009-03-16 15:56:37 robbep Exp $
* Author: Alexei Dvoretskii, dvoretsk@slac.stanford.edu, 2001-2002
*
* Copyright (C) 2002 Caltech
double EvtBlattWeisskopf::compute(double p) const
{
- if(p < 0) {
-
- report(INFO,"EvtGen") << "Momentum " << p << " negative in form factor calculation" << endl;
- assert(0);
- }
- else {
-
- double x = p*p*_radial*_radial;
-
- if(0 == _LL) return 1.;
- else
- if(1 == _LL) return sqrt(1.0/(1.0+x));
- else
- if(2 == _LL) return sqrt(1.0/(1.0+x/3.0+x*x/9.0));
- else {
- report(INFO,"EvtGen") << "Angular momentum " << _LL << " not implemented" << endl;
- assert(0);
- }
+
+ double value(1.0);
+
+ double z = p*_radial;
+ double zSq = z*z;
+
+ if (_LL == 0) {
+ value = 1.0;
+ } else if (_LL == 1) {
+ value = sqrt(1.0/(1.0 + zSq));
+ } else if (_LL == 2) {
+ value = sqrt(1.0/(zSq*(zSq + 3.0) + 9.0));
+ } else if (_LL == 3) {
+ double denom = zSq*(zSq*(zSq + 6.0) + 45.0) + 225.0;
+ value = sqrt(1.0/denom);
+ } else if (_LL == 4) {
+ double denom = zSq*(zSq*(zSq*(zSq + 10.0) + 135.0) + 1575.0) + 11025.0;
+ value = sqrt(1.0/denom);
+ } else if (_LL == 5) {
+ double denom = zSq*(zSq*(zSq*(zSq*(zSq + 15.0) + 315.0) + 6300.0) + 99225.0) + 893025.0;
+ value = sqrt(1.0/denom);
}
-}
+ return value;
+
+}