Changeset View
Changeset View
Standalone View
Standalone View
src/EvtGenBase/EvtMTree.cpp
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | vector<EvtMNode*> EvtMTree::makeparticles( const string& strid ) | ||||
return particles; | return particles; | ||||
} | } | ||||
EvtMRes* EvtMTree::makeresonance( const EvtId& id, const string& ls, | EvtMRes* EvtMTree::makeresonance( const EvtId& id, const string& ls, | ||||
const vector<string>& lsarg, const string& type, | const vector<string>& lsarg, const string& type, | ||||
const vector<EvtComplex>& amps, | const vector<EvtComplex>& amps, | ||||
const vector<EvtMNode*>& children ) | const vector<EvtMNode*>& children ) | ||||
{ | { | ||||
EvtMRes* resonance = NULL; | EvtMRes* resonance = nullptr; | ||||
EvtMLineShape* lineshape = NULL; | EvtMLineShape* lineshape = nullptr; | ||||
if ( ls == "BREITWIGNER" ) { | if ( ls == "BREITWIGNER" ) { | ||||
lineshape = new EvtMBreitWigner( id, lsarg ); | lineshape = new EvtMBreitWigner( id, lsarg ); | ||||
} else if ( ls == "TRIVIAL" ) { | } else if ( ls == "TRIVIAL" ) { | ||||
lineshape = new EvtMTrivialLS( id, lsarg ); | lineshape = new EvtMTrivialLS( id, lsarg ); | ||||
} else { | } else { | ||||
EvtGenReport( EVTGEN_ERROR, "EvtGen" ) | EvtGenReport( EVTGEN_ERROR, "EvtGen" ) | ||||
<< "Lineshape " << lineshape << " not recognized." << endl; | << "Lineshape " << lineshape << " not recognized." << endl; | ||||
▲ Show 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | vector<EvtComplex> EvtMTree::parseAmps( ptype& c_iter, ptype& c_begin, | ||||
// Get parametrization amplitudes | // Get parametrization amplitudes | ||||
vector<string>::iterator amp_iter = parg.begin(); | vector<string>::iterator amp_iter = parg.begin(); | ||||
vector<string>::iterator amp_end = parg.end(); | vector<string>::iterator amp_end = parg.end(); | ||||
vector<EvtComplex> amps; | vector<EvtComplex> amps; | ||||
while ( amp_iter != amp_end ) { | while ( amp_iter != amp_end ) { | ||||
const char* nptr; | const char* nptr; | ||||
char* endptr = NULL; | char* endptr = nullptr; | ||||
double amp = 0.0, phase = 0.0; | double amp = 0.0, phase = 0.0; | ||||
nptr = ( *amp_iter ).c_str(); | nptr = ( *amp_iter ).c_str(); | ||||
amp = strtod( nptr, &endptr ); | amp = strtod( nptr, &endptr ); | ||||
parseerror( nptr == endptr, c_iter, c_begin, c_end ); | parseerror( nptr == endptr, c_iter, c_begin, c_end ); | ||||
++amp_iter; | ++amp_iter; | ||||
parseerror( amp_iter == amp_end, c_iter, c_begin, c_end ); | parseerror( amp_iter == amp_end, c_iter, c_begin, c_end ); | ||||
▲ Show 20 Lines • Show All 241 Lines • Show Last 20 Lines |