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

#include <decayTopology.h>

Inheritance diagram for rpwa::decayTopology:
rpwa::isobarDecayTopology

Public Member Functions

 decayTopology ()
 decayTopology (const productionVertexPtr &productionVertex, const std::vector< interactionVertexPtr > &decayVertices, const std::vector< particlePtr > &fsParticles, const bool performTopologyCheck=true)
 decayTopology (const decayTopology &topo)
 decayTopology (const decayTopologyGraphType &graph)
virtual ~decayTopology ()
decayTopologyoperator= (const decayTopology &topo)
decayTopologyoperator= (const decayTopologyGraphType &graph)
decayTopologyPtr clone (const bool cloneFsParticles=false, const bool cloneProdKinematics=false) const
 < creates deep copy of decay topology; must not be virtual
virtual void clear ()
 deletes all information
unsigned int nmbDecayVertices () const
 returns number of decay vertices
unsigned int nmbFsParticles () const
 returns number of final-state particles
std::map< std::string,
unsigned int
nmbIndistFsParticles () const
 returns multiplicities of indistinguishable final-state particles
int fsParticlesIntrinsicParity () const
 returns intrinsic parity of final-state particles
int spaceInvEigenValue () const
 returns eigenvalue of decay under space inversion
int reflectionEigenValue () const
 returns eigenvalue of decay under reflection through production plane
const std::vector< particlePtr > & fsParticles () const
 returns final-state particles ordered depth-first
const std::vector
< interactionVertexPtr > & 
decayVertices () const
 returns decay vertices ordered depth-first
const particlePtrXParticle () const
 returns X particle
const productionVertexPtrproductionVertex () const
 returns production vertex
const interactionVertexPtrXDecayVertex () const
 returns X-decay vertex
void transformFsParticles (const TLorentzRotation &L)
 applies Lorentz-transformation to all final-state particles
bool isVertex (const interactionVertexPtr &vert) const
 returns whether given vertex is a vertex in this topology
bool isParticle (const particlePtr &part) const
 returns whether given particle is a particle in this topology
bool isProductionVertex (const interactionVertexPtr &vert) const
 returns whether given vertex is the production vertex
bool isDecayVertex (const interactionVertexPtr &vert) const
 returns whether given vertex is one of the interaction vertices
int decayVertexIndex (const interactionVertexPtr &vert) const
 returns index of given vertex in decay-vertex array; -1 means vertex is not a decay vertex
bool isFsVertex (const interactionVertexPtr &vert) const
 returns whether given vertex is one of the final-state vertices
bool isFsParticle (const particlePtr &part) const
 returns whether given particle is one of the final-state particles
int fsParticlesIndex (const particlePtr &part) const
 returns index of given particle in final-state particle array; -1 means particle is not a final-state particle
bool checkTopology () const
 returns whether decay has the correct topology
bool checkConsistency () const
 checks consistency of information in vertices
decayTopology subDecay (const nodeDesc &startNd, const bool linkToMotherTopo=false)
 returns sub-decay tree that starts at given node
decayTopology subDecay (const interactionVertexPtr &startVert, const bool linkToParentTopo=false)
 returns sub-decay tree that starts at given vertex
void addDecay (const decayTopology &topo)
 copies all vertices and particles into this topology
void setProductionVertex (const productionVertexPtr &productionVertex)
 (re)defines production vertex
bool initKinematicsData (const TClonesArray &prodKinParticles, const TClonesArray &decayKinParticles)
 initializes input data
bool readKinematicsData (const TClonesArray &prodKinMomenta, const TClonesArray &decayKinMomenta)
 reads production and decay kinematics data and sets respective 4-momenta
void fillKinematicsDataCache ()
 copies kinematics data into cache; needed for Bose symmetrization
bool revertMomenta ()
 resets momenta to the values of last event read
bool revertMomenta (const std::vector< unsigned int > &fsPartPermMap)
 resets momenta to the values of last event read, but reordering them according to index map
virtual std::ostream & print (std::ostream &out) const
 prints decay topology in human-readable form
virtual std::ostream & printProdKinParticles (std::ostream &out) const
 prints production kinematics data in human-readable form
