gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
MCLoopInfo.hpp
Go to the documentation of this file.
1 // GAMBIT: Global and Modular BSM Inference Tool
2 // *********************************************
16 
17 
18 #pragma once
19 
20 #include <vector>
23 
24 namespace Gambit
25 {
26 
27  namespace ColliderBit
28  {
29 
31  struct MCLoopInfo
32  {
35 
38 
40  mutable bool end_of_event_file;
41 
43  std::vector<str> collider_names;
44 
46  std::map<str,int> maxFailedEvents;
47 
49  std::map<str,bool> invalidate_failed_points;
50 
52  mutable std::map<str,int> event_count;
53 
55  std::map<str,convergence_settings> convergence_options;
56 
58  std::map<str,std::vector<str>> analyses;
59 
61  std::map<str,std::map<str,std::vector<str>>> detector_analyses;
62 
65 
67  const str& current_collider() const;
68 
70  const int& current_maxFailedEvents() const;
73 
75  const bool& current_invalidate_failed_points() const;
78 
80  const int& current_event_count() const;
82  int& current_event_count();
83 
88 
90  const std::vector<str>& current_analyses() const;
92  std::vector<str>& current_analyses();
93 
95  const std::vector<str>& current_analyses_for(const str&) const;
97  std::vector<str>& current_analyses_for(const str&);
98 
100  bool current_analyses_exist_for(const str&) const;
101 
103  void report_exceeded_maxFailedEvents() const;
104 
106  void report_end_of_event_file() const;
107 
109  void reset_flags();
110 
111  private:
112 
115 
117  std::map<str,int>::iterator _current_maxFailedEvents_it;
118 
120  std::map<str,bool>::iterator _current_invalidate_failed_points_it;
121 
123  std::map<str,int>::iterator _current_event_count_it;
124 
126  std::map<str,convergence_settings>::iterator _current_convergence_options_it;
127 
129  std::map<str,std::vector<str>>::iterator _current_analyses_it;
130 
132  std::map<str,std::map<str,std::vector<str>>>::iterator _current_detector_analyses_it;
133 
134  };
135 
136  }
137 }
138 
std::map< str, int > event_count
Number of events generated for each collider.
Definition: MCLoopInfo.hpp:52
std::map< str, int >::iterator _current_event_count_it
Iterator to the current event count.
Definition: MCLoopInfo.hpp:123
std::map< str, std::map< str, std::vector< str > > >::iterator _current_detector_analyses_it
Iterator to the current set of analyses sorted by detector.
Definition: MCLoopInfo.hpp:132
void report_exceeded_maxFailedEvents() const
Set exceeded_maxFailedEvents = true and decrement event counter by 1.
Definition: MCLoopInfo.cpp:29
std::map< str, std::vector< str > >::iterator _current_analyses_it
Iterator to the current set of analyses.
Definition: MCLoopInfo.hpp:129
const int & current_maxFailedEvents() const
Get maximum allowable number of failed events before MC loop is terminated for the current collider...
Definition: MCLoopInfo.cpp:129
bool end_of_event_file
Maximum allowed number of failed events has been reached and MC loop terminated.
Definition: MCLoopInfo.hpp:40
const int & current_event_count() const
Get the number of events generated for the current collider.
Definition: MCLoopInfo.cpp:135
General small utility classes, typedefs, etc.
bool exceeded_maxFailedEvents
Maximum allowed number of failed events has been reached.
Definition: MCLoopInfo.hpp:37
const std::vector< str > & current_analyses_for(const str &) const
Get the set of analyses for the current collider and a given detector.
Definition: MCLoopInfo.cpp:144
std::map< str, convergence_settings > convergence_options
Convergence options for each collider.
Definition: MCLoopInfo.hpp:55
str _current_collider
The name of the current collider.
Definition: MCLoopInfo.hpp:114
std::map< str, bool > invalidate_failed_points
Invalidate points where number of failed events > maxFailedEvents? One bool for each collider...
Definition: MCLoopInfo.hpp:49
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
bool event_generation_began
Event generation has started.
Definition: MCLoopInfo.hpp:34
void reset_flags()
Reset flags.
Definition: MCLoopInfo.cpp:51
std::map< str, int > maxFailedEvents
Maximum allowable number of failed events before MC loop is terminated for each collider.
Definition: MCLoopInfo.hpp:46
const str & current_collider() const
Get the current collider.
Definition: MCLoopInfo.cpp:127
std::map< str, bool >::iterator _current_invalidate_failed_points_it
Iterator to the current invalidate_failed_points.
Definition: MCLoopInfo.hpp:120
std::vector< str > collider_names
The names of all colliders.
Definition: MCLoopInfo.hpp:43
std::map< str, std::map< str, std::vector< str > > > detector_analyses
Analysis list for each detector of each collider.
Definition: MCLoopInfo.hpp:61
void set_current_collider(str &)
Set the current collider.
Definition: MCLoopInfo.cpp:59
const bool & current_invalidate_failed_points() const
Get invalidate_failed_points bool for the current collider.
Definition: MCLoopInfo.cpp:132
std::map< str, convergence_settings >::iterator _current_convergence_options_it
Iterator to the current set of convergence options.
Definition: MCLoopInfo.hpp:126
std::string str
Shorthand for a standard string.
Definition: Analysis.hpp:35
void report_end_of_event_file() const
Set end_of_event_file = true and decrement event counter by 1.
Definition: MCLoopInfo.cpp:40
ColliderBit Monte Carlo convergence routines.
std::map< str, int >::iterator _current_maxFailedEvents_it
Iterator to the current maxFailedEvents.
Definition: MCLoopInfo.hpp:117
Type for holding Monte Carlo convergence settings.
const std::vector< str > & current_analyses() const
Get the set of analyses for the current collider.
Definition: MCLoopInfo.cpp:141
TODO: see if we can use this one:
Definition: Analysis.hpp:33
Container for event loop status data and settings.
Definition: MCLoopInfo.hpp:31
const convergence_settings & current_convergence_options() const
Get the set of convergence options for the current collider.
Definition: MCLoopInfo.cpp:138
std::map< str, std::vector< str > > analyses
Analysis list for each collider.
Definition: MCLoopInfo.hpp:58