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::AmplitudeBase Class Referenceabstract

Base class for amplitudes. More...

#include <AmplitudeBase.hh>

+ Inheritance diagram for Hammer::AmplitudeBase:
+ Collaboration diagram for Hammer::AmplitudeBase:

Public Member Functions

 AmplitudeBase ()
 
 AmplitudeBase (const AmplitudeBase &other)=delete
 
AmplitudeBaseoperator= (const AmplitudeBase &other)=delete
 
 AmplitudeBase (AmplitudeBase &&other)=delete
 
AmplitudeBaseoperator= (AmplitudeBase &&other)=delete
 
virtual ~AmplitudeBase () noexcept=default
 
virtual void eval (const Particle &parent, const ParticleList &daughters, const ParticleList &references)=0
 method to evaluate the object on a specific particle set More...
 
std::vector< std::complex
< double > > 
getWCVectorFromDict (const std::map< std::string, std::complex< double >> &wcDict) const
 
std::vector< std::complex
< double > > 
getWCVectorFromSettings (WTerm what) const
 
void updateWCSettings (const std::vector< std::complex< double >> &values, WTerm what)
 
void updateWCSettings (const std::map< std::string, std::complex< double >> &values, WTerm what)
 
void updateWCTensor (std::vector< std::complex< double >> values, MultiDimensional::SharedTensorData &data) const
 
std::pair< std::string,
IndexLabel
getWCInfo () const
 
void init ()
 initializes the amplitude (defines settings associated to this amplitude, etc.) More...
 
TensorgetTensor ()
 returns a reference to itself as a Tensor More...
 
const TensorgetTensor () const
 returns a reference to itself as a Tensor More...
 
virtual bool setSignatureIndex (size_t idx=0)
 select a specific signature to be the current signature More...
 
size_t multiplicityFactor () const
 
- Public Member Functions inherited from Hammer::ParticleData
 ParticleData ()
 default constructor More...
 
 ParticleData (const ParticleData &other)=default
 
ParticleDataoperator= (const ParticleData &other)=default
 
 ParticleData (ParticleData &&other)=default
 
ParticleDataoperator= (ParticleData &&other)=default
 
virtual ~ParticleData ()
 
HashId id () const
 returns the unique ID of the current decay signature More...
 
HashId hadronicId () const
 returns the hadronic unique ID (parent + hadronic daughters) of the current decay signature More...
 
const std::vector< double > & masses () const
 returns the particle masses of the current decay signature More...
 
size_t numSignatures () const
 returns the number of available signatures More...
 
- 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...
 

Protected Member Functions

virtual void preProcessWCValues (std::vector< std::complex< double >> &data) const
 
virtual void defineSettings ()=0
 defines new settings for this class More...
 
void addTensor (Tensor &&tensor)
 adds the index labels for the amplitude tensor for a specific signature to the index labels signature list. More...
 
virtual void updateWilsonCeffLabelPrefix ()
 
LoggetLog () const
 logging facility More...
 
- Protected Member Functions inherited from Hammer::ParticleData
void addProcessSignature (PdgId parent, const std::vector< PdgId > &daughters, const std::vector< PdgId > &subDaughters={})
 adds a signature to the list by specifying the particles PDG codes. More...
 
- 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

std::vector< std::string > _WCNames
 
std::string _WCPrefix
 
IndexLabel _WCLabel
 
std::vector< Tensor_tensorList
 list of (list of) labels for the tensor indices (one for each signature) More...
 
size_t _multiplicity
 
- Protected Attributes inherited from Hammer::ParticleData
std::vector< Signature_signatures
 the list of signatures More...
 
size_t _signatureIndex
 the index of the current signature More...
 
- 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

Base class for amplitudes.

Provides the amplitude contents as tensor...

Definition at line 35 of file AmplitudeBase.hh.

Constructor & Destructor Documentation

Hammer::AmplitudeBase::AmplitudeBase ( )

Definition at line 25 of file AmplitudeBase.cc.

Hammer::AmplitudeBase::AmplitudeBase ( const AmplitudeBase other)
delete
Hammer::AmplitudeBase::AmplitudeBase ( AmplitudeBase &&  other)
delete
virtual Hammer::AmplitudeBase::~AmplitudeBase ( )
virtualdefaultnoexcept

Member Function Documentation

void Hammer::AmplitudeBase::addTensor ( Tensor &&  tensor)
protected

adds the index labels for the amplitude tensor for a specific signature to the index labels signature list.

It will be selected by calling setSignatureIndex

Parameters
[in]tensorthe tensor indices labels

Definition at line 114 of file AmplitudeBase.cc.

virtual void Hammer::AmplitudeBase::defineSettings ( )
protectedpure virtual

defines new settings for this class

Implements Hammer::SettingsConsumer.

Implemented in Hammer::AmplBToQLepNuBase, Hammer::AmplTau3PiNu, Hammer::AmplTauEllNuNu, and Hammer::AmplTauPiNu.

virtual void Hammer::AmplitudeBase::eval ( const Particle parent,
const ParticleList daughters,
const ParticleList references 
)
pure virtual

method to evaluate the object on a specific particle set

Parameters
[in]parentthe parent Particle
[in]daughtersthe daughters (and grand-daughters, if necessary) Particle list
[in]referencesthe parent Particle siblings (necessary e.g. for helicity amplitude phase conventions)

Implements Hammer::ParticleData.

Implemented in Hammer::AmplBD0starLepNu, Hammer::AmplBD1LepNu, Hammer::AmplBD1starLepNu, Hammer::AmplBD2starLepNu, Hammer::AmplBDLepNu, Hammer::AmplBDstarDGamLepNu, Hammer::AmplBDstarDPiLepNu, Hammer::AmplBDstarLepNu, Hammer::AmplLbLcLepNu, Hammer::AmplTau3PiNu, Hammer::AmplTauEllNuNu, and Hammer::AmplTauPiNu.

Log & Hammer::AmplitudeBase::getLog ( ) const
protected

logging facility

Returns
stream to be used for logging

Definition at line 110 of file AmplitudeBase.cc.

Tensor & Hammer::AmplitudeBase::getTensor ( )

returns a reference to itself as a Tensor

Returns
itself

Definition at line 83 of file AmplitudeBase.cc.

const Tensor & Hammer::AmplitudeBase::getTensor ( ) const

returns a reference to itself as a Tensor

Returns
itself

Definition at line 87 of file AmplitudeBase.cc.

pair< string, IndexLabel > Hammer::AmplitudeBase::getWCInfo ( ) const
Returns

Definition at line 70 of file AmplitudeBase.cc.

vector< complex< double > > Hammer::AmplitudeBase::getWCVectorFromDict ( const std::map< std::string, std::complex< double >> &  wcDict) const

Definition at line 28 of file AmplitudeBase.cc.

vector< complex< double > > Hammer::AmplitudeBase::getWCVectorFromSettings ( WTerm  what) const

Definition at line 39 of file AmplitudeBase.cc.

void Hammer::AmplitudeBase::init ( )

initializes the amplitude (defines settings associated to this amplitude, etc.)

Todo:
anything else?

Definition at line 78 of file AmplitudeBase.cc.

size_t Hammer::AmplitudeBase::multiplicityFactor ( ) const
Returns

Definition at line 106 of file AmplitudeBase.cc.

AmplitudeBase& Hammer::AmplitudeBase::operator= ( const AmplitudeBase other)
delete
AmplitudeBase& Hammer::AmplitudeBase::operator= ( AmplitudeBase &&  other)
delete
void Hammer::AmplitudeBase::preProcessWCValues ( std::vector< std::complex< double >> &  data) const
protectedvirtual

Reimplemented in Hammer::AmplBToQLepNuBase.

Definition at line 74 of file AmplitudeBase.cc.

bool Hammer::AmplitudeBase::setSignatureIndex ( size_t  idx = 0)
virtual

select a specific signature to be the current signature

Parameters
[in]idxthe signature index

Reimplemented from Hammer::ParticleData.

Definition at line 91 of file AmplitudeBase.cc.

void Hammer::AmplitudeBase::updateWCSettings ( const std::vector< std::complex< double >> &  values,
WTerm  what 
)

Definition at line 49 of file AmplitudeBase.cc.

void Hammer::AmplitudeBase::updateWCSettings ( const std::map< std::string, std::complex< double >> &  values,
WTerm  what 
)

Definition at line 53 of file AmplitudeBase.cc.

void Hammer::AmplitudeBase::updateWCTensor ( std::vector< std::complex< double >>  values,
MultiDimensional::SharedTensorData data 
) const
Parameters
[in]values
[in]data
Returns

Definition at line 57 of file AmplitudeBase.cc.

void Hammer::AmplitudeBase::updateWilsonCeffLabelPrefix ( )
protectedvirtual

Reimplemented in Hammer::AmplBToQLepNuBase.

Definition at line 101 of file AmplitudeBase.cc.

Member Data Documentation

size_t Hammer::AmplitudeBase::_multiplicity
protected

Definition at line 116 of file AmplitudeBase.hh.

std::vector<Tensor> Hammer::AmplitudeBase::_tensorList
protected

list of (list of) labels for the tensor indices (one for each signature)

Definition at line 115 of file AmplitudeBase.hh.

IndexLabel Hammer::AmplitudeBase::_WCLabel
protected

Definition at line 114 of file AmplitudeBase.hh.

std::vector<std::string> Hammer::AmplitudeBase::_WCNames
protected

Definition at line 112 of file AmplitudeBase.hh.

std::string Hammer::AmplitudeBase::_WCPrefix
protected

Definition at line 113 of file AmplitudeBase.hh.


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