Changeset View
Changeset View
Standalone View
Standalone View
src/EvtGenModels/EvtDalitzTable.cpp
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
_dalitztable.clear(); | _dalitztable.clear(); | ||||
_readFiles.clear(); | _readFiles.clear(); | ||||
} | } | ||||
EvtDalitzTable* EvtDalitzTable::getInstance( const std::string dec_name, | EvtDalitzTable* EvtDalitzTable::getInstance( const std::string dec_name, | ||||
bool verbose ) | bool verbose ) | ||||
{ | { | ||||
static EvtDalitzTable* theDalitzTable = 0; | static EvtDalitzTable* theDalitzTable = nullptr; | ||||
if ( theDalitzTable == 0 ) { | if ( theDalitzTable == nullptr ) { | ||||
theDalitzTable = new EvtDalitzTable(); | theDalitzTable = new EvtDalitzTable(); | ||||
} | } | ||||
if ( !theDalitzTable->fileHasBeenRead( dec_name ) ) { | if ( !theDalitzTable->fileHasBeenRead( dec_name ) ) { | ||||
theDalitzTable->readXMLDecayFile( dec_name, verbose ); | theDalitzTable->readXMLDecayFile( dec_name, verbose ); | ||||
} | } | ||||
return theDalitzTable; | return theDalitzTable; | ||||
Show All 15 Lines | void EvtDalitzTable::readXMLDecayFile( const std::string dec_name, bool verbose ) | ||||
if ( verbose ) { | if ( verbose ) { | ||||
EvtGenReport( EVTGEN_INFO, "EvtGen" ) | EvtGenReport( EVTGEN_INFO, "EvtGen" ) | ||||
<< "EvtDalitzTable: Reading in xml parameter file " << dec_name | << "EvtDalitzTable: Reading in xml parameter file " << dec_name | ||||
<< endl; | << endl; | ||||
} | } | ||||
_readFiles.push_back( dec_name ); | _readFiles.push_back( dec_name ); | ||||
EvtDalitzDecayInfo* dalitzDecay = 0; | EvtDalitzDecayInfo* dalitzDecay = nullptr; | ||||
double probMax = 0; | double probMax = 0; | ||||
EvtId ipar; | EvtId ipar; | ||||
std::string decayParent = ""; | std::string decayParent = ""; | ||||
std::string daugStr = ""; | std::string daugStr = ""; | ||||
EvtId daughter[3]; | EvtId daughter[3]; | ||||
EvtDalitzPlot dp; | EvtDalitzPlot dp; | ||||
EvtComplex cAmp; | EvtComplex cAmp; | ||||
▲ Show 20 Lines • Show All 285 Lines • ▼ Show 20 Lines | while ( parser.readNextTag() ) { | ||||
EvtGenReport( EVTGEN_INFO, "EvtGen" ) | EvtGenReport( EVTGEN_INFO, "EvtGen" ) | ||||
<< "Will now estimate probMax. This may take a while. Once probMax is calculated, update the XML file to skip this step in future." | << "Will now estimate probMax. This may take a while. Once probMax is calculated, update the XML file to skip this step in future." | ||||
<< endl; | << endl; | ||||
probMax = calcProbMax( dp, dalitzDecay ); | probMax = calcProbMax( dp, dalitzDecay ); | ||||
} | } | ||||
dalitzDecay->setProbMax( probMax ); | dalitzDecay->setProbMax( probMax ); | ||||
addDecay( ipar, *dalitzDecay ); | addDecay( ipar, *dalitzDecay ); | ||||
delete dalitzDecay; | delete dalitzDecay; | ||||
dalitzDecay = 0; | dalitzDecay = nullptr; | ||||
} else if ( verbose ) { | } else if ( verbose ) { | ||||
EvtGenReport( EVTGEN_INFO, "EvtGen" ) | EvtGenReport( EVTGEN_INFO, "EvtGen" ) | ||||
<< "Unexpected tag " << parser.getTagTitle() | << "Unexpected tag " << parser.getTagTitle() | ||||
<< " found in XML decay file near line " | << " found in XML decay file near line " | ||||
<< parser.getLineNumber() << ". Tag will be ignored." | << parser.getLineNumber() << ". Tag will be ignored." | ||||
<< endl; | << endl; | ||||
} | } | ||||
//TAGS FOUND UNDER RESONANCE | //TAGS FOUND UNDER RESONANCE | ||||
▲ Show 20 Lines • Show All 278 Lines • Show Last 20 Lines |