|
This is the base class of all analysis classes in Rivet.
More...
#include <Analysis.hh>
|
Analysis & | setCrossSection (double xs) |
| Set the cross section from the generator.
|
|
AnalysisHandler & | handler () const |
| Access the controlling AnalysisHandler object.
|
|
const CentralityProjection & | declareCentrality (const SingleValueProjection &proj, string calAnaName, string calHistName, const string projName, bool increasing=false) |
| Book a CentralityProjection. More...
|
|
template<class T > |
Percentile< T > | bookPercentile (string projName, vector< pair< float, float > > centralityBins, vector< tuple< int, int, int > > ref) |
| Book a Pecentile wrapper around AnalysisObjects. More...
|
|
template<class T > |
PercentileXaxis< T > | bookPercentileXaxis (string projName, tuple< int, int, int > ref) |
| Book Pecentile wrappers around AnalysisObjects. More...
|
|
const vector< AnalysisObjectPtr > & | analysisObjects () const |
| List of registered analysis data objects.
|
|
|
| Analysis (const std::string &name) |
| Constructor.
|
|
virtual | ~Analysis () |
| The destructor.
|
|
|
virtual void | init () |
|
virtual void | analyze (const Event &event)=0 |
|
virtual void | finalize () |
|
|
Metadata is used for querying from the command line and also for building web pages and the analysis pages in the Rivet manual.
|
const AnalysisInfo & | info () const |
| Get the actual AnalysisInfo object in which all this metadata is stored.
|
|
virtual std::string | name () const |
| Get the name of the analysis. More...
|
|
virtual std::string | getRefDataName () const |
|
virtual void | setRefDataName (const std::string &ref_data="") |
|
virtual std::string | inspireId () const |
| Get the Inspire ID code for this analysis.
|
|
virtual std::string | spiresId () const |
| Get the SPIRES ID code for this analysis (~deprecated).
|
|
virtual std::vector< std::string > | authors () const |
| Names & emails of paper/analysis authors. More...
|
|
virtual std::string | summary () const |
| Get a short description of the analysis. More...
|
|
virtual std::string | description () const |
| Get a full description of the analysis. More...
|
|
virtual std::string | runInfo () const |
| Information about the events needed as input for this analysis. More...
|
|
virtual std::string | experiment () const |
| Experiment which performed and published this analysis.
|
|
virtual std::string | collider () const |
| Collider on which the experiment ran.
|
|
virtual std::string | year () const |
| When the original experimental analysis was published.
|
|
virtual std::string | luminosityfb () const |
| The luminosity in inverse femtobarn.
|
|
virtual std::vector< std::string > | references () const |
| Journal, and preprint references.
|
|
virtual std::string | bibKey () const |
| BibTeX citation key for this article.
|
|
virtual std::string | bibTeX () const |
| BibTeX citation entry for this article.
|
|
virtual std::string | status () const |
| Whether this analysis is trusted (in any way!)
|
|
virtual std::vector< std::string > | todos () const |
| Any work to be done on this analysis.
|
|
virtual const std::vector< PdgIdPair > & | requiredBeams () const |
| Return the allowed pairs of incoming beams required by this analysis.
|
|
virtual Analysis & | setRequiredBeams (const std::vector< PdgIdPair > &requiredBeams) |
| Declare the allowed pairs of incoming beams required by this analysis.
|
|
virtual const std::vector< std::pair< double, double > > & | requiredEnergies () const |
| Sets of valid beam energy pairs, in GeV.
|
|
virtual const std::vector< std::string > & | keywords () const |
| Get vector of analysis keywords.
|
|
virtual Analysis & | setRequiredEnergies (const std::vector< std::pair< double, double > > &requiredEnergies) |
| Declare the list of valid beam energy pairs, in GeV.
|
|
bool | needsCrossSection () const |
|
Analysis & | setNeedsCrossSection (bool needed=true) |
|
|
AnalysisInfo & | info () |
| Get the actual AnalysisInfo object in which all this metadata is stored (non-const).
|
|
|
const ParticlePair & | beams () const |
| Incoming beams for this run.
|
|
const PdgIdPair | beamIds () const |
| Incoming beam IDs for this run.
|
|
double | sqrtS () const |
| Centre of mass energy for this run.
|
|
bool | merging () const |
| Check if we are running rivet-merge.
|
|
|
- Todo:
Replace with beamsCompatible() with no args (calling beams() function internally)
Add beamsMatch() methods with same (shared-code?) tolerance as in beamsCompatible()
|
bool | isCompatible (const ParticlePair &beams) const |
| Check if analysis is compatible with the provided beam particle IDs and energies.
|
|
bool | isCompatible (PdgId beam1, PdgId beam2, double e1, double e2) const |
| Check if analysis is compatible with the provided beam particle IDs and energies.
|
|
bool | isCompatible (const PdgIdPair &beams, const std::pair< double, double > &energies) const |
| Check if analysis is compatible with the provided beam particle IDs and energies.
|
|
|
std::string | getOption (std::string optname) |
| Get an option for this analysis instance as a string.
|
|
template<typename T > |
T | getOption (std::string optname, T def) |
|
|
- Todo:
- Should really be protected: only public to keep BinnedHistogram happy for now...
|
void | scale (CounterPtr cnt, double factor) |
| Multiplicatively scale the given counter, cnt, by factor factor.
|
|
void | scale (const std::vector< CounterPtr > &cnts, double factor) |
|
template<std::size_t array_size> |
void | scale (const CounterPtr(&cnts)[array_size], double factor) |
|
void | normalize (Histo1DPtr histo, double norm=1.0, bool includeoverflows=true) |
| Normalize the given histogram, histo, to area = norm.
|
|
void | normalize (const std::vector< Histo1DPtr > &histos, double norm=1.0, bool includeoverflows=true) |
|
template<std::size_t array_size> |
void | normalize (const Histo1DPtr(&histos)[array_size], double norm=1.0, bool includeoverflows=true) |
|
void | scale (Histo1DPtr histo, double factor) |
| Multiplicatively scale the given histogram, histo, by factor factor.
|
|
void | scale (const std::vector< Histo1DPtr > &histos, double factor) |
|
template<std::size_t array_size> |
void | scale (const Histo1DPtr(&histos)[array_size], double factor) |
|
void | normalize (Histo2DPtr histo, double norm=1.0, bool includeoverflows=true) |
| Normalize the given histogram, histo, to area = norm.
|
|
void | normalize (const std::vector< Histo2DPtr > &histos, double norm=1.0, bool includeoverflows=true) |
|
template<std::size_t array_size> |
void | normalize (const Histo2DPtr(&histos)[array_size], double norm=1.0, bool includeoverflows=true) |
|
void | scale (Histo2DPtr histo, double factor) |
| Multiplicatively scale the given histogram, histo, by factor factor.
|
|
void | scale (const std::vector< Histo2DPtr > &histos, double factor) |
|
template<std::size_t array_size> |
void | scale (const Histo2DPtr(&histos)[array_size], double factor) |
|
void | divide (CounterPtr c1, CounterPtr c2, Scatter1DPtr s) const |
|
void | divide (const YODA::Counter &c1, const YODA::Counter &c2, Scatter1DPtr s) const |
|
void | divide (Histo1DPtr h1, Histo1DPtr h2, Scatter2DPtr s) const |
|
void | divide (const YODA::Histo1D &h1, const YODA::Histo1D &h2, Scatter2DPtr s) const |
|
void | divide (Profile1DPtr p1, Profile1DPtr p2, Scatter2DPtr s) const |
|
void | divide (const YODA::Profile1D &p1, const YODA::Profile1D &p2, Scatter2DPtr s) const |
|
void | divide (Histo2DPtr h1, Histo2DPtr h2, Scatter3DPtr s) const |
|
void | divide (const YODA::Histo2D &h1, const YODA::Histo2D &h2, Scatter3DPtr s) const |
|
void | divide (Profile2DPtr p1, Profile2DPtr p2, Scatter3DPtr s) const |
|
void | divide (const YODA::Profile2D &p1, const YODA::Profile2D &p2, Scatter3DPtr s) const |
|
void | efficiency (Histo1DPtr h1, Histo1DPtr h2, Scatter2DPtr s) const |
|
void | efficiency (const YODA::Histo1D &h1, const YODA::Histo1D &h2, Scatter2DPtr s) const |
|
void | asymm (Histo1DPtr h1, Histo1DPtr h2, Scatter2DPtr s) const |
|
void | asymm (const YODA::Histo1D &h1, const YODA::Histo1D &h2, Scatter2DPtr s) const |
|
void | integrate (Histo1DPtr h, Scatter2DPtr s) const |
|
void | integrate (const Histo1D &h, Scatter2DPtr s) const |
|
| ProjectionApplier () |
| Constructor.
|
|
void | markAsOwned () const |
| Mark this object as owned by a proj-handler.
|
|
std::set< ConstProjectionPtr > | getProjections () const |
| Get the contained projections, including recursion.
|
|
bool | hasProjection (const std::string &name) const |
| Does this applier have a projection registered under the name name?
|
|
template<typename PROJ > |
const PROJ & | getProjection (const std::string &name) const |
|
template<typename PROJ > |
const PROJ & | get (const std::string &name) const |
|
const Projection & | getProjection (const std::string &name) const |
|
template<typename PROJ > |
const PROJ & | applyProjection (const Event &evt, const Projection &proj) const |
| Apply the supplied projection on event evt. More...
|
|
template<typename PROJ > |
const PROJ & | apply (const Event &evt, const Projection &proj) const |
|
template<typename PROJ > |
const PROJ & | applyProjection (const Event &evt, const PROJ &proj) const |
| Apply the supplied projection on event evt. More...
|
|
template<typename PROJ > |
const PROJ & | apply (const Event &evt, const PROJ &proj) const |
|
template<typename PROJ > |
const PROJ & | applyProjection (const Event &evt, const std::string &name) const |
|
template<typename PROJ > |
const PROJ & | apply (const Event &evt, const std::string &name) const |
|
template<typename PROJ > |
const PROJ & | apply (const std::string &name, const Event &evt) const |
|
|
Log & | getLog () const |
| Get a Log object based on the name() property of the calling analysis object.
|
|
double | crossSection () const |
| Get the process cross-section in pb. Throws if this hasn't been set.
|
|
double | crossSectionPerEvent () const |
|
size_t | numEvents () const |
| Get the number of events seen (via the analysis handler). More...
|
|
double | sumW () const |
| Get the sum of event weights seen (via the analysis handler). More...
|
|
double | sumOfWeights () const |
| Alias.
|
|
double | sumW2 () const |
| Get the sum of squared event weights seen (via the analysis handler). More...
|
|
|
const std::string | histoDir () const |
| Get the canonical histogram "directory" path for this analysis. More...
|
|
const std::string | histoPath (const std::string &hname) const |
| Get the canonical histogram path for the named histogram in this analysis.
|
|
const std::string | histoPath (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) const |
| Get the canonical histogram path for the numbered histogram in this analysis.
|
|
const std::string | mkAxisCode (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) const |
| Get the internal histogram name for given d, x and y (cf. HepData)
|
|
const std::string | makeAxisCode (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) const |
|
|
template<typename T = YODA::Scatter2D> |
const T & | refData (const string &hname) const |
|
template<typename T = YODA::Scatter2D> |
const T & | refData (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) const |
|
|
CounterPtr | bookCounter (const std::string &name, const std::string &title="") |
| Book a counter.
|
|
CounterPtr | bookCounter (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId, const std::string &title="") |
|
|
Histo1DPtr | bookHisto1D (const std::string &name, size_t nbins, double lower, double upper, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="") |
| Book a 1D histogram with nbins uniformly distributed across the range lower - upper .
|
|
Histo1DPtr | bookHisto1D (const std::string &name, const std::vector< double > &binedges, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="") |
| Book a 1D histogram with non-uniform bins defined by the vector of bin edges binedges .
|
|
Histo1DPtr | bookHisto1D (const std::string &name, const std::initializer_list< double > &binedges, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="") |
| Book a 1D histogram with non-uniform bins defined by the vector of bin edges binedges .
|
|
Histo1DPtr | bookHisto1D (const std::string &name, const Scatter2D &refscatter, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="") |
| Book a 1D histogram with binning from a reference scatter.
|
|
Histo1DPtr | bookHisto1D (const std::string &name, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="") |
| Book a 1D histogram, using the binnings in the reference data histogram.
|
|
Histo1DPtr | bookHisto1D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="") |
|
|
Histo2DPtr | bookHisto2D (const std::string &name, size_t nxbins, double xlower, double xupper, size_t nybins, double ylower, double yupper, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="", const std::string &ztitle="") |
|
Histo2DPtr | bookHisto2D (const std::string &name, const std::vector< double > &xbinedges, const std::vector< double > &ybinedges, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="", const std::string &ztitle="") |
|
Histo2DPtr | bookHisto2D (const std::string &name, const std::initializer_list< double > &xbinedges, const std::initializer_list< double > &ybinedges, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="", const std::string &ztitle="") |
|
Histo2DPtr | bookHisto2D (const std::string &name, const Scatter3D &refscatter, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="", const std::string &ztitle="") |
| Book a 2D histogram with binning from a reference scatter.
|
|
Histo2DPtr | bookHisto2D (const std::string &name, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="", const std::string &ztitle="") |
| Book a 2D histogram, using the binnings in the reference data histogram.
|
|
Histo2DPtr | bookHisto2D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="", const std::string &ztitle="") |
|
|
Profile1DPtr | bookProfile1D (const std::string &name, size_t nbins, double lower, double upper, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="") |
| Book a 1D profile histogram with nbins uniformly distributed across the range lower - upper .
|
|
Profile1DPtr | bookProfile1D (const std::string &name, const std::vector< double > &binedges, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="") |
| Book a 1D profile histogram with non-uniform bins defined by the vector of bin edges binedges .
|
|
Profile1DPtr | bookProfile1D (const std::string &name, const std::initializer_list< double > &binedges, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="") |
| Book a 1D profile histogram with non-uniform bins defined by the vector of bin edges binedges .
|
|
Profile1DPtr | bookProfile1D (const std::string &name, const Scatter2D &refscatter, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="") |
| Book a 1D profile histogram with binning from a reference scatter.
|
|
Profile1DPtr | bookProfile1D (const std::string &name, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="") |
| Book a 1D profile histogram, using the binnings in the reference data histogram.
|
|
Profile1DPtr | bookProfile1D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="") |
|
|
Profile2DPtr | bookProfile2D (const std::string &name, size_t nxbins, double xlower, double xupper, size_t nybins, double ylower, double yupper, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="", const std::string &ztitle="") |
|
Profile2DPtr | bookProfile2D (const std::string &name, const std::vector< double > &xbinedges, const std::vector< double > &ybinedges, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="", const std::string &ztitle="") |
|
Profile2DPtr | bookProfile2D (const std::string &name, const std::initializer_list< double > &xbinedges, const std::initializer_list< double > &ybinedges, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="", const std::string &ztitle="") |
|
Profile2DPtr | bookProfile2D (const std::string &name, const Scatter3D &refscatter, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="", const std::string &ztitle="") |
| Book a 2D profile histogram with binning from a reference scatter.
|
|
Profile2DPtr | bookProfile2D (const std::string &name, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="", const std::string &ztitle="") |
| Book a 2D profile histogram, using the binnings in the reference data histogram.
|
|
Profile2DPtr | bookProfile2D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="", const std::string &ztitle="") |
|
|
Scatter2DPtr | bookScatter2D (const std::string &name, bool copy_pts=false, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="") |
| Book a 2-dimensional data point set with the given name. More...
|
|
Scatter2DPtr | bookScatter2D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId, bool copy_pts=false, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="") |
| Book a 2-dimensional data point set, using the binnings in the reference data histogram. More...
|
|
Scatter2DPtr | bookScatter2D (const std::string &name, size_t npts, double lower, double upper, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="") |
| Book a 2-dimensional data point set with equally spaced x-points in a range. More...
|
|
Scatter2DPtr | bookScatter2D (const std::string &hname, const std::vector< double > &binedges, const std::string &title, const std::string &xtitle, const std::string &ytitle) |
| Book a 2-dimensional data point set based on provided contiguous "bin edges". More...
|
|
Scatter2DPtr | bookScatter2D (const Scatter2DPtr scPtr, const std::string &path, const std::string &title="", const std::string &xtitle="", const std::string &ytitle="") |
| Book a 2-dimensional data point set with x-points from an existing scatter and a new path.
|
|
|
void | addAnalysisObject (AnalysisObjectPtr ao) |
| Register a data object in the histogram system. More...
|
|
template<typename AO = YODA::AnalysisObject> |
std::shared_ptr< AO > | addOrGetCompatAO (std::shared_ptr< AO > aonew) |
|
template<typename AO = YODA::AnalysisObject> |
const std::shared_ptr< AO > | getAnalysisObject (const std::string &name) const |
| Get a data object from the histogram system.
|
|
template<typename AO = YODA::AnalysisObject> |
std::shared_ptr< AO > | getAnalysisObject (const std::string &name) |
| Get a data object from the histogram system (non-const)
|
|
void | removeAnalysisObject (const std::string &path) |
| Unregister a data object from the histogram system (by name)
|
|
void | removeAnalysisObject (AnalysisObjectPtr ao) |
| Unregister a data object from the histogram system (by pointer)
|
|
vector< AnalysisObjectPtr > | getAllData (bool includeorphans) const |
| Get all data object from the AnalysisHandler.
|
|
template<typename AO = YODA::AnalysisObject> |
std::shared_ptr< AO > | getAnalysisObject (const std::string &ananame, const std::string &name) |
|
const Histo1DPtr | getHisto1D (const std::string &name) const |
| Get a named Histo1D object from the histogram system.
|
|
Histo1DPtr | getHisto1D (const std::string &name) |
| Get a named Histo1D object from the histogram system (non-const)
|
|
const Histo1DPtr | getHisto1D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) const |
| Get a Histo1D object from the histogram system by axis ID codes (non-const)
|
|
Histo1DPtr | getHisto1D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) |
| Get a Histo1D object from the histogram system by axis ID codes (non-const)
|
|
const Histo2DPtr | getHisto2D (const std::string &name) const |
| Get a named Histo2D object from the histogram system.
|
|
Histo2DPtr | getHisto2D (const std::string &name) |
| Get a named Histo2D object from the histogram system (non-const)
|
|
const Histo2DPtr | getHisto2D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) const |
| Get a Histo2D object from the histogram system by axis ID codes (non-const)
|
|
Histo2DPtr | getHisto2D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) |
| Get a Histo2D object from the histogram system by axis ID codes (non-const)
|
|
const Profile1DPtr | getProfile1D (const std::string &name) const |
| Get a named Profile1D object from the histogram system.
|
|
Profile1DPtr | getProfile1D (const std::string &name) |
| Get a named Profile1D object from the histogram system (non-const)
|
|
const Profile1DPtr | getProfile1D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) const |
| Get a Profile1D object from the histogram system by axis ID codes (non-const)
|
|
Profile1DPtr | getProfile1D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) |
| Get a Profile1D object from the histogram system by axis ID codes (non-const)
|
|
const Profile2DPtr | getProfile2D (const std::string &name) const |
| Get a named Profile2D object from the histogram system.
|
|
Profile2DPtr | getProfile2D (const std::string &name) |
| Get a named Profile2D object from the histogram system (non-const)
|
|
const Profile2DPtr | getProfile2D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) const |
| Get a Profile2D object from the histogram system by axis ID codes (non-const)
|
|
Profile2DPtr | getProfile2D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) |
| Get a Profile2D object from the histogram system by axis ID codes (non-const)
|
|
const Scatter2DPtr | getScatter2D (const std::string &name) const |
| Get a named Scatter2D object from the histogram system.
|
|
Scatter2DPtr | getScatter2D (const std::string &name) |
| Get a named Scatter2D object from the histogram system (non-const)
|
|
const Scatter2DPtr | getScatter2D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) const |
| Get a Scatter2D object from the histogram system by axis ID codes (non-const)
|
|
Scatter2DPtr | getScatter2D (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) |
| Get a Scatter2D object from the histogram system by axis ID codes (non-const)
|
|
Log & | getLog () const |
|
ProjectionHandler & | getProjHandler () const |
| Get a reference to the ProjectionHandler for this thread.
|
|
template<typename PROJ > |
const PROJ & | declareProjection (const PROJ &proj, const std::string &name) |
| Register a contained projection. More...
|
|
template<typename PROJ > |
const PROJ & | declare (const PROJ &proj, const std::string &name) |
| Register a contained projection (user-facing version) More...
|
|
template<typename PROJ > |
const PROJ & | declare (const std::string &name, const PROJ &proj) |
| Register a contained projection (user-facing, arg-reordered version) More...
|
|
template<typename PROJ > |
const PROJ & | addProjection (const PROJ &proj, const std::string &name) |
| Register a contained projection (user-facing version) More...
|
|
This is the base class of all analysis classes in Rivet.
There are three virtual functions which should be implemented in base classes:
void init() is called by Rivet before a run is started. Here the analysis class should book necessary histograms. The needed projections should probably rather be constructed in the constructor.
void analyze(const Event&) is called once for each event. Here the analysis class should apply the necessary Projections and fill the histograms.
void finalize() is called after a run is finished. Here the analysis class should do whatever manipulations are necessary on the histograms. Writing the histograms to a file is, however, done by the Rivet class.
◆ addAnalysisObject()
void Rivet::Analysis::addAnalysisObject |
( |
AnalysisObjectPtr |
ao | ) |
|
|
protected |
◆ addOrGetCompatAO()
template<typename AO = YODA::AnalysisObject>
std::shared_ptr<AO> Rivet::Analysis::addOrGetCompatAO |
( |
std::shared_ptr< AO > |
aonew | ) |
|
|
inlineprotected |
Register a data object in the system and return its pointer, or, if an object of the same path is already there, check if it is compatible (eg. same type and same binning) and return that object instead. Emits a warning if an incompatible object with the same name is found and replcaces that with the given data object.
References addAnalysisObject(), analysisObjects(), Rivet::bookingCompatible(), and name().
Referenced by bookCounter(), bookHisto1D(), bookHisto2D(), bookPercentile(), bookPercentileXaxis(), bookProfile1D(), bookProfile2D(), and bookScatter2D().
◆ analyze()
virtual void Rivet::Analysis::analyze |
( |
const Event & |
event | ) |
|
|
pure virtual |
◆ asymm() [1/2]
void Rivet::Analysis::asymm |
( |
Histo1DPtr |
h1, |
|
|
Histo1DPtr |
h2, |
|
|
Scatter2DPtr |
s |
|
) |
| const |
Helper for histogram asymmetry calculation.
- Note
- Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
Referenced by scale().
◆ asymm() [2/2]
void Rivet::Analysis::asymm |
( |
const YODA::Histo1D & |
h1, |
|
|
const YODA::Histo1D & |
h2, |
|
|
Scatter2DPtr |
s |
|
) |
| const |
Helper for histogram asymmetry calculation.
- Note
- Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
◆ authors()
virtual std::vector<std::string> Rivet::Analysis::authors |
( |
| ) |
const |
|
inlinevirtual |
Names & emails of paper/analysis authors.
Names and email of authors in 'NAME <EMAIL>' format. The first name in the list should be the primary contact person.
References Rivet::AnalysisInfo::authors(), and info().
◆ bookCounter()
CounterPtr Rivet::Analysis::bookCounter |
( |
unsigned int |
datasetId, |
|
|
unsigned int |
xAxisId, |
|
|
unsigned int |
yAxisId, |
|
|
const std::string & |
title = "" |
|
) |
| |
|
protected |
Book a counter, using a path generated from the dataset and axis ID codes
The paper, dataset and x/y-axis IDs will be used to build the histo name in the HepData standard way.
References bookCounter(), and mkAxisCode().
◆ bookHisto1D()
Histo1DPtr Rivet::Analysis::bookHisto1D |
( |
unsigned int |
datasetId, |
|
|
unsigned int |
xAxisId, |
|
|
unsigned int |
yAxisId, |
|
|
const std::string & |
title = "" , |
|
|
const std::string & |
xtitle = "" , |
|
|
const std::string & |
ytitle = "" |
|
) |
| |
|
protected |
Book a 1D histogram, using the binnings in the reference data histogram.
The paper, dataset and x/y-axis IDs will be used to build the histo name in the HepData standard way.
References bookHisto1D(), and mkAxisCode().
◆ bookHisto2D() [1/4]
Histo2DPtr Rivet::Analysis::bookHisto2D |
( |
const std::string & |
name, |
|
|
size_t |
nxbins, |
|
|
double |
xlower, |
|
|
double |
xupper, |
|
|
size_t |
nybins, |
|
|
double |
ylower, |
|
|
double |
yupper, |
|
|
const std::string & |
title = "" , |
|
|
const std::string & |
xtitle = "" , |
|
|
const std::string & |
ytitle = "" , |
|
|
const std::string & |
ztitle = "" |
|
) |
| |
|
protected |
Book a 2D histogram with nxbins and nybins uniformly distributed across the ranges xlower - xupper and ylower - yupper respectively along the x- and y-axis.
- Todo:
- Add booking methods which take a path, titles and a reference Scatter from which to book
References addOrGetCompatAO(), and histoPath().
Referenced by bookHisto2D(), and refData().
◆ bookHisto2D() [2/4]
Histo2DPtr Rivet::Analysis::bookHisto2D |
( |
const std::string & |
name, |
|
|
const std::vector< double > & |
xbinedges, |
|
|
const std::vector< double > & |
ybinedges, |
|
|
const std::string & |
title = "" , |
|
|
const std::string & |
xtitle = "" , |
|
|
const std::string & |
ytitle = "" , |
|
|
const std::string & |
ztitle = "" |
|
) |
| |
|
protected |
◆ bookHisto2D() [3/4]
Histo2DPtr Rivet::Analysis::bookHisto2D |
( |
const std::string & |
name, |
|
|
const std::initializer_list< double > & |
xbinedges, |
|
|
const std::initializer_list< double > & |
ybinedges, |
|
|
const std::string & |
title = "" , |
|
|
const std::string & |
xtitle = "" , |
|
|
const std::string & |
ytitle = "" , |
|
|
const std::string & |
ztitle = "" |
|
) |
| |
|
protected |
Book a 2D histogram with non-uniform bins defined by the vectors of bin edges xbinedges and ybinedges.
◆ bookHisto2D() [4/4]
Histo2DPtr Rivet::Analysis::bookHisto2D |
( |
unsigned int |
datasetId, |
|
|
unsigned int |
xAxisId, |
|
|
unsigned int |
yAxisId, |
|
|
const std::string & |
title = "" , |
|
|
const std::string & |
xtitle = "" , |
|
|
const std::string & |
ytitle = "" , |
|
|
const std::string & |
ztitle = "" |
|
) |
| |
|
protected |
Book a 2D histogram, using the binnings in the reference data histogram.
The paper, dataset and x/y-axis IDs will be used to build the histo name in the HepData standard way.
References bookHisto2D(), and mkAxisCode().
◆ bookPercentile()
template<class T >
Percentile<T> Rivet::Analysis::bookPercentile |
( |
string |
projName, |
|
|
vector< pair< float, float > > |
centralityBins, |
|
|
vector< tuple< int, int, int > > |
ref |
|
) |
| |
|
inline |
◆ bookPercentileXaxis()
template<class T >
PercentileXaxis<T> Rivet::Analysis::bookPercentileXaxis |
( |
string |
projName, |
|
|
tuple< int, int, int > |
ref |
|
) |
| |
|
inline |
◆ bookProfile1D()
Profile1DPtr Rivet::Analysis::bookProfile1D |
( |
unsigned int |
datasetId, |
|
|
unsigned int |
xAxisId, |
|
|
unsigned int |
yAxisId, |
|
|
const std::string & |
title = "" , |
|
|
const std::string & |
xtitle = "" , |
|
|
const std::string & |
ytitle = "" |
|
) |
| |
|
protected |
Book a 1D profile histogram, using the binnings in the reference data histogram.
The paper, dataset and x/y-axis IDs will be used to build the histo name in the HepData standard way.
References bookProfile1D(), and mkAxisCode().
◆ bookProfile2D() [1/4]
Profile2DPtr Rivet::Analysis::bookProfile2D |
( |
const std::string & |
name, |
|
|
size_t |
nxbins, |
|
|
double |
xlower, |
|
|
double |
xupper, |
|
|
size_t |
nybins, |
|
|
double |
ylower, |
|
|
double |
yupper, |
|
|
const std::string & |
title = "" , |
|
|
const std::string & |
xtitle = "" , |
|
|
const std::string & |
ytitle = "" , |
|
|
const std::string & |
ztitle = "" |
|
) |
| |
|
protected |
◆ bookProfile2D() [2/4]
Profile2DPtr Rivet::Analysis::bookProfile2D |
( |
const std::string & |
name, |
|
|
const std::vector< double > & |
xbinedges, |
|
|
const std::vector< double > & |
ybinedges, |
|
|
const std::string & |
title = "" , |
|
|
const std::string & |
xtitle = "" , |
|
|
const std::string & |
ytitle = "" , |
|
|
const std::string & |
ztitle = "" |
|
) |
| |
|
protected |
◆ bookProfile2D() [3/4]
Profile2DPtr Rivet::Analysis::bookProfile2D |
( |
const std::string & |
name, |
|
|
const std::initializer_list< double > & |
xbinedges, |
|
|
const std::initializer_list< double > & |
ybinedges, |
|
|
const std::string & |
title = "" , |
|
|
const std::string & |
xtitle = "" , |
|
|
const std::string & |
ytitle = "" , |
|
|
const std::string & |
ztitle = "" |
|
) |
| |
|
protected |
Book a 2D profile histogram with non-uniform bins defined by the vectorx of bin edges xbinedges and ybinedges.
◆ bookProfile2D() [4/4]
Profile2DPtr Rivet::Analysis::bookProfile2D |
( |
unsigned int |
datasetId, |
|
|
unsigned int |
xAxisId, |
|
|
unsigned int |
yAxisId, |
|
|
const std::string & |
title = "" , |
|
|
const std::string & |
xtitle = "" , |
|
|
const std::string & |
ytitle = "" , |
|
|
const std::string & |
ztitle = "" |
|
) |
| |
|
protected |
Book a 2D profile histogram, using the binnings in the reference data histogram.
The paper, dataset and x/y-axis IDs will be used to build the histo name in the HepData standard way.
References bookProfile2D(), and mkAxisCode().
◆ bookScatter2D() [1/4]
Scatter2DPtr Rivet::Analysis::bookScatter2D |
( |
const std::string & |
name, |
|
|
bool |
copy_pts = false , |
|
|
const std::string & |
title = "" , |
|
|
const std::string & |
xtitle = "" , |
|
|
const std::string & |
ytitle = "" |
|
) |
| |
|
protected |
Book a 2-dimensional data point set with the given name.
- Note
- Unlike histogram booking, scatter booking by default makes no attempt to use reference data to pre-fill the data object. If you want this, which is sometimes useful e.g. when the x-position is not really meaningful and can't be extracted from the data, then set the copy_pts parameter to true. This creates points to match the reference data's x values and errors, but with the y values and errors zeroed... assuming that there is a reference histo with the same name: if there isn't, an exception will be thrown.
References addOrGetCompatAO(), histoPath(), and refData().
Referenced by bookScatter2D(), Rivet::MC_JetAnalysis::finalize(), Rivet::MC_ParticleAnalysis::finalize(), Rivet::MC_JetSplittings::init(), Rivet::MC_ParticleAnalysis::init(), Rivet::MC_JetAnalysis::init(), and refData().
◆ bookScatter2D() [2/4]
Scatter2DPtr Rivet::Analysis::bookScatter2D |
( |
unsigned int |
datasetId, |
|
|
unsigned int |
xAxisId, |
|
|
unsigned int |
yAxisId, |
|
|
bool |
copy_pts = false , |
|
|
const std::string & |
title = "" , |
|
|
const std::string & |
xtitle = "" , |
|
|
const std::string & |
ytitle = "" |
|
) |
| |
|
protected |
Book a 2-dimensional data point set, using the binnings in the reference data histogram.
The paper, dataset and x/y-axis IDs will be used to build the histo name in the HepData standard way.
- Note
- Unlike histogram booking, scatter booking by default makes no attempt to use reference data to pre-fill the data object. If you want this, which is sometimes useful e.g. when the x-position is not really meaningful and can't be extracted from the data, then set the copy_pts parameter to true. This creates points to match the reference data's x values and errors, but with the y values and errors zeroed.
References bookScatter2D(), and mkAxisCode().
◆ bookScatter2D() [3/4]
Scatter2DPtr Rivet::Analysis::bookScatter2D |
( |
const std::string & |
name, |
|
|
size_t |
npts, |
|
|
double |
lower, |
|
|
double |
upper, |
|
|
const std::string & |
title = "" , |
|
|
const std::string & |
xtitle = "" , |
|
|
const std::string & |
ytitle = "" |
|
) |
| |
|
protected |
Book a 2-dimensional data point set with equally spaced x-points in a range.
The y values and errors will be set to 0.
References addOrGetCompatAO(), and histoPath().
◆ bookScatter2D() [4/4]
Scatter2DPtr Rivet::Analysis::bookScatter2D |
( |
const std::string & |
hname, |
|
|
const std::vector< double > & |
binedges, |
|
|
const std::string & |
title, |
|
|
const std::string & |
xtitle, |
|
|
const std::string & |
ytitle |
|
) |
| |
|
protected |
Book a 2-dimensional data point set based on provided contiguous "bin edges".
The y values and errors will be set to 0.
References addOrGetCompatAO(), and histoPath().
◆ crossSectionPerEvent()
double Rivet::Analysis::crossSectionPerEvent |
( |
| ) |
const |
|
protected |
◆ declareCentrality()
◆ description()
virtual std::string Rivet::Analysis::description |
( |
| ) |
const |
|
inlinevirtual |
◆ divide() [1/10]
void Rivet::Analysis::divide |
( |
CounterPtr |
c1, |
|
|
CounterPtr |
c2, |
|
|
Scatter1DPtr |
s |
|
) |
| const |
◆ divide() [2/10]
void Rivet::Analysis::divide |
( |
const YODA::Counter & |
c1, |
|
|
const YODA::Counter & |
c2, |
|
|
Scatter1DPtr |
s |
|
) |
| const |
Helper for histogram division with raw YODA objects.
- Note
- Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
◆ divide() [3/10]
void Rivet::Analysis::divide |
( |
Histo1DPtr |
h1, |
|
|
Histo1DPtr |
h2, |
|
|
Scatter2DPtr |
s |
|
) |
| const |
Helper for histogram division.
- Note
- Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
References divide().
◆ divide() [4/10]
void Rivet::Analysis::divide |
( |
const YODA::Histo1D & |
h1, |
|
|
const YODA::Histo1D & |
h2, |
|
|
Scatter2DPtr |
s |
|
) |
| const |
Helper for histogram division with raw YODA objects.
- Note
- Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
◆ divide() [5/10]
void Rivet::Analysis::divide |
( |
Profile1DPtr |
p1, |
|
|
Profile1DPtr |
p2, |
|
|
Scatter2DPtr |
s |
|
) |
| const |
Helper for profile histogram division.
- Note
- Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
References divide().
◆ divide() [6/10]
void Rivet::Analysis::divide |
( |
const YODA::Profile1D & |
p1, |
|
|
const YODA::Profile1D & |
p2, |
|
|
Scatter2DPtr |
s |
|
) |
| const |
Helper for profile histogram division with raw YODA objects.
- Note
- Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
◆ divide() [7/10]
void Rivet::Analysis::divide |
( |
Histo2DPtr |
h1, |
|
|
Histo2DPtr |
h2, |
|
|
Scatter3DPtr |
s |
|
) |
| const |
Helper for 2D histogram division.
- Note
- Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
References divide().
◆ divide() [8/10]
void Rivet::Analysis::divide |
( |
const YODA::Histo2D & |
h1, |
|
|
const YODA::Histo2D & |
h2, |
|
|
Scatter3DPtr |
s |
|
) |
| const |
Helper for 2D histogram division with raw YODA objects.
- Note
- Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
◆ divide() [9/10]
void Rivet::Analysis::divide |
( |
Profile2DPtr |
p1, |
|
|
Profile2DPtr |
p2, |
|
|
Scatter3DPtr |
s |
|
) |
| const |
Helper for 2D profile histogram division.
- Note
- Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
References divide().
◆ divide() [10/10]
void Rivet::Analysis::divide |
( |
const YODA::Profile2D & |
p1, |
|
|
const YODA::Profile2D & |
p2, |
|
|
Scatter3DPtr |
s |
|
) |
| const |
Helper for 2D profile histogram division with raw YODA objects
- Note
- Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
◆ efficiency() [1/2]
void Rivet::Analysis::efficiency |
( |
Histo1DPtr |
h1, |
|
|
Histo1DPtr |
h2, |
|
|
Scatter2DPtr |
s |
|
) |
| const |
Helper for histogram efficiency calculation.
- Note
- Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
- Todo:
- Counter and Histo2D efficiencies and asymms
Referenced by scale().
◆ efficiency() [2/2]
void Rivet::Analysis::efficiency |
( |
const YODA::Histo1D & |
h1, |
|
|
const YODA::Histo1D & |
h2, |
|
|
Scatter2DPtr |
s |
|
) |
| const |
Helper for histogram efficiency calculation.
- Note
- Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
◆ finalize()
virtual void Rivet::Analysis::finalize |
( |
| ) |
|
|
inlinevirtual |
◆ getAnalysisObject()
template<typename AO = YODA::AnalysisObject>
std::shared_ptr<AO> Rivet::Analysis::getAnalysisObject |
( |
const std::string & |
ananame, |
|
|
const std::string & |
name |
|
) |
| |
|
inlineprotected |
Get a data object from another analysis (e.g. preloaded calibration histogram). Get a data object from the histogram system (non-const)
References getAllData(), and name().
◆ getOption()
template<typename T >
T Rivet::Analysis::getOption |
( |
std::string |
optname, |
|
|
T |
def |
|
) |
| |
|
inline |
Get an option for this analysis instance converted to a specific type (given by the specified def value).
References declareCentrality().
◆ histoDir()
const string Rivet::Analysis::histoDir |
( |
| ) |
const |
|
protected |
◆ init()
virtual void Rivet::Analysis::init |
( |
| ) |
|
|
inlinevirtual |
◆ integrate() [1/2]
void Rivet::Analysis::integrate |
( |
Histo1DPtr |
h, |
|
|
Scatter2DPtr |
s |
|
) |
| const |
Helper for converting a differential histo to an integral one.
- Note
- Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
Referenced by scale().
◆ integrate() [2/2]
void Rivet::Analysis::integrate |
( |
const Histo1D & |
h, |
|
|
Scatter2DPtr |
s |
|
) |
| const |
Helper for converting a differential histo to an integral one.
- Note
- Assigns to the (already registered) output scatter, s. Preserves the path information of the target.
◆ makeAxisCode()
const std::string Rivet::Analysis::makeAxisCode |
( |
unsigned int |
datasetId, |
|
|
unsigned int |
xAxisId, |
|
|
unsigned int |
yAxisId |
|
) |
| const |
|
inlineprotected |
◆ name()
virtual std::string Rivet::Analysis::name |
( |
| ) |
const |
|
inlinevirtual |
Get the name of the analysis.
By default this is computed by combining the results of the experiment, year and Spires ID metadata methods and you should only override it if there's a good reason why those won't work. If options has been set for this instance, a corresponding string is appended at the end.
Implements Rivet::ProjectionApplier.
References Rivet::AnalysisInfo::getRefDataName(), info(), and Rivet::AnalysisInfo::setRefDataName().
Referenced by addOrGetCompatAO(), Analysis(), crossSection(), crossSectionPerEvent(), getAnalysisObject(), getHisto1D(), getHisto2D(), getLog(), getProfile1D(), getProfile2D(), getScatter2D(), histoDir(), normalize(), refData(), and scale().
◆ needsCrossSection()
bool Rivet::Analysis::needsCrossSection |
( |
| ) |
const |
|
inline |
◆ normalize() [1/4]
void Rivet::Analysis::normalize |
( |
const std::vector< Histo1DPtr > & |
histos, |
|
|
double |
norm = 1.0 , |
|
|
bool |
includeoverflows = true |
|
) |
| |
|
inline |
Normalize the given histograms, histos, to area = norm. - Note
- Constness intentional, if weird, to allow passing rvalue refs of smart ptrs (argh)
- Todo:
- Use SFINAE for a generic iterable of Histo1DPtrs
References normalize().
◆ normalize() [2/4]
template<std::size_t array_size>
void Rivet::Analysis::normalize |
( |
const Histo1DPtr(&) |
histos[array_size], |
|
|
double |
norm = 1.0 , |
|
|
bool |
includeoverflows = true |
|
) |
| |
|
inline |
◆ normalize() [3/4]
void Rivet::Analysis::normalize |
( |
const std::vector< Histo2DPtr > & |
histos, |
|
|
double |
norm = 1.0 , |
|
|
bool |
includeoverflows = true |
|
) |
| |
|
inline |
Normalize the given histograms, histos, to area = norm. - Note
- Constness intentional, if weird, to allow passing rvalue refs of smart ptrs (argh)
- Todo:
- Use SFINAE for a generic iterable of Histo2DPtrs
References normalize().
◆ normalize() [4/4]
template<std::size_t array_size>
void Rivet::Analysis::normalize |
( |
const Histo2DPtr(&) |
histos[array_size], |
|
|
double |
norm = 1.0 , |
|
|
bool |
includeoverflows = true |
|
) |
| |
|
inline |
◆ numEvents()
size_t Rivet::Analysis::numEvents |
( |
| ) |
const |
|
protected |
◆ refData() [1/2]
template<typename T = YODA::Scatter2D>
const T& Rivet::Analysis::refData |
( |
const string & |
hname | ) |
const |
|
inlineprotected |
◆ refData() [2/2]
template<typename T = YODA::Scatter2D>
const T& Rivet::Analysis::refData |
( |
unsigned int |
datasetId, |
|
|
unsigned int |
xAxisId, |
|
|
unsigned int |
yAxisId |
|
) |
| const |
|
inlineprotected |
◆ runInfo()
virtual std::string Rivet::Analysis::runInfo |
( |
| ) |
const |
|
inlinevirtual |
◆ scale() [1/6]
void Rivet::Analysis::scale |
( |
const std::vector< CounterPtr > & |
cnts, |
|
|
double |
factor |
|
) |
| |
|
inline |
Multiplicatively scale the given counters, cnts, by factor factor. - Note
- Constness intentional, if weird, to allow passing rvalue refs of smart ptrs (argh)
- Todo:
- Use SFINAE for a generic iterable of CounterPtrs
References scale().
◆ scale() [2/6]
template<std::size_t array_size>
void Rivet::Analysis::scale |
( |
const CounterPtr(&) |
cnts[array_size], |
|
|
double |
factor |
|
) |
| |
|
inline |
◆ scale() [3/6]
void Rivet::Analysis::scale |
( |
const std::vector< Histo1DPtr > & |
histos, |
|
|
double |
factor |
|
) |
| |
|
inline |
Multiplicatively scale the given histograms, histos, by factor factor. - Note
- Constness intentional, if weird, to allow passing rvalue refs of smart ptrs (argh)
- Todo:
- Use SFINAE for a generic iterable of Histo1DPtrs
References scale().
◆ scale() [4/6]
template<std::size_t array_size>
void Rivet::Analysis::scale |
( |
const Histo1DPtr(&) |
histos[array_size], |
|
|
double |
factor |
|
) |
| |
|
inline |
◆ scale() [5/6]
void Rivet::Analysis::scale |
( |
const std::vector< Histo2DPtr > & |
histos, |
|
|
double |
factor |
|
) |
| |
|
inline |
Multiplicatively scale the given histograms, histos, by factor factor. - Note
- Constness intentional, if weird, to allow passing rvalue refs of smart ptrs (argh)
- Todo:
- Use SFINAE for a generic iterable of Histo2DPtrs
References scale().
◆ scale() [6/6]
template<std::size_t array_size>
void Rivet::Analysis::scale |
( |
const Histo2DPtr(&) |
histos[array_size], |
|
|
double |
factor |
|
) |
| |
|
inline |
◆ setNeedsCrossSection()
Analysis& Rivet::Analysis::setNeedsCrossSection |
( |
bool |
needed = true | ) |
|
|
inline |
◆ summary()
virtual std::string Rivet::Analysis::summary |
( |
| ) |
const |
|
inlinevirtual |
◆ sumW()
double Rivet::Analysis::sumW |
( |
| ) |
const |
|
protected |
◆ sumW2()
double Rivet::Analysis::sumW2 |
( |
| ) |
const |
|
protected |
The documentation for this class was generated from the following files:
|