virtual std::ostream & printDecayKinParticles (std::ostream &out) const
 prints decay kinematics data in human-readable form

Static Public Member Functions

static bool debug ()
 returns debug flag
static void setDebug (const bool debug=true)
 sets debug flag

Protected Member Functions

virtual decayTopologydoClone (const bool cloneFsParticles, const bool cloneProdKinematics) const
 helper function to use covariant return types with smart pointers; needed for public clone()
decayTopologyconstructDecay (const productionVertexPtr &productionVertex, const std::vector< interactionVertexPtr > &decayVertices, const std::vector< particlePtr > &fsParticles, const bool performTopologyCheck=true)
 constructs the decay graph based on production vertex, intermediate vertices, and final-state particles
void buildInternalData ()
 (re)builds internal data structure of vertex and particle pointers
virtual interactionVertexPtr cloneNode (const nodeDesc &nd, const bool cloneInParticles=false, const bool cloneOutParticles=false)
virtual particlePtr cloneEdge (const edgeDesc &ed)

Private Attributes

productionVertexPtr _prodVertex
 pointer to production vertex
std::vector< interactionVertexPtr_decayVertices
 array of decay vertices; ordered depth-first
std::vector< particlePtr_fsParticles
 array of final-state particles; ordered depth-first
std::map< unsigned int,
unsigned int
_fsDataPartIndexMap
 final-state particle indices in input data array
std::vector< TVector3 > _fsDataPartMomCache
 caches final-state momenta of last event read from input data; allows to "reset" kinematics for multiple passes over the same data

Static Private Attributes

static bool _debug = false
 if set to true, debug messages are printed

Detailed Description

Definition at line 76 of file decayTopology.h.

Constructor & Destructor Documentation

decayTopology::decayTopology ( )

Definition at line 70 of file decayTopology.cc.

Referenced by doClone().

decayTopology::decayTopology ( const productionVertexPtr productionVertex,
const std::vector< interactionVertexPtr > &  decayVertices,
const std::vector< particlePtr > &  fsParticles,
const bool  performTopologyCheck = true 
)

Definition at line 81 of file decayTopology.cc.

References constructDecay().

decayTopology::decayTopology ( const decayTopology topo)

Definition at line 90 of file decayTopology.cc.

decayTopology::decayTopology ( const decayTopologyGraphType graph)

Definition at line 96 of file decayTopology.cc.

decayTopology::~decayTopology ( )
virtual

Definition at line 102 of file decayTopology.cc.

Member Function Documentation

void decayTopology::addDecay ( const decayTopology topo)

copies all vertices and particles into this topology

Definition at line 560 of file decayTopology.cc.

References buildInternalData().

void decayTopology::buildInternalData ( )
protected

(re)builds internal data structure of vertex and particle pointers

Definition at line 923 of file decayTopology.cc.

References _debug, _decayVertices, _fsParticles, _prodVertex, i, isDecayVertex(), and isFsVertex().

Referenced by addDecay(), and operator=().

bool rpwa::decayTopology::checkConsistency ( ) const
inline

checks consistency of information in vertices

Reimplemented in rpwa::isobarDecayTopology.

Definition at line 124 of file decayTopology.h.

bool decayTopology::checkTopology ( ) const

returns whether decay has the correct topology

Reimplemented in rpwa::isobarDecayTopology.

Definition at line 341 of file decayTopology.cc.

References _debug, _prodVertex, rpwa::compareIndicesAsc(), decayVertices(), fsParticles(), i, int, isFsVertex(), isProductionVertex(), nmbDecayVertices(), nmbFsParticles(), productionVertex(), and XParticle().

Referenced by constructDecay().

void decayTopology::clear ( )
virtual

deletes all information

Reimplemented in rpwa::isobarDecayTopology.

Definition at line 182 of file decayTopology.cc.

References _decayVertices, _fsDataPartIndexMap, _fsDataPartMomCache, _fsParticles, and _prodVertex.

Referenced by constructDecay().

decayTopologyPtr rpwa::decayTopology::clone ( const bool  cloneFsParticles = false,
const bool  cloneProdKinematics = false 
) const
inline

