6 #ifndef HEPMC3_CROSS_SECTION_H
7 #define HEPMC3_CROSS_SECTION_H
58 bool from_string(
const string &att);
61 bool to_string(
string &att)
const;
64 void set_cross_section(
const double& xs,
const double& xs_err,
const long& n_acc = -1,
const long& n_att = -1);
69 accepted_events=n_acc;
75 attempted_events=n_att;
81 return accepted_events;
87 return attempted_events;
93 void set_xsec(
const string& wName,
const double& xs) {
94 set_xsec(windx(wName), xs);
101 cross_sections[indx] = xs;
108 set_xsec_err(windx(wName), xs_err);
115 cross_section_errors[indx] = xs_err;
121 double xsec(
const string& wName) {
122 return xsec(windx(wName));
128 double xsec(
const int& indx = 0) {
129 return cross_sections[indx];
136 return xsec_err(windx(wName));
143 return cross_section_errors[indx];
148 bool is_valid()
const;
153 int windx(
string wName)
const;
Forward declaration of GenParticle.
long get_attempted_events() const
Get the number of attempted events.
void set_xsec(const string &wName, const double &xs)
Set the cross section corresponding to the weight named wName.
long get_accepted_events() const
Get the number of accepted events.
vector< double > cross_sections
Per-weight cross-section.
void set_xsec_err(const int &indx, const double &xs_err)
Set the cross section error corresponding to the weight with index indx.
void set_attempted_events(const long &n_att)
Set the number of attempted events.
double xsec_err(const int &indx=0)
Get the cross section error corresponding to the weight with index indx.
long attempted_events
The number of events attempted so far.
double xsec(const string &wName)
Get the cross section corresponding to the weight named wName.
vector< double > cross_section_errors
Per-weight errors.
void set_accepted_events(const long &n_acc)
Set the number of accepted events.
void set_xsec_err(const string &wName, const double &xs_err)
Set the cross section error corresponding to the weight named wName.
double xsec(const int &indx=0)
Get the cross section corresponding to the weight with index indx.
Definition of class Attribute, class IntAttribute and class StringAttribute.
long accepted_events
The number of events generated so far.
double xsec_err(const string &wName)
Get the cross section error corresponding to the weight named wName.
Stores additional information about cross-section.
void set_xsec(const int &indx, const double &xs)
Set the cross section corresponding to the weight with index indx.