gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
smearEvent.cpp
Go to the documentation of this file.
1 // GAMBIT: Global and Modular BSM Inference Tool
2 // *********************************************
37 
39 
40 namespace Gambit
41 {
42 
43  namespace ColliderBit
44  {
45 
47  void smearEvent(HEPUtils::Event& result,
48  const HEPUtils::Event& HardScatteringEvent,
49  const BaseDetector& detector,
50  const MCLoopInfo& RunMC,
51  const int iteration,
52  const str& detname)
53  {
54  if (iteration <= BASE_INIT or not RunMC.current_analyses_exist_for(detname)) return;
55  result.clear();
56  HardScatteringEvent.cloneTo(result);
57  detector.processEvent(result);
58  }
59 
61  #define SMEAR_EVENT(NAME, EXPERIMENT) \
62  void NAME(HEPUtils::Event& result) \
63  { \
64  using namespace Pipes::NAME; \
65  smearEvent(result, *Dep::HardScatteringEvent, *(*Dep::CAT(EXPERIMENT,DetectorSim)),\
66  *Dep::RunMC, *Loop::iteration, #EXPERIMENT); \
67  }
68 
69  SMEAR_EVENT(smearEventATLAS, ATLAS)
70  SMEAR_EVENT(smearEventCMS, CMS)
71  SMEAR_EVENT(copyEvent, Identity)
72 
73  }
74 
75 }
Declarations common to all ColliderBit event loop functions.
SMEAR_EVENT(smearEventATLAS, ATLAS) SMEAR_EVENT(smearEventCMS
bool current_analyses_exist_for(const str &) const
Query whether any analyses exist for a given detector for the current collider.
Definition: MCLoopInfo.cpp:120
std::string str
Shorthand for a standard string.
Definition: Analysis.hpp:35
An abstract base class for detector simulators within ColliderBit.
virtual void processEvent(HEPUtils::Event &) const =0
Perform the actual simulation on the next collider event.
void smearEvent(HEPUtils::Event &result, const HEPUtils::Event &HardScatteringEvent, const BaseDetector &detector, const MCLoopInfo &RunMC, const int iteration, const str &detname)
Smear an event.
Definition: smearEvent.cpp:47
TODO: see if we can use this one:
Definition: Analysis.hpp:33
Container for event loop status data and settings.
Definition: MCLoopInfo.hpp:31