BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtTwoBodyVertex.cc
Go to the documentation of this file.
1#include "EvtPatches.hh"
2/*******************************************************************************
3 * Project: BaBar detector at the SLAC PEP-II B-factory
4 * Package: EvtGenBase
5 * File: $Id: EvtTwoBodyVertex.cc,v 1.4 2018/12/05 07:37:32 pingrg Exp $
6 * Author: Alexei Dvoretskii, dvoretsk@slac.stanford.edu, 2001-2002
7 *
8 * Copyright (C) 2002 Caltech
9 *******************************************************************************/
10
11#include "EvtMacros.hh"
12#include "EvtTwoBodyVertex.hh"
13#include <assert.h>
14#include <iostream>
15#include <math.h>
16using std::endl;
17using std::ostream;
18
19// Default ctor can sometimes be useful
20
21EvtTwoBodyVertex::EvtTwoBodyVertex() : _LL( 0 ), _p0( 0 ), _f( 0 ) {}
22
23EvtTwoBodyVertex::EvtTwoBodyVertex( double mA, double mB, double mAB, int L )
24 : _kine(), _LL( L ), _p0( 0 ), _f( 0 ) {
25 // Kinematics is initialized only if the decay is above threshold
26
27 if ( mAB > mA + mB )
28 {
29
30 _kine = EvtTwoBodyKine( mA, mB, mAB );
31 _p0 = _kine.p();
32 }
33}
34
36 : _kine( other._kine )
37 , _LL( other._LL )
38 , _p0( other._p0 )
39 , _f( ( other._f ) ? new EvtBlattWeisskopf( *other._f ) : 0 ) {}
40
42 if ( _f ) delete _f;
43}
44
45void EvtTwoBodyVertex::set_f( double R ) {
46 if ( _f ) delete _f;
47 _f = new EvtBlattWeisskopf( _LL, R, _p0 );
48}
49
51 assert( _p0 > 0. );
52
53 double p1 = x.p();
54 double ff = formFactor( x );
55 double factor = pow( p1 / _p0, 2 * _LL + 1 ) * pow( mAB() / x.mAB(), 2 ) * ff *
56 ff; // pingrg,2008-11-24, in EvtGen Manual Eq 66, (m0/m) should be squared
57 // see PLB537,201; PLB561, 55; ZPC48, 445, and PRD65, 032002, PRD68, 052006
58 return factor;
59}
60
62 double p1 = x.p( i );
63 double factor = pow( p1, _LL );
64 return factor;
65}
66
68 double ff = 1.;
69
70 if ( _f )
71 {
72
73 double p1 = x.p();
74 ff = ( *_f )( p1 );
75 }
76
77 return ff;
78}
79
80void EvtTwoBodyVertex::print( ostream& os ) const {
81 os << " mA = " << mA() << endl;
82 os << " mB = " << mB() << endl;
83 os << "mAB = " << mAB() << endl;
84 os << " L = " << _LL << endl;
85 os << " p0 = " << _p0 << endl;
86}
87
88ostream& operator<<( ostream& os, const EvtTwoBodyVertex& v ) {
89 v.print( os );
90 return os;
91}
double p1[4]
ostream & operator<<(ostream &os, const EvtTwoBodyVertex &v)
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35
double mAB() const
double formFactor(EvtTwoBodyKine x) const
void print(std::ostream &os) const
void set_f(double R)
double widthFactor(EvtTwoBodyKine x) const
double mA() const
double mB() const
double phaseSpaceFactor(EvtTwoBodyKine x, EvtTwoBodyKine::Index) const