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.hh
Go to the documentation of this file.
1 ///
2 /// @file Hammer.hh
3 /// @brief Main Hammer class
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_HAMMER
13 #define HAMMER_HAMMER
14 
15 #include <map>
16 #include <memory>
17 #include <string>
18 #include <utility>
19 #include <vector>
20 
25 #include "Hammer/Tools/Pdg.fhh"
26 
27 #include "Hammer/Tools/IOTypes.hh"
28 
29 
30 
31 namespace Hammer {
32 
33  class Log;
34  class DictionaryManager;
35  class Event;
36  class SettingsHandler;
37  class Histos;
38  class Process;
39 
40  /// @brief Main class
41  ///
42  /// Contains ...
43  ///
44  /// @ingroup Core
45  class Hammer : private SettingsConsumer {
46 
47  public:
48  Hammer();
49 
50  Hammer(const Hammer& other) = delete;
51  Hammer& operator=(const Hammer& other) = delete;
52  Hammer(Hammer&& other) = delete;
53  Hammer& operator=(Hammer&& other) = delete;
54 
55  ~Hammer() noexcept;
56 
57 
58  public:
59  /// @brief
60  void initRun();
61 
62  /// @brief Clears the _event container
63  /// @param[in] weight
64  void initEvent(double weight = 1.0);
65 
66  /// @brief Adds a process to the _event container
67  /// @param[in] p
68  /// @return HashId of the process
69  size_t addProcess(Process& p);
70 
71 
72  /// @brief Removes a process to the _event container
73  /// @param[in] id
74  void removeProcess(size_t id);
75 
76  /// @brief
77  /// @param[in] name
78  /// @param[in] bins
79  void setEventHistogramBin(const std::string& name, const std::vector<uint16_t>& bins);
80 
81  void fillEventHistogram(const std::string& name, const std::vector<double>& values);
82 
83  /// @brief
84  /// @param[in] weight
85  void setEventBaseWeight(double weight);
86 
87  /// @brief
88  void processEvent();
89 
90 
91  /// @brief
92  /// @param[in] buffer
93  /// @param[in] merge
94  bool loadEventWeights(IOBuffer& buffer, bool merge = false);
95 
96  /// @brief
97  /// @return
98  IOBuffer saveEventWeights() const;
99 
100  /// @brief
101  /// @param[in] buffer
102  /// @param[in] merge
103  bool loadRunHeader(IOBuffer& buffer, bool merge = false);
104 
105  /// @brief
106  /// @return
107  IOBuffer saveRunHeader() const;
108 
109  /// @brief
110  /// @param[in] buffer
111  /// @param[in] merge
112  /// @return
113  std::string loadHistogramDefinition(IOBuffer& buffer, bool merge = false);
114 
115  /// @brief
116  /// @param[in] buffer
117  /// @param[in] merge
118  HistoInfo loadHistogram(IOBuffer& buffer, bool merge = false);
119 
120  /// @brief
121  /// @param[in] name
122  /// @return
123  IOBuffers saveHistogram(const std::string& name) const;
124 
125  /// @brief
126  /// @param[in] name
127  /// @param[in] scheme
128  /// @return
129  IOBuffers saveHistogram(const std::string& name, const std::string& scheme) const;
130 
131  /// @brief
132  /// @param[in] name
133  /// @param[in] eventIDs
134  /// @return
135  IOBuffers saveHistogram(const std::string& name, const EventUIDGroup& eventIDs) const;
136 
137  /// @brief
138  /// @param[in] name
139  /// @param[in] scheme
140  /// @param[in] eventIDs
141  /// @return
142  IOBuffers saveHistogram(const std::string& name, const std::string& scheme, const EventUIDGroup& eventIDs) const;
143 
144  /// @brief
145  /// @param[in] info
146  /// @return
147  IOBuffers saveHistogram(const HistoInfo& info) const;
148 
149  /// @brief
150  /// @param[in] buffer
151  /// @param[in] merge
152  bool loadRates(IOBuffer& buffer, bool merge = false);
153 
154  /// @brief
155  /// @return
156  IOBuffer saveRates() const;
157 
158  /// @brief Reads settings in the cards
159  /// @param[in] fileDecays
160  /// @param[in] fileOptions
161  void readCards(const std::string& fileDecays, const std::string& fileOptions);
162 
163  /// @brief Reads settings in the cards
164  /// @param[in] fileOptions
165  /// @param[in] useDefault
166  void saveOptionCard(const std::string& fileOptions, bool useDefault = true) const;
167 
168  /// @brief Reads settings in the cards
169  /// @param[in] fileDecays
170  void saveHeaderCard(const std::string& fileDecays) const;
171 
172  void saveReferences(const std::string& fileRefs) const;
173 
174  /// @brief
175  /// @param[in] options
176  void setOptions(const std::string& options);
177 
178  /// @brief
179  /// @param[in] options
180  void setHeader(const std::string& options);
181 
182  /// @brief Add total weight sum histogram with compression and errors
183  /// @details Histogram is uniquely identified by "Total Sum of Weights", and is a (single bin) zero dim histogram
184  /// @param[in] compress
185  /// @param[in] witherrors
186  void addTotalSumOfWeights(const bool compress = false, const bool witherrors = false);
187 
188  /// @brief Adds a tensor histogram
189  /// @details Histogram is uniquely identified by a name. The dimensionality is arbitrary, with bin entries generically of type Tensor
190  /// Example: hammer.addHistogram("q2VsEmuon", {10,20}, false, {{0.,12.},{0.,2.4}})
191  /// @param[in] name
192  /// @param[in] binSizes
193  /// @param[in] hasUnderOverFlow
194  /// @param[in] ranges
195  void addHistogram(const std::string& name, const std::vector<uint16_t>& binSizes, bool hasUnderOverFlow = true,
196  const std::vector<std::pair<double, double>>& ranges = {});
197 
198  /// @brief Adds a tensor histogram
199  /// @details Histogram is uniquely identified by a name. The dimensionality is arbitrary, with bin entries
200  /// generically of type Tensor Example: hammer.addHistogram("q2VsEmuon", {10,20}, false)
201  /// @param[in] name
202  /// @param[in] binEdges
203  /// @param[in] hasUnderOverFlow
204  void addHistogram(const std::string& name, const std::vector<std::vector<double>>& binEdges, bool hasUnderOverFlow);
205 
206  void collapseProcessesInHistogram(const std::string& name);
207 
208  void keepErrorsInHistogram(const std::string& name, bool value = true);
209 
210  void specializeWCInWeights(const std::string& process,
211  const std::vector<std::complex<double>>& values);
212 
213  void specializeWCInWeights(const std::string& process,
214  const std::map<std::string, std::complex<double>>& settings);
215 
216  void resetSpecializeWCInWeights(const std::string& process);
217 
218  void specializeWCInHistogram(const std::string& name, const std::string& process,
219  const std::vector<std::complex<double>>& values);
220 
221  void specializeWCInHistogram(const std::string& name, const std::string& process,
222  const std::map<std::string, std::complex<double>>& settings);
223 
224  void specializeFFInHistogram(const std::string& name, const std::string& process, const std::string& group,
225  const std::vector<double>& values);
226 
227  void specializeFFInHistogram(const std::string& name, const std::string& process, const std::string& group,
228  const std::map<std::string, double>& settings);
229 
230  void resetSpecializationInHistogram(const std::string& name);
231 
232  void createProjectedHistogram(const std::string& oldName, const std::string& newName,
233  const std::set<uint16_t>& collapsedIndexPositions);
234 
235  void removeHistogram(const std::string& name);
236 
237  /// @brief Adds a form factor scheme
238  /// @details A form factor scheme is a name (string) plus a map from a subprocess name to a FF parametrization
239  /// Example: hammer.addFFScheme("MixedBag", {{"BD", "CLN"}, {"BD*", "ISGW2"}})
240  /// @param[in] schemeName
241  /// @param[in] schemes
242  void addFFScheme(const std::string& schemeName, const std::map<std::string, std::string>& schemes);
243 
244  /// @brief Sets the FF schemes for the denominator
245  /// @details A map from each hadronic subprocess to a specified FF parametrization
246  /// Example: hammer.setFFInputScheme({{"B0barD+", "ISGW2"}})
247  /// @param[in] schemes
248  void setFFInputScheme(const std::map<std::string, std::string>& schemes);
249 
250  /// @brief Removes a form factor scheme
251  /// Example: hammer.removeFFScheme("MixedBag")
252  /// @param[in] schemeName
253  void removeFFScheme(const std::string& schemeName);
254 
255  std::vector<std::string> getFFSchemeNames() const;
256 
257  /// @brief Adds a combinatoric set to included process specifications
258  /// @param[in] names
259  void includeDecay(const std::vector<std::string>& names);
260 
261  /// @brief Adds an included process specification
262  /// @param[in] name
263  void includeDecay(const std::string& name);
264 
265  /// @brief Adds a combinatoric set to forbidden process specifications
266  /// @param[in] names
267  void forbidDecay(const std::vector<std::string>& names);
268 
269  /// @brief Adds a forbidden process specification
270  /// @param[in] name
271  void forbidDecay(const std::string& name);
272 
273  /// @brief Sets pure PS by vertex
274  /// @details A map from each vertex to specified position: "Numerator", "Denominator", "All"
275  /// Example: hammer.setFFInputScheme({{"BDTauNu+", "Numerator"}})
276  /// @param[in] vertices
277  /// @param[in] what
278  void addPurePSVertices(const std::set<std::string>& vertices, WTerm what = WTerm::NUMERATOR);
279 
281 
282  /// @brief Sets the units
283  /// @details default is GeV
284  /// @param[in] name
285  void setUnits(std::string name = "GeV");
286 
287  /// @brief
288  /// @param[in] process
289  /// @param[in] values
290  /// @param[in] what
291  void setWilsonCoefficients(const std::string& process, const std::vector<std::complex<double>>& values, WTerm what = WTerm::NUMERATOR);
292 
293  /// @brief
294  /// @param[in] process
295  /// @param[in] settings
296  /// @param[in] what
297  void setWilsonCoefficients(const std::string& process, const std::map<std::string, std::complex<double>>& settings, WTerm what = WTerm::NUMERATOR);
298 
299  /// @brief
300  /// @param[in] process
301  /// @param[in] values
302  void setWilsonCoefficientsLocal(const std::string& process, const std::vector<std::complex<double>>& values);
303 
304  /// @brief
305  /// @param[in] process
306  /// @param[in] settings
307  void setWilsonCoefficientsLocal(const std::string& process,
308  const std::map<std::string, std::complex<double>>& settings);
309 
310  /// @brief
311  /// @param[in] process
312  /// @param[in] what
313  void resetWilsonCoefficients(const std::string& process, WTerm what = WTerm::NUMERATOR);
314 
315  /// @brief
316  /// @param[in] process
317  /// @param[in] group
318  /// @param[in] values
319  void setFFEigenvectors(const std::string& process, const std::string& group, const std::vector<double>& values);
320 
321  /// @brief
322  /// @param[in] process
323  /// @param[in] group
324  /// @param[in] settings
325  void setFFEigenvectors(const std::string& process, const std::string& group, const std::map<std::string, double>& settings);
326 
327  /// @brief
328  /// @param[in] process
329  /// @param[in] group
330  /// @param[in] values
331  void setFFEigenvectorsLocal(const std::string& process, const std::string& group, const std::vector<double>& values);
332 
333  /// @brief
334  /// @param[in] process
335  /// @param[in] group
336  /// @param[in] settings
337  void setFFEigenvectorsLocal(const std::string& process, const std::string& group,
338  const std::map<std::string, double>& settings);
339 
340  /// @brief
341  /// @param[in] process
342  /// @param[in] group
343  void resetFFEigenvectors(const std::string& process, const std::string& group);
344 
345  /// @brief
346  /// @param[in] scheme
347  /// @param[in] processes
348  /// @return
349  double getWeight(const std::string& scheme, const std::vector<size_t>& processes = {}) const;
350 
351  /// @brief
352  /// @param[in] scheme
353  /// @param[in] processes
354  /// @return
355  double getWeight(const std::string& scheme, const std::vector<std::vector<std::string>>& processes) const;
356 
357  /// @brief
358  /// @param[in] scheme
359  /// @return
360  std::map<size_t, double> getWeights(const std::string& scheme) const;
361 
362  /// @brief
363  /// @param[in] id
364  /// @param[in] scheme
365  /// @return rate double
366  double getRate(const HashId& id, const std::string& scheme) const;
367 
368  /// @brief
369  /// @param[in] parent pdg id
370  /// @param[in] daughters pdg ids
371  /// @param[in] scheme
372  /// @return rate double
373  double getRate(const PdgId& parent, const std::vector<PdgId>& daughters, const std::string& scheme) const;
374 
375  /// @brief
376  /// @param[in] vertex string
377  /// @param[in] scheme
378  /// @return rate double
379  double getRate(const std::string& vertex, const std::string& scheme) const;
380 
381  /// @brief
382  /// @param[in] id
383  /// @return rate double
384  double getDenominatorRate(const HashId& id) const;
385 
386  /// @brief
387  /// @param[in] parent pdg id
388  /// @param[in] daughters pdg ids
389  /// @return rate double
390  double getDenominatorRate(const PdgId& parent, const std::vector<PdgId>& daughters) const;
391 
392  /// @brief
393  /// @param[in] vertex string
394  /// @return rate double
395  double getDenominatorRate(const std::string& vertex) const;
396 
397  /// @brief
398  /// @param[in] name
399  /// @param[in] scheme
400  /// @return
401  IOHistogram getHistogram(const std::string& name, const std::string& scheme) const;
402 
403  /// @brief
404  /// @param[in] name
405  /// @param[in] scheme
406  /// @return
407  EventIdGroupDict<IOHistogram> getHistograms(const std::string& name, const std::string& scheme) const;
408 
409  EventUIDGroup getHistogramEventIds(const std::string& name, const std::string& scheme) const ;
410  std::vector<std::vector<double>> getHistogramBinEdges(const std::string& name) const;
411  std::vector<uint16_t> getHistogramShape(const std::string& name) const;
412  bool histogramHasUnderOverFlows(const std::string& name) const;
413 
414 #ifdef HAVE_ROOT
415 
416  /// @brief
417  /// @param[in] name
418  /// @param[in] scheme
419  /// @return
420  std::unique_ptr<TH1D> getHistogram1D(const std::string& name, const std::string& scheme) const;
421 
422  /// @brief
423  /// @param[in] name
424  /// @param[in] scheme
425  /// @return
426  std::unique_ptr<TH2D> getHistogram2D(const std::string& name, const std::string& scheme) const;
427 
428  /// @brief
429  /// @param[in] name
430  /// @param[in] scheme
431  /// @return
432  std::unique_ptr<TH3D> getHistogram3D(const std::string& name, const std::string& scheme) const;
433 
434  /// @brief
435  /// @param[in] name
436  /// @param[in] scheme
437  /// @return
438  EventIdGroupDict<std::unique_ptr<TH1D>> getHistograms1D(const std::string& name,
439  const std::string& scheme) const;
440 
441  /// @brief
442  /// @param[in] name
443  /// @param[in] scheme
444  /// @return
445  EventIdGroupDict<std::unique_ptr<TH2D>> getHistograms2D(const std::string& name,
446  const std::string& scheme) const;
447 
448  /// @brief
449  /// @param[in] name
450  /// @param[in] scheme
451  /// @return
452  EventIdGroupDict<std::unique_ptr<TH3D>> getHistograms3D(const std::string& name,
453  const std::string& scheme) const;
454 
455 
456  /// @brief
457  /// @param[in] name
458  /// @param[in] scheme
459  /// @param[out] histogram
460  /// @return
461  void setHistogram1D(const std::string& name, const std::string& scheme, TH1D& histogram) const;
462 
463  /// @brief
464  /// @param[in] name
465  /// @param[in] scheme
466  /// @param[out] histogram
467  /// @return
468  void setHistogram2D(const std::string& name, const std::string& scheme, TH2D& histogram) const;
469 
470  /// @brief
471  /// @param[in] name
472  /// @param[in] scheme
473  /// @param[out] histogram
474  /// @return
475  void setHistogram3D(const std::string& name, const std::string& scheme, TH3D& histogram) const;
476 
477  /// @brief
478  /// @param[in] name
479  /// @param[in] scheme
480  /// @param[out] histograms
481  /// @return
482  void setHistograms1D(const std::string& name, const std::string& scheme,
483  EventIdGroupDict<std::unique_ptr<TH1D>>& histograms) const;
484 
485  /// @brief
486  /// @param[in] name
487  /// @param[in] scheme
488  /// @param[out] histograms
489  /// @return
490  void setHistograms2D(const std::string& name, const std::string& scheme,
491  EventIdGroupDict<std::unique_ptr<TH2D>>& histograms) const;
492 
493  /// @brief
494  /// @param[in] name
495  /// @param[in] scheme
496  /// @param[out] histograms
497  /// @return
498  void setHistograms3D(const std::string& name, const std::string& scheme,
499  EventIdGroupDict<std::unique_ptr<TH3D>>& histograms) const;
500 
501 
502 #endif
503 
504  private:
505  /// @brief purely virtual function for a class to define new settings
506  virtual void defineSettings();
507 
508  /// @brief logging facility
509  /// @return stream to be used for logging
510  Log& getLog() const;
511 
512 
513  private:
514  std::unique_ptr<DictionaryManager> _containers;
515  std::unique_ptr<SettingsHandler> _settings;
516  std::unique_ptr<Histos> _histograms;
517  std::unique_ptr<flatbuffers::FlatBufferBuilder> _builder;
518  std::unique_ptr<Event> _event;
519  double _mcunits = 1.;
520 
521 
522  };
523 
524 } // namespace Hammer
525 
526 #endif
size_t addProcess(Process &p)
Adds a process to the _event container.
Definition: Hammer.cc:78
bool loadRunHeader(IOBuffer &buffer, bool merge=false)
Definition: Hammer.cc:123
void setEventBaseWeight(double weight)
Definition: Hammer.cc:96
void specializeWCInWeights(const std::string &process, const std::vector< std::complex< double >> &values)
Definition: Hammer.cc:357
Forward declaration of serialization related typedefs and includes.
void specializeWCInHistogram(const std::string &name, const std::string &process, const std::vector< std::complex< double >> &values)
Definition: Hammer.cc:369
void addPurePSVertices(const std::set< std::string > &vertices, WTerm what=WTerm::NUMERATOR)
Sets pure PS by vertex.
Definition: Hammer.cc:439
void clearPurePSVertices(WTerm what=WTerm::NUMERATOR)
Definition: Hammer.cc:443
IOBuffer saveRunHeader() const
Definition: Hammer.cc:136
void collapseProcessesInHistogram(const std::string &name)
Definition: Hammer.cc:353
std::vector< uint16_t > getHistogramShape(const std::string &name) const
Definition: Hammer.cc:598
Decay process class.
Definition: Process.hh:34
void addHistogram(const std::string &name, const std::vector< uint16_t > &binSizes, bool hasUnderOverFlow=true, const std::vector< std::pair< double, double >> &ranges={})
Adds a tensor histogram.
std::vector< BinContents > IOHistogram
Definition: IOTypes.hh:132
Hammer & operator=(const Hammer &other)=delete
virtual void defineSettings()
purely virtual function for a class to define new settings
Definition: Hammer.cc:453
EventIdGroupDict< IOHistogram > getHistograms(const std::string &name, const std::string &scheme) const
Definition: Hammer.cc:586
~Hammer() noexcept
Definition: Hammer.cc:63
void includeDecay(const std::vector< std::string > &names)
Adds a combinatoric set to included process specifications.
Definition: Hammer.cc:423
std::set< EventUID > EventUIDGroup
Definition: IndexTypes.hh:56
double _mcunits
Definition: Hammer.hh:519
void saveOptionCard(const std::string &fileOptions, bool useDefault=true) const
Reads settings in the cards.
Definition: Hammer.cc:306
bool histogramHasUnderOverFlows(const std::string &name) const
Definition: Hammer.cc:602
double getDenominatorRate(const HashId &id) const
Definition: Hammer.cc:569
void setUnits(std::string name="GeV")
Sets the units.
Definition: Hammer.cc:447
void initRun()
Definition: Hammer.cc:326
Hammer configuration definitions.
double getWeight(const std::string &scheme, const std::vector< size_t > &processes={}) const
Definition: Hammer.cc:519
void specializeFFInHistogram(const std::string &name, const std::string &process, const std::string &group, const std::vector< double > &values)
Definition: Hammer.cc:381
void setHeader(const std::string &options)
Definition: Hammer.cc:322
Log & getLog() const
logging facility
Definition: Hammer.cc:460
void setFFEigenvectors(const std::string &process, const std::string &group, const std::vector< double > &values)
Definition: Hammer.cc:484
HistoInfo loadHistogram(IOBuffer &buffer, bool merge=false)
Definition: Hammer.cc:157
Base class to access the settings repository.
void resetWilsonCoefficients(const std::string &process, WTerm what=WTerm::NUMERATOR)
Definition: Hammer.cc:480
void setFFEigenvectorsLocal(const std::string &process, const std::string &group, const std::vector< double > &values)
Definition: Hammer.cc:498
std::unique_ptr< SettingsHandler > _settings
Definition: Hammer.hh:515
bool loadRates(IOBuffer &buffer, bool merge=false)
Definition: Hammer.cc:271
Pdg forward declarations.
bool loadEventWeights(IOBuffer &buffer, bool merge=false)
Definition: Hammer.cc:102
std::vector< std::vector< double > > getHistogramBinEdges(const std::string &name) const
Definition: Hammer.cc:594
Logging class.
Definition: Logging.hh:33
void forbidDecay(const std::vector< std::string > &names)
Adds a combinatoric set to forbidden process specifications.
Definition: Hammer.cc:431
void setEventHistogramBin(const std::string &name, const std::vector< uint16_t > &bins)
Definition: Hammer.cc:86
void addTotalSumOfWeights(const bool compress=false, const bool witherrors=false)
Add total weight sum histogram with compression and errors.
Definition: Hammer.cc:333
std::unique_ptr< Event > _event
Definition: Hammer.hh:518
UMap< EventUIDGroup, T > EventIdGroupDict
Definition: IndexTypes.hh:58
std::map< size_t, double > getWeights(const std::string &scheme) const
Definition: Hammer.cc:543
Base class for accessing Hammer settings repository.
void saveReferences(const std::string &fileRefs) const
Definition: Hammer.cc:314
void resetFFEigenvectors(const std::string &process, const std::string &group)
Definition: Hammer.cc:512
void setOptions(const std::string &options)
Definition: Hammer.cc:318
IOHistogram getHistogram(const std::string &name, const std::string &scheme) const
Definition: Hammer.cc:582
std::unique_ptr< DictionaryManager > _containers
Definition: Hammer.hh:514
std::string loadHistogramDefinition(IOBuffer &buffer, bool merge=false)
Definition: Hammer.cc:146
void keepErrorsInHistogram(const std::string &name, bool value=true)
Definition: Hammer.cc:349
void createProjectedHistogram(const std::string &oldName, const std::string &newName, const std::set< uint16_t > &collapsedIndexPositions)
Definition: Hammer.cc:397
IOBuffer saveRates() const
Definition: Hammer.cc:282
void readCards(const std::string &fileDecays, const std::string &fileOptions)
Reads settings in the cards.
Definition: Hammer.cc:301
void resetSpecializeWCInWeights(const std::string &process)
Definition: Hammer.cc:365
void resetSpecializationInHistogram(const std::string &name)
Definition: Hammer.cc:393
IOBuffer saveEventWeights() const
Definition: Hammer.cc:113
std::unique_ptr< Histos > _histograms
Definition: Hammer.hh:516
Declarations for Hammer IO structs.
void addFFScheme(const std::string &schemeName, const std::map< std::string, std::string > &schemes)
Adds a form factor scheme.
Definition: Hammer.cc:407
void setWilsonCoefficients(const std::string &process, const std::vector< std::complex< double >> &values, WTerm what=WTerm::NUMERATOR)
Definition: Hammer.cc:464
void fillEventHistogram(const std::string &name, const std::vector< double > &values)
Definition: Hammer.cc:90
void processEvent()
Definition: Hammer.cc:292
std::unique_ptr< flatbuffers::FlatBufferBuilder > _builder
Definition: Hammer.hh:517
void saveHeaderCard(const std::string &fileDecays) const
Reads settings in the cards.
Definition: Hammer.cc:310
std::vector< std::string > getFFSchemeNames() const
Definition: Hammer.cc:419
ROOT forward declarations.
size_t HashId
Definition: IndexTypes.hh:31
Main class.
Definition: Hammer.hh:45
void setFFInputScheme(const std::map< std::string, std::string > &schemes)
Sets the FF schemes for the denominator.
Definition: Hammer.cc:411
void removeFFScheme(const std::string &schemeName)
Removes a form factor scheme Example: hammer.removeFFScheme(&quot;MixedBag&quot;)
Definition: Hammer.cc:415
int PdgId
Definition: Pdg.fhh:17
EventUIDGroup getHistogramEventIds(const std::string &name, const std::string &scheme) const
Definition: Hammer.cc:590
void initEvent(double weight=1.0)
Clears the _event container.
Definition: Hammer.cc:68
void removeHistogram(const std::string &name)
Definition: Hammer.cc:403
void setWilsonCoefficientsLocal(const std::string &process, const std::vector< std::complex< double >> &values)
Definition: Hammer.cc:472
double getRate(const HashId &id, const std::string &scheme) const
Definition: Hammer.cc:547
void removeProcess(size_t id)
Removes a process to the _event container.
Definition: Hammer.cc:82
IOBuffers saveHistogram(const std::string &name) const
Definition: Hammer.cc:168