< creates deep copy of decay topology; must not be virtual

Reimplemented in rpwa::isobarDecayTopology.

Definition at line 91 of file decayTopology.h.

References doClone().

particlePtr decayTopology::cloneEdge ( const edgeDesc &  ed)
protectedvirtual

Definition at line 1010 of file decayTopology.cc.

References _fsParticles, fsParticles(), i, isFsParticle(), and nmbFsParticles().

Referenced by doClone().

interactionVertexPtr decayTopology::cloneNode ( const nodeDesc &  nd,
const bool  cloneInParticles = false,
const bool  cloneOutParticles = false 
)
protectedvirtual

Definition at line 990 of file decayTopology.cc.

References _decayVertices, _prodVertex, i, isDecayVertex(), isProductionVertex(), and nmbDecayVertices().

Referenced by doClone().

decayTopology & decayTopology::constructDecay ( const productionVertexPtr productionVertex,
const std::vector< interactionVertexPtr > &  decayVertices,
const std::vector< particlePtr > &  fsParticles,
const bool  performTopologyCheck = true 
)
protected

constructs the decay graph based on production vertex, intermediate vertices, and final-state particles

Reimplemented in rpwa::isobarDecayTopology.

Definition at line 843 of file decayTopology.cc.

References _debug, _decayVertices, _fsParticles, _prodVertex, checkTopology(), clear(), rpwa::createFsVertex(), i, rpwa::interactionVertex::inParticles(), and productionVertex().

Referenced by decayTopology().

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

returns debug flag

Reimplemented in rpwa::isobarDecayTopology.

Definition at line 152 of file decayTopology.h.

References _debug.

Referenced by setDebug().

int decayTopology::decayVertexIndex ( const interactionVertexPtr vert) const

returns index of given vertex in decay-vertex array; -1 means vertex is not a decay vertex

Definition at line 294 of file decayTopology.cc.

References decayVertices(), i, isDecayVertex(), and nmbDecayVertices().

const std::vector<interactionVertexPtr>& rpwa::decayTopology::decayVertices ( ) const
inline
decayTopology * decayTopology::doClone ( const bool  cloneFsParticles,
const bool  cloneProdKinematics 
) const
protectedvirtual

helper function to use covariant return types with smart pointers; needed for public clone()

!! what about outgoing particles in production vertex other than X?

Definition at line 133 of file decayTopology.cc.

References _debug, cloneEdge(), cloneNode(), decayTopology(), i, isDecayVertex(), isFsParticle(), isFsVertex(), and isProductionVertex().

Referenced by clone().

void decayTopology::fillKinematicsDataCache ( )

copies kinematics data into cache; needed for Bose symmetrization

Definition at line 713 of file decayTopology.cc.

References _fsDataPartMomCache, fsParticles(), i, and nmbFsParticles().

Referenced by readKinematicsData().

const std::vector<particlePtr>& rpwa::decayTopology::fsParticles ( ) const
inline
int decayTopology::fsParticlesIndex ( const particlePtr part) const

returns index of given particle in final-state particle array; -1 means particle is not a final-state particle

Definition at line 329 of file decayTopology.cc.

References fsParticles(), i, isParticle(), and nmbFsParticles().

Referenced by rpwa::isobarDecayTopology::getFsPartIndicesConnectedToVertex(), and rpwa::isobarDecayTopology::print().

int decayTopology::fsParticlesIntrinsicParity ( ) const

returns intrinsic parity of final-state particles

Definition at line 210 of file decayTopology.cc.

References fsParticles(), i, and nmbFsParticles().

Referenced by reflectionEigenValue(), and spaceInvEigenValue().

bool decayTopology::initKinematicsData ( const TClonesArray &  prodKinParticles,
const TClonesArray &  decayKinParticles 
)

initializes input data

Definition at line 591 of file decayTopology.cc.

References _debug, _fsDataPartIndexMap, fsParticles(), i, nmbFsParticles(), and productionVertex().

bool decayTopology::isDecayVertex ( const interactionVertexPtr vert) const

returns whether given vertex is one of the interaction vertices

Definition at line 281 of file decayTopology.cc.

References isFsVertex(), isProductionVertex(), and isVertex().

Referenced by buildInternalData(), cloneNode(), decayVertexIndex(), and doClone().

bool decayTopology::isFsParticle ( const particlePtr part) const
bool decayTopology::isFsVertex ( const interactionVertexPtr vert) const

returns whether given vertex is one of the final-state vertices

Definition at line 306 of file decayTopology.cc.

References isVertex().

Referenced by buildInternalData(), checkTopology(), doClone(), isDecayVertex(), rpwa::isobarDecayTopology::print(), print(), and rpwa::waveDescription::waveNameFromTopology().

bool decayTopology::isParticle ( const particlePtr part) const

returns whether given particle is a particle in this topology

Definition at line 259 of file decayTopology.cc.

Referenced by fsParticlesIndex(), and isFsParticle().

bool decayTopology::isProductionVertex ( const interactionVertexPtr vert) const

returns whether given vertex is the production vertex

Definition at line 272 of file decayTopology.cc.

References _prodVertex, and isVertex().

Referenced by checkTopology(), cloneNode(), doClone(), and isDecayVertex().

bool decayTopology::isVertex ( const interactionVertexPtr vert) const

returns whether given vertex is a vertex in this topology

Definition at line 246 of file decayTopology.cc.

Referenced by isDecayVertex(), isFsVertex(), and isProductionVertex().

unsigned int rpwa::decayTopology::nmbDecayVertices ( ) const
inline
unsigned int rpwa::decayTopology::nmbFsParticles ( ) const
inline
map< string, unsigned int > decayTopology::nmbIndistFsParticles ( ) const

returns multiplicities of indistinguishable final-state particles

Definition at line 194 of file decayTopology.cc.

References fsParticles(), i, and nmbFsParticles().

Referenced by rpwa::isobarDecayTopology::findIsobarBoseSymVertices(), and rpwa::isobarDecayTopology::getBoseSymmetrization().

decayTopology & decayTopology::operator= ( const decayTopology topo)

Reimplemented in rpwa::isobarDecayTopology.

Definition at line 107 of file decayTopology.cc.

References _decayVertices, _fsDataPartIndexMap, _fsDataPartMomCache, _fsParticles, and _prodVertex.

Referenced by operator=().

decayTopology & decayTopology::operator= ( const decayTopologyGraphType graph)

Definition at line 122 of file decayTopology.cc.

References buildInternalData(), and operator=().

ostream & decayTopology::print ( std::ostream &  out) const
virtual

prints decay topology in human-readable form

Reimplemented in rpwa::isobarDecayTopology.

Definition at line 779 of file decayTopology.cc.

References decayVertices(), i, isFsParticle(), isFsVertex(), nmbDecayVertices(), and productionVertex().

Referenced by rpwa::operator<<().

ostream & decayTopology::printDecayKinParticles ( std::ostream &  out) const
virtual

prints decay kinematics data in human-readable form

Definition at line 830 of file decayTopology.cc.

References fsParticles(), i, and nmbFsParticles().

ostream & decayTopology::printProdKinParticles ( std::ostream &  out) const
virtual

prints production kinematics data in human-readable form

Definition at line 812 of file decayTopology.cc.

References i, and productionVertex().

const productionVertexPtr& rpwa::decayTopology::productionVertex ( ) const
inline
bool decayTopology::readKinematicsData ( const TClonesArray &  prodKinMomenta,
const TClonesArray &  decayKinMomenta 
)

reads production and decay kinematics data and sets respective 4-momenta

Definition at line 671 of file decayTopology.cc.

References _debug, _fsDataPartIndexMap, fillKinematicsDataCache(), fsParticles(), i, nmbFsParticles(), and productionVertex().

int decayTopology::reflectionEigenValue ( ) const

returns eigenvalue of decay under reflection through production plane

Definition at line 229 of file decayTopology.cc.

References fsParticlesIntrinsicParity(), and XParticle().

bool decayTopology::revertMomenta ( )

resets momenta to the values of last event read

Definition at line 726 of file decayTopology.cc.

References _debug, _fsDataPartMomCache, fsParticles(), i, nmbFsParticles(), and productionVertex().

bool decayTopology::revertMomenta ( const std::vector< unsigned int > &  fsPartPermMap)

resets momenta to the values of last event read, but reordering them according to index map

Definition at line 750 of file decayTopology.cc.

References _debug, _fsDataPartMomCache, fsParticles(), i, nmbFsParticles(), and productionVertex().

static void rpwa::decayTopology::setDebug ( const bool  debug = true)
inlinestatic

sets debug flag

Reimplemented in rpwa::isobarDecayTopology.

Definition at line 153 of file decayTopology.h.

References _debug, and debug().

void decayTopology::setProductionVertex ( const productionVertexPtr productionVertex)

(re)defines production vertex

Definition at line 567 of file decayTopology.cc.

References _prodVertex, and productionVertex().

Referenced by main().

int decayTopology::spaceInvEigenValue ( ) const

returns eigenvalue of decay under space inversion

Definition at line 221 of file decayTopology.cc.

References fsParticlesIntrinsicParity(), and XParticle().

decayTopology decayTopology::subDecay ( const nodeDesc &  startNd,
const bool  linkToMotherTopo = false 
)

returns sub-decay tree that starts at given node

Reimplemented in rpwa::isobarDecayTopology.

Definition at line 550 of file decayTopology.cc.

Referenced by rpwa::waveSetGenerator::findBoseSymDecays(), rpwa::isobarDecayTopology::findIsobarBoseSymVertices(), and rpwa::isobarDecayTopology::subDecay().

decayTopology rpwa::decayTopology::subDecay ( const interactionVertexPtr startVert,
const bool  linkToParentTopo = false 
)
inline

returns sub-decay tree that starts at given vertex

Definition at line 128 of file decayTopology.h.

References subDecay().

Referenced by subDecay().

void decayTopology::transformFsParticles ( const TLorentzRotation &  L)

applies Lorentz-transformation to all final-state particles

Definition at line 238 of file decayTopology.cc.

References fsParticles(), i, and nmbFsParticles().

const interactionVertexPtr& rpwa::decayTopology::XDecayVertex ( ) const
inline

returns X-decay vertex

Definition at line 110 of file decayTopology.h.

References _decayVertices.

Referenced by rpwa::isobarDecayTopology::getIsospinClebschGordanProduct(), and main().

const particlePtr& rpwa::decayTopology::XParticle ( ) const
inline

Member Data Documentation

bool decayTopology::_debug = false
staticprivate

if set to true, debug messages are printed

Definition at line 182 of file decayTopology.h.

Referenced by buildInternalData(), checkTopology(), constructDecay(), debug(), doClone(), initKinematicsData(), readKinematicsData(), revertMomenta(), and setDebug().

std::vector<interactionVertexPtr> rpwa::decayTopology::_decayVertices
private

array of decay vertices; ordered depth-first

Definition at line 176 of file decayTopology.h.

Referenced by buildInternalData(), clear(), cloneNode(), constructDecay(), decayVertices(), nmbDecayVertices(), operator=(), and XDecayVertex().

std::map<unsigned int, unsigned int> rpwa::decayTopology::_fsDataPartIndexMap
private

final-state particle indices in input data array

Definition at line 179 of file decayTopology.h.

Referenced by clear(), initKinematicsData(), operator=(), and readKinematicsData().

std::vector<TVector3> rpwa::decayTopology::_fsDataPartMomCache
private

caches final-state momenta of last event read from input data; allows to "reset" kinematics for multiple passes over the same data

Definition at line 180 of file decayTopology.h.

Referenced by clear(), fillKinematicsDataCache(), operator=(), and revertMomenta().

std::vector<particlePtr> rpwa::decayTopology::_fsParticles
private

array of final-state particles; ordered depth-first

Definition at line 177 of file decayTopology.h.

Referenced by buildInternalData(), clear(), cloneEdge(), constructDecay(), fsParticles(), nmbFsParticles(), and operator=().

productionVertexPtr rpwa::decayTopology::_prodVertex
private

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