|
MARLEY (Model of Argon Reaction Low Energy Yields) v2.0.0
A Monte Carlo event generator for tens-of-MeV neutrino interactions
|
Stores additional information about cross-section. More...
#include <GenCrossSection.h>
Public Member Functions | |
| bool | from_string (const std::string &att) override |
| Implementation of Attribute::from_string. | |
| long | get_accepted_events () const |
| Get the number of accepted events. | |
| long | get_attempted_events () const |
| Get the number of attempted events. | |
| bool | is_valid () const |
| Verify that the instance contains non-zero information. | |
| bool | operator!= (const GenCrossSection &) const |
| Operator !=. | |
| bool | operator== (const GenCrossSection &) const |
| Operator ==. | |
| void | set_accepted_events (const long &n_acc) |
| Set the number of accepted events. | |
| void | set_attempted_events (const long &n_att) |
| Set the number of attempted events. | |
| void | set_cross_section (const std::vector< double > &xs, const std::vector< double > &xs_err, const long &n_acc=-1, const long &n_att=-1) |
| Set all fields. | |
| void | set_xsec (const std::string &wName, const double &xs) |
| Set the cross section corresponding to the weight named wName. | |
| void | set_xsec (const unsigned long &index, const double &xs) |
| Set the cross section corresponding to the weight with index indx. | |
| void | set_xsec_err (const std::string &wName, const double &xs_err) |
| Set the cross section error corresponding to the weight named wName. | |
| void | set_xsec_err (const unsigned long &index, const double &xs_err) |
| Set the cross section error corresponding to the weight with index indx. | |
| bool | to_string (std::string &att) const override |
| Implementation of Attribute::to_string. | |
| double | xsec (const std::string &wName) const |
| Get the cross section corresponding to the weight named wName. | |
| double | xsec (const unsigned long &index=0) const |
| Get the cross section corresponding to the weight with index indx. | |
| double | xsec_err (const std::string &wName) const |
| Get the cross section error corresponding to the weight named wName. | |
| double | xsec_err (const unsigned long &index=0) const |
| Get the cross section error corresponding to the weight with index indx. | |
| const std::vector< double > & | xsec_errs () const |
| Get the cross-section errors. | |
| const std::vector< double > & | xsecs () const |
| Get the cross-sections. | |
Deprecated functionality | |
| void | set_cross_section (const double &xs, const double &xs_err, const long &n_acc=-1, const long &n_att=-1) |
| Set all fields. | |
Public Member Functions inherited from HepMC3::Attribute | |
| Attribute () | |
| Default constructor. | |
| virtual | ~Attribute () |
| Virtual destructor. | |
| const GenEvent * | event () const |
| virtual bool | init () |
| Optionally initialize the attribute after from_string. | |
| virtual bool | init (const GenRunInfo &) |
| Optionally initialize the attribute after from_string. | |
| bool | is_parsed () const |
| Check if this attribute is parsed. | |
| GenParticlePtr | particle () |
| ConstGenParticlePtr | particle () const |
| const std::string & | unparsed_string () const |
| Get unparsed string. | |
| GenVertexPtr | vertex () |
| ConstGenVertexPtr | vertex () const |
Additional Inherited Members | |
Protected Member Functions inherited from HepMC3::Attribute | |
| Attribute (const std::string &st) | |
| Protected constructor that allows to set string. | |
| void | set_is_parsed (bool flag) |
| Set is_parsed flag. | |
| void | set_unparsed_string (const std::string &st) |
| Set unparsed string. | |
Stores additional information about cross-section.
This is an example of event attribute used to store cross-section information
This class is meant to be used to pass, on an event by event basis, the current best guess of the total cross section. It is expected that the final cross section will be stored elsewhere.
In addition, several cross sections and related info can be included in case of runs with mulltiple weights.
The units of cross_section and cross_section_error are expected to be pb.
Definition at line 42 of file GenCrossSection.h.
|
overridevirtual |
Implementation of Attribute::from_string.
Implements HepMC3::Attribute.
|
inline |
Get the number of accepted events.
Definition at line 102 of file GenCrossSection.h.
|
inline |
Get the number of attempted events.
Definition at line 108 of file GenCrossSection.h.
|
inline |
Set the number of accepted events.
Definition at line 90 of file GenCrossSection.h.
|
inline |
Set the number of attempted events.
Definition at line 96 of file GenCrossSection.h.
| void HepMC3::GenCrossSection::set_cross_section | ( | const double & | xs, |
| const double & | xs_err, | ||
| const long & | n_acc = -1, | ||
| const long & | n_att = -1 ) |
Set all fields.
| xs | Cross section |
| xs_err | Uncertainty on cross-section |
| n_acc | Number of accepted events |
| n_att | Number of attempted events |
|
inline |
Set the cross section corresponding to the weight named wName.
Definition at line 115 of file GenCrossSection.h.
References set_xsec().
Referenced by set_xsec().
|
inline |
Set the cross section corresponding to the weight with index indx.
Definition at line 124 of file GenCrossSection.h.
|
inline |
Set the cross section error corresponding to the weight named wName.
Definition at line 132 of file GenCrossSection.h.
References set_xsec_err().
Referenced by set_xsec_err().
|
inline |
Set the cross section error corresponding to the weight with index indx.
Definition at line 141 of file GenCrossSection.h.
|
overridevirtual |
Implementation of Attribute::to_string.
Implements HepMC3::Attribute.
|
inline |
Get the cross section corresponding to the weight named wName.
Definition at line 149 of file GenCrossSection.h.
References xsec().
Referenced by xsec().
|
inline |
Get the cross section corresponding to the weight with index indx.
Definition at line 158 of file GenCrossSection.h.
|
inline |
Get the cross section error corresponding to the weight named wName.
Definition at line 167 of file GenCrossSection.h.
References xsec_err().
Referenced by xsec_err().
|
inline |
Get the cross section error corresponding to the weight with index indx.
Definition at line 176 of file GenCrossSection.h.
|
inline |
Get the cross-section errors.
Definition at line 85 of file GenCrossSection.h.
|
inline |
Get the cross-sections.
Definition at line 81 of file GenCrossSection.h.