gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
Gambit::ColliderBit::MCLoopInfo Struct Reference

Container for event loop status data and settings. More...

#include <MCLoopInfo.hpp>

Collaboration diagram for Gambit::ColliderBit::MCLoopInfo:

Public Member Functions

void set_current_collider (str &)
 Set the current collider. More...
 
const strcurrent_collider () const
 Get the current collider. More...
 
const intcurrent_maxFailedEvents () const
 Get maximum allowable number of failed events before MC loop is terminated for the current collider. More...
 
intcurrent_maxFailedEvents ()
 Get/set maximum allowable number of failed events before MC loop is terminated for the current collider. More...
 
const bool & current_invalidate_failed_points () const
 Get invalidate_failed_points bool for the current collider. More...
 
bool & current_invalidate_failed_points ()
 Get/set invalidate_failed_points for the current collider. More...
 
const intcurrent_event_count () const
 Get the number of events generated for the current collider. More...
 
intcurrent_event_count ()
 Get/set the number of events generated for the current collider. More...
 
const convergence_settingscurrent_convergence_options () const
 Get the set of convergence options for the current collider. More...
 
convergence_settingscurrent_convergence_options ()
 Get/set the set of convergence options for the current collider. More...
 
const std::vector< str > & current_analyses () const
 Get the set of analyses for the current collider. More...
 
std::vector< str > & current_analyses ()
 Get/set the set of analyses for the current collider. More...
 
const std::vector< str > & current_analyses_for (const str &) const
 Get the set of analyses for the current collider and a given detector. More...
 
std::vector< str > & current_analyses_for (const str &)
 Get/set the set of analyses for the current collider and a given detector. More...
 
bool current_analyses_exist_for (const str &) const
 Query whether any analyses exist for a given detector for the current collider. More...
 
void report_exceeded_maxFailedEvents () const
 Set exceeded_maxFailedEvents = true and decrement event counter by 1. More...
 
void report_end_of_event_file () const
 Set end_of_event_file = true and decrement event counter by 1. More...
 
void reset_flags ()
 Reset flags. More...
 

Public Attributes

bool event_generation_began
 Event generation has started. More...
 
bool exceeded_maxFailedEvents
 Maximum allowed number of failed events has been reached. More...
 
bool end_of_event_file
 Maximum allowed number of failed events has been reached and MC loop terminated. More...
 
std::vector< strcollider_names
 The names of all colliders. More...
 
std::map< str, intmaxFailedEvents
 Maximum allowable number of failed events before MC loop is terminated for each collider. More...
 
std::map< str, bool > invalidate_failed_points
 Invalidate points where number of failed events > maxFailedEvents? One bool for each collider. More...
 
std::map< str, intevent_count
 Number of events generated for each collider. More...
 
std::map< str, convergence_settingsconvergence_options
 Convergence options for each collider. More...
 
std::map< str, std::vector< str > > analyses
 Analysis list for each collider. More...
 
std::map< str, std::map< str, std::vector< str > > > detector_analyses
 Analysis list for each detector of each collider. More...
 

Private Attributes

str _current_collider
 The name of the current collider. More...
 
std::map< str, int >::iterator _current_maxFailedEvents_it
 Iterator to the current maxFailedEvents. More...
 
std::map< str, bool >::iterator _current_invalidate_failed_points_it
 Iterator to the current invalidate_failed_points. More...
 
std::map< str, int >::iterator _current_event_count_it
 Iterator to the current event count. More...
 
std::map< str, convergence_settings >::iterator _current_convergence_options_it
 Iterator to the current set of convergence options. More...
 
std::map< str, std::vector< str > >::iterator _current_analyses_it
 Iterator to the current set of analyses. More...
 
std::map< str, std::map< str, std::vector< str > > >::iterator _current_detector_analyses_it
 Iterator to the current set of analyses sorted by detector. More...
 

Detailed Description

Container for event loop status data and settings.

Definition at line 31 of file MCLoopInfo.hpp.

Member Function Documentation

◆ current_analyses() [1/2]

const std::vector< str > & Gambit::ColliderBit::MCLoopInfo::current_analyses ( ) const

Get the set of analyses for the current collider.

Definition at line 141 of file MCLoopInfo.cpp.

References _current_analyses_it.

141 { return _current_analyses_it->second; }
std::map< str, std::vector< str > >::iterator _current_analyses_it
Iterator to the current set of analyses.
Definition: MCLoopInfo.hpp:129

◆ current_analyses() [2/2]

std::vector< str > & Gambit::ColliderBit::MCLoopInfo::current_analyses ( )

Get/set the set of analyses for the current collider.

Definition at line 142 of file MCLoopInfo.cpp.

References _current_analyses_it.

142 { return _current_analyses_it->second; }
std::map< str, std::vector< str > >::iterator _current_analyses_it
Iterator to the current set of analyses.
Definition: MCLoopInfo.hpp:129

◆ current_analyses_exist_for()

bool Gambit::ColliderBit::MCLoopInfo::current_analyses_exist_for ( const str detname) const

Query whether any analyses exist for a given detector for the current collider.

Definition at line 120 of file MCLoopInfo.cpp.

References _current_detector_analyses_it.

Referenced by current_analyses_for(), Gambit::ColliderBit::getAnalysisContainer(), and Gambit::ColliderBit::smearEvent().

121  {
122  auto current_analyses_by_detector = _current_detector_analyses_it->second;
123  auto it = current_analyses_by_detector.find(detname);
124  return not (it == current_analyses_by_detector.end());
125  }
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
Here is the caller graph for this function:

◆ current_analyses_for() [1/2]

const std::vector< str > & Gambit::ColliderBit::MCLoopInfo::current_analyses_for ( const str detname) const

Get the set of analyses for the current collider and a given detector.

Definition at line 144 of file MCLoopInfo.cpp.

References _current_detector_analyses_it, current_analyses_exist_for(), LOCAL_INFO, and Gambit::utils_error().

Referenced by Gambit::ColliderBit::getAnalysisContainer().

145  {
146  if (not current_analyses_exist_for(detname)) utils_error().raise(LOCAL_INFO, "Detector "+detname);
147  return _current_detector_analyses_it->second.at(detname);
148  }
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
EXPORT_SYMBOLS error & utils_error()
Utility errors.
#define LOCAL_INFO
Definition: local_info.hpp:34
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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ current_analyses_for() [2/2]

std::vector< str > & Gambit::ColliderBit::MCLoopInfo::current_analyses_for ( const str detname)

Get/set the set of analyses for the current collider and a given detector.

Definition at line 149 of file MCLoopInfo.cpp.

References _current_detector_analyses_it, current_analyses_exist_for(), LOCAL_INFO, and Gambit::utils_error().

150  {
151  if (not current_analyses_exist_for(detname)) utils_error().raise(LOCAL_INFO, "Detector "+detname);
152  return _current_detector_analyses_it->second.at(detname);
153  }
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
EXPORT_SYMBOLS error & utils_error()
Utility errors.
#define LOCAL_INFO
Definition: local_info.hpp:34
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
Here is the call graph for this function:

◆ current_collider()

const str & Gambit::ColliderBit::MCLoopInfo::current_collider ( ) const

Get the current collider.

Definition at line 127 of file MCLoopInfo.cpp.

References _current_collider.

Referenced by Gambit::ColliderBit::getAnalysisContainer(), and Gambit::ColliderBit::getPy8Collider().

127 { return _current_collider; }
str _current_collider
The name of the current collider.
Definition: MCLoopInfo.hpp:114
Here is the caller graph for this function:

◆ current_convergence_options() [1/2]

const convergence_settings & Gambit::ColliderBit::MCLoopInfo::current_convergence_options ( ) const

Get the set of convergence options for the current collider.

Definition at line 138 of file MCLoopInfo.cpp.

References _current_convergence_options_it.

138 { return _current_convergence_options_it->second; }
std::map< str, convergence_settings >::iterator _current_convergence_options_it
Iterator to the current set of convergence options.
Definition: MCLoopInfo.hpp:126

◆ current_convergence_options() [2/2]

convergence_settings & Gambit::ColliderBit::MCLoopInfo::current_convergence_options ( )

Get/set the set of convergence options for the current collider.

Definition at line 139 of file MCLoopInfo.cpp.

References _current_convergence_options_it.

139 { return _current_convergence_options_it->second; }
std::map< str, convergence_settings >::iterator _current_convergence_options_it
Iterator to the current set of convergence options.
Definition: MCLoopInfo.hpp:126

◆ current_event_count() [1/2]

const int & Gambit::ColliderBit::MCLoopInfo::current_event_count ( ) const

Get the number of events generated for the current collider.

Definition at line 135 of file MCLoopInfo.cpp.

References _current_event_count_it.

Referenced by Gambit::ColliderBit::getAnalysisContainer(), and Gambit::ColliderBit::operateLHCLoop().

135 { return _current_event_count_it->second; }
std::map< str, int >::iterator _current_event_count_it
Iterator to the current event count.
Definition: MCLoopInfo.hpp:123
Here is the caller graph for this function:

◆ current_event_count() [2/2]

int & Gambit::ColliderBit::MCLoopInfo::current_event_count ( )

Get/set the number of events generated for the current collider.

Definition at line 136 of file MCLoopInfo.cpp.

References _current_event_count_it.

136 { return _current_event_count_it->second; }
std::map< str, int >::iterator _current_event_count_it
Iterator to the current event count.
Definition: MCLoopInfo.hpp:123

◆ current_invalidate_failed_points() [1/2]

const bool & Gambit::ColliderBit::MCLoopInfo::current_invalidate_failed_points ( ) const

Get invalidate_failed_points bool for the current collider.

Definition at line 132 of file MCLoopInfo.cpp.

References _current_invalidate_failed_points_it.

Referenced by Gambit::ColliderBit::generateEventPy8Collider().

132 { return _current_invalidate_failed_points_it->second; }
std::map< str, bool >::iterator _current_invalidate_failed_points_it
Iterator to the current invalidate_failed_points.
Definition: MCLoopInfo.hpp:120
Here is the caller graph for this function:

◆ current_invalidate_failed_points() [2/2]

bool & Gambit::ColliderBit::MCLoopInfo::current_invalidate_failed_points ( )

Get/set invalidate_failed_points for the current collider.

Definition at line 133 of file MCLoopInfo.cpp.

References _current_invalidate_failed_points_it.

133 { return _current_invalidate_failed_points_it->second; }
std::map< str, bool >::iterator _current_invalidate_failed_points_it
Iterator to the current invalidate_failed_points.
Definition: MCLoopInfo.hpp:120

◆ current_maxFailedEvents() [1/2]

const int & Gambit::ColliderBit::MCLoopInfo::current_maxFailedEvents ( ) const

Get maximum allowable number of failed events before MC loop is terminated for the current collider.

Definition at line 129 of file MCLoopInfo.cpp.

References _current_maxFailedEvents_it.

Referenced by Gambit::ColliderBit::generateEventPy8Collider().

129 { return _current_maxFailedEvents_it->second; }
std::map< str, int >::iterator _current_maxFailedEvents_it
Iterator to the current maxFailedEvents.
Definition: MCLoopInfo.hpp:117
Here is the caller graph for this function:

◆ current_maxFailedEvents() [2/2]

int & Gambit::ColliderBit::MCLoopInfo::current_maxFailedEvents ( )

Get/set maximum allowable number of failed events before MC loop is terminated for the current collider.

Definition at line 130 of file MCLoopInfo.cpp.

References _current_maxFailedEvents_it.

130 { return _current_maxFailedEvents_it->second; }
std::map< str, int >::iterator _current_maxFailedEvents_it
Iterator to the current maxFailedEvents.
Definition: MCLoopInfo.hpp:117

◆ report_end_of_event_file()

void Gambit::ColliderBit::MCLoopInfo::report_end_of_event_file ( ) const

Set end_of_event_file = true and decrement event counter by 1.

Definition at line 40 of file MCLoopInfo.cpp.

References _current_event_count_it, and end_of_event_file.

41  {
42  #pragma omp critical
43  {
44  end_of_event_file = true;
45  // Decrement event counter
46  _current_event_count_it->second--;
47  }
48  }
std::map< str, int >::iterator _current_event_count_it
Iterator to the current event count.
Definition: MCLoopInfo.hpp:123
bool end_of_event_file
Maximum allowed number of failed events has been reached and MC loop terminated.
Definition: MCLoopInfo.hpp:40

◆ report_exceeded_maxFailedEvents()

void Gambit::ColliderBit::MCLoopInfo::report_exceeded_maxFailedEvents ( ) const

Set exceeded_maxFailedEvents = true and decrement event counter by 1.

Definition at line 29 of file MCLoopInfo.cpp.

References _current_event_count_it, and exceeded_maxFailedEvents.

Referenced by Gambit::ColliderBit::generateEventPy8Collider().

30  {
31  #pragma omp critical
32  {
34  // Decrement event counter
35  _current_event_count_it->second--;
36  }
37  }
std::map< str, int >::iterator _current_event_count_it
Iterator to the current event count.
Definition: MCLoopInfo.hpp:123
bool exceeded_maxFailedEvents
Maximum allowed number of failed events has been reached.
Definition: MCLoopInfo.hpp:37
Here is the caller graph for this function:

◆ reset_flags()

void Gambit::ColliderBit::MCLoopInfo::reset_flags ( )

Reset flags.

Definition at line 51 of file MCLoopInfo.cpp.

References end_of_event_file, event_generation_began, and exceeded_maxFailedEvents.

Referenced by Gambit::ColliderBit::operateLHCLoop().

52  {
53  end_of_event_file = false;
54  event_generation_began = false;
56  }
bool end_of_event_file
Maximum allowed number of failed events has been reached and MC loop terminated.
Definition: MCLoopInfo.hpp:40
bool exceeded_maxFailedEvents
Maximum allowed number of failed events has been reached.
Definition: MCLoopInfo.hpp:37
bool event_generation_began
Event generation has started.
Definition: MCLoopInfo.hpp:34
Here is the caller graph for this function:

◆ set_current_collider()

void Gambit::ColliderBit::MCLoopInfo::set_current_collider ( str col)

Set the current collider.

Definition at line 59 of file MCLoopInfo.cpp.

References _current_analyses_it, _current_collider, _current_convergence_options_it, _current_detector_analyses_it, _current_event_count_it, _current_invalidate_failed_points_it, _current_maxFailedEvents_it, analyses, convergence_options, detector_analyses, event_count, invalidate_failed_points, LOCAL_INFO, maxFailedEvents, mt, and Gambit::utils_error().

Referenced by Gambit::ColliderBit::operateLHCLoop().

60  {
61  // Save the current collider
62  _current_collider = col;
63 
64  // Save an iterator to the current maxFailedEvents
65  auto it = maxFailedEvents.find(_current_collider);
66  if (it == maxFailedEvents.end())
67  {
68  str msg = "Current collider \"" + _current_collider + "\" not found in MCLoopInfo::maxFailedEvents map.";
69  utils_error().raise(LOCAL_INFO, msg);
70  }
72 
73  // Save an iterator to the number of events generated for the current collider
74  it = event_count.find(_current_collider);
75  if (it == event_count.end())
76  {
77  str msg = "Current collider \"" + _current_collider + "\" not found in MCLoopInfo::event_count map.";
78  utils_error().raise(LOCAL_INFO, msg);
79  }
81 
82  // Save an iterator to the the list of analyses for the current collider
83  auto jt = convergence_options.find(_current_collider);
84  if (jt == convergence_options.end())
85  {
86  str msg = "Current collider \"" + _current_collider + "\" not found in MCLoopInfo::convergence_options map.";
87  utils_error().raise(LOCAL_INFO, msg);
88  }
90 
91  // Save an iterator to the the list of analyses for the current collider
92  auto kt = analyses.find(_current_collider);
93  if (kt == analyses.end())
94  {
95  str msg = "Current collider \"" + _current_collider + "\" not found in MCLoopInfo::analyses map.";
96  utils_error().raise(LOCAL_INFO, msg);
97  }
99 
100  // Save an iterator to the the list of analyses for the current collider, sorted by detector
101  auto lt = detector_analyses.find(_current_collider);
102  if (lt == detector_analyses.end())
103  {
104  str msg = "Current collider \"" + _current_collider + "\" not found in MCLoopInfo::detector_analyses map.";
105  utils_error().raise(LOCAL_INFO, msg);
106  }
108 
109  // Save an iterator to the current invalidate_failed_points
111  if (mt == invalidate_failed_points.end())
112  {
113  str msg = "Current collider \"" + _current_collider + "\" not found in MCLoopInfo::invalidate_failed_points map.";
114  utils_error().raise(LOCAL_INFO, msg);
115  }
117 
118  }
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
EXPORT_SYMBOLS error & utils_error()
Utility errors.
std::map< str, std::vector< str > >::iterator _current_analyses_it
Iterator to the current set of analyses.
Definition: MCLoopInfo.hpp:129
#define LOCAL_INFO
Definition: local_info.hpp:34
const double mt
Definition: topness.h:39
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
std::map< str, int > maxFailedEvents
Maximum allowable number of failed events before MC loop is terminated for each collider.
Definition: MCLoopInfo.hpp:46
std::map< str, bool >::iterator _current_invalidate_failed_points_it
Iterator to the current invalidate_failed_points.
Definition: MCLoopInfo.hpp:120
std::map< str, std::map< str, std::vector< str > > > detector_analyses
Analysis list for each detector of each collider.
Definition: MCLoopInfo.hpp:61
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
std::map< str, int >::iterator _current_maxFailedEvents_it
Iterator to the current maxFailedEvents.
Definition: MCLoopInfo.hpp:117
std::map< str, std::vector< str > > analyses
Analysis list for each collider.
Definition: MCLoopInfo.hpp:58
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _current_analyses_it

std::map<str,std::vector<str> >::iterator Gambit::ColliderBit::MCLoopInfo::_current_analyses_it
private

Iterator to the current set of analyses.

Definition at line 129 of file MCLoopInfo.hpp.

Referenced by current_analyses(), and set_current_collider().

◆ _current_collider

str Gambit::ColliderBit::MCLoopInfo::_current_collider
private

The name of the current collider.

Definition at line 114 of file MCLoopInfo.hpp.

Referenced by current_collider(), and set_current_collider().

◆ _current_convergence_options_it

std::map<str,convergence_settings>::iterator Gambit::ColliderBit::MCLoopInfo::_current_convergence_options_it
private

Iterator to the current set of convergence options.

Definition at line 126 of file MCLoopInfo.hpp.

Referenced by current_convergence_options(), and set_current_collider().

◆ _current_detector_analyses_it

std::map<str,std::map<str,std::vector<str> > >::iterator Gambit::ColliderBit::MCLoopInfo::_current_detector_analyses_it
private

Iterator to the current set of analyses sorted by detector.

Definition at line 132 of file MCLoopInfo.hpp.

Referenced by current_analyses_exist_for(), current_analyses_for(), and set_current_collider().

◆ _current_event_count_it

std::map<str,int>::iterator Gambit::ColliderBit::MCLoopInfo::_current_event_count_it
private

Iterator to the current event count.

Definition at line 123 of file MCLoopInfo.hpp.

Referenced by current_event_count(), report_end_of_event_file(), report_exceeded_maxFailedEvents(), and set_current_collider().

◆ _current_invalidate_failed_points_it

std::map<str,bool>::iterator Gambit::ColliderBit::MCLoopInfo::_current_invalidate_failed_points_it
private

Iterator to the current invalidate_failed_points.

Definition at line 120 of file MCLoopInfo.hpp.

Referenced by current_invalidate_failed_points(), and set_current_collider().

◆ _current_maxFailedEvents_it

std::map<str,int>::iterator Gambit::ColliderBit::MCLoopInfo::_current_maxFailedEvents_it
private

Iterator to the current maxFailedEvents.

Definition at line 117 of file MCLoopInfo.hpp.

Referenced by current_maxFailedEvents(), and set_current_collider().

◆ analyses

std::map<str,std::vector<str> > Gambit::ColliderBit::MCLoopInfo::analyses

◆ collider_names

std::vector<str> Gambit::ColliderBit::MCLoopInfo::collider_names

The names of all colliders.

Definition at line 43 of file MCLoopInfo.hpp.

Referenced by Gambit::ColliderBit::operateLHCLoop().

◆ convergence_options

std::map<str,convergence_settings> Gambit::ColliderBit::MCLoopInfo::convergence_options

Convergence options for each collider.

Definition at line 55 of file MCLoopInfo.hpp.

Referenced by Gambit::ColliderBit::operateLHCLoop(), and set_current_collider().

◆ detector_analyses

std::map<str,std::map<str,std::vector<str> > > Gambit::ColliderBit::MCLoopInfo::detector_analyses

Analysis list for each detector of each collider.

Definition at line 61 of file MCLoopInfo.hpp.

Referenced by Gambit::ColliderBit::operateLHCLoop(), and set_current_collider().

◆ end_of_event_file

bool Gambit::ColliderBit::MCLoopInfo::end_of_event_file
mutable

Maximum allowed number of failed events has been reached and MC loop terminated.

Definition at line 40 of file MCLoopInfo.hpp.

Referenced by Gambit::ColliderBit::operateLHCLoop(), report_end_of_event_file(), and reset_flags().

◆ event_count

std::map<str,int> Gambit::ColliderBit::MCLoopInfo::event_count
mutable

Number of events generated for each collider.

Definition at line 52 of file MCLoopInfo.hpp.

Referenced by Gambit::ColliderBit::operateLHCLoop(), and set_current_collider().

◆ event_generation_began

bool Gambit::ColliderBit::MCLoopInfo::event_generation_began

Event generation has started.

Definition at line 34 of file MCLoopInfo.hpp.

Referenced by Gambit::ColliderBit::operateLHCLoop(), and reset_flags().

◆ exceeded_maxFailedEvents

bool Gambit::ColliderBit::MCLoopInfo::exceeded_maxFailedEvents
mutable

Maximum allowed number of failed events has been reached.

Definition at line 37 of file MCLoopInfo.hpp.

Referenced by Gambit::ColliderBit::operateLHCLoop(), report_exceeded_maxFailedEvents(), and reset_flags().

◆ invalidate_failed_points

std::map<str,bool> Gambit::ColliderBit::MCLoopInfo::invalidate_failed_points

Invalidate points where number of failed events > maxFailedEvents? One bool for each collider.

Definition at line 49 of file MCLoopInfo.hpp.

Referenced by Gambit::ColliderBit::operateLHCLoop(), and set_current_collider().

◆ maxFailedEvents

std::map<str,int> Gambit::ColliderBit::MCLoopInfo::maxFailedEvents

Maximum allowable number of failed events before MC loop is terminated for each collider.

Definition at line 46 of file MCLoopInfo.hpp.

Referenced by Gambit::ColliderBit::operateLHCLoop(), and set_current_collider().


The documentation for this struct was generated from the following files: