ROOTPWA
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
rpwa::waveDescription Class Reference

#include <waveDescription.h>

Public Member Functions

 waveDescription ()
virtual ~waveDescription ()
void clear ()
waveDescriptionoperator= (const waveDescription &waveDesc)
bool parseKeyFile (const std::string &keyFileName)
 parses key file
bool keyFileParsed () const
 returns whether key file was successfully parsed
std::string keyFileContents () const
 returns contents of key file
std::ostream & printKeyFileContents (std::ostream &out) const
 prints key file contents with line numbers
bool constructDecayTopology (isobarDecayTopologyPtr &topo, const bool fromTemplate=false) const
 construct isobar decay topology from keyfile
bool constructAmplitude (isobarAmplitudePtr &amplitude) const
 construct isobar decay amplitude from keyfile
bool constructAmplitude (isobarAmplitudePtr &amplitude, const isobarDecayTopologyPtr &topo) const
 construct isobar amplitude using existing decay topology

Static Public Member Functions

template<class T >
static bool writeKeyFile (std::ostream &out, const T &topoOrAmp, const bool writeProdVert=true)
 writes keys from decay topology or amplitude to stream
template<class T >
static bool writeKeyFile (const std::string &keyFileName, const T &topoOrAmp, const bool writeProdVert=true)
 creates key file from decay topology or amplitude
static std::string waveNameFromTopology (isobarDecayTopology topo, const bool newConvention=false, const isobarDecayVertexPtr &currentVertex=isobarDecayVertexPtr())
 recursive function that generates unique wave name from decay topology
static std::string waveLaTeXFromTopology (isobarDecayTopology topo, const isobarDecayVertexPtr &currentVertex=isobarDecayVertexPtr())
 recursive function that generates unique wave name from decay topology
static bool debug ()
 returns debug flag
static void setDebug (const bool debug=true)
 sets debug flag

Private Member Functions

bool parseKeyFileLocalCopy ()
 parses _keyFileLocalCopy string

Static Private Member Functions

static bool constructXParticle (const libconfig::Setting &XQnKey, particlePtr &X)
 creates X particle with quantum numbers defined in X key
static productionVertexPtr mapProductionVertexType (const libconfig::Setting &prodVertKey, const std::string &vertType, const particlePtr &X)
 creates production vertex according to given type
static bool constructProductionVertex (const libconfig::Setting &rootKey, const particlePtr &X, productionVertexPtr &prodVert)
 creates production vertex
static bool constructParticle (const libconfig::Setting &particleKey, particlePtr &particle, const bool requirePartInTable=true)
 creates particle using name in particle key
static massDependencePtr mapMassDependenceType (const std::string &massDepType)
 creates mass dependence functor of specified type
static bool constructDecayVertex (const libconfig::Setting &parentKey, const particlePtr &parentParticle, std::vector< isobarDecayVertexPtr > &decayVertices, std::vector< particlePtr > &fsParticles, const bool fromTemplate=false)
 recursively traverses decay chain and creates decay vertices and final state particles
static isobarAmplitudePtr mapAmplitudeType (const std::string &formalismType, const isobarDecayTopologyPtr &topo)
 creates amplitude for specified formalism
static bool setProductionVertexKeys (libconfig::Setting &prodVertKey, const productionVertexPtr &prodVert)
 puts production vertex info into keys
static bool setXQuantumNumbersKeys (libconfig::Setting &XQnKey, const particle &X)
 puts X quantum numbers into keys
static bool setMassDependence (libconfig::Setting &isobarMassDepKey, const massDependence &massDep)
 puts mass dependence into key
static bool setXDecayKeys (libconfig::Setting &parentDecayKey, const isobarDecayTopology &topo, const isobarDecayVertex &vert)
 recursive function that puts X decay chain into keys
static bool setKeysFromTopology (libconfig::Setting &rootKey, const isobarDecayTopology &topo, const bool setProdVert=true)
 fills keys from decay topology
static bool setAmplitude (libconfig::Setting &amplitudeKey, const isobarAmplitude &amplitude)
 puts amplitude specification into key
static bool setKeysFromAmplitude (libconfig::Setting &rootKey, const isobarAmplitude &amplitude, const bool setProdVert=true)
 fills keys from amplitude
static bool writeKeyFile (FILE &outStream, const isobarDecayTopology &topo, const bool writeProdVert=true)
 creates key file from decay topology and writes it to output stream
static bool writeKeyFile (FILE &outStream, const isobarAmplitude &amplitude, const bool writeProdVert=true)
 creates key file from amplitude and writes it to output stream

Private Attributes

libconfig::Config * _key
bool _keyFileParsed
 ///< libConfig date structure constructed from key file
std::string _keyFileLocalCopy
 ///< indicates whether key file was successfully parsed

Static Private Attributes

static bool _debug = false
 if set to true, debug messages are printed
static std::map< std::string,
std::string > 
isobars
 LaTeX names of isobars.

Detailed Description

Definition at line 66 of file waveDescription.h.

