Hammer  1.0.0
Helicity Amplitude Module for Matrix Element Reweighting
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HammerModules.hh.in
Go to the documentation of this file.
1 ///
2 /// @file HammerModules.hh
3 /// @brief Hammer available modules header
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_HAMMERModules_HH
13 #define HAMMER_HAMMERModules_HH
14 
15 @HAMMER_AMPLITUDES_INCLUDES@
16 @HAMMER_FORMFACTORS_INCLUDES@
17 @HAMMER_RATES_INCLUDES@
18 
19 #define ADD(ELEM, CONT, TYP) do { \
20  unique_ptr<TYP> pEntry(new ELEM{}); \
21  size_t counts = pEntry->numSignatures(); \
22  CONT.emplace(pEntry->id(), std::move(pEntry)); \
23  for(size_t i = 1; i < counts; ++i) { \
24  unique_ptr<TYP> pEntryNext(new ELEM{}); \
25  pEntryNext->setSignatureIndex(i); \
26  CONT.emplace(pEntryNext->id(), std::move(pEntryNext)); \
27  } \
28  } while(0)
29 
30 #define ADDV(ELEM, CONT, TYP) do { \
31  unique_ptr<TYP> pEntry(new ELEM{}); \
32  size_t counts = pEntry->numSignatures(); \
33  CONT[pEntry->id()].emplace_back(std::move(pEntry)); \
34  for(size_t i = 1; i < counts; ++i) { \
35  unique_ptr<TYP> pEntryNext(new ELEM{}); \
36  pEntryNext->setSignatureIndex(i); \
37  CONT[pEntryNext->id()].emplace_back(std::move(pEntryNext)); \
38  } \
39  } while(0)
40 
41 #define ADD_AMPLITUDES(CONT) do { \
42 @AMPL_BODY@ } while (0)
43 
44 #define ADD_FORMFACTORS(CONT) do { \
45 @FF_BODY@ } while (0)
46 
47 #define ADD_RATES(CONT) do { \
48 @RATE_BODY@ } while (0)
49 
50 #endif