BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtMBreitWigner.cc
Go to the documentation of this file.
3#include <cstdlib>
4
5using std::endl;
6
7EvtMBreitWigner::EvtMBreitWigner( const EvtId& id, const vector<string>& args )
8{
9 if( args.size() != 0 ) {
10 report(ERROR, "EvtGen")<<"Unknown input arguments passed in to lineshape."<<endl;
11 ::abort();
12 }
13
14 _id = id;
15 _width = EvtPDL::getWidth( id );
16 _resmass = EvtPDL::getMeanMass( id );
17}
18
19EvtComplex EvtMBreitWigner::shape( const vector<EvtVector4R>& product ) const
20{
21 static EvtComplex I(0.0, 1.0);
22 double mass = _node->get4vector(product).mass();
23
24 return sqrt(_width/( EvtConst::twoPi )) * 1/( mass - _resmass - I * _width/2 );
25}
26
27
29{
30 vector<string> args;
31 EvtMLineShape* tmp=new EvtMBreitWigner( _id, args );
32 return tmp;
33}
34
double mass
const DifComplex I
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:36
@ ERROR
Definition EvtReport.hh:49
static const double twoPi
Definition EvtConst.hh:29
Definition EvtId.hh:27
EvtMBreitWigner(const EvtId &id, const vector< string > &args)
EvtMLineShape * duplicate() const
EvtComplex shape(const vector< EvtVector4R > &product) const
EvtMRes * _node
Definition EvtMRes.hh:21
EvtVector4R get4vector(const vector< EvtVector4R > &product) const
Definition EvtMNode.cc:4
static double getWidth(EvtId i)
Definition EvtPDL.hh:54
static double getMeanMass(EvtId i)
Definition EvtPDL.hh:45
double mass() const