BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtMBreitWigner.cc
Go to the documentation of this file.
1#include "EvtMBreitWigner.hh"
2#include "EvtPatches.hh"
3#include <cstdlib>
4
5using std::endl;
6
7EvtMBreitWigner::EvtMBreitWigner( const EvtId& id, const vector<string>& args ) {
8 if ( args.size() != 0 )
9 {
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 static EvtComplex I( 0.0, 1.0 );
21 double mass = _node->get4vector( product ).mass();
22
23 return sqrt( _width / ( EvtConst::twoPi ) ) * 1 / ( mass - _resmass - I * _width / 2 );
24}
25
27 vector<string> args;
28 EvtMLineShape* tmp = new EvtMBreitWigner( _id, args );
29 return tmp;
30}
double mass
ostream & report(Severity severity, const char *facility)
Definition EvtReport.cc:34
@ ERROR
Definition EvtReport.hh:49
const DifComplex I
static const double twoPi
Definition EvtConst.hh:28
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:19
static double getWidth(EvtId i)
Definition EvtPDL.hh:59
static double getMeanMass(EvtId i)
Definition EvtPDL.hh:43