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 Namespace Reference

The Hammer namespace contains the library code. More...

Namespaces

 MultiDimensional
 The MultiDimensional namespace contains the tensor algebra infrastructure.
 
 PS
 The PS namespace contains the phase space integration infrastructure.
 
 Serial
 The Serial namespace contains the Hammer serialization code based on flatbuffers.
 

Classes

class  AmplitudeBase
 Base class for amplitudes. More...
 
class  AmplBD0starLepNu
 
class  AmplBD1LepNu
 
class  AmplBD1starLepNu
 
class  AmplBD2starLepNu
 
class  AmplBDLepNu
 
class  AmplBDstarDGamLepNu
 
class  AmplBDstarDPiLepNu
 
class  AmplBDstarLepNu
 
class  AmplBToQLepNuBase
 
class  AmplLbLcLepNu
 
class  AmplTau3PiNu
 
class  AmplTauEllNuNu
 
class  AmplTauPiNu
 
class  DictionaryManager
 Main class. More...
 
class  Event
 Event container class. More...
 
class  Error
 Generic error class. More...
 
class  IndexLabelError
 Invalid index label error class. More...
 
class  RangeError
 Out-of-range error class. More...
 
class  PhaseSpaceError
 Invalid phase space point error class. More...
 
class  InitializationError
 Initialization error class. More...
 
class  ExternalData
 Main class. More...
 
class  FormFactorBase
 Base class for form factors. More...
 
class  FFBGLBase
 Base class for BGL form factors. More...
 
class  FFBLPRBase
 Base class for BLPR form factors. More...
 
class  FFBLRBase
 Base class for BLR form factors. More...
 
class  FFBLRSBase
 Base class for BLR form factors. More...
 
class  FFBtoD0starBLR
 
class  FFBtoD0starBLRVar
 
class  FFBtoD0starISGW2
 
class  FFBtoD0starLLSW
 
class  FFBtoD1BLR
 
class  FFBtoD1BLRVar
 
class  FFBtoD1ISGW2
 
class  FFBtoD1LLSW
 
class  FFBtoD1starBLR
 
class  FFBtoD1starBLRVar
 
class  FFBtoD1starISGW2
 
class  FFBtoD1starLLSW
 
class  FFBtoD2starBLR
 
class  FFBtoD2starBLRVar
 
class  FFBtoD2starISGW2
 
class  FFBtoD2starLLSW
 
class  FFBtoDBGL
 
class  FFBtoDBGLVar
 
class  FFBtoDBLPR
 
class  FFBtoDBLPRVar
 
class  FFBtoDCLN
 
class  FFBtoDISGW2
 
class  FFBtoDstarBGL
 
class  FFBtoDstarBGLVar
 
class  FFBtoDstarBLPR
 
class  FFBtoDstarBLPRVar
 
class  FFBtoDstarCLN
 
class  FFBtoDstarCLNVar
 
class  FFBtoDstarISGW2
 
class  FFCLNBase
 Base class for CLN form factors. More...
 
class  FFISGW2Base
 Base class for ISGW2 form factors implementation matched to EvtGen. More...
 
class  FFLbtoLcBLRS
 
class  FFLbtoLcBLRSVar
 
class  FFLbtoLcPCR
 
class  FFLLSWBase
 Base class for LLSW form factors. More...
 
class  FFPCRBase
 Base class for PCR form factors See Pervin, Roberst, and Capstick, Phys. More...
 
class  FFRCTBase
 Base class for RCT form factors See Pervin, Roberst, and Capstick, Phys. More...
 
class  FFTauto3PiRCT
 
class  Hammer
 Main class. More...
 
class  Histos
 Hammer histogram manager class. More...
 
struct  FFPrefixGroup
 
struct  NumDenPair
 
class  FourMomentum
 4-momentum class More...
 
class  Histogram
 Multidimensional histogram class with Tensor as cell bins. More...
 
class  HistogramDefinition
 
class  HistogramSet
 
class  Integrator
 Tensor integration class. More...
 
class  Tensor
 Multidimensional tensor class with complex numbers as elements. More...
 
class  Units
 Hammer class for dealing with units. More...
 
class  Particle
 Particle class. More...
 
class  Process
 Decay process class. More...
 
class  ProcessDefinitions
 Hammer settings manager class. More...
 
struct  AmplEntry
 
struct  SelectedAmplEntry
 
class  AmplTriplet
 
struct  EdgeEntry
 
struct  VertexEntry
 
class  ProcGraph
 Decay process class. More...
 
class  ProcManager
 Decay process class. More...
 
class  ProcRates
 Decay process class. More...
 
class  ProcRequirements
 Decay process class. More...
 
class  ProcResults
 Decay process class. More...
 
class  ProvidersRepo
 Main class. More...
 
class  PurePhaseSpaceDefs
 Hammer settings manager class. More...
 
class  RateBase
 Base class for rates. More...
 
class  RateBD0starLepNu
 
class  RateBD1LepNu
 
class  RateBD1starLepNu
 
class  RateBD2starLepNu
 
class  RateBDLepNu
 
class  RateBDstarLepNu
 
class  RateLbLcLepNu
 
class  RateTau3PiNu
 
class  SchemeDefinitions
 Hammer settings manager class. More...
 
class  SettingsHandler
 Hammer settings manager class. More...
 
struct  IOBuffer
 
class  IOBuffers
 
struct  BinContents
 contents of a histogram bin after full contraction (real weights) to be used to export the histogram outside Hammer More...
 
struct  HistoInfo
 
class  product_iterator
 
class  Log
 Logging class. More...
 
class  ParticleData
 PDG code process signature class. More...
 
class  PID
 Hammer class for dealing with particle data. More...
 
class  Setting
 container for an Hammer run option More...
 
class  SettingsConsumer
 Base class to access the settings repository. More...
 
struct  SettingChecker
 
class  SettingWriter
 
struct  SettingEncoder
 
struct  SettingStringConverter
 
struct  reversion_wrapper
 

Typedefs

template<typename T >
using HistoNameDict = std::map< std::string, T >
 
using ParticleIndex = size_t
 
using ParticleIndices = std::vector< ParticleIndex >
 
using UniqueParticleIndices = std::set< ParticleIndex >
 
using HashId = size_t
 
using AmplitudeUID = HashId
 
template<typename T >
using AmplitudeIdDict = std::map< AmplitudeUID, T >
 
using HadronicUID = HashId
 
template<typename T >
using HadronicIdDict = std::map< HadronicUID, T >
 
using VertexUID = HashId
 
template<typename T >
using VertexIdDict = std::map< VertexUID, T >
 
using VertexUIDSet = std::set< VertexUID >
 
template<typename T >
using VertexDict = std::map< ParticleIndex, T >
 
using VertexName = std::string
 
using ProcessUID = HashId
 
template<typename T >
using ProcIdDict = std::map< ProcessUID, T >
 
using EventUID = std::set< ProcessUID >
 
template<typename T >
using EventIdDict = UMap< EventUID, T >
 
using EventUIDGroup = std::set< EventUID >
 
template<typename T >
using EventIdGroupDict = UMap< EventUIDGroup, T >
 
using SchemeName = std::string
 
using SchemeNameList = std::vector< SchemeName >
 
template<typename T >
using SchemeDict = std::map< SchemeName, T >
 
