Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ProcRates.hh
Go to the documentation of this file.
1 ///
2 /// @file ProcRates.hh
3 /// @brief Container class for process rate tensors
4 ///
5 
6 //**** This file is a part of the HAMMER library
7 //**** Copyright (C) 2016 - 2020 The HAMMER Collaboration
8 //**** HAMMER is licensed under version 3 of the GPL; see COPYING for details
9 //**** Please note the MCnet academic guidelines; see GUIDELINES for details
10 
11 // -*- C++ -*-
12 #ifndef HAMMER_PROCRATES_HH
13 #define HAMMER_PROCRATES_HH
14 
15 #include <utility>
16 #include <vector>
17 #include <string>
18 
19 #include "Hammer/IndexTypes.hh"
20 #include "Hammer/Math/Tensor.hh"
23 
24 namespace Hammer {
25 
26  class Log;
27  class ExternalData;
28 
29  /// @brief Decay process class
30  ///
31  /// Contains the amplitudes, weights and info associated to a decay, ...
32  ///
33  /// @ingroup Core
34  class ProcRates : public SettingsConsumer {
35 
36  public:
37  ProcRates(const ExternalData* ext);
38 
39  ProcRates(const Serial::FBProcData* msgreader);
40 
41  ProcRates(const ProcRates& other) = delete;
42  ProcRates& operator=(const ProcRates& other) = delete;
43  ProcRates(ProcRates&& other) = delete;
44  ProcRates& operator=(ProcRates&& other) = delete;
45 
46  ~ProcRates() noexcept;
47 
48  public:
49 
50  /// @brief
51  /// @param[in] id
52  /// @return
54 
55  /// @brief
56  /// @param[in] id
57  /// @param[in] schemeName
58  /// @return
59  virtual double getVertexRate(const ProcessUID& id, const std::string& schemeName) const;
60 
61  void init();
62 
63  public:
64 
65  /// @brief
66  /// @param[in] msgwriter
67  void write(flatbuffers::FlatBufferBuilder* msgwriter) const;
68 
69  /// @brief
70  /// @param[in] msgreader
71  /// @param[in] merge
72  bool read(const Serial::FBRates* msgreader, bool merge);
73 
74  protected:
75  /// @brief purely virtual function for a class to define new settings
76  virtual void defineSettings();
77 
78  /// @brief logging facility
79  /// @return stream to be used for logging
80  Log& getLog() const;
81 
82  private:
83 
86 
87  };
88 
89 } // namespace Hammer
90 
91 #endif
ProcRates(const ExternalData *ext)
Definition: ProcRates.cc:30
HashId ProcessUID
Definition: IndexTypes.hh:49
Decay process class.
Definition: ProcRates.hh:34
Forward declaration of serialization related typedefs and includes.
virtual void defineSettings()
purely virtual function for a class to define new settings
Definition: ProcRates.cc:38
Hammer data types declarations.
virtual double getVertexRate(const ProcessUID &id, const std::string &schemeName) const
Definition: ProcRates.cc:59
~ProcRates() noexcept
Definition: ProcRates.cc:33
Log & getLog() const
logging facility
Definition: ProcRates.cc:86
const ExternalData * _external
Definition: ProcRates.hh:85
Base class to access the settings repository.
bool read(const Serial::FBRates *msgreader, bool merge)
Definition: ProcRates.cc:90
ProcRates & operator=(const ProcRates &other)=delete
Logging class.
Definition: Logging.hh:33
Base class for accessing Hammer settings repository.
std::map< ProcessUID, T > ProcIdDict
Definition: IndexTypes.hh:51
ProcIdDict< SchemeDict< Tensor > > _processRates
Definition: ProcRates.hh:84
void write(flatbuffers::FlatBufferBuilder *msgwriter) const
Definition: ProcRates.cc:123
std::map< SchemeName, T > SchemeDict
Definition: IndexTypes.hh:64
virtual SchemeDict< Tensor > * getProcessRates(ProcessUID id)
Definition: ProcRates.cc:45
Hammer tensor class.