LCOV - code coverage report
Current view: top level - TEvtGen/EvtGen/EvtGenBase - EvtMBreitWigner.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 16 0.0 %
Date: 2016-06-14 17:26:59 Functions: 0 4 0.0 %

          Line data    Source code
       1             : #include "EvtGenBase/EvtPatches.hh"
       2             : #include "EvtGenBase/EvtMBreitWigner.hh"
       3             : #include "EvtGenBase/EvtReport.hh"
       4             : #include <stdlib.h>
       5             : 
       6             : using std::endl;
       7             : 
       8           0 : EvtMBreitWigner::EvtMBreitWigner( const EvtId& id, const vector<string>& args )
       9           0 : {
      10           0 :     if( args.size() != 0 ) {
      11           0 :         report(Severity::Error, "EvtGen")<<"Unknown input arguments passed in to lineshape."<<endl;
      12           0 :         ::abort();
      13             :     }
      14             : 
      15           0 :     _id = id;
      16           0 :     _width = EvtPDL::getWidth( id );
      17           0 :     _resmass = EvtPDL::getMeanMass( id );
      18           0 : }
      19             : 
      20             : EvtComplex EvtMBreitWigner::shape( const vector<EvtVector4R>& product ) const 
      21             : {
      22           0 :     static EvtComplex I(0.0, 1.0);
      23           0 :     double mass = _node->get4vector(product).mass();
      24             :  
      25           0 :     return sqrt(_width/( EvtConst::twoPi )) * 1/( mass - _resmass - I * _width/2 );
      26           0 : }
      27             : 
      28             : 
      29             : EvtMLineShape * EvtMBreitWigner::duplicate() const
      30             : {
      31           0 :   vector<string> args;
      32           0 :   EvtMLineShape* tmp=new EvtMBreitWigner( _id, args );
      33             :   return tmp;
      34           0 : }
      35             : 

Generated by: LCOV version 1.11