template<typename T >
using WCPrefixDict = std::map< std::string, T >
 
using FFIndex = size_t
 
template<typename T >
using FFIndexDict = std::map< FFIndex, T >
 
template<typename T >
using FFPrefixGroupDict = std::map< FFPrefixGroup, T >
 
using BoundaryFunction = std::function< std::pair< double, double >(const std::vector< double > &)>
 
using IntegrationBoundaries = std::vector< BoundaryFunction >
 
using EvaluationGrid = std::vector< std::vector< double >>
 
using EvaluationWeights = std::vector< double >
 
using IndexType = uint16_t
 
using IndexPair = std::pair< IndexType, IndexType >
 
using IndexList = std::vector< IndexType >
 
using UniqueIndexList = std::set< IndexType >
 
using IndexPairList = std::vector< IndexPair >
 
using PositionType = size_t
 
using PositionPair = std::pair< PositionType, PositionType >
 
using PositionList = std::vector< PositionType >
 
using PositionPairList = std::vector< PositionPair >
 
using PosIndexPair = std::pair< PositionType, IndexType >
 
using PosIndexPairList = std::vector< PosIndexPair >
 
using LabelPair = int std::pair< IndexLabel, IndexLabel >
 
using LabelsList = std::vector< IndexLabel >
 
using UniqueLabelsList = std::set< IndexLabel >
 
using LabelPairsSet = std::set< LabelPair >
 
using ParticleList = std::vector< Particle >
 
template<typename T >
using EdgeWeightDict = std::map< size_t, T, std::less< size_t >>
 
template<typename T >
using DepthLevelDict = std::map< size_t, T, std::greater< size_t >>
 
using IOHistogram = std::vector< BinContents >
 
using PdgId = int
 
template<typename K , typename V >
using UMap = std::unordered_map< K, V, boost::hash< K >>
 

Enumerations

enum  IndexLabel : int {
  NONE = 0, SPIN_INDEX_START = 0, SPIN_TAUP = 1, SPIN_TAUP_HC = -SPIN_TAUP,
  SPIN_TAUM = 2, SPIN_TAUM_HC = -SPIN_TAUM, SPIN_MUP = 3, SPIN_MUP_HC = -SPIN_MUP,
  SPIN_MUM = 4, SPIN_MUM_HC = -SPIN_MUM, SPIN_EP = 5, SPIN_EP_HC = -SPIN_EP,
  SPIN_EM = 6, SPIN_EM_HC = -SPIN_EM, SPIN_NUTAU = 7, SPIN_NUTAU_HC = -SPIN_NUTAU,
  SPIN_NUTAU_BAR = 8, SPIN_NUTAU_BAR_HC = -SPIN_NUTAU_BAR, SPIN_NUMU = 9, SPIN_NUMU_HC = -SPIN_NUMU,
  SPIN_NUMU_BAR = 10, SPIN_NUMU_BAR_HC = -SPIN_NUMU_BAR, SPIN_NUE = 11, SPIN_NUE_HC = -SPIN_NUE,
  SPIN_NUE_BAR = 12, SPIN_NUE_BAR_HC = -SPIN_NUE_BAR, SPIN_GAMMA = 13, SPIN_GAMMA_HC = -SPIN_GAMMA,
  SPIN_DSTAR = 14, SPIN_DSTAR_HC = -SPIN_DSTAR, SPIN_DSSD1STAR = 15, SPIN_DSSD1STAR_HC = -SPIN_DSSD1STAR,
  SPIN_DSSD1 = 16, SPIN_DSSD1_HC = -SPIN_DSSD1, SPIN_DSSD2STAR = 17, SPIN_DSSD2STAR_HC = -SPIN_DSSD2STAR,
  SPIN_LB = 18, SPIN_LB_HC = -SPIN_LB, SPIN_LC = 19, SPIN_LC_HC = -SPIN_LC,
  SPIN_RHO = 20, SPIN_RHO_HC = -SPIN_RHO, SPIN_DSSTAR = 24, SPIN_DSSTAR_HC = -SPIN_DSSTAR,
  SPIN_DSSDS1STAR = 25, SPIN_DSSDS1STAR_HC = -SPIN_DSSDS1STAR, SPIN_DSSDS1 = 26, SPIN_DSSDS1_HC = -SPIN_DSSDS1,
  SPIN_DSSDS2STAR = 27, SPIN_DSSDS2STAR_HC = -SPIN_DSSDS2STAR, SPIN_TAUP_REF = 101, SPIN_TAUP_HC_REF = -SPIN_TAUP_REF,
  SPIN_TAUM_REF = 102, SPIN_TAUM_HC_REF = -SPIN_TAUM_REF, SPIN_MUP_REF = 103, SPIN_MUP_HC_REF = -SPIN_MUP_REF,
  SPIN_MUM_REF = 104, SPIN_MUM_HC_REF = -SPIN_MUM_REF, SPIN_EP_REF = 105, SPIN_EP_HC_REF = -SPIN_EP_REF,
  SPIN_EM_REF = 106, SPIN_EM_HC_REF = -SPIN_EM_REF, SPIN_NUTAU_REF = 107, SPIN_NUTAU_HC_REF = -SPIN_NUTAU_REF,
  SPIN_NUTAU_BAR_REF = 108, SPIN_NUTAU_BAR_HC_REF = -SPIN_NUTAU_BAR_REF, SPIN_NUMU_REF = 109, SPIN_NUMU_HC_REF = -SPIN_NUMU_REF,
  SPIN_NUMU_BAR_REF = 110, SPIN_NUMU_BAR_HC_REF = -SPIN_NUMU_BAR_REF, SPIN_NUE_REF = 111, SPIN_NUE_HC_REF = -SPIN_NUE_REF,
  SPIN_NUE_BAR_REF = 112, SPIN_NUE_BAR_HC_REF = -SPIN_NUE_BAR_REF, SPIN_INDEX_END = 999, WC_INDEX_START = 1000,
  WILSON_BCTAUNU = 1001, WILSON_BCTAUNU_HC = -WILSON_BCTAUNU, WILSON_BCMUNU = 1002, WILSON_BCMUNU_HC = -WILSON_BCMUNU,
  WILSON_BCENU = 1003, WILSON_BCENU_HC = -WILSON_BCENU, WILSON_BUTAUNU = 1004, WILSON_BUTAUNU_HC = -WILSON_BUTAUNU,
  WILSON_BUMUNU = 1005, WILSON_BUMUNU_HC = -WILSON_BUMUNU, WILSON_BUENU = 1006, WILSON_BUENU_HC = -WILSON_BUENU,
  WC_INDEX_END = 1999, FF_INDEX_START = 2000, FF_BD = 2001, FF_BD_HC = -FF_BD,
  FF_BDSTAR = 2002, FF_BDSTAR_HC = -FF_BDSTAR, FF_BDSSD0STAR = 2003, FF_BDSSD0STAR_HC = -FF_BDSSD0STAR,
  FF_BDSSD1STAR = 2004, FF_BDSSD1STAR_HC = -FF_BDSSD1STAR, FF_BDSSD1 = 2005, FF_BDSSD1_HC = -FF_BDSSD1,
  FF_BDSSD2STAR = 2006, FF_BDSSD2STAR_HC = -FF_BDSSD2STAR, FF_BSDS = 2011, FF_BSDS_HC = -FF_BSDS,
  FF_BSDSSTAR = 2012, FF_BSDSSTAR_HC = -FF_BSDSSTAR, FF_BSDSSDS0STAR = 2013, FF_BSDSSDS0STAR_HC = -FF_BSDSSDS0STAR,
  FF_BSDSSDS1STAR = 2014, FF_BSDSSDS1STAR_HC = -FF_BSDSSDS1STAR, FF_BSDSSDS1 = 2015, FF_BSDSSDS1_HC = -FF_BSDSSDS1,
  FF_BSDSSDS2STAR = 2016, FF_BSDSSDS2STAR_HC = -FF_BSDSSDS2STAR, FF_BRHO = 2021, FF_BRHO_HC = -FF_BRHO,
  FF_LBLC = 2051, FF_LBLC_HC = -FF_LBLC, FF_TAU3PI = 2501, FF_TAU3PI_HC = -FF_TAU3PI,
  FF_INDEX_END = 2999, FF_VAR_INDEX_START = 3000, FF_BD_VAR = 3001, FF_BD_VAR_HC = -FF_BD_VAR,
  FF_BDSTAR_VAR = 3002, FF_BDSTAR_VAR_HC = -FF_BDSTAR_VAR, FF_BDSSD0STAR_VAR = 3003, FF_BDSSD0STAR_VAR_HC = -FF_BDSSD0STAR_VAR,
  FF_BDSSD1STAR_VAR = 3004, FF_BDSSD1STAR_VAR_HC = -FF_BDSSD1STAR_VAR, FF_BDSSD1_VAR = 3005, FF_BDSSD1_VAR_HC = -FF_BDSSD1_VAR,
  FF_BDSSD2STAR_VAR = 3006, FF_BDSSD2STAR_VAR_HC = -FF_BDSSD2STAR_VAR, FF_BSDS_VAR = 3011, FF_BSDS_VAR_HC = -FF_BSDS_VAR,
  FF_BSDSSTAR_VAR = 3012, FF_BSDSSTAR_VAR_HC = -FF_BSDSSTAR_VAR, FF_BSDSSDS0STAR_VAR = 3013, FF_BSDSSDS0STAR_VAR_HC = -FF_BSDSSDS0STAR_VAR,
  FF_BSDSSDS1STAR_VAR = 3014, FF_BSDSSDS1STAR_VAR_HC = -FF_BSDSSDS1STAR_VAR, FF_BSDSSDS1_VAR = 3015, FF_BSDSSDS1_VAR_HC = -FF_BSDSSDS1_VAR,
  FF_BSDSSDS2STAR_VAR = 3016, FF_BSDSSDS2STAR_VAR_HC = -FF_BSDSSDS2STAR_VAR, FF_BRHO_VAR = 3021, FF_BRHO_VAR_HC = -FF_BRHO_VAR,
  FF_LBLC_VAR = 3051, FF_LBLC_VAR_HC = -FF_LBLC_VAR, FF_VAR_INDEX_END = 3999, INTEGRATION_INDEX = 4000
}
 label identifiers of tensor indices they are used to determine which indices can be contracted together or traced over and which indices are quantum numbers, Wilson coefficient indices, form factor indices, etc. More...
 
