]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TEvtGen/EvtGenBase/EvtMBreitWigner.cxx
New plots for trending injector efficiencies (Melinda)
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenBase / EvtMBreitWigner.cxx
CommitLineData
da0e9ce3 1#include "EvtGenBase/EvtPatches.hh"
2#include "EvtGenBase/EvtMBreitWigner.hh"
3#include "EvtGenBase/EvtReport.hh"
4#include <stdlib.h>
5
6using std::endl;
7
8EvtMBreitWigner::EvtMBreitWigner( const EvtId& id, const vector<string>& args )
9{
10 if( args.size() != 0 ) {
11 report(ERROR, "EvtGen")<<"Unknown input arguments passed in to lineshape."<<endl;
12 ::abort();
13 }
14
15 _id = id;
16 _width = EvtPDL::getWidth( id );
17 _resmass = EvtPDL::getMeanMass( id );
18}
19
20EvtComplex EvtMBreitWigner::shape( const vector<EvtVector4R>& product ) const
21{
22 static EvtComplex I(0.0, 1.0);
23 double mass = _node->get4vector(product).mass();
24
25 return sqrt(_width/( EvtConst::twoPi )) * 1/( mass - _resmass - I * _width/2 );
26}
27
28
29EvtMLineShape * EvtMBreitWigner::duplicate() const
30{
31 vector<string> args;
32 EvtMLineShape* tmp=new EvtMBreitWigner( _id, args );
33 return tmp;
34}
35