Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ProcRequirements.hh
Go to the documentation of this file.
1 ///
2 /// @file ProcRequirements.hh
3 /// @brief Container class for required ingredients for the process weight calculation
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_PROCREQUIREMENTS_HH
13 #define HAMMER_PROCREQUIREMENTS_HH
14 
15 #include <map>
16 #include <string>
17 #include <vector>
18 
19 #include "Hammer/IndexTypes.hh"
20 #include "Hammer/ProcGraph.fhh"
21 #include "Hammer/Math/Tensor.hh"
22 
23 namespace Hammer {
24 
25  class Log;
26  class DictionaryManager;
27  class AmplitudeBase;
28  class RateBase;
29  class FormFactorBase;
30  class Process;
31 
32  /// @brief Decay process class
33  ///
34  /// Contains the amplitudes, weights and info associated to a decay, ...
35  ///
36  /// @ingroup Core
38 
39  public:
41 
42  ProcRequirements(const ProcRequirements& other) = delete;
43  ProcRequirements& operator=(const ProcRequirements& other) = delete;
44  ProcRequirements(ProcRequirements&& other) = delete;
45  ProcRequirements& operator=(ProcRequirements&& other) = delete;
46 
47  ~ProcRequirements() noexcept = default;
48 
49  public:
50  /// @brief
51  /// @param[in] dictionaries
52  /// @param[in] inputs
53  /// @param[in] graph
54  size_t initialize(const DictionaryManager* dictionaries, const Process* inputs, const ProcGraph* graph);
55 
56  /// @brief
57  /// @return
58  std::vector<std::tuple<ParticleIndex, ParticleIndex, NumDenPair<AmplEntry>, NumDenPair<double>, NumDenPair<double>>> generatedAmplsMultsPS() const;
59 
60  std::pair<double, double> getPSRates() const;
61 
62  double calcCorrectionFactor(WTerm what = WTerm::NUMERATOR) const;
63 
65  const VertexDict<RateBase*>& rates() const;
67  const std::vector<Tensor>& denominatorWilsonCoeffs() const;
68  const std::vector<Tensor>& denominatorFFEigenVectors() const;
69  const std::vector<Tensor>& specializedWilsonCoeffs() const;
70  const VertexDict<HashId>& rateIds() const;
72 
73  protected:
74 
75  /// @brief logging facility
76  /// @return stream to be used for logging
77  Log& getLog() const;
78 
79  ///@brief
80  /// @param[in] descendant
81  std::pair<ParticleIndex, bool> getAncestorId(ParticleIndex descendant) const;
82 
83  /// @brief
84  void getAmplitudes();
85 
86  /// @brief
87  void getFormFactors();
88 
89  /// @brief
90  void getRates();
91 
92  private:
93 
95 
97  const ProcGraph* _graph;
98  const Process* _inputs;
99 
106  std::vector<Tensor> _denominatorWilsonCoeffs;
107  std::vector<Tensor> _denominatorFFEigenVectors;
108  std::vector<Tensor> _specializedWilsonCoeffs;
109 
110  };
111 
112 } // namespace Hammer
113 
114 #endif
VertexDict< FFIndexDict< FormFactorBase * > > _requiredFormFactors
const VertexDict< SelectedAmplEntry > & amplitudes() const
VertexDict< const double * > _requiredPWs
Hammer data types declarations.
const DictionaryManager * _dictionaries
VertexDict< VertexUID > _rateIds
std::pair< ParticleIndex, bool > getAncestorId(ParticleIndex descendant) const
VertexDict< NumDenPair< double > > _multPSFactors
Decay process class.
Definition: Process.hh:34
const std::vector< Tensor > & denominatorFFEigenVectors() const
double calcCorrectionFactor(WTerm what=WTerm::NUMERATOR) const
const VertexDict< HashId > & rateIds() const
std::vector< std::tuple< ParticleIndex, ParticleIndex, NumDenPair< AmplEntry >, NumDenPair< double >, NumDenPair< double > > > generatedAmplsMultsPS() const
const ProcGraph * _graph
std::vector< Tensor > _specializedWilsonCoeffs
std::vector< Tensor > _denominatorFFEigenVectors
const VertexDict< FFIndexDict< FormFactorBase * > > & formFactors() const
std::pair< double, double > getPSRates() const
const std::vector< Tensor > & denominatorWilsonCoeffs() const
Logging class.
Definition: Logging.hh:33
VertexDict< RateBase * > _requiredRates
VertexDict< SelectedAmplEntry > _requiredAmplitudes
Log & getLog() const
logging facility
const VertexDict< RateBase * > & rates() const
std::map< ParticleIndex, T > VertexDict
Definition: IndexTypes.hh:45
size_t ParticleIndex
Definition: IndexTypes.hh:27
Decay process class.
Definition: ProcGraph.hh:69
size_t initialize(const DictionaryManager *dictionaries, const Process *inputs, const ProcGraph *graph)
Declarations of process graph data structures.
Decay process class.
std::vector< Tensor > _denominatorWilsonCoeffs
VertexDict< NumDenPair< double > > _massPSFactors
Hammer tensor class.
const std::vector< Tensor > & specializedWilsonCoeffs() const
~ProcRequirements() noexcept=default
ProcRequirements & operator=(const ProcRequirements &other)=delete
const VertexDict< const double * > & partialWidths() const