enum  WTerm { WTerm::COMMON, WTerm::NUMERATOR, WTerm::DENOMINATOR }
 
enum  IndexPairMember { IndexPairMember::Left, IndexPairMember::Right, IndexPairMember::Both }
 
enum  AmplType : short { AmplType::VERTEX = 0, AmplType::PARENTEDGE, AmplType::DAUGHTEREDGE, AmplType::FULLEDGE }
 
enum  RecordType : char {
  UNDEFINED = 'u', HEADER = 'b', EVENT = 'e', HISTOGRAM = 'h',
  RATE = 'r', HISTOGRAM_DEFINITION = 'd'
}
 

Functions

YAML::Emitter & operator<< (YAML::Emitter &out, const ProcessDefinitions &s)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const PurePhaseSpaceDefs &s)
 
YAML::Emitter & operator<< (YAML::Emitter &out, const SchemeDefinitions &s)
 
unique_ptr< HistogrammakeHistogram (const string &name, const HistogramDefinition &def, const Tensor &defaultValue)
 
unique_ptr< HistogrammakeHistogram (const string &name, const HistogramDefinition &def, const IndexList &defaultTensorDims, const LabelsList &defaultTensorLabels)
 
Histogram operator+ (const Histogram &a, const Histogram &b)
 
static BinContents operator+ (const BinContents &a, const BinContents &b)
 
double integrate (std::function< double(double)> &func, double low, double high)
 integration function based on gaussian method More...
 
static BoundaryFunction makeMjFunction (double parentMass, vector< double > masses, size_t j)
 
static double kStar (double mParent, double mk, double mSibling)
 
double phaseSpaceNBody (const double mass, const std::vector< double > &masses)
 
static double phaseSpace2 (const double m0, const double m1, const double m2)
 
static double phaseSpace3 (const double m0, const double m1, const double m2, const double m3)
 
double phaseSpaceN (const double mass, const std::vector< double > &masses)
 
Tensor dot (const Tensor &first, const Tensor &second, const set< IndexLabel > &indices)
 
Tensor spinSum (const Tensor &first)
 trace a tensor More...
 
Tensor spinAverage (const Tensor &first)
 trace a tensor over the traceable spin indices and divide by the product of the dimensions of the traced indices (equal to \( 2s_i + 1 \)) More...
 
Tensor operator* (const Tensor &first, double val)
 left multiplies a tensor by a real constant More...
 
Tensor operator* (double val, const Tensor &first)
 right multiplies a tensor by a real constant More...
 
Tensor operator* (std::complex< double > val, const Tensor &first)
 right multiplies a tensor by a complex constant More...
 
Tensor operator* (const Tensor &first, std::complex< double > val)
 left multiplies a tensor by a complex constant More...
 
Tensor operator+ (const Tensor &first, const Tensor &second)
 adds two tensors of the same rank and same dimensions More...
 
Tensor outerSquare (const Tensor &first)
 creates a tensor with twice the rank by multiplying the tensor with it's hermitean conjugate More...
 
Tensor elementMultiply (const Tensor &first, const Tensor &second)
 multiplies two tensors of the same rank and same dimensions element by element More...
 
Tensor elementDivide (const Tensor &first, const Tensor &second)
 divides two tensors of the same rank and same dimensions element by element More...
 
double compareVals (const double val1, const double val2)
 
complex< double > compareVals (const std::complex< double > val1, const std::complex< double > val2)
 
ostream & operator<< (ostream &os, const IOBuffer &buf)
 
istream & operator>> (istream &is, IOBuffer &buf)
 
ostream & operator<< (ostream &os, const IOBuffers &buf)
 
ostream & operator<< (Log &log, int level)
 Streaming output to a logger must have a Level/int as its first argument. More...
 
