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::Event Class Reference

Event container class. More...

#include <Event.hh>

+ Inheritance diagram for Hammer::Event:
+ Collaboration diagram for Hammer::Event:

Public Member Functions

 Event (Histos *histograms=nullptr, DictionaryManager *dict=nullptr)
 
 Event (const Event &other)=delete
 
Eventoperator= (const Event &other)=delete
 
 Event (Event &&other)=delete
 
Eventoperator= (Event &&other)=delete
 
 ~Event () noexcept
 
ProcessUID addProcess (Process &p)
 
void removeProcess (ProcessUID id)
 
void setEventBaseWeight (double weight)
 
double getEventBaseWeight () const
 
void clear ()
 
void init ()
 
const EventUIDgetEventId () const
 
const TensorgetAmplitude (ProcessUID process, WTerm what=WTerm::NUMERATOR) const
 
ProcIdDict
< std::reference_wrapper
< const Tensor > > 
getAmplitudes (WTerm what=WTerm::NUMERATOR) const
 
const TensorgetSquaredAmplitude (ProcessUID process, WTerm what=WTerm::NUMERATOR) const
 
ProcIdDict
< std::reference_wrapper
< const Tensor > > 
getSquaredAmplitudes (WTerm what=WTerm::NUMERATOR) const
 
std::vector
< std::reference_wrapper
< const Tensor > > 
getProcessFormFactors (const std::string &schemeName, ProcessUID process) const
 
ProcIdDict< std::vector
< std::reference_wrapper
< const Tensor > > > 
getFormFactors (const std::string &schemeName) const
 
const TensorgetTensorWeight (const std::string &schemeName, ProcessUID process) const
 
ProcIdDict
< std::reference_wrapper
< const Tensor > > 
getTensorWeights (const std::string &schemeName) const
 
double getWeight (const std::string &schemeName, ProcessUID process) const
 
ProcIdDict< double > getWeights (const std::string &schemeName) const
 
void calc ()
 
void setHistogramBin (const std::string &label, const IndexList indices)
 
void fillHistograms ()
 
void write (flatbuffers::FlatBufferBuilder *msgwriter) const
 
bool read (const Serial::FBEvent *msgreader, bool merge)
 
- 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

LoggetLog () const
 logging facility More...
 
void defineSettings ()
 purely virtual function for a class to define new settings More...
 
const ProcManagergetProcManager (ProcessUID id) const
 
ProcManagergetProcManager (ProcessUID id)
 
ProcessUID addProcManager (ProcManager &&pm)
 
- 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)
 

Private Attributes

ProcIdDict< ProcManager_processes
 
EventUID _eventId
 
SchemeNameList _schemes
 
HistoNameDict< IndexList_histogramBins
 
Histos_histograms
 
DictionaryManager_dictionaries
 
double _eventWeight
 

Additional Inherited Members

- 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

Event container class.

Contains the decay processes within an event, ...

Definition at line 37 of file Event.hh.

Constructor & Destructor Documentation

Hammer::Event::Event ( Histos histograms = nullptr,
DictionaryManager dict = nullptr 
)
Parameters
[in]histograms
[in]dict

Definition at line 29 of file Event.cc.

Hammer::Event::Event ( const Event other)
delete
Hammer::Event::Event ( Event &&  other)
delete
Hammer::Event::~Event ( )
noexcept

Definition at line 35 of file Event.cc.

Member Function Documentation

HashId Hammer::Event::addProcess ( Process p)
Parameters
[in]p
Returns

Definition at line 56 of file Event.cc.

HashId Hammer::Event::addProcManager ( ProcManager &&  pm)
protected

Definition at line 65 of file Event.cc.

void Hammer::Event::calc ( )
Todo:
anything else?

Definition at line 104 of file Event.cc.

void Hammer::Event::clear ( )

Definition at line 41 of file Event.cc.

void Hammer::Event::defineSettings ( )
protectedvirtual

purely virtual function for a class to define new settings

Implements Hammer::SettingsConsumer.

Definition at line 218 of file Event.cc.

void Hammer::Event::fillHistograms ( )

Definition at line 120 of file Event.cc.

const Tensor & Hammer::Event::getAmplitude ( ProcessUID  process,
WTerm  what = WTerm::NUMERATOR 
) const
Parameters
[in]process
[in]what
Returns

Definition at line 222 of file Event.cc.

