/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/BesEvtGen/BesEvtGen-00-03-58/src/EvtGen/EvtGenBase/EvtTwoBodyVertex.cc

Go to the documentation of this file.
00001 #include "EvtGenBase/EvtPatches.hh"
00002 /*******************************************************************************
00003  * Project: BaBar detector at the SLAC PEP-II B-factory
00004  * Package: EvtGenBase
00005  *    File: $Id: EvtTwoBodyVertex.cc,v 1.3 2011/01/06 22:57:56 pingrg Exp $
00006  *  Author: Alexei Dvoretskii, dvoretsk@slac.stanford.edu, 2001-2002
00007  *
00008  * Copyright (C) 2002 Caltech
00009  *******************************************************************************/
00010 
00011 #include <iostream>
00012 #include <math.h>
00013 #include <assert.h>
00014 #include "EvtGenBase/EvtMacros.hh"
00015 #include "EvtGenBase/EvtTwoBodyVertex.hh"
00016 using std::endl;
00017 using std::ostream;
00018 
00019 
00020 // Default ctor can sometimes be useful
00021 
00022 EvtTwoBodyVertex::EvtTwoBodyVertex()
00023   : _LL(0), _p0(0), _f(0)
00024 {}
00025 
00026 EvtTwoBodyVertex::EvtTwoBodyVertex(double mA, double mB, double mAB, int L)
00027   : _kine(), _LL(L), _p0(0), _f(0)
00028 {
00029   // Kinematics is initialized only if the decay is above threshold
00030 
00031   if(mAB > mA + mB) {
00032 
00033     _kine = EvtTwoBodyKine(mA,mB,mAB);
00034     _p0 = _kine.p();
00035   }
00036 }
00037 
00038 
00039 EvtTwoBodyVertex::EvtTwoBodyVertex(const EvtTwoBodyVertex& other)
00040   : _kine(other._kine), _LL(other._LL), _p0(other._p0), 
00041   _f( (other._f) ? new EvtBlattWeisskopf(*other._f) : 0 )
00042 {}
00043 
00044 EvtTwoBodyVertex::~EvtTwoBodyVertex()
00045 {
00046   if(_f) delete _f;
00047 }
00048 
00049 
00050 void EvtTwoBodyVertex::set_f(double R) 
00051 {
00052   if(_f) delete _f;
00053   _f = new EvtBlattWeisskopf(_LL,R,_p0);
00054 }
00055 
00056 
00057 double EvtTwoBodyVertex::widthFactor(EvtTwoBodyKine x) const
00058 {
00059   assert(_p0 > 0.);
00060 
00061   double p1 = x.p();
00062   double ff = formFactor(x);
00063   double factor = pow(p1/_p0,2*_LL+1)*pow(mAB()/x.mAB(),2) * ff * ff;  //pingrg,2008-11-24, in EvtGen Manual Eq 66, (m0/m) should be squared 
00064 
00065   return factor;
00066 }
00067 
00068 
00069 double EvtTwoBodyVertex::phaseSpaceFactor(EvtTwoBodyKine x,EvtTwoBodyKine::Index i) const
00070 {
00071   double p1 = x.p(i);
00072   double factor = pow(p1,_LL);
00073   return factor;
00074 }
00075 
00076 
00077 double EvtTwoBodyVertex::formFactor(EvtTwoBodyKine x) const
00078 {
00079   double ff = 1.;
00080 
00081   if(_f) {
00082 
00083     double p1 = x.p();
00084     ff = (*_f)(p1);
00085   }
00086   
00087   return ff;
00088 }
00089 
00090 void EvtTwoBodyVertex::print(ostream& os) const
00091 {
00092   os << " mA = " << mA() << endl;
00093   os << " mB = " << mB() << endl;
00094   os << "mAB = " << mAB() << endl;
00095   os << "  L = " << _LL << endl;
00096   os << " p0 = " << _p0 << endl;
00097 }
00098 
00099 
00100 ostream& operator<<(ostream& os, const EvtTwoBodyVertex& v)
00101 {
00102   v.print(os);
00103   return os;
00104 }

Generated on Tue Nov 29 23:12:16 2016 for BOSS_7.0.2 by  doxygen 1.4.7