std::vector< PdgIdflipSigns (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 flipSign (const PdgId &id)
 return the PDG code of the conjugate particle (itself if self-conjugate) More...
 
std::vector< PdgIdcombineDaughters (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 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 combineProcessIDs (const std::set< HashId > &allIds)
 
bool pdgSorter (PdgId a, PdgId b)
 sorting function for PDG ids for computing hashes. More...
 
bool 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...
 
YAML::Emitter & operator<< (YAML::Emitter &out, const Setting &s)
 
bool isSpinQN (IndexLabel val)
 determine if a given label is corresponds to a spin index (or reference spin index) More...
 
double dot (const FourMomentum &v, const FourMomentum &w)
 
double operator* (const FourMomentum &v, const FourMomentum &w)
 contracts two 4-momenta More...
 
double angle (const FourMomentum &v, const FourMomentum &w)
 computes the angle between the spatial components of two 4-momenta More...
 
double deltaR (const FourMomentum &v, const FourMomentum &w)
 computes \( \Delta R = \sqrt{\Delta \eta^2 + \Delta \phi^2} \) between two 4-momenta More...
 
double deltaPhi (const FourMomentum &v, const FourMomentum &w)
 computes the difference between the azimuthal angles of two 4-momenta More...
 
double deltaEta (const FourMomentum &v, const FourMomentum &w)
 computes the difference between the pseudorapidities of two 4-momenta More...
 
double epsilon (const FourMomentum &a, const FourMomentum &b, const FourMomentum &c, const FourMomentum &d)
 contracts four 4-momenta with an 4D epsilon tensor. More...
 
FourMomentum boostToRestFrameOf (const FourMomentum &mom, double vx, double vy, double vz)
 
FourMomentum boostToRestFrameOf (const FourMomentum &mom, const std::array< double, 3 > &v)
 
FourMomentum boostToRestFrameOf (const FourMomentum &mom, const FourMomentum &v)
 
double dot (const std::array< double, 3 > &a, const std::array< double, 3 > &b)
 
double costheta (const std::array< double, 3 > &a, const std::array< double, 3 > &b)
 
bool isZero (const std::complex< double > val)
 
bool isZero (const double val)
 
bool fuzzyLess (const double val1, const double val2)
 
double regularize (const double regularVal, const double problematicValue, const double delta=std::numeric_limits< double >::min(), int direction=0)
 
template<typename T >
std::enable_if
< std::is_arithmetic< typename
std::remove_reference< T >
::type >::value, double >
::type 
toDouble (T value)
 
template<typename T >
std::enable_if< std::is_same
< typename
std::remove_reference
< typename std::remove_cv< T >
::type >::type, std::string >
::value, double >::type 
toDouble (T value)
 
template<typename T >
std::enable_if< std::is_same
< typename
std::remove_reference
< typename std::remove_cv< T >
::type >::type, std::complex
< double > >::value, double >
::type 
toDouble (T value)
 
template<typename T >
std::enable_if
< std::is_unsigned< T >::value
&&std::is_integral< T >::value,
T >::type 
minPadding (T value)
 
ParticleIndex parentId (Process::const_iterator it)
 
const ParticleIndicesdaughtersId (Process::const_iterator it)
 
template<typename T >
void writeDict2 (YAML::Emitter &emitter, std::map< std::string, std::map< std::string, const T * >> dict2)
 
template<typename T >
void writeDict (YAML::Emitter &emitter, std::map< std::string, const T * > dict)
 
std::string version ()
 
template<typename KeyType , typename ValueType >
ValueType getOrDefault (const std::map< KeyType, ValueType > &data, KeyType key, ValueType fallback)
 
template<typename KeyType , typename ValueType >
ValueType getOrDefault (const std::unordered_map< KeyType, ValueType > &data, KeyType key, ValueType fallback)
 
template<typename KeyType , typename ValueType >
auto const & getOrThrow (const std::map< KeyType, ValueType > &data, KeyType key, std::exception error)
 
template<typename KeyType , typename ValueType >
auto & getOrThrow (std::map< KeyType, ValueType > &data, KeyType key, std::exception error)
 
template<typename _InputIterator , typename _OutputIterator , typename _UnaryOperation >
_OutputIterator transform_n (_InputIterator __first, size_t __n, _OutputIterator __result, _UnaryOperation __op)
 
template<typename T >
auto begin (reversion_wrapper< T > w)
 
template<typename T >
auto end (reversion_wrapper< T > w)
 
template<typename T >
reversion_wrapper< T > reverse_range (T &&iterable)
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const std::vector< T > &v)
 

Variables

static constexpr double pi = boost::math::constants::pi<double>()
 
static constexpr double twoPi = boost::math::constants::two_pi<double>()
 
static constexpr double halfPi = boost::math::constants::half_pi<double>()
 
static constexpr double pi2 = boost::math::constants::pi_sqr<double>()
 
static constexpr double pi3 = boost::math::constants::pi_cubed<double>()
 
static constexpr double sqrt2 = boost::math::constants::root_two<double>()
 
static constexpr double sqrt3 = boost::math::constants::root_three<double>()
 
static constexpr double GFermi = 1.16638e-5 / GeV2
 
static constexpr double TwoSqTwoGFermi = 2. * sqrt2 * GFermi
 
static constexpr double FPion = 93 * MeV
 
static const double eV = 1.e-9
 
static const double eV2 = eV*eV
 
static const double keV = 1.e-6
 
static const double keV2 = keV*keV
 
static constexpr double MeV = 1.e-3
 
static constexpr double MeV2 = MeV*MeV
 
static constexpr double GeV = 1.
 
static constexpr double GeV2 = GeV*GeV
 
static const double TeV = 1.e3
 
static const double TeV2 = TeV*TeV
 
static const double precision = 0.001
 

Detailed Description

The Hammer namespace contains the library code.

Typedef Documentation

template<typename T >
using Hammer::AmplitudeIdDict = typedef std::map<AmplitudeUID, T>

Definition at line 35 of file IndexTypes.hh.

using Hammer::AmplitudeUID = typedef HashId

Definition at line 33 of file IndexTypes.hh.

using Hammer::BoundaryFunction = typedef std::function<std::pair<double, double>(const std::vector<double>&)>

Definition at line 24 of file Integrator.fhh.

template<typename T >
using Hammer::DepthLevelDict = typedef std::map<size_t, T, std::greater<size_t>>

Definition at line 33 of file ProcGraph.hh.

template<typename T >
using Hammer::EdgeWeightDict = typedef std::map<size_t, T, std::less<size_t>>

Definition at line 30 of file ProcGraph.hh.

using Hammer::EvaluationGrid = typedef std::vector<std::vector<double>>

Definition at line 26 of file Integrator.fhh.

using Hammer::EvaluationWeights = typedef std::vector<double>

Definition at line 27 of file Integrator.fhh.

template<typename T >
using Hammer::EventIdDict = typedef UMap<EventUID, T>

Definition at line 55 of file IndexTypes.hh.

template<typename T >
using Hammer::EventIdGroupDict = typedef UMap<EventUIDGroup, T>

Definition at line 58 of file IndexTypes.hh.

using Hammer::EventUID = typedef std::set<ProcessUID>

Definition at line 53 of file IndexTypes.hh.

using Hammer::EventUIDGroup = typedef std::set<EventUID>

Definition at line 56 of file IndexTypes.hh.

using Hammer::FFIndex = typedef size_t

Definition at line 69 of file IndexTypes.hh.

template<typename T >
using Hammer::FFIndexDict = typedef std::map<FFIndex, T>

Definition at line 71 of file IndexTypes.hh.

template<typename T >
using Hammer::FFPrefixGroupDict = typedef std::map<FFPrefixGroup, T>

Definition at line 87 of file IndexTypes.hh.

template<typename T >
using Hammer::HadronicIdDict = typedef std::map<HadronicUID, T>

Definition at line 38 of file IndexTypes.hh.

using Hammer::HadronicUID = typedef HashId

Definition at line 36 of file IndexTypes.hh.

using Hammer::HashId = typedef size_t

Definition at line 31 of file IndexTypes.hh.

template<typename T >
using Hammer::HistoNameDict = typedef std::map<std::string, T>

Definition at line 21 of file Histos.fhh.

using Hammer::IndexList = typedef std::vector<IndexType>

Definition at line 25 of file MultiDimensional.fhh.

using Hammer::IndexPair = typedef std::pair<IndexType, IndexType>

Definition at line 24 of file MultiDimensional.fhh.

using Hammer::IndexPairList = typedef std::vector<IndexPair>

Definition at line 27 of file MultiDimensional.fhh.

using Hammer::IndexType = typedef uint16_t

Definition at line 23 of file MultiDimensional.fhh.

using Hammer::IntegrationBoundaries = typedef std::vector<BoundaryFunction>

Definition at line 25 of file Integrator.fhh.

using Hammer::IOHistogram = typedef std::vector<BinContents>

Definition at line 132 of file IOTypes.hh.

using Hammer::LabelPair = typedef int std::pair<IndexLabel, IndexLabel>

Definition at line 39 of file MultiDimensional.fhh.

using Hammer::LabelPairsSet = typedef std::set<LabelPair>

Definition at line 42 of file MultiDimensional.fhh.

using Hammer::LabelsList = typedef std::vector<IndexLabel>

Definition at line 40 of file MultiDimensional.fhh.

using Hammer::ParticleIndex = typedef size_t

Definition at line 27 of file IndexTypes.hh.

using Hammer::ParticleIndices = typedef std::vector<ParticleIndex>

Definition at line 28 of file IndexTypes.hh.

using Hammer::ParticleList = typedef std::vector<Particle>

Definition at line 20 of file Particle.fhh.

using Hammer::PdgId = typedef int

Definition at line 17 of file Pdg.fhh.

using Hammer::PosIndexPair = typedef std::pair<PositionType, IndexType>

Definition at line 35 of file MultiDimensional.fhh.

using Hammer::PosIndexPairList = typedef std::vector<PosIndexPair>

Definition at line 36 of file MultiDimensional.fhh.

using Hammer::PositionList = typedef std::vector<PositionType>

Definition at line 32 of file MultiDimensional.fhh.

using Hammer::PositionPair = typedef std::pair<PositionType, PositionType>

Definition at line 31 of file MultiDimensional.fhh.

using Hammer::PositionPairList = typedef std::vector<PositionPair>

Definition at line 33 of file MultiDimensional.fhh.

using Hammer::PositionType = typedef size_t

Definition at line 30 of file MultiDimensional.fhh.

using Hammer::ProcessUID = typedef HashId

Definition at line 49 of file IndexTypes.hh.

template<typename T >
using Hammer::ProcIdDict = typedef std::map<ProcessUID, T>

Definition at line 51 of file IndexTypes.hh.

template<typename T >
using Hammer::SchemeDict = typedef std::map<SchemeName, T>

Definition at line 64 of file IndexTypes.hh.

using Hammer::SchemeName = typedef std::string

Definition at line 61 of file IndexTypes.hh.

using Hammer::SchemeNameList = typedef std::vector<SchemeName>

Definition at line 62 of file IndexTypes.hh.

template<typename K , typename V >
using Hammer::UMap = typedef std::unordered_map<K, V, boost::hash<K>>

Definition at line 104 of file Tools/Utils.hh.

using Hammer::UniqueIndexList = typedef std::set<IndexType>

Definition at line 26 of file MultiDimensional.fhh.

using Hammer::UniqueLabelsList = typedef std::set<IndexLabel>

Definition at line 41 of file MultiDimensional.fhh.

using Hammer::UniqueParticleIndices = typedef std::set<ParticleIndex>

Definition at line 29 of file IndexTypes.hh.

template<typename T >
using Hammer::VertexDict = typedef std::map<ParticleIndex, T>

Definition at line 45 of file IndexTypes.hh.

template<typename T >
using Hammer::VertexIdDict = typedef std::map<VertexUID, T>

Definition at line 42 of file IndexTypes.hh.

using Hammer::VertexName = typedef std::string

Definition at line 46 of file IndexTypes.hh.

using Hammer::VertexUID = typedef HashId

Definition at line 40 of file IndexTypes.hh.

using Hammer::VertexUIDSet = typedef std::set<VertexUID>

Definition at line 43 of file IndexTypes.hh.

template<typename T >
using Hammer::WCPrefixDict = typedef std::map<std::string, T>

Definition at line 67 of file IndexTypes.hh.

Enumeration Type Documentation

enum Hammer::AmplType : short
strong
Enumerator
VERTEX 
PARENTEDGE 
DAUGHTEREDGE 
FULLEDGE 

Definition at line 22 of file ProcGraph.fhh.

enum Hammer::IndexLabel : int

label identifiers of tensor indices they are used to determine which indices can be contracted together or traced over and which indices are quantum numbers, Wilson coefficient indices, form factor indices, etc.

Same labels in different tensors can be contracted together, labels with opposite sign in the same tensor can be traced over when squaring matrix elements. The opposite sign convention determine the hermitean conjugate index of a given type.

Enumerator
NONE 
SPIN_INDEX_START 
SPIN_TAUP 
SPIN_TAUP_HC 
SPIN_TAUM 
SPIN_TAUM_HC 
SPIN_MUP 
SPIN_MUP_HC 
SPIN_MUM 
SPIN_MUM_HC 
SPIN_EP 
SPIN_EP_HC 
SPIN_EM 
SPIN_EM_HC 
SPIN_NUTAU 
SPIN_NUTAU_HC 
SPIN_NUTAU_BAR 
SPIN_NUTAU_BAR_HC 
SPIN_NUMU 
SPIN_NUMU_HC 
SPIN_NUMU_BAR 
SPIN_NUMU_BAR_HC 
SPIN_NUE 
SPIN_NUE_HC 
SPIN_NUE_BAR 
SPIN_NUE_BAR_HC 
SPIN_GAMMA 
SPIN_GAMMA_HC 
SPIN_DSTAR 
SPIN_DSTAR_HC 
SPIN_DSSD1STAR 
SPIN_DSSD1STAR_HC 
SPIN_DSSD1 
SPIN_DSSD1_HC 
SPIN_DSSD2STAR 
SPIN_DSSD2STAR_HC 
SPIN_LB 
SPIN_LB_HC 
SPIN_LC 
SPIN_LC_HC 
SPIN_RHO 
SPIN_RHO_HC 
SPIN_DSSTAR 
SPIN_DSSTAR_HC 
SPIN_DSSDS1STAR 
SPIN_DSSDS1STAR_HC 
SPIN_DSSDS1 
SPIN_DSSDS1_HC 
SPIN_DSSDS2STAR 
SPIN_DSSDS2STAR_HC 
SPIN_TAUP_REF 
SPIN_TAUP_HC_REF 
SPIN_TAUM_REF 
SPIN_TAUM_HC_REF 
SPIN_MUP_REF 
SPIN_MUP_HC_REF 
SPIN_MUM_REF 
SPIN_MUM_HC_REF 
SPIN_EP_REF 
SPIN_EP_HC_REF 
SPIN_EM_REF 
SPIN_EM_HC_REF 
SPIN_NUTAU_REF 
SPIN_NUTAU_HC_REF 
SPIN_NUTAU_BAR_REF 
SPIN_NUTAU_BAR_HC_REF 
SPIN_NUMU_REF 
SPIN_NUMU_HC_REF 
SPIN_NUMU_BAR_REF 
SPIN_NUMU_BAR_HC_REF 
SPIN_NUE_REF 
SPIN_NUE_HC_REF 
SPIN_NUE_BAR_REF 
SPIN_NUE_BAR_HC_REF 
SPIN_INDEX_END 
WC_INDEX_START 
WILSON_BCTAUNU 
WILSON_BCTAUNU_HC 
WILSON_BCMUNU 
WILSON_BCMUNU_HC 
WILSON_BCENU 
WILSON_BCENU_HC 
WILSON_BUTAUNU 
WILSON_BUTAUNU_HC 
WILSON_BUMUNU 
WILSON_BUMUNU_HC 
WILSON_BUENU 
WILSON_BUENU_HC 
WC_INDEX_END 
FF_INDEX_START 
FF_BD 
FF_BD_HC 
FF_BDSTAR 
FF_BDSTAR_HC 
FF_BDSSD0STAR 
FF_BDSSD0STAR_HC 
FF_BDSSD1STAR 
FF_BDSSD1STAR_HC 
FF_BDSSD1 
FF_BDSSD1_HC 
FF_BDSSD2STAR 
FF_BDSSD2STAR_HC 
FF_BSDS 
FF_BSDS_HC 
FF_BSDSSTAR 
FF_BSDSSTAR_HC 
FF_BSDSSDS0STAR 
FF_BSDSSDS0STAR_HC 
FF_BSDSSDS1STAR 
FF_BSDSSDS1STAR_HC 
FF_BSDSSDS1 
FF_BSDSSDS1_HC 
FF_BSDSSDS2STAR 
FF_BSDSSDS2STAR_HC 
FF_BRHO 
FF_BRHO_HC 
FF_LBLC 
FF_LBLC_HC 
FF_TAU3PI 
FF_TAU3PI_HC 
FF_INDEX_END 
FF_VAR_INDEX_START 
FF_BD_VAR 
FF_BD_VAR_HC 
FF_BDSTAR_VAR 
FF_BDSTAR_VAR_HC 
FF_BDSSD0STAR_VAR 
FF_BDSSD0STAR_VAR_HC 
FF_BDSSD1STAR_VAR 
FF_BDSSD1STAR_VAR_HC 
FF_BDSSD1_VAR 
FF_BDSSD1_VAR_HC 
FF_BDSSD2STAR_VAR 
FF_BDSSD2STAR_VAR_HC 
FF_BSDS_VAR 
FF_BSDS_VAR_HC 
FF_BSDSSTAR_VAR 
FF_BSDSSTAR_VAR_HC 
FF_BSDSSDS0STAR_VAR 
FF_BSDSSDS0STAR_VAR_HC 
FF_BSDSSDS1STAR_VAR 
FF_BSDSSDS1STAR_VAR_HC 
FF_BSDSSDS1_VAR 
FF_BSDSSDS1_VAR_HC 
FF_BSDSSDS2STAR_VAR 
FF_BSDSSDS2STAR_VAR_HC 
FF_BRHO_VAR 
FF_BRHO_VAR_HC 
FF_LBLC_VAR 
FF_LBLC_VAR_HC 
FF_VAR_INDEX_END 
INTEGRATION_INDEX 

Definition at line 27 of file IndexLabels.hh.

Enumerator
Left 
Right 
Both 

Definition at line 23 of file AlignedIndexing.hh.

enum Hammer::RecordType : char
Enumerator
UNDEFINED 
HEADER 
EVENT 
HISTOGRAM 
RATE 
HISTOGRAM_DEFINITION 

Definition at line 30 of file IOTypes.hh.

enum Hammer::WTerm
strong
Enumerator
COMMON 
NUMERATOR 
DENOMINATOR 

Definition at line 25 of file IndexTypes.hh.

Function Documentation

double Hammer::angle ( const FourMomentum &  v,
const FourMomentum &  w 
)

computes the angle between the spatial components of two 4-momenta

Parameters
[in]vthe first 4-momentum
[in]wthe second 4-momentum
template<typename T >
auto Hammer::begin ( reversion_wrapper< T >  w)

Definition at line 79 of file Tools/Utils.hh.

FourMomentum Hammer::boostToRestFrameOf ( const FourMomentum &  mom,
double  vx,
double  vy,
double  vz 
)
FourMomentum Hammer::boostToRestFrameOf ( const FourMomentum &  mom,
const std::array< double, 3 > &  v 
)
FourMomentum Hammer::boostToRestFrameOf ( const FourMomentum &  mom,
const FourMomentum &  v 
)
std::vector< PdgId > Hammer::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

Parameters
[in]daughters
[in]subDaughters
Returns
the combined list

Definition at line 44 of file ParticleUtils.cc.

HashId Hammer::combineProcessIDs ( const std::set< HashId > &  allIds)

Definition at line 64 of file ParticleUtils.cc.

double Hammer::Hammer::compareVals ( const double  val1,
const double  val2 
)
Parameters
[in]val1
[in]val2
Returns

Definition at line 18 of file Utils.cc.

std::complex< double > Hammer::Hammer::compareVals ( const std::complex< double >  val1,
const std::complex< double >  val2 
)
Parameters
[in]val1
[in]val2
Returns

Definition at line 27 of file Utils.cc.

double Hammer::costheta ( const std::array< double, 3 > &  a,
const std::array< double, 3 > &  b 
)
const ParticleIndices& Hammer::daughtersId ( Process::const_iterator  it)
inline

Definition at line 195 of file Process.hh.

double Hammer::deltaEta ( const FourMomentum &  v,
const FourMomentum &  w 
)

computes the difference between the pseudorapidities of two 4-momenta

Parameters
[in]vthe first 4-momentum
[in]wthe second 4-momentum
double Hammer::deltaPhi ( const FourMomentum &  v,
const FourMomentum &  w 
)

computes the difference between the azimuthal angles of two 4-momenta

Parameters
[in]vthe first 4-momentum
[in]wthe second 4-momentum
double Hammer::deltaR ( const FourMomentum &  v,
const FourMomentum &  w 
)

computes \( \Delta R = \sqrt{\Delta \eta^2 + \Delta \phi^2} \) between two 4-momenta

Parameters
[in]vthe first 4-momentum
[in]wthe second 4-momentum
double Hammer::dot ( const FourMomentum &  v,
const FourMomentum &  w 
)
Tensor Hammer::dot ( const Tensor &  first,
const Tensor &  second,
const set< IndexLabel > &  indices 
)

Definition at line 268 of file Tensor.cc.

double Hammer::dot ( const std::array< double, 3 > &  a,
const std::array< double, 3 > &  b 
)
Tensor Hammer::Hammer::elementDivide ( const Tensor &  first,
const Tensor &  second 
)

divides two tensors of the same rank and same dimensions element by element

Parameters
[in]firstthe numerator tensor
[in]secondthe denominator tensor
Returns
the result of the divisions Throws an exception if the tensors don't have the same dimensions or if a division by zero is encountered

Definition at line 328 of file Tensor.cc.

Tensor Hammer::Hammer::elementMultiply ( const Tensor &  first,
const Tensor &  second 
)

multiplies two tensors of the same rank and same dimensions element by element

Parameters
[in]firstthe first tensor
[in]secondthe second tensor
Returns
the result of the multiplications Throws an exception if the tensors don't have the same dimensions

Definition at line 322 of file Tensor.cc.

template<typename T >
auto Hammer::end ( reversion_wrapper< T >  w)

Definition at line 84 of file Tools/Utils.hh.

double Hammer::epsilon ( const FourMomentum &  a,
const FourMomentum &  b,
const FourMomentum &  c,
const FourMomentum &  d 
)

contracts four 4-momenta with an 4D epsilon tensor.

   The convetion used is \form#23
Parameters
[in]athe first 4-momentum
[in]bthe second 4-momentum
[in]cthe third 4-momentum
[in]dthe fourth 4-momentum
Returns
the contraction
PdgId Hammer::Hammer::flipSign ( const PdgId &  id)

return the PDG code of the conjugate particle (itself if self-conjugate)

Parameters
[in]idthe PDG code

Definition at line 34 of file ParticleUtils.cc.

std::vector< PdgId > Hammer::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

Parameters
[in]listthe PDG codes

Definition at line 22 of file ParticleUtils.cc.

bool Hammer::fuzzyLess ( const double  val1,
const double  val2 
)
inline
Parameters
[in]val1
[in]val2
Returns

Definition at line 42 of file Math/Utils.hh.

template<typename KeyType , typename ValueType >
ValueType Hammer::getOrDefault ( const std::map< KeyType, ValueType > &  data,
KeyType  key,
ValueType  fallback 
)

Definition at line 39 of file Tools/Utils.hh.

template<typename KeyType , typename ValueType >
ValueType Hammer::getOrDefault ( const std::unordered_map< KeyType, ValueType > &  data,
KeyType  key,
ValueType  fallback 
)

Definition at line 45 of file Tools/Utils.hh.

template<typename KeyType , typename ValueType >
auto const& Hammer::getOrThrow ( const std::map< KeyType, ValueType > &  data,
KeyType  key,
std::exception  error 
)

Definition at line 51 of file Tools/Utils.hh.

template<typename KeyType , typename ValueType >
auto& Hammer::getOrThrow ( std::map< KeyType, ValueType > &  data,
KeyType  key,
std::exception  error 
)

Definition at line 60 of file Tools/Utils.hh.

double Hammer::Hammer::integrate ( std::function< double(double)> &  func,
double  low,
double  high 
)

integration function based on gaussian method

Parameters
[in]functhe function to be integrated
[in]lowthe lower limit of integration
[in]highthe higher limit of integration
Returns
the integral

Definition at line 22 of file Integrator.cc.

bool Hammer::isSpinQN ( IndexLabel  val)

determine if a given label is corresponds to a spin index (or reference spin index)

Parameters
[in]valthe label
Returns
true if label corresponds to (reference) spin index
bool Hammer::isZero ( const std::complex< double >  val)
inline
Parameters
[in]val
Returns

Definition at line 25 of file Math/Utils.hh.

bool Hammer::isZero ( const double  val)
inline
Parameters
[in]val
Returns

Definition at line 34 of file Math/Utils.hh.

static double Hammer::kStar ( double  mParent,
double  mk,
double  mSibling 
)
static

Definition at line 47 of file PhaseSpace.cc.

std::unique_ptr< Histogram > Hammer::makeHistogram ( const string &  name,
const HistogramDefinition &  def,
const Tensor &  defaultValue 
)

Definition at line 393 of file Histogram.cc.

std::unique_ptr< Histogram > Hammer::makeHistogram ( const string &  name,
const HistogramDefinition &  def,
const IndexList &  defaultTensorDims,
const LabelsList &  defaultTensorLabels 
)

Definition at line 402 of file Histogram.cc.

static BoundaryFunction Hammer::makeMjFunction ( double  parentMass,
vector< double >  masses,
size_t  j 
)
static

Definition at line 26 of file PhaseSpace.cc.

template<typename T >
std::enable_if<std::is_unsigned<T>::value && std::is_integral<T>::value, T>::type Hammer::minPadding ( value)

Definition at line 90 of file Math/Utils.hh.

double Hammer::operator* ( const FourMomentum &  v,
const FourMomentum &  w 
)

contracts two 4-momenta

Parameters
[in]vthe first 4-momentum
[in]wthe second 4-momentum
Tensor Hammer::operator* ( const Tensor &  first,
double  val 
)

left multiplies a tensor by a real constant

Parameters
[in]firstthe tensor
[in]valthe real number
Returns
the result of the multiplication

Definition at line 286 of file Tensor.cc.

Tensor Hammer::operator* ( double  val,
const Tensor &  first 
)

right multiplies a tensor by a real constant

Parameters
[in]valthe real number
[in]firstthe tensor
Returns
the result of the multiplication

Definition at line 292 of file Tensor.cc.

Tensor Hammer::operator* ( std::complex< double >  val,
const Tensor &  first 
)

right multiplies a tensor by a complex constant

Parameters
[in]valthe complex number
[in]firstthe tensor
Returns
the result of the multiplication

Definition at line 298 of file Tensor.cc.

Tensor Hammer::operator* ( const Tensor &  first,
std::complex< double >  val 
)

left multiplies a tensor by a complex constant

Parameters
[in]firstthe tensor
[in]valthe complex number
Returns
the result of the multiplication

Definition at line 304 of file Tensor.cc.

static BinContents Hammer::operator+ ( const BinContents &  a,
const BinContents &  b 
)
static

Definition at line 202 of file HistogramSet.cc.

Tensor Hammer::Hammer::operator+ ( const Tensor &  first,
const Tensor &  second 
)

adds two tensors of the same rank and same dimensions

Parameters
[in]firstthe first tensor
[in]secondthe second tensor
Returns
the result of the sum. Throws an exception if the tensors don't have the same dimensions

Definition at line 310 of file Tensor.cc.

Histogram Hammer::Hammer::operator+ ( const Histogram &  a,
const Histogram &  b 
)
Parameters
[in]a
[in]b
Returns

Definition at line 412 of file Histogram.cc.

std::ostream & Hammer::operator<< ( ostream &  os,
const IOBuffer &  buf 
)

Definition at line 21 of file IOTypes.cc.

template<typename T >
std::ostream& Hammer::operator<< ( std::ostream &  out,
const std::vector< T > &  v 
)

Definition at line 94 of file Tools/Utils.hh.

YAML::Emitter & Hammer::operator<< ( YAML::Emitter &  out,
const PurePhaseSpaceDefs &  s 
)

Definition at line 170 of file PurePhaseSpaceDefs.cc.

std::ostream & Hammer::operator<< ( ostream &  os,
const IOBuffers &  buf 
)

Definition at line 195 of file IOTypes.cc.

YAML::Emitter & Hammer::operator<< ( YAML::Emitter &  out,
const ProcessDefinitions &  s 
)

Definition at line 238 of file ProcessDefinitions.cc.

YAML::Emitter & Hammer::operator<< ( YAML::Emitter &  out,
const SchemeDefinitions &  s 
)

Definition at line 327 of file SchemeDefinitions.cc.

YAML::Emitter & Hammer::operator<< ( YAML::Emitter &  out,
const Setting &  s 
)

Definition at line 391 of file Setting.cc.

std::istream & Hammer::operator>> ( istream &  is,
IOBuffer &  buf 
)

Definition at line 28 of file IOTypes.cc.

Tensor Hammer::outerSquare ( const Tensor &  first)

creates a tensor with twice the rank by multiplying the tensor with it's hermitean conjugate

Parameters
[in]firstthe tensor
Returns
the result

Definition at line 316 of file Tensor.cc.

ParticleIndex Hammer::parentId ( Process::const_iterator  it)
inline

Definition at line 191 of file Process.hh.

bool Hammer::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)