Constructor & Destructor Documentation

waveDescription::waveDescription ( )

Definition at line 108 of file waveDescription.cc.

waveDescription::~waveDescription ( )
virtual

Definition at line 118 of file waveDescription.cc.

References _key.

Member Function Documentation

void waveDescription::clear ( )

Definition at line 126 of file waveDescription.cc.

References _key, _keyFileLocalCopy, and _keyFileParsed.

bool waveDescription::constructAmplitude ( isobarAmplitudePtr amplitude) const

construct isobar decay amplitude from keyfile

Definition at line 273 of file waveDescription.cc.

References constructDecayTopology().

Referenced by calcNewAmps(), main(), and testAmplitude().

bool waveDescription::constructAmplitude ( isobarAmplitudePtr amplitude,
const isobarDecayTopologyPtr topo 
) const

construct isobar amplitude using existing decay topology

Definition at line 285 of file waveDescription.cc.

References _debug, _key, and mapAmplitudeType().

bool waveDescription::constructDecayTopology ( isobarDecayTopologyPtr topo,
const bool  fromTemplate = false 
) const

construct isobar decay topology from keyfile

!! user should correctly define quantum numbers

Definition at line 194 of file waveDescription.cc.

References _debug, _key, _keyFileParsed, constructDecayVertex(), constructProductionVertex(), constructXParticle(), rpwa::createIsobarDecayTopology(), and rpwa::createParticle().

Referenced by constructAmplitude(), main(), rpwa::waveSetGenerator::setWaveSetParameters(), and testAmplitude().

bool waveDescription::constructDecayVertex ( const libconfig::Setting &  parentKey,
const particlePtr parentParticle,
std::vector< isobarDecayVertexPtr > &  decayVertices,
std::vector< particlePtr > &  fsParticles,
const bool  fromTemplate = false 
)
staticprivate

recursively traverses decay chain and creates decay vertices and final state particles

Definition at line 671 of file waveDescription.cc.

References _debug, constructParticle(), rpwa::createIsobarDecayVertex(), i, mapMassDependenceType(), and p.

Referenced by constructDecayTopology().

bool waveDescription::constructParticle ( const libconfig::Setting &  particleKey,
particlePtr particle,
const bool  requirePartInTable = true 
)
staticprivate

creates particle using name in particle key

Definition at line 611 of file waveDescription.cc.

References _debug, and rpwa::createParticle().

Referenced by constructDecayVertex(), and mapProductionVertexType().

bool waveDescription::constructProductionVertex ( const libconfig::Setting &  rootKey,
const particlePtr X,
productionVertexPtr prodVert 
)
staticprivate

creates production vertex

Definition at line 585 of file waveDescription.cc.

References _debug, and mapProductionVertexType().

Referenced by constructDecayTopology().

bool waveDescription::constructXParticle ( const libconfig::Setting &  XQnKey,
particlePtr X 
)
staticprivate

creates X particle with quantum numbers defined in X key

Definition at line 483 of file waveDescription.cc.

References _debug, rpwa::createParticle(), i, and if.

Referenced by constructDecayTopology().

static bool rpwa::waveDescription::debug ( )
inlinestatic

returns debug flag

Definition at line 109 of file waveDescription.h.

References _debug.

Referenced by setDebug().

std::string rpwa::waveDescription::keyFileContents ( ) const
inline

returns contents of key file

Definition at line 83 of file waveDescription.h.

References _keyFileLocalCopy.

bool rpwa::waveDescription::keyFileParsed ( ) const
inline

returns whether key file was successfully parsed

Definition at line 81 of file waveDescription.h.

References _keyFileParsed.

isobarAmplitudePtr waveDescription::mapAmplitudeType ( const std::string &  formalismType,
const isobarDecayTopologyPtr topo 
)
staticprivate

creates amplitude for specified formalism

Definition at line 759 of file waveDescription.cc.

References rpwa::createIsobarCanonicalAmplitude(), and rpwa::createIsobarHelicityAmplitude().

Referenced by constructAmplitude().

massDependencePtr waveDescription::mapMassDependenceType ( const std::string &  massDepType)
staticprivate
productionVertexPtr waveDescription::mapProductionVertexType ( const libconfig::Setting &  prodVertKey,
const std::string &  vertType,
const particlePtr X 
)
staticprivate

creates production vertex according to given type

Definition at line 529 of file waveDescription.cc.

References _debug, constructParticle(), rpwa::createDiffractiveDissVertex(), rpwa::createLeptoProductionVertex(), and i.

Referenced by constructProductionVertex().

waveDescription & waveDescription::operator= ( const waveDescription waveDesc)

Definition at line 135 of file waveDescription.cc.

References _key, _keyFileLocalCopy, and _keyFileParsed.

bool waveDescription::parseKeyFile ( const std::string &  keyFileName)

parses key file

Definition at line 148 of file waveDescription.cc.

References _debug, _key, _keyFileLocalCopy, and _keyFileParsed.

