Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Hammer::Process Class Reference

Decay process class. More...

#include <Process.hh>

+ Inheritance diagram for Hammer::Process:
+ Collaboration diagram for Hammer::Process:

Public Types

using TreeMap = std::map< ParticleIndex, ParticleIndices >
 
using const_iterator = TreeMap::const_iterator
 

Public Member Functions

 Process ()
 
 Process (const Process &other)=default
 
Processoperator= (const Process &other)=default
 
 Process (Process &&other)=default
 
Processoperator= (Process &&other)=default
 
 ~Process () noexcept=default
 
const_iterator begin () const
 
const_iterator end () const
 
const_iterator find (ParticleIndex particle) const
 
ParticleIndex addParticle (const Particle &p)
 
void addVertex (ParticleIndex parent, const ParticleIndices &daughters)
 
void removeVertex (ParticleIndex parent, bool prune=false)
 
const ParticleIndicesgetDaughtersIds (ParticleIndex parent=0) const
 
ParticleIndex getParentId (ParticleIndex daughter) const
 
ParticleIndices getSiblingsIds (ParticleIndex particle=0) const
 
const ParticlegetParticle (ParticleIndex id) const
 
ParticleList getDaughters (ParticleIndex parent=0, bool sorted=false) const
 
ParticleList getSiblings (ParticleIndex particle=0, bool sorted=false) const
 
const ParticlegetParent (ParticleIndex daughter) const
 
bool isParent (ParticleIndex particle) const
 
ParticleIndex getFirstVertex () const
 
HashId getId () const
 
const std::set< HashId > & fullId () const
 
std::pair< Particle, ParticleListgetParticlesByVertex (PdgId parent, std::vector< PdgId > daughters) const
 
std::pair< Particle, ParticleListgetParticlesByVertex (std::string vertex) const
 
HashId getVertexId (std::string vertex) const
 
bool initialize ()
 
void disable ()
 
void write (flatbuffers::FlatBufferBuilder *msgwriter, flatbuffers::Offset< Serial::FBProcIDs > *msg) const
 
void read (const Serial::FBProcIDs *msgreader)
 
size_t numParticles (bool withoutPhotons=false) const
 
- Public Member Functions inherited from Hammer::SettingsConsumer
virtual void setSettingsHandler (SettingsHandler &sh)
 set link to settings repository handler. More...
 
void setSettingsHandler (const SettingsConsumer &other)
 
SettingsHandlergetSettingsHandler () const
 provide the pointer to the repository handler More...
 
WTerm setWeightTerm (WTerm group)
 
virtual void addRefs () const
 
 SettingsConsumer ()
 base constructor More...
 
 SettingsConsumer (const SettingsConsumer &)=default
 default copy constructor More...
 
SettingsConsumeroperator= (const SettingsConsumer &)=default
 
virtual ~SettingsConsumer ()
 virtual destructor More...
 

Private Member Functions

virtual void defineSettings ()
 purely virtual function for a class to define new settings More...
 
LoggetLog () const
 logging facility More...
 
void pruneSoftPhotons ()
 
void calcSignatures ()
 
ParticleIndex findFirstVertex () const
 
void cacheParticleDependencies ()
 
ParticleList sortByParent (ParticleIndex parent, ParticleList parts) const
 

Private Attributes

ParticleList _particles
 
TreeMap _processTree
 
ProcessUID _hashId
 
VertexUIDSet _fullId
 
ProcIdDict< ParticleIndex_idTree
 
ParticleIndex _firstVertexIdx = std::numeric_limits<size_t>::max()
 
std::unordered_map
< ParticleIndex, ParticleIndex
_parentDict
 
UniqueParticleIndices _erasedGammas
 
bool _initialized = false
 

Additional Inherited Members

- Protected Member Functions inherited from Hammer::SettingsConsumer
LoggetLog () const
 logging facility More...
 
void initSettings ()
 
void setPath (const std::string &path)
 provide the basic path for the settings defined by this class, as in "<path>:<setting>" More...
 
template<typename T >
void addSetting (const std::string &name, const T &defaultValue)
 template method to add a new setting More...
 
void removeSetting (const std::string &name)
 
template<typename T >
T * getSetting (const std::string &name) const
 template method to return a setting defined by this class More...
 
template<typename T >
T * getSetting (const std::string &otherPath, const std::string &name) const
 template method to return a setting defined by this class More...
 
bool isOn (const std::string &name) const
 method to check a boolean setting defined by this class More...
 
bool isOn (const std::string &otherPath, const std::string &name) const
 method to check a boolean setting by its name and path More...
 
template<typename T >
void updateVectorOfSettings (const std::vector< T > &values, const std::vector< std::string > &names, const std::string &path="", WTerm group=WTerm::COMMON)
 
template<typename T >
void updateVectorOfSettings (const std::map< std::string, T > &values, const std::string &path="", WTerm group=WTerm::COMMON)
 
- Protected Attributes inherited from Hammer::SettingsConsumer
SettingsHandler_settingHandler
 pointer to the settings repository handler. More...
 
std::string _settingPath
 path of the settings defined by this class More...
 
WTerm _group
 
std::set< std::string > _ownedSettings
 

Detailed Description

Decay process class.

Contains the amplitudes, weights and info associated to a decay, ...

Definition at line 34 of file Process.hh.

Member Typedef Documentation

using Hammer::Process::const_iterator = TreeMap::const_iterator

Definition at line 49 of file Process.hh.

Definition at line 48 of file Process.hh.

Constructor & Destructor Documentation

Hammer::Process::Process ( )

Definition at line 27 of file Process.cc.

Hammer::Process::Process ( const Process other)
default
Hammer::Process::Process ( Process &&  other)
default
Hammer::Process::~Process ( )
defaultnoexcept

Member Function Documentation

ParticleIndex Hammer::Process::addParticle ( const Particle p)
Parameters
[in]p
Returns

Definition at line 52 of file Process.cc.

void Hammer::Process::addVertex ( ParticleIndex  parent,
const ParticleIndices daughters 
)
Parameters
[in]parent
[in]daughters

Definition at line 59 of file Process.cc.

Process::const_iterator Hammer::Process::begin ( ) const

Definition at line 40 of file Process.cc.

void Hammer::Process::cacheParticleDependencies ( )
private

Definition at line 257 of file Process.cc.

void Hammer::Process::calcSignatures ( )
private

Definition at line 371 of file Process.cc.

void Hammer::Process::defineSettings ( )
privatevirtual

purely virtual function for a class to define new settings

Implements Hammer::SettingsConsumer.

Definition at line 425 of file Process.cc.

void Hammer::Process::disable ( )

Definition at line 397 of file Process.cc.

Process::const_iterator Hammer::Process::end ( ) const

Definition at line 44 of file Process.cc.

Process::const_iterator Hammer::Process::find ( ParticleIndex  particle) const

Definition at line 48 of file Process.cc.

ParticleIndex Hammer::Process::findFirstVertex ( ) const
private

Definition at line 242 of file Process.cc.

const set< HashId > & Hammer::Process::fullId ( ) const

Definition at line 393 of file Process.cc.

ParticleList Hammer::Process::getDaughters ( ParticleIndex  parent = 0,
bool  sorted = false 
) const
Parameters
[in]parent
[in]sorted
Returns

Definition at line 145 of file Process.cc.

const ParticleIndices & Hammer::Process::getDaughtersIds ( ParticleIndex  parent = 0) const
Parameters
[in]parent
Returns

Definition at line 96 of file Process.cc.

ParticleIndex Hammer::Process::getFirstVertex ( ) const

Definition at line 235 of file Process.cc.

HashId Hammer::Process::getId ( ) const
Returns

Definition at line 389 of file Process.cc.

Log & Hammer::Process::getLog ( ) const
private

logging facility

Returns
stream to be used for logging

Definition at line 429 of file Process.cc.

const Particle & Hammer::Process::getParent ( ParticleIndex  daughter) const
Parameters
[in]daughter
Returns

Definition at line 158 of file Process.cc.

ParticleIndex Hammer::Process::getParentId ( ParticleIndex  daughter) const
Parameters
[in]daughter
Returns

Definition at line 115 of file Process.cc.

const Particle & Hammer::Process::getParticle ( ParticleIndex  id) const
Parameters
[in]id
Returns

Definition at line 127 of file Process.cc.

pair< Particle, ParticleList > Hammer::Process::getParticlesByVertex ( PdgId  parent,
std::vector< PdgId daughters 
) const
Parameters
[in]parent
[in]daughters
Returns

Definition at line 186 of file Process.cc.

pair< Particle, ParticleList > Hammer::Process::getParticlesByVertex ( std::string  vertex) const
Parameters
[in]vertex
Returns

Definition at line 200 of file Process.cc.

ParticleList Hammer::Process::getSiblings ( ParticleIndex  particle = 0,
bool  sorted = false 
) const
Parameters
[in]particle
[in]sorted
Returns

Definition at line 163 of file Process.cc.

ParticleIndices Hammer::Process::getSiblingsIds ( ParticleIndex  particle = 0) const
Parameters
[in]particle
Returns

Definition at line 100 of file Process.cc.

HashId Hammer::Process::getVertexId ( std::string  vertex) const
Parameters
[in]vertex
Returns

Definition at line 212 of file Process.cc.

bool Hammer::Process::initialize ( )
Todo:
what else needs to be done here?

Definition at line 275 of file Process.cc.

bool Hammer::Process::isParent ( ParticleIndex  particle) const

Definition at line 182 of file Process.cc.

size_t Hammer::Process::numParticles ( bool  withoutPhotons = false) const

Definition at line 231 of file Process.cc.

Process& Hammer::Process::operator= ( const Process other)
default
Process& Hammer::Process::operator= ( Process &&  other)
default
void Hammer::Process::pruneSoftPhotons ( )
private

Definition at line 290 of file Process.cc.

void Hammer::Process::read ( const Serial::FBProcIDs *  msgreader)
Parameters
[in]msgreader

Definition at line 414 of file Process.cc.

void Hammer::Process::removeVertex ( ParticleIndex  parent,
bool  prune = false 
)
Parameters
[in]parent
[in]prune

Definition at line 72 of file Process.cc.

ParticleList Hammer::Process::sortByParent ( ParticleIndex  parent,
ParticleList  parts 
) const
private

Definition at line 135 of file Process.cc.

void Hammer::Process::write ( flatbuffers::FlatBufferBuilder *  msgwriter,
flatbuffers::Offset< Serial::FBProcIDs > *  msg 
) const
Parameters
[in]msgwriter
[in]msg

Definition at line 402 of file Process.cc.

Member Data Documentation

UniqueParticleIndices Hammer::Process::_erasedGammas
private

Definition at line 187 of file Process.hh.

ParticleIndex Hammer::Process::_firstVertexIdx = std::numeric_limits<size_t>::max()
private

Definition at line 185 of file Process.hh.

VertexUIDSet Hammer::Process::_fullId
private

Definition at line 182 of file Process.hh.

ProcessUID Hammer::Process::_hashId
private

Definition at line 181 of file Process.hh.

ProcIdDict<ParticleIndex> Hammer::Process::_idTree
private

Definition at line 183 of file Process.hh.

bool Hammer::Process::_initialized = false
private

Definition at line 188 of file Process.hh.

std::unordered_map<ParticleIndex, ParticleIndex> Hammer::Process::_parentDict
private

Definition at line 186 of file Process.hh.

ParticleList Hammer::Process::_particles
private

Definition at line 178 of file Process.hh.

TreeMap Hammer::Process::_processTree
private

Definition at line 179 of file Process.hh.


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