Parameters
[in]pdgGetterthe PDG code extractor function
[in]athe first particle
[in]bthe second particle

Definition at line 81 of file ParticleUtils.cc.

bool Hammer::Hammer::pdgSorter ( PdgId  a,
PdgId  b 
)

sorting function for PDG ids for computing hashes.

   the codes are ordered if \form#43 or if \form#44 and if \form#45
Parameters
[in]athe first PDG code
[in]bthe second PDG code

Definition at line 73 of file ParticleUtils.cc.

static double Hammer::phaseSpace2 ( const double  m0,
const double  m1,
const double  m2 
)
static

Definition at line 86 of file PhaseSpace.cc.

static double Hammer::phaseSpace3 ( const double  m0,
const double  m1,
const double  m2,
const double  m3 
)
static

Definition at line 98 of file PhaseSpace.cc.

double Hammer::Hammer::phaseSpaceN ( const double  mass,
const std::vector< double > &  masses 
)
Parameters
[in]mass
[in]masses
Returns

Definition at line 142 of file PhaseSpace.cc.

double Hammer::Hammer::phaseSpaceNBody ( const double  mass,
const std::vector< double > &  masses 
)
Parameters
[in]mass
[in]masses
Returns

Definition at line 52 of file PhaseSpace.cc.

HashId Hammer::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)