Referenced by calcNewAmps(), main(), rpwa::waveSetGenerator::setWaveSetParameters(), and testAmplitude().

bool waveDescription::parseKeyFileLocalCopy ( )
private

parses _keyFileLocalCopy string

Definition at line 464 of file waveDescription.cc.

References _debug, _key, _keyFileLocalCopy, _keyFileParsed, and printKeyFileContents().

ostream & waveDescription::printKeyFileContents ( std::ostream &  out) const

prints key file contents with line numbers

Definition at line 178 of file waveDescription.cc.

References _keyFileLocalCopy, and i.

Referenced by main(), and parseKeyFileLocalCopy().

bool waveDescription::setAmplitude ( libconfig::Setting &  amplitudeKey,
const isobarAmplitude amplitude 
)
staticprivate
static void rpwa::waveDescription::setDebug ( const bool  debug = true)
inlinestatic

sets debug flag

Definition at line 110 of file waveDescription.h.

References _debug, and debug().

bool waveDescription::setKeysFromAmplitude ( libconfig::Setting &  rootKey,
const isobarAmplitude amplitude,
const bool  setProdVert = true 
)
staticprivate

fills keys from amplitude

Definition at line 972 of file waveDescription.cc.

References _debug, setAmplitude(), and setKeysFromTopology().

Referenced by writeKeyFile().

bool waveDescription::setKeysFromTopology ( libconfig::Setting &  rootKey,
const isobarDecayTopology topo,
const bool  setProdVert = true 
)
staticprivate
bool waveDescription::setMassDependence ( libconfig::Setting &  isobarMassDepKey,
const massDependence massDep 
)
staticprivate

puts mass dependence into key

Definition at line 849 of file waveDescription.cc.

References _debug, and rpwa::massDependence::name().

Referenced by setXDecayKeys().

bool waveDescription::setProductionVertexKeys ( libconfig::Setting &  prodVertKey,
const productionVertexPtr prodVert 
)
staticprivate

puts production vertex info into keys

Definition at line 777 of file waveDescription.cc.

References _debug, and i.

Referenced by setKeysFromTopology().

bool waveDescription::setXDecayKeys ( libconfig::Setting &  parentDecayKey,
const isobarDecayTopology topo,
const isobarDecayVertex vert 
)
staticprivate
bool waveDescription::setXQuantumNumbersKeys ( libconfig::Setting &  XQnKey,
const particle X 
)
staticprivate
string waveDescription::waveLaTeXFromTopology ( isobarDecayTopology  topo,
const isobarDecayVertexPtr currentVertex = isobarDecayVertexPtr() 
)
static
string waveDescription::waveNameFromTopology ( isobarDecayTopology  topo,
const bool  newConvention = false,
const isobarDecayVertexPtr currentVertex = isobarDecayVertexPtr() 
)
static
template<class T >
bool rpwa::waveDescription::writeKeyFile ( std::ostream &  out,
const T &  topoOrAmp,
const bool  writeProdVert = true 
)
inlinestatic

writes keys from decay topology or amplitude to stream

Definition at line 182 of file waveDescription.h.

References FILE.

Referenced by main(), and writeKeyFile().

template<class T >
bool rpwa::waveDescription::writeKeyFile ( const std::string &  keyFileName,
const T &  topoOrAmp,
const bool  writeProdVert = true 
)
inlinestatic

creates key file from decay topology or amplitude

Definition at line 225 of file waveDescription.h.

References _debug, and writeKeyFile().

bool waveDescription::writeKeyFile ( FILE outStream,
const isobarDecayTopology topo,
const bool  writeProdVert = true 
)
staticprivate

creates key file from decay topology and writes it to output stream

Definition at line 992 of file waveDescription.cc.

References setKeysFromTopology().

bool waveDescription::writeKeyFile ( FILE outStream,
const isobarAmplitude amplitude,
const bool  writeProdVert = true 
)
staticprivate

creates key file from amplitude and writes it to output stream

Definition at line 1013 of file waveDescription.cc.

References setKeysFromAmplitude().

Member Data Documentation

bool waveDescription::_debug = false
staticprivate
libconfig::Config* rpwa::waveDescription::_key
private
std::string rpwa::waveDescription::_keyFileLocalCopy
private

///< indicates whether key file was successfully parsed

copy of keyfile contents; is written to .root file

Definition at line 168 of file waveDescription.h.

Referenced by clear(), keyFileContents(), operator=(), parseKeyFile(), parseKeyFileLocalCopy(), and printKeyFileContents().

bool rpwa::waveDescription::_keyFileParsed
private

///< libConfig date structure constructed from key file

Definition at line 166 of file waveDescription.h.

Referenced by clear(), constructDecayTopology(), keyFileParsed(), operator=(), parseKeyFile(), and parseKeyFileLocalCopy().

map< string, string > waveDescription::isobars
staticprivate

LaTeX names of isobars.

Definition at line 171 of file waveDescription.h.

Referenced by setXDecayKeys(), and waveLaTeXFromTopology().


The documentation for this class was generated from the following files: