Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ParticleUtils.cc File Reference

PDG codes to UID functions. More...

#include "Hammer/Tools/ParticleUtils.hh"
#include "Hammer/Tools/Pdg.hh"
#include <algorithm>
#include <boost/functional/hash.hpp>
+ Include dependency graph for ParticleUtils.cc:

Go to the source code of this file.

Namespaces

 Hammer
 The Hammer namespace contains the library code.
 

Functions

std::vector< PdgId > Hammer::flipSigns (const std::vector< PdgId > &list)
 return the PDG codes of the conjugate particles (itself if self-conjugate) for all the PDG codes in alist More...
 
PdgId Hammer::flipSign (const PdgId &id)
 return the PDG code of the conjugate particle (itself if self-conjugate) More...
 
std::vector< PdgId > Hammer::combineDaughters (const std::vector< PdgId > &daughters, const std::vector< PdgId > &subDaughters={})
 combine list of codes of daughters and grandaughters (for processes which parameterise two subsequent decays in a single amplitude) in a single list for computing hashes the convention is that daughters are ordered within themselves, grandDaughters are ordered within themselves, and then the two groups are concatenated with daughters first More...
 
HashId Hammer::processID (PdgId parent, const std::vector< PdgId > &allDaughters)
 compute a unique ID for a given process based on the PDG codes of the parent particle and the ordered list of the daughters (and grandaughters if present) More...
 
HashId Hammer::combineProcessIDs (const std::set< HashId > &allIds)
 
bool Hammer::pdgSorter (PdgId a, PdgId b)
 sorting function for PDG ids for computing hashes. More...
 
bool Hammer::particlesByPdg (const std::function< PdgId(const Particle &)> &pdgGetter, const Particle &a, const Particle &b)
 checks whether two particles are ordered according to the PDG code ordering used in computing hashes (see pdgSorter for more info on the ordering) More...
 

Detailed Description

PDG codes to UID functions.

Definition in file ParticleUtils.cc.