Parameters
[in]parentthe PDG code of the parent particle
[in]allDaughtersthe ordered list of PDG codes of the daughters particles
Returns
the unique id

Definition at line 55 of file ParticleUtils.cc.

double Hammer::regularize ( const double  regularVal,
const double  problematicValue,
const double  delta = std::numeric_limits<double>::min(),
int  direction = 0 
)
inline

Definition at line 59 of file Math/Utils.hh.

template<typename T >
reversion_wrapper<T> Hammer::reverse_range ( T &&  iterable)

Definition at line 89 of file Tools/Utils.hh.

Tensor Hammer::spinAverage ( const Tensor &  first)

trace a tensor over the traceable spin indices and divide by the product of the dimensions of the traced indices (equal to \( 2s_i + 1 \))

Parameters
[in]firstthe tensor to be spin averaged
Returns
the result of the spin average

Definition at line 280 of file Tensor.cc.

Tensor Hammer::spinSum ( const Tensor &  first)

trace a tensor

Parameters
[in]firstthe tensor to be traced
Returns
the result of the trace

Definition at line 274 of file Tensor.cc.

template<typename T >
std::enable_if<std::is_arithmetic<typename std::remove_reference<T>::type>::value, double>::type Hammer::toDouble ( value)

Definition at line 69 of file Math/Utils.hh.

template<typename T >
std::enable_if< std::is_same<typename std::remove_reference<typename std::remove_cv<T>::type>::type, std::string>::value, double>::type Hammer::toDouble ( value)

Definition at line 77 of file Math/Utils.hh.

template<typename T >
std::enable_if<std::is_same<typename std::remove_reference<typename std::remove_cv<T>::type>::type, std::complex<double> >::value, double>::type Hammer::toDouble ( value)

Definition at line 85 of file Math/Utils.hh.

template<typename _InputIterator , typename _OutputIterator , typename _UnaryOperation >
_OutputIterator Hammer::transform_n ( _InputIterator  __first,
size_t  __n,
_OutputIterator  __result,
_UnaryOperation  __op 
)

Definition at line 69 of file Tools/Utils.hh.

std::string Hammer::version ( )
inline
Returns

Definition at line 34 of file Tools/Utils.hh.

template<typename T >
void Hammer::writeDict ( YAML::Emitter &  emitter,
std::map< std::string, const T * >  dict 
)

Definition at line 36 of file HammerYaml.hh.

template<typename T >
void Hammer::writeDict2 ( YAML::Emitter &  emitter,
std::map< std::string, std::map< std::string, const T * >>  dict2 
)

Definition at line 23 of file HammerYaml.hh.

Variable Documentation

const double Hammer::eV = 1.e-9
static

Definition at line 19 of file Units.hh.

const double Hammer::eV2 = eV*eV
static

Definition at line 20 of file Units.hh.

constexpr double Hammer::FPion = 93 * MeV
static

Definition at line 31 of file Constants.hh.

constexpr double Hammer::GeV = 1.
static

Definition at line 25 of file Units.hh.

constexpr double Hammer::GeV2 = GeV*GeV
static

Definition at line 26 of file Units.hh.

constexpr double Hammer::GFermi = 1.16638e-5 / GeV2
static

Definition at line 29 of file Constants.hh.

constexpr double Hammer::halfPi = boost::math::constants::half_pi<double>()
static

Definition at line 23 of file Constants.hh.

const double Hammer::keV = 1.e-6
static

Definition at line 21 of file Units.hh.

const double Hammer::keV2 = keV*keV
static

Definition at line 22 of file Units.hh.

constexpr double Hammer::MeV = 1.e-3
static

Definition at line 23 of file Units.hh.

constexpr double Hammer::MeV2 = MeV*MeV
static

Definition at line 24 of file Units.hh.

constexpr double Hammer::pi = boost::math::constants::pi<double>()
static

Definition at line 21 of file Constants.hh.

constexpr double Hammer::pi2 = boost::math::constants::pi_sqr<double>()
static

Definition at line 24 of file Constants.hh.

constexpr double Hammer::pi3 = boost::math::constants::pi_cubed<double>()
static

Definition at line 25 of file Constants.hh.

const double Hammer::precision = 0.001
static

Definition at line 20 of file Math/Utils.hh.

constexpr double Hammer::sqrt2 = boost::math::constants::root_two<double>()
static

Definition at line 26 of file Constants.hh.

constexpr double Hammer::sqrt3 = boost::math::constants::root_three<double>()
static

Definition at line 27 of file Constants.hh.

const double Hammer::TeV = 1.e3
static

Definition at line 27 of file Units.hh.

const double Hammer::TeV2 = TeV*TeV
static

Definition at line 28 of file Units.hh.

constexpr double Hammer::twoPi = boost::math::constants::two_pi<double>()
static

Definition at line 22 of file Constants.hh.

constexpr double Hammer::TwoSqTwoGFermi = 2. * sqrt2 * GFermi
static

Definition at line 30 of file Constants.hh.