ProcIdDict< reference_wrapper< const Tensor > > Hammer::Event::getAmplitudes ( WTerm  what = WTerm::NUMERATOR) const
Parameters
[in]what
Returns

Definition at line 230 of file Event.cc.

double Hammer::Event::getEventBaseWeight ( ) const

Definition at line 52 of file Event.cc.

const EventUID & Hammer::Event::getEventId ( ) const

Definition at line 149 of file Event.cc.

ProcIdDict< vector< reference_wrapper< const Tensor > > > Hammer::Event::getFormFactors ( const std::string &  schemeName) const
Parameters
[in]schemeName
Returns

Definition at line 252 of file Event.cc.

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

logging facility

Returns
stream to be used for logging

Definition at line 214 of file Event.cc.

vector< reference_wrapper< const Tensor > > Hammer::Event::getProcessFormFactors ( const std::string &  schemeName,
ProcessUID  process 
) const
Parameters
[in]schemeName
[in]process
Returns

Definition at line 248 of file Event.cc.

const ProcManager & Hammer::Event::getProcManager ( ProcessUID  id) const
protected
Parameters
[in]id
Returns

Definition at line 89 of file Event.cc.

ProcManager & Hammer::Event::getProcManager ( ProcessUID  id)
protected
Parameters
[in]id
Returns

Definition at line 93 of file Event.cc.

const Tensor & Hammer::Event::getSquaredAmplitude ( ProcessUID  process,
WTerm  what = WTerm::NUMERATOR 
) const
Parameters
[in]process
[in]what
Returns

Definition at line 226 of file Event.cc.

ProcIdDict< reference_wrapper< const Tensor > > Hammer::Event::getSquaredAmplitudes ( WTerm  what = WTerm::NUMERATOR) const

Definition at line 239 of file Event.cc.

const Tensor & Hammer::Event::getTensorWeight ( const std::string &  schemeName,
ProcessUID  process 
) const
Parameters
[in]schemeName
[in]process
Returns

Definition at line 260 of file Event.cc.

ProcIdDict< reference_wrapper< const Tensor > > Hammer::Event::getTensorWeights ( const std::string &  schemeName) const
Parameters
[in]schemeName
Returns

Definition at line 264 of file Event.cc.

double Hammer::Event::getWeight ( const std::string &  schemeName,
ProcessUID  process 
) const
Parameters
[in]schemeName
[in]process
Returns

Definition at line 273 of file Event.cc.

ProcIdDict< double > Hammer::Event::getWeights ( const std::string &  schemeName) const
Parameters
[in]schemeName
Returns

Definition at line 284 of file Event.cc.

void Hammer::Event::init ( )

Definition at line 97 of file Event.cc.

Event& Hammer::Event::operator= ( const Event other)
delete
Event& Hammer::Event::operator= ( Event &&  other)
delete
bool Hammer::Event::read ( const Serial::FBEvent *  msgreader,
bool  merge 
)
Parameters
[in]msgreader
[in]merge

Definition at line 177 of file Event.cc.

void Hammer::Event::removeProcess ( ProcessUID  id)
Parameters
[in]id

Definition at line 78 of file Event.cc.

void Hammer::Event::setEventBaseWeight ( double  weight)

Definition at line 48 of file Event.cc.

void Hammer::Event::setHistogramBin ( const std::string &  label,
const IndexList  indices 
)
Parameters
[in]label
[in]indices

Definition at line 111 of file Event.cc.

void Hammer::Event::write ( flatbuffers::FlatBufferBuilder *  msgwriter) const
Parameters
[out]msgwriter

Definition at line 153 of file Event.cc.

Member Data Documentation

DictionaryManager* Hammer::Event::_dictionaries
private

Definition at line 178 of file Event.hh.

EventUID Hammer::Event::_eventId
private

Definition at line 172 of file Event.hh.

double Hammer::Event::_eventWeight
private

Definition at line 180 of file Event.hh.

HistoNameDict<IndexList> Hammer::Event::_histogramBins
private

Definition at line 176 of file Event.hh.

Histos* Hammer::Event::_histograms
private

Definition at line 177 of file Event.hh.

ProcIdDict<ProcManager> Hammer::Event::_processes
private

Definition at line 171 of file Event.hh.

SchemeNameList Hammer::Event::_schemes
private

Definition at line 174 of file Event.hh.


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