#include <Analysis.hh>
Inheritance diagram for Analysis:
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 finish() 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.
Definition at line 34 of file Analysis.hh.
Public Member Functions | |
virtual void | init ()=0 |
virtual void | analyze (const Event &event)=0 |
virtual void | finalize ()=0 |
virtual const Cuts | getCuts () const |
virtual const BeamPair & | getBeams () const |
Return the pair of incoming beams required by this analysis. | |
virtual const bool | isCompatible (const string &quantity, const double value) const |
Is this analysis compatible with the named quantity set at the supplied value? | |
virtual const bool | isCompatible (const ParticleName &beam1, const ParticleName &beam2) const |
Is this analysis able to run on the supplied pair of beams? | |
virtual const bool | isCompatible (const BeamPair &beams) const |
Is this analysis able to run on the BeamPair beams ? | |
AnalysisHandler & | getHandler () const |
Access the controlling AnalysisHandler object. | |
virtual string | getName () const |
Get the name of the analysis (returns mangled RTTI name by default). | |
Standard constructors and destructors. | |
Analysis () | |
The default constructor. | |
virtual | ~Analysis () |
The destructor. | |
Protected Member Functions | |
Log & | getLog () |
Get a Log object based on the getName() property of the calling analysis object. | |
virtual const bool | checkConsistency () const |
Is this analysis able to run on the BeamPair beams ? | |
set< Projection * > | getProjections () const |
Analysis & | setBeams (const ParticleName &beam1, const ParticleName &beam2) |
Set the colliding beam pair. | |
Analysis & | addCut (const string &quantity, const Comparison &comparison, const double value) |
Add a cut. | |
Analysis & | addProjection (Projection &proj) |
Add a projection dependency to the projection list. | |
AIDA analysis infrastructure. | |
AIDA::IAnalysisFactory & | analysisFactory () |
Access the AIDA analysis factory of the controlling AnalysisHandler object. | |
AIDA::ITree & | tree () |
Access the AIDA tree of the controlling AnalysisHandler object. | |
AIDA::IHistogramFactory & | histogramFactory () |
Access the AIDA histogram factory of the controlling AnalysisHandler object. | |
AIDA::IDataPointSetFactory & | datapointsetFactory () |
Access the AIDA histogram factory of the controlling AnalysisHandler object. | |
const string | getHistoDir () const |
Get the canonical AIDA histogram path for this analysis. | |
Internal histogram and data point set booking (for use by Analysis sub-classes). | |
AIDA::IHistogram1D * | bookHistogram1D (const string &name, const string &title, const size_t nbins, const double lower, const double upper) |
AIDA::IHistogram1D * | bookHistogram1D (const string &name, const string &title, const vector< double > &binedges) |
AIDA::IHistogram1D * | bookHistogram1D (const size_t datasetId, const size_t xAxisId, const size_t yAxisId, const string &title) |
AIDA::IDataPointSet * | bookDataPointSet (const string &name, const string &title) |
AIDA::IDataPointSet * | bookDataPointSet (const string &name, const string &title, const size_t npts, const double lower, const double upper) |
AIDA::IDataPointSet * | bookDataPointSet (const size_t datasetId, const size_t xAxisId, const size_t yAxisId, const string &title) |
Protected Attributes | |
set< Projection * > | _projections |
Collection of pointers to projections, for automatically combining constraints. | |
Friends | |
class | AnalysisHandler |
The AnalysisHandler is a friend. |
|
The default constructor. Factory method for making an analysis - to be implemented in concrete classes.
Definition at line 51 of file Analysis.hh. References Rivet::ANY. |
|
The destructor.
Definition at line 65 of file Analysis.hh. |
|
Add a cut.
Definition at line 230 of file Analysis.hh. |
|
Add a projection dependency to the projection list.
Definition at line 236 of file Analysis.hh. |
|
Access the AIDA analysis factory of the controlling AnalysisHandler object.
Definition at line 13 of file Analysis.cc. References AnalysisHandler::analysisFactory(), and Analysis::getHandler(). |
|
Analyze one event. A concrete class should here apply the necessary projections on the event and fill the relevant histograms. An overridden function must make sure it first calls the base class function. Implemented in ExampleTree, HepEx0112029, HepEx0409040, HepEx9506012, PL273B181, PRD65092002, TestAnalysis, and ZPhys73C11. |
|
Book a 2-dimensional data point set based on the paper, dataset and x/y-axis IDs in the corresponding HepData record. The binnings (x-errors) will be obtained by reading the bundled AIDA data record file of the same filename as the analysis' getName() property.
Definition at line 89 of file Analysis.cc. |
|
Book a 2-dimensional data point set with equally spaced points in a range. (NB. this returns a pointer rather than a reference since it will have to be stored in the analysis class - there's no point in forcing users to explicitly get the pointer from a reference before they can use it!) Definition at line 73 of file Analysis.cc. References Analysis::bookDataPointSet(). |
|
Book a 2-dimensional data point set. (NB. this returns a pointer rather than a reference since it will have to be stored in the analysis class - there's no point in forcing users to explicitly get the pointer from a reference before they can use it!) Definition at line 66 of file Analysis.cc. References Analysis::datapointsetFactory(), and Analysis::getHistoDir(). Referenced by Analysis::bookDataPointSet(), and PRD65092002::init(). |
|
Book a 1D histogram based on the paper, dataset and x/y-axis IDs in the corresponding HepData record. The binnings will be obtained by reading the bundled AIDA data record file of the same filename as the analysis' getName() property. Definition at line 39 of file Analysis.cc. References IHistogramFactory::createHistogram1D(), Rivet::getBinEdges(), Analysis::getHistoDir(), Analysis::getName(), and Analysis::histogramFactory(). |
|
Book a 1D histogram with non-uniform bins defined by the vector of bin edges binedges . (NB. this returns a pointer rather than a reference since it will have to be stored in the analysis class - there's no point in forcing users to explicitly get the pointer from a reference before they can use it!) Definition at line 58 of file Analysis.cc. References IHistogramFactory::createHistogram1D(), Analysis::getHistoDir(), and Analysis::histogramFactory(). |
|
Book a 1D histogram with nbins uniformly distributed across the range lower - upper . (NB. this returns a pointer rather than a reference since it will have to be stored in the analysis class - there's no point in forcing users to explicitly get the pointer from a reference before they can use it!) Definition at line 50 of file Analysis.cc. References IHistogramFactory::createHistogram1D(), Analysis::getHistoDir(), and Analysis::histogramFactory(). Referenced by ZPhys73C11::init(), TestAnalysis::init(), HepEx9506012::init(), HepEx0409040::init(), HepEx0112029::init(), and PL273B181::init(). |
|
Is this analysis able to run on the BeamPair beams ?
Definition at line 113 of file Analysis.cc. References Analysis::_projections, Cuts::checkConsistency(), Rivet::compatible(), Cuts::end(), Analysis::getBeams(), Analysis::getCuts(), and Analysis::getName(). |
|
Access the AIDA histogram factory of the controlling AnalysisHandler object.
Definition at line 28 of file Analysis.cc. References AnalysisHandler::datapointsetFactory(), and Analysis::getHandler(). Referenced by Analysis::bookDataPointSet(). |
|
Finalize this analysis object. A concrete class should here make all necessary operations on the histograms. Writing the histograms to a file is, however, done by the Rivet class. An overridden function must make sure it first calls the base class function. Implemented in ExampleTree, HepEx0112029, HepEx0409040, HepEx9506012, PL273B181, PRD65092002, TestAnalysis, and ZPhys73C11. |
|
Return the pair of incoming beams required by this analysis.
Definition at line 95 of file Analysis.hh. References Rivet::BeamPair. Referenced by Analysis::checkConsistency(), and main(). |
|
Return the Cuts object of this analysis object. Derived classes should re-implement this function to return the combined RivetInfo object of this object and of any Projection objects upon which this depends. Definition at line 104 of file Analysis.cc. References Analysis::_projections, and Cuts::addCuts(). Referenced by Analysis::checkConsistency(), and main(). |
|
Access the controlling AnalysisHandler object.
Definition at line 124 of file Analysis.hh. Referenced by Analysis::analysisFactory(), Analysis::datapointsetFactory(), Analysis::histogramFactory(), and Analysis::tree(). |
|
Get the canonical AIDA histogram path for this analysis.
Definition at line 161 of file Analysis.hh. Referenced by Analysis::bookDataPointSet(), and Analysis::bookHistogram1D(). |
|
Get a Log object based on the getName() property of the calling analysis object.
Definition at line 33 of file Analysis.cc. References Analysis::getName(). Referenced by ZPhys73C11::analyze(), TestAnalysis::analyze(), PRD65092002::analyze(), HepEx0409040::analyze(), HepEx0112029::analyze(), ExampleTree::analyze(), PL273B181::analyze(), HepEx0409040::finalize(), and ExampleTree::init(). |
|
Get the name of the analysis (returns mangled RTTI name by default).
Reimplemented in ExampleTree, HepEx0112029, HepEx0409040, HepEx9506012, PL273B181, PRD65092002, TestAnalysis, and ZPhys73C11. Definition at line 129 of file Analysis.hh. Referenced by Analysis::bookHistogram1D(), Analysis::checkConsistency(), Analysis::getLog(), and main(). |
|
Get all the projections used by this analysis, including recursion. WARNING: No caching or loop-avoidance is implemented at the moment. Definition at line 127 of file Analysis.cc. References Analysis::_projections, and Cuts::end(). |
|
Access the AIDA histogram factory of the controlling AnalysisHandler object.
Definition at line 23 of file Analysis.cc. References Analysis::getHandler(), and AnalysisHandler::histogramFactory(). Referenced by Analysis::bookHistogram1D(), and HepEx9506012::finalize(). |
|
Initialize this analysis object. A concrete class should here book all necessary histograms. An overridden function must make sure it first calls the base class function. Implemented in ExampleTree, HepEx0112029, HepEx0409040, HepEx9506012, PL273B181, PRD65092002, TestAnalysis, and ZPhys73C11. |
|
Is this analysis able to run on the BeamPair beams ?
Definition at line 117 of file Analysis.hh. References Rivet::BeamPair, and Rivet::compatible(). |
|
Is this analysis able to run on the supplied pair of beams?
Definition at line 109 of file Analysis.hh. References Rivet::BeamPair, and Rivet::compatible(). |
|
Is this analysis compatible with the named quantity set at the supplied value?
Definition at line 100 of file Analysis.hh. Referenced by main(). |
|
Set the colliding beam pair.
Definition at line 223 of file Analysis.hh. |
|
Access the AIDA tree of the controlling AnalysisHandler object.
Definition at line 18 of file Analysis.cc. References Analysis::getHandler(), and AnalysisHandler::tree(). |
|
The AnalysisHandler is a friend.
Definition at line 37 of file Analysis.hh. |
|
Collection of pointers to projections, for automatically combining constraints.
Definition at line 242 of file Analysis.hh. Referenced by Analysis::checkConsistency(), Analysis::getCuts(), and Analysis::getProjections(). |