Rivet API documentation

Rivet 4.1.3

Tools for flow analyses. More...

#include <Correlators.hh>

Inheritance diagram for Rivet::CumulantAnalysis:
Rivet::Analysis Rivet::ProjectionApplier

Classes

class  ECorrelator
 A helper class to calculate all event averages of correlators. More...

Public Types

typedef shared_ptr< ECorrelatorECorrPtr
 Typedef of shared pointer to ECorrelator.

Public Member Functions

const pair< int, int > getMaxValues () const
 Get the correct max N and max P for the set of booked correlators.
ECorrPtr bookECorrelator (const string name, const vector< int > &h, const YODA::Estimate1D &hIn)
 Book an ECorrelator in the same way as a histogram.
ECorrPtr bookECorrelator (const string name, const vector< int > &h, const vector< double > &binIn)
 Book an ECorrelator in the same way as a histogram.
ECorrPtr bookECorrelator (const string name, const vector< int > &h1, const vector< int > &h2, const vector< double > &binIn)
 Book a gapped ECorrelator with two harmonic vectors.
ECorrPtr bookECorrelator (const string &name, const vector< int > &h1, const vector< int > &h2, const YODA::Estimate1D &hIn)
 Book a gapped ECorrelator with two harmonic vectors.
ECorrPtr bookECorrelatorGap (const string &name, const vector< int > &h, const YODA::Estimate1D &hIn)
template<unsigned int N, unsigned int M>
ECorrPtr bookECorrelator (const string &name, const vector< double > &binIn)
 Templated version of correlator booking which takes N desired harmonic and M number of particles, and given bins.
template<unsigned int N, unsigned int M>
ECorrPtr bookECorrelator (const string &name, const YODA::Estimate1D &hIn)
 Templated version of correlator booking which takes N desired harmonic and M number of particles.
template<unsigned int N, unsigned int M>
ECorrPtr bookECorrelatorGap (const string &name, const YODA::Estimate1D &hIn)
 Templated version of gapped correlator booking which takes N desired harmonic and M number of particles.
 CumulantAnalysis (const string &n)
 Constructor.
template<typename F>
void fillScatter (Scatter2DPtr h, const vector< double > &binx, const F func, vector< pair< double, double > > &yErr) const
 Helper method for turning correlators into Scatter2Ds with error estimates.
template<typename T>
const pair< double, double > sampleError (T func) const
 Selection method for which sample error to use, given in the constructor.
void cnTwoInt (Scatter2DPtr h, ECorrPtr e2) const
 Two-particle integrated cn.
void vnTwoInt (Scatter2DPtr h, ECorrPtr e2) const
 Two particle integrated vn.
void corrPlot (Scatter2DPtr h, ECorrPtr e) const
 Put an event-averaged correlator into a Scatter2D.
void rawHookIn (YODA::AnalysisObjectPtr yao) final
void rawHookOut (const vector< MultiplexAOPtr > &raos, size_t iW) final
 Transform RAW ECorrelator Profiles to have content before writing them. Overloaded method from Analysis base class should not be overridden further.
void cnFourInt (Scatter2DPtr h, ECorrPtr e2, ECorrPtr e4) const
 Four particle integrated cn.
void vnFourInt (Scatter2DPtr h, ECorrPtr e2, ECorrPtr e4) const
 Four-particle integrated vn.
void cnSixInt (Scatter2DPtr h, ECorrPtr e2, ECorrPtr e4, ECorrPtr e6) const
 Six-particle integrated cn.
void vnSixInt (Scatter2DPtr h, ECorrPtr e2, ECorrPtr e4, ECorrPtr e6) const
 Six-particle integrated vn.
void cnEightInt (Scatter2DPtr h, ECorrPtr e2, ECorrPtr e4, ECorrPtr e6, ECorrPtr e8) const
 Eight-particle integrated cn.
void vnEightInt (Scatter2DPtr h, ECorrPtr e2, ECorrPtr e4, ECorrPtr e6, ECorrPtr e8) const
 Eight-particle integrated vn.
void vnTwoDiff (Scatter2DPtr h, ECorrPtr e2Dif) const
 Two-particle differential vn.
void vnFourDiff (Scatter2DPtr h, ECorrPtr e2Dif, ECorrPtr e4Dif) const
 Four-particle differential vn.
AnalysisHandlerhandler () const
 Access the controlling AnalysisHandler object.
const EventcurrentEvent () const
 Access the current event.
double dbl (double x)
double dbl (const YODA::Counter &c)
double dbl (const YODA::Estimate0D &e)
double dbl (const YODA::Scatter1D &s)
const vector< MultiplexAOPtr > & analysisObjects () const
 List of registered analysis data objects.
void markAsOwned () const
 Mark this object as owned by a proj-handler.
Main analysis methods
virtual void init ()
virtual void analyze (const Event &event)=0
virtual void finalize ()
Power-user analysis methods
virtual void preInit ()
 A method called before init(), for cleaner subclassing.
virtual void postInit ()
 A method called after init(), for cleaner subclassing.
virtual void preAnalyze (const Event &)
 A method called before analyze(), for cleaner subclassing.
virtual void postAnalyze (const Event &)
 A method called after analyze(), for cleaner subclassing.
virtual void preFinalize ()
 A method called before finalize(), for cleaner subclassing.
virtual void postFinalize ()
 A method called after finalize(), for cleaner subclassing.
void syncDeclQueue ()
Metadata

Metadata is used for querying from the command line and also for building web pages and the analysis pages in the Rivet manual.

void loadInfo ()
 Get the AnalysisInfo object to parse its info file in which the metadata is stored.
const AnalysisInfoinfo () const
 Get the actual AnalysisInfo object in which all this metadata is stored.
AnalysisInfoinfo ()
 Get the actual AnalysisInfo object in which all this metadata is stored (non-const).
virtual std::string name () const
 Get the name of the analysis.
std::string analysisDataPath (const std::string &extn, const std::string &suffix="")
 Get the path to a data file associated with this analysis.
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.
virtual std::string summary () const
 Get a short description of the analysis.
virtual std::string description () const
 Get a full description of the analysis.
virtual std::string runInfo () const
 Information about the events needed as input for this analysis.
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 double luminosityfb () const
 The integrated luminosity in inverse femtobarn.
virtual double luminosity () const
 The integrated luminosity in inverse picobarn.
double luminositypb () const
 The integrated luminosity in inverse picobarn.
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::string warning () const
 A warning message from the info file, if there is one.
virtual std::vector< std::string > todos () const
 Any work to be done on this analysis.
virtual std::vector< std::string > validation () const
 make-style commands for validating this analysis.
virtual bool reentrant () const
 Does this analysis have a reentrant finalize()?
virtual const std::vector< std::string > & keywords () const
 Get vector of analysis keywords.
virtual std::string refMatch () const
 Positive filtering regex for ref-data HepData sync.
virtual std::string refUnmatch () const
 Negative filtering regex for ref-data HepData sync.
virtual std::string writerDoublePrecision () const
 Positive filtering regex for setting double precision in Writer.
virtual const std::vector< PdgIdPair > & requiredBeamIDs () const
 Return the allowed pairs of incoming beams required by this analysis.
virtual AnalysissetRequiredBeamIDs (const std::vector< PdgIdPair > &beamids)
 Declare the allowed pairs of incoming beams required by this analysis.
virtual const std::vector< std::pair< double, double > > & requiredBeamEnergies () const
 Sets of valid beam energy pairs, in GeV.
virtual AnalysissetRequiredBeamEnergies (const std::vector< std::pair< double, double > > &energies)
 Declare the list of valid beam energy pairs, in GeV.
virtual std::string refFile () const
 Location of reference data YODA file.
virtual std::string refDataName () const
 Get name of reference data file, which could be different from plugin name.
virtual void setRefDataName (const std::string &ref_data="")
 Set name of reference data file, which could be different from plugin name.
Run conditions
bool merging () const
 Check if we are running rivet-merge.
bool compatibleWithRun () const
 Check if the given conditions are compatible with this analysis' declared constraints.
void raiseBeamErrorIf (const bool condition) const
 Raise BeamError if condition not met and not in merging mode.
Analysis / beam compatibility testing
const ParticlePairbeams () const
 Incoming beams for this run.
PdgIdPair beamIDs () const
 Incoming beam IDs for this run.
pair< double, double > beamEnergies () const
 Incoming beam energies for this run.
vector< double > allowedEnergies () const
 Allowed centre-of-mass energies (in GeV) for this routine.
double sqrtS () const
 Centre of mass energy for this run.
bool beamsMatch (const ParticlePair &beams) const
 Check if analysis is compatible with the provided beam particle IDs and energies.
bool beamsMatch (PdgId beam1, PdgId beam2, double e1, double e2) const
 Check if analysis is compatible with the provided beam particle IDs and energies.
bool beamsMatch (const PdgIdPair &beams, const std::pair< double, double > &energies) const
 Check if analysis is compatible with the provided beam particle IDs and energies in GeV.
bool beamIDsMatch (PdgId beam1, PdgId beam2) const
 Check if analysis is compatible with the provided beam particle IDs.
bool beamIDsMatch (const PdgIdPair &beamids) const
 Check if analysis is compatible with the provided beam particle IDs.
bool beamEnergiesMatch (double e1, double e2) const
 Check if analysis is compatible with the provided beam energies.
bool beamEnergiesMatch (const std::pair< double, double > &energies) const
 Check if analysis is compatible with the provided beam energies.
bool beamEnergyMatch (const std::pair< double, double > &energies) const
 Check if analysis is compatible with the provided CoM energy.
bool beamEnergyMatch (double sqrts) const
 Check if analysis is compatible with the provided CoM energy.
bool isCompatibleWithSqrtS (double energy, double tolerance=1e-5) const
 Check if sqrtS is compatible with provided value.
Booking heavy ion features
template<typename T>
Percentile< T > book (const string &projName, const vector< pair< double, double > > &centralityBins, const vector< tuple< size_t, size_t, size_t > > &ref)
 Book a Percentile Multiplexer around AnalysisObjects.
const CentralityProjectiondeclareCentrality (const SingleValueProjection &proj, string calAnaName, string calHistName, const string projName, PercentileOrder pctorder=PercentileOrder::DECREASING)
 Book a CentralityProjection.
Accessing options for this Analysis instance.
const std::map< std::string, std::string > & options () const
 Return the map of all options given to this analysis.
std::string getOption (std::string optname, string def="") const
 Get an option for this analysis instance as a string.
std::string getOption (std::string optname, const char *def)
 Sane overload for literal character strings (which don't play well with stringstream).
template<typename T>
getOption (std::string optname, T def) const
 Get an option for this analysis instance converted to a specific type.
bool getOption (std::string optname, bool def) const
 Get an option for this analysis instance converted to a bool.
Projection "getting" functions
std::set< ConstProjectionPtr > getProjections () const
 Get the contained projections, including recursion.
std::set< ConstProjectionPtr > getImmediateChildProjections () const
 Get the contained projections, excluding 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
const ProjectiongetProjection (const std::string &name) const
template<typename PROJ>
const PROJ & get (const std::string &name) const
template<typename PROJ>
const PROJ & getProjectionFromDeclQueue (const std::string name) const
Projection applying functions
template<typename PROJ = Projection>
std::enable_if_t< std::is_base_of< Projection, PROJ >::value, const PROJ & > apply (const Event &evt, const Projection &proj) const
 Apply the supplied projection on event evt.
template<typename PROJ = Projection>
std::enable_if_t< std::is_base_of< Projection, PROJ >::value, const PROJ & > apply (const Event &evt, const PROJ &proj) const
 Apply the supplied projection on event evt (user-facing alias).
template<typename PROJ = Projection>
std::enable_if_t< std::is_base_of< Projection, PROJ >::value, const PROJ & > apply (const Event &evt, const std::string &name) const
 Apply the supplied projection on event evt (user-facing alias).
template<typename PROJ = Projection>
std::enable_if_t< std::is_base_of< Projection, PROJ >::value, const PROJ & > apply (const std::string &name, const Event &evt) const
 Apply the supplied projection on event evt (convenience arg-reordering alias).

Static Public Member Functions

template<typename T>
static void fillScatter (Scatter2DPtr h, const vector< double > &binx, const T &func)
 Helper method for turning correlators into Scatter2Ds.
static void nthPow (Scatter2DPtr hOut, const Scatter2DPtr hIn, const double &n, const double &k=1.0)
 Take the n th power of all points in hIn and put the result in hOut.
static void nthPow (Scatter2DPtr h, const double n, const double k=1.0)
 Take the n th power of all points in h, and put the result back in the same Scatter2D.
template<typename T>
static pair< double, double > sampleVariance (T func)
 Calculate the bootstrapped sample variance.
template<typename T>
static pair< double, double > sampleEnvelope (T func)
 Calculate the bootstrapped sample envelope.

Protected Member Functions

LoggetLog () 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
double crossSectionError () const
 Get the process cross-section error in pb. Throws if this hasn't been set.
double crossSectionErrorPerEvent () const
size_t numEvents () const
 Get the number of events seen (via the analysis handler).
double effNumEvents () const
 Get the effective number of events seen (via the analysis handler).
double sumW () const
 Get the sum of event weights seen (via the analysis handler).
double sumOfWeights () const
 Alias.
double sumW2 () const
 Get the sum of squared event weights seen (via the analysis handler).
const std::string histoDir () const
 Get the canonical histogram "directory" path for this analysis.
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).
CounterPtr & book (CounterPtr &, const std::string &name)
 Book a counter.
CounterPtr & book (CounterPtr &, unsigned int datasetID, unsigned int xAxisID, unsigned int yAxisID)
CutflowPtrbook (CutflowPtr &ao, const string &name, const std::vector< std::string > &edges)
 Book a Cutflow object defined by the vector of edges.
CutflowPtrbook (CutflowPtr &ao, const string &name, const std::initializer_list< std::string > &edges)
 Book a Cutflow object defined by the vector of edges.
ProjectionHandlergetProjHandler () const
 Get a reference to the ProjectionHandler for this thread.
void setProjectionHandler (ProjectionHandler &projectionHandler) const
Histogram reference data
const std::map< std::string, YODA::AnalysisObjectPtr > & refData () const
 Get all reference data objects for this analysis.
template<typename T = YODA::Estimate1D>
const T & refData (const string &hname) const
template<typename T = YODA::Estimate1D>
const T & refData (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) const
bool hasRefData (const string &hname) const
 Check if reference data object exists for a specific histo name.
bool hasRefData (unsigned int datasetId, unsigned int xAxisId, unsigned int yAxisId) const
 Check if a reference data object exists for a numbered histo.
Estimate booking
Estimate0DPtr & book (Estimate0DPtr &, const std::string &name)
 Book an estimate.
Estimate0DPtr & book (Estimate0DPtr &, unsigned int datasetID, unsigned int xAxisID, unsigned int yAxisID)
BinnedDbn booking
template<size_t DbnN, typename... AxisT, typename = YODA::enable_if_all_CAxisT<AxisT...>>
BinnedDbnPtr< DbnN, AxisT... > & book (BinnedDbnPtr< DbnN, AxisT... > &ao, const std::string &name, const std::vector< size_t > &nbins, const std::vector< std::pair< double, double > > &loUpPairs)
 Book a ND histogram with nbins uniformly distributed across the range lower - upper .
Histo1DPtr & book (Histo1DPtr &ao, const std::string &name, const size_t nbins, const double lower, const double upper)
Profile1DPtr & book (Profile1DPtr &ao, const std::string &name, const size_t nbins, const double lower, const double upper)
Histo2DPtr & book (Histo2DPtr &ao, const std::string &name, const size_t nbinsX, const double lowerX, const double upperX, const size_t nbinsY, const double lowerY, const double upperY)
Profile2DPtr & book (Profile2DPtr &ao, const std::string &name, const size_t nbinsX, const double lowerX, const double upperX, const size_t nbinsY, const double lowerY, const double upperY)
Histo3DPtr & book (Histo3DPtr &ao, const std::string &name, const size_t nbinsX, const double lowerX, const double upperX, const size_t nbinsY, const double lowerY, const double upperY, const size_t nbinsZ, const double lowerZ, const double upperZ)
Profile3DPtr & book (Profile3DPtr &ao, const std::string &name, const size_t nbinsX, const double lowerX, const double upperX, const size_t nbinsY, const double lowerY, const double upperY, const size_t nbinsZ, const double lowerZ, const double upperZ)
template<size_t DbnN, typename... AxisT>
BinnedDbnPtr< DbnN, AxisT... > & book (BinnedDbnPtr< DbnN, AxisT... > &ao, const std::string &name, const std::vector< AxisT > &... binedges)
 Book a ND histogram with non-uniform bins defined by the vector of bin edges binedges .
template<size_t DbnN, typename... AxisT>
BinnedDbnPtr< DbnN, AxisT... > & book (BinnedDbnPtr< DbnN, AxisT... > &ao, const std::string &name, const std::initializer_list< AxisT > &... binedges)
 Book a ND histogram with non-uniform bins defined by the vector of bin edges binedges .
template<size_t DbnN, typename... AxisT>
BinnedDbnPtr< DbnN, AxisT... > & book (BinnedDbnPtr< DbnN, AxisT... > &ao, const std::string &name, const YODA::BinnedEstimate< AxisT... > &refest)
 Book a ND histogram with binning from a reference scatter.
template<size_t DbnN, typename... AxisT>
BinnedDbnPtr< DbnN, AxisT... > & book (BinnedDbnPtr< DbnN, AxisT... > &ao, const std::string &name)
 Book a ND histogram, using the binnings in the reference data histogram.
template<size_t DbnN, typename... AxisT>
BinnedDbnPtr< DbnN, AxisT... > & book (BinnedDbnPtr< DbnN, AxisT... > &ao, const unsigned int datasetID, const unsigned int xAxisID, const unsigned int yAxisID)
HistoGroup booking
template<typename GroupAxisT, typename... AxisT>
HistoGroupPtr< GroupAxisT, AxisT... > & book (HistoGroupPtr< GroupAxisT, AxisT... > &ao, const std::vector< GroupAxisT > &edges, const std::vector< std::string > &names)
template<typename GroupAxisT, typename... AxisT>
HistoGroupPtr< GroupAxisT, AxisT... > & book (HistoGroupPtr< GroupAxisT, AxisT... > &ao, const std::vector< GroupAxisT > &edges)
template<typename GroupAxisT, typename... AxisT>
HistoGroupPtr< GroupAxisT, AxisT... > & book (HistoGroupPtr< GroupAxisT, AxisT... > &ao, std::initializer_list< GroupAxisT > &&edges)
BinnedEstimate booking
template<typename... AxisT, typename = YODA::enable_if_all_CAxisT<AxisT...>>
BinnedEstimatePtr< AxisT... > & book (BinnedEstimatePtr< AxisT... > &ao, const std::string &name, const std::vector< size_t > &nbins, const std::vector< std::pair< double, double > > &loUpPairs)
 Book a ND estimate with nbins uniformly distributed across the range lower - upper .
Estimate1DPtr & book (Estimate1DPtr &ao, const std::string &name, const size_t nbins, const double lower, const double upper)
Estimate2DPtr & book (Estimate2DPtr &ao, const std::string &name, const size_t nbinsX, const double lowerX, const double upperX, const size_t nbinsY, const double lowerY, const double upperY)
Estimate3DPtr & book (Estimate3DPtr &ao, const std::string &name, const size_t nbinsX, const double lowerX, const double upperX, const size_t nbinsY, const double lowerY, const double upperY, const size_t nbinsZ, const double lowerZ, const double upperZ)
template<typename... AxisT>
BinnedEstimatePtr< AxisT... > & book (BinnedEstimatePtr< AxisT... > &ao, const std::string &name, const std::vector< AxisT > &... binedges)
 Book a ND estimate with non-uniform bins defined by the vector of bin edges binedges .
template<typename... AxisT>
BinnedEstimatePtr< AxisT... > & book (BinnedEstimatePtr< AxisT... > &ao, const std::string &name, const std::initializer_list< AxisT > &... binedges)
 Book a ND estimate with non-uniform bins defined by the vector of bin edges binedges .
template<typename... AxisT>
BinnedEstimatePtr< AxisT... > & book (BinnedEstimatePtr< AxisT... > &ao, const std::string &name)
 Book a ND estimate, using the binnings in the reference data histogram.
template<typename... AxisT>
BinnedEstimatePtr< AxisT... > & book (BinnedEstimatePtr< AxisT... > &ao, const unsigned int datasetID, const unsigned int xAxisID, const unsigned int yAxisID)
Scatter booking
template<size_t N>
ScatterNDPtr< N > & book (ScatterNDPtr< N > &snd, const string &name, const bool copy_pts=false)
 Book a N-dimensional data point set with the given name.
template<size_t N>
ScatterNDPtr< N > & book (ScatterNDPtr< N > &snd, const unsigned int datasetID, const unsigned int xAxisID, const unsigned int yAxisID, const bool copy_pts=false)
 Book a N-dimensional data point set, using the binnings in the reference data histogram.
Scatter2DPtr & book (Scatter2DPtr &snd, const string &name, const size_t npts, const double lower, const double upper)
 Book a N-dimensional data point set with equally spaced x-points in a range.
Scatter3DPtr & book (Scatter3DPtr &snd, const string &name, const size_t nptsX, const double lowerX, const double upperX, const size_t nptsY, const double lowerY, const double upperY)
Scatter2DPtr & book (Scatter2DPtr &snd, const string &name, const std::vector< double > &binedges)
 Book a 2-dimensional data point set based on provided contiguous "bin edges".
Scatter3DPtr & book (Scatter3DPtr &snd, const string &name, const std::vector< double > &binedgesX, const std::vector< double > &binedgesY)
template<size_t N>
ScatterNDPtr< N > & book (ScatterNDPtr< N > &snd, const string &name, const YODA::ScatterND< N > &refscatter)
 Book a 2-dimensional data point set with x-points from an existing scatter and a new path.
Cutflows booking
CutflowsPtrbook (CutflowsPtr &ao, const std::vector< std::string > &edges, const std::vector< std::vector< std::string > > &innerEdges)
CutflowsPtrbook (CutflowsPtr &ao, const std::vector< std::string > &edges)
CutflowsPtrbook (CutflowsPtr &ao, std::initializer_list< std::string > &&edges)
Analysis object manipulation
template<typename T>
void scale (MultiplexPtr< Multiplexer< T > > &ao, CounterAdapter factor)
 Multiplicatively scale the given AnalysisObject, ao, by factor factor.
template<typename GroupAxisT, typename... AxisT>
void scale (HistoGroupPtr< GroupAxisT, AxisT... > &group, CounterAdapter factor)
 Multiplicatively scale the given histogram group, group, by factor factor.
template<typename GroupAxisT, typename... AxisT>
void scale (HistoGroupPtr< GroupAxisT, AxisT... > &group, const vector< double > &factors)
 Multiplicatively scale the given histogram group, group, by factors factors.
void scale (CutflowsPtr &group, CounterAdapter factor)
 Multiplicatively scale the cutflow group, group, by factor factor.
template<typename T, typename U>
void scale (std::map< T, U > &aos, CounterAdapter factor)
 Iteratively scale the AOs in the map aos, by factor factor.
template<typename AORange, typename = std::enable_if_t<YODA::isIterable<AORange>>>
void scale (AORange &aos, CounterAdapter factor)
 Iteratively scale the AOs in the iterable aos, by factor factor.
template<typename T>
void scale (std::initializer_list< T > aos, CounterAdapter factor)
 Iteratively scale the AOs in the initialiser list aos, by factor factor.
template<typename T, typename U>
void scale (std::map< T, U > &aos, const vector< double > &factors)
 Iteratively scale the AOs in the map aos, by factors factors.
template<typename AORange, typename = std::enable_if_t<YODA::isIterable<AORange>>>
void scale (AORange &aos, const vector< double > &factors)
 Iteratively scale the AOs in the iterable aos, by factors factors.
template<typename T>
void scale (std::initializer_list< T > aos, const vector< double > &factors)
 Iteratively scale the AOs in the initialiser list aos, by factors factors.
template<typename GroupAxisT, typename... AxisT>
void divByGroupWidth (HistoGroupPtr< GroupAxisT, AxisT... > &group)
 Scale the given histogram group, group, by the group axis width.
template<typename T, typename U>
void divByGroupWidth (std::map< T, U > &aos)
 Iteratively scale the HistoGroups in the map aos, by the group axis width.
template<typename AORange, typename = std::enable_if_t<YODA::isIterable<AORange>>>
void divByGroupWidth (AORange &aos)
 Iteratively scale the HistoGroups in the iterable aos, by the group axis width.
template<typename T>
void divByGroupWidth (std::initializer_list< T > aos)
 Iteratively scale the HistoGroups in the initialiser list aos, by the group axis width.
template<size_t DbnN, typename... AxisT>
void normalize (BinnedDbnPtr< DbnN, AxisT... > ao, const CounterAdapter norm=1.0, const bool includeoverflows=true)
 Normalize the given analysis object, ao to a target norm.
template<typename GroupAxisT, typename... AxisT>
void normalize (HistoGroupPtr< GroupAxisT, AxisT... > group, const CounterAdapter norm=1.0, const bool includeoverflows=true)
 Normalize each AO in the given histogram group, group to a target norm.
template<typename AORange, typename = std::enable_if_t<YODA::isIterable<AORange>>>
void normalize (AORange &aos, const CounterAdapter norm=1.0, const bool includeoverflows=true)
 Iteratively normalise the AOs in the iterable iter, by factor factor.
template<typename T>
void normalize (std::initializer_list< T > &&aos, const CounterAdapter norm=1.0, const bool includeoverflows=true)
 Iteratively normalise the AOs in the initialiser list iter to a target norm.
template<typename T, typename U>
void normalize (std::map< T, U > &aos, const CounterAdapter norm=1.0, const bool includeoverflows=true)
 Iteratively normalise the AOs in the map aos to a target norm.
template<typename GroupAxisT, typename... AxisT>
void normalizeGroup (HistoGroupPtr< GroupAxisT, AxisT... > group, const CounterAdapter norm=1.0, const bool includeoverflows=true)
 Normalize the given histogram group, group to a target norm.
template<typename AORange, typename = std::enable_if_t<YODA::isIterable<AORange>>>
void normalizeGroup (AORange &aos, const CounterAdapter norm=1.0, const bool includeoverflows=true)
 Iteratively normalise the HistoGroups in the iterable iter, by factor factor.
template<typename T>
void normalizeGroup (std::initializer_list< T > &&aos, const CounterAdapter norm=1.0, const bool includeoverflows=true)
 Iteratively normalise the HistoGroups in the initialiser list iter to a target norm.
template<typename T, typename U>
void normalizeGroup (std::map< T, U > &aos, const CounterAdapter norm=1.0, const bool includeoverflows=true)
 Iteratively normalise the HistoGroups in the map aos to a target norm.
template<size_t DbnN, typename... AxisT>
void barchart (BinnedDbnPtr< DbnN, AxisT... > ao, BinnedEstimatePtr< AxisT... > est) const
void divide (CounterPtr c1, CounterPtr c2, Estimate0DPtr est) const
void divide (const YODA::Counter &c1, const YODA::Counter &c2, Estimate0DPtr est) const
void divide (Estimate0DPtr e1, Estimate0DPtr e2, Estimate0DPtr est) const
void divide (const YODA::Estimate0D &e1, const YODA::Estimate0D &e2, Estimate0DPtr est) const
template<size_t DbnN, typename... AxisT>
void divide (const YODA::BinnedDbn< DbnN, AxisT... > &h1, const YODA::BinnedDbn< DbnN, AxisT... > &h2, BinnedEstimatePtr< AxisT... > est) const
template<size_t DbnN, typename... AxisT>
void divide (BinnedDbnPtr< DbnN, AxisT... > h1, BinnedDbnPtr< DbnN, AxisT... > h2, BinnedEstimatePtr< AxisT... > est) const
template<typename... AxisT>
void divide (const YODA::BinnedEstimate< AxisT... > &e1, const YODA::BinnedEstimate< AxisT... > &e2, BinnedEstimatePtr< AxisT... > est) const
template<typename... AxisT>
void divide (BinnedEstimatePtr< AxisT... > e1, BinnedEstimatePtr< AxisT... > e2, BinnedEstimatePtr< AxisT... > est) const
void efficiency (CounterPtr c1, CounterPtr c2, Estimate0DPtr est) const
void efficiency (const YODA::Counter &c1, const YODA::Counter &c2, Estimate0DPtr est) const
template<size_t DbnN, typename... AxisT>
void efficiency (const YODA::BinnedDbn< DbnN, AxisT... > &h1, const YODA::BinnedDbn< DbnN, AxisT... > &h2, BinnedEstimatePtr< AxisT... > est) const
template<size_t DbnN, typename... AxisT>
void efficiency (BinnedDbnPtr< DbnN, AxisT... > h1, BinnedDbnPtr< DbnN, AxisT... > h2, BinnedEstimatePtr< AxisT... > est) const
template<typename... AxisT>
void efficiency (const YODA::BinnedEstimate< AxisT... > &e1, const YODA::BinnedEstimate< AxisT... > &e2, BinnedEstimatePtr< AxisT... > est) const
template<typename... AxisT>
void efficiency (BinnedEstimatePtr< AxisT... > e1, BinnedEstimatePtr< AxisT... > e2, BinnedEstimatePtr< AxisT... > est) const
template<size_t DbnN, typename... AxisT>
void asymm (const YODA::BinnedDbn< DbnN, AxisT... > &h1, const YODA::BinnedDbn< DbnN, AxisT... > &h2, BinnedEstimatePtr< AxisT... > est) const
template<size_t DbnN, typename... AxisT>
void asymm (BinnedDbnPtr< DbnN, AxisT... > h1, BinnedDbnPtr< DbnN, AxisT... > h2, BinnedEstimatePtr< AxisT... > est) const
template<typename... AxisT>
void asymm (const YODA::BinnedEstimate< AxisT... > &e1, const YODA::BinnedEstimate< AxisT... > &e2, BinnedEstimatePtr< AxisT... > est) const
template<typename... AxisT>
void asymm (BinnedEstimatePtr< AxisT... > e1, BinnedEstimatePtr< AxisT... > e2, BinnedEstimatePtr< AxisT... > est) const
template<size_t DbnN, typename... AxisT>
void integrate (const YODA::BinnedDbn< DbnN, AxisT... > &h, BinnedEstimatePtr< AxisT... > est) const
template<size_t DbnN, typename... AxisT>
void integrate (BinnedDbnPtr< DbnN, AxisT... > &h, BinnedEstimatePtr< AxisT... > est) const
Data object registration, retrieval, and removal
size_t defaultWeightIndex () const
 Get the default/nominal weight index.
template<typename YODAT>
shared_ptr< YODAT > getPreload (const string &path) const
 Get a preloaded YODA object.
template<typename YODAT>
MultiplexPtr< Multiplexer< YODAT > > registerAO (const YODAT &yao)
 Register a new data object, optionally read in preloaded data.
template<typename AO = MultiplexAOPtr>
AO addAnalysisObject (const AO &aonew)
 Register a data object in the histogram system.
void removeAnalysisObject (const std::string &path)
 Unregister a data object from the histogram system (by name).
void removeAnalysisObject (const MultiplexAOPtr &ao)
 Unregister a data object from the histogram system (by pointer).
template<typename AO = MultiplexAOPtr>
const AO getAnalysisObject (const std::string &aoname) const
 Get a Rivet data object from the histogram system.
template<typename AO = MultiplexAOPtr>
AO getAnalysisObject (const std::string &ananame, const std::string &aoname)
Projection registration functions
template<typename PROJ>
const PROJ & declare (const PROJ &proj, const std::string &name) const
 Register a contained projection (user-facing version).
template<typename PROJ>
const PROJ & declare (const std::string &name, const PROJ &proj) const
 Register a contained projection (user-facing, arg-reordered version).

Static Protected Member Functions

template<typename... Args, typename CONTAINER, typename = std::enable_if_t< is_citerable_v<CONTAINER>, Jet >>
static CONTAINER reclusterJets (const CONTAINER &jetsIn, Args &&... args)
 Avoid FastJet:: scoping prefix.
template<typename T, typename U, typename... Args>
static std::map< T, U > reclusterJets (const std::map< T, U > &jetsMap, Args &&... args)
template<JetAlg JETALG, typename... Args, typename CONTAINER, typename = std::enable_if_t< is_citerable_v<CONTAINER>, Jet >>
static CONTAINER reclusterJets (const CONTAINER &jetsIn, Args &&... args)
template<JetAlg JETALG, typename T, typename U, typename... Args>
static std::map< T, U > reclusterJets (const std::map< T, U > &jetsMap, Args &&... args)

Protected Attributes

list< ECorrPtreCorrPtrs

Detailed Description

Tools for flow analyses.

The following are helper classes to construct event averaged correlators as well as cummulants and flow coefficents from the basic event correlators defined above. They are all encapsulated in a Cumulants class, which can be used as a(nother) base class for flow analyses, to ensure access.

Constructor & Destructor Documentation

◆ CumulantAnalysis()

Rivet::CumulantAnalysis::CumulantAnalysis ( const string & n)
inline

Constructor.

Use CumulantAnalysis as base class for the analysis to have access to functionality.

References Rivet::Analysis::Analysis().

Member Function Documentation

◆ analysisDataPath()

std::string Rivet::Analysis::analysisDataPath ( const std::string & extn,
const std::string & suffix = "" )
inlineinherited

Get the path to a data file associated with this analysis.

The searched-for filename will be <ANANAME>.<extn> of suffix is empty/unspecified, or <ANANAME>-<suffix>.<extn> if a non-zero suffix is specified.

References Rivet::findAnalysisDataFile(), and name().

◆ analyze()

virtual void Rivet::Analysis::analyze ( const Event & event)
pure virtualinherited

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 Rivet::MC_JETS_BASE, Rivet::MC_KTSPLITTINGS_BASE, and Rivet::MC_PARTICLES_BASE.

◆ apply()

template<typename PROJ = Projection>
std::enable_if_t< std::is_base_of< Projection, PROJ >::value, const PROJ & > Rivet::ProjectionApplier::apply ( const Event & evt,
const Projection & proj ) const
inlineinherited

◆ asymm() [1/2]

template<size_t DbnN, typename... AxisT>
void Rivet::Analysis::asymm ( const YODA::BinnedDbn< DbnN, AxisT... > & h1,
const YODA::BinnedDbn< DbnN, AxisT... > & h2,
BinnedEstimatePtr< AxisT... > est ) const
inlineprotectedinherited

Helper for histogram asymmetry calculation.

Note
Assigns to the (already registered) output estimate, est. Preserves the path information of the target.

◆ asymm() [2/2]

template<typename... AxisT>
void Rivet::Analysis::asymm ( const YODA::BinnedEstimate< AxisT... > & e1,
const YODA::BinnedEstimate< AxisT... > & e2,
BinnedEstimatePtr< AxisT... > est ) const
inlineprotectedinherited

Helper for estimate asymmetry calculation.

Note
Assigns to the (already registered) output estimate, est. Preserves the path information of the target.

◆ authors()

virtual std::vector< std::string > Rivet::Analysis::authors ( ) const
inlinevirtualinherited

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().

◆ barchart()

template<size_t DbnN, typename... AxisT>
void Rivet::Analysis::barchart ( BinnedDbnPtr< DbnN, AxisT... > ao,
BinnedEstimatePtr< AxisT... > est ) const
inlineprotectedinherited

Helper for histogram conversion to an inert estimate type

Note
Assigns to the (already registered) output estimate, est. Preserves the path information of the target.

◆ book() [1/8]

template<size_t DbnN, typename... AxisT>
BinnedDbnPtr< DbnN, AxisT... > & Rivet::Analysis::book ( BinnedDbnPtr< DbnN, AxisT... > & ao,
const unsigned int datasetID,
const unsigned int xAxisID,
const unsigned int yAxisID )
inlineprotectedinherited

Book a ND 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 book(), mkAxisCode(), and name().

◆ book() [2/8]

template<typename... AxisT>
BinnedEstimatePtr< AxisT... > & Rivet::Analysis::book ( BinnedEstimatePtr< AxisT... > & ao,
const unsigned int datasetID,
const unsigned int xAxisID,
const unsigned int yAxisID )
inlineprotectedinherited

Book a ND estimate, 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 book(), mkAxisCode(), and name().

◆ book() [3/8]

template<typename T>
Percentile< T > Rivet::Analysis::book ( const string & projName,
const vector< pair< double, double > > & centralityBins,
const vector< tuple< size_t, size_t, size_t > > & ref )
inlineinherited

Book a Percentile Multiplexer around AnalysisObjects.

Based on a previously registered CentralityProjection named projName book one AnalysisObject for each centralityBin and name them according to the corresponding code in the ref vector.

References Rivet::PercentileTBase< T >::add(), addAnalysisObject(), histoPath(), mkAxisCode(), and refData().

◆ book() [4/8]

Estimate0DPtr & Rivet::Analysis::book ( Estimate0DPtr & ,
unsigned int datasetID,
unsigned int xAxisID,
unsigned int yAxisID )
protectedinherited

Book an estimate, 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.

◆ book() [5/8]

Scatter2DPtr & Rivet::Analysis::book ( Scatter2DPtr & snd,
const string & name,
const size_t npts,
const double lower,
const double upper )
inlineprotectedinherited

Book a N-dimensional data point set with equally spaced x-points in a range.

The y values and errors will be set to 0.

Todo
Remove this when we switch to BinnedEstimates

References histoPath(), name(), and registerAO().

◆ book() [6/8]

Scatter2DPtr & Rivet::Analysis::book ( Scatter2DPtr & snd,
const string & name,
const std::vector< double > & binedges )
inlineprotectedinherited

Book a 2-dimensional data point set based on provided contiguous "bin edges".

The y values and errors will be set to 0.

Todo
Remove this when we switch to BinnedEstimates

References histoPath(), name(), and registerAO().

◆ book() [7/8]

template<size_t N>
ScatterNDPtr< N > & Rivet::Analysis::book ( ScatterNDPtr< N > & snd,
const string & name,
const bool copy_pts = false )
inlineprotectedinherited

Book a N-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 histoPath(), name(), Rivet::Kin::p(), refData(), and registerAO().

◆ book() [8/8]

template<size_t N>
ScatterNDPtr< N > & Rivet::Analysis::book ( ScatterNDPtr< N > & snd,
const unsigned int datasetID,
const unsigned int xAxisID,
const unsigned int yAxisID,
const bool copy_pts = false )
inlineprotectedinherited

Book a N-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 book(), and mkAxisCode().

◆ bookECorrelator() [1/6]

template<unsigned int N, unsigned int M>
ECorrPtr Rivet::CumulantAnalysis::bookECorrelator ( const string & name,
const vector< double > & binIn )
inline

Templated version of correlator booking which takes N desired harmonic and M number of particles, and given bins.

Todo
Rename to book(ECorrPtr, ...)

References bookECorrelator(), Rivet::Correlators::hVec(), and Rivet::Analysis::name().

◆ bookECorrelator() [2/6]

ECorrPtr Rivet::CumulantAnalysis::bookECorrelator ( const string & name,
const vector< int > & h1,
const vector< int > & h2,
const YODA::Estimate1D & hIn )
inline

Book a gapped ECorrelator with two harmonic vectors.

Todo
Rename to book(ECorrPtr, ...)

References bookECorrelator(), Rivet::Analysis::name(), and Rivet::Kin::p().

◆ bookECorrelator() [3/6]

template<unsigned int N, unsigned int M>
ECorrPtr Rivet::CumulantAnalysis::bookECorrelator ( const string & name,
const YODA::Estimate1D & hIn )
inline

Templated version of correlator booking which takes N desired harmonic and M number of particles.

Todo
Rename to book(ECorrPtr, ...)

References bookECorrelator(), Rivet::Correlators::hVec(), and Rivet::Analysis::name().

◆ bookECorrelator() [4/6]

ECorrPtr Rivet::CumulantAnalysis::bookECorrelator ( const string name,
const vector< int > & h,
const vector< double > & binIn )
inline

Book an ECorrelator in the same way as a histogram.

Todo
Rename to book(ECorrPtr, ...)

References Rivet::Analysis::book(), and Rivet::Analysis::name().

◆ bookECorrelator() [5/6]

ECorrPtr Rivet::CumulantAnalysis::bookECorrelator ( const string name,
const vector< int > & h,
const YODA::Estimate1D & hIn )
inline

Book an ECorrelator in the same way as a histogram.

Todo
Rename to book(ECorrPtr, ...)

References bookECorrelator(), Rivet::Analysis::name(), and Rivet::Kin::p().

Referenced by bookECorrelator(), bookECorrelator(), bookECorrelator(), bookECorrelator(), bookECorrelatorGap(), and bookECorrelatorGap().

◆ bookECorrelator() [6/6]

ECorrPtr Rivet::CumulantAnalysis::bookECorrelator ( const string name,
const vector< int > & h1,
const vector< int > & h2,
const vector< double > & binIn )
inline

Book a gapped ECorrelator with two harmonic vectors.

Todo
Rename to book(ECorrPtr, ...)

References Rivet::Analysis::book(), and Rivet::Analysis::name().

◆ bookECorrelatorGap() [1/2]

ECorrPtr Rivet::CumulantAnalysis::bookECorrelatorGap ( const string & name,
const vector< int > & h,
const YODA::Estimate1D & hIn )
inline

Shorthand for gapped correlators, splitting the harmonic vector into negative and positive components.

Todo
Rename to book(ECorrPtr, ...)

References bookECorrelator(), and Rivet::Analysis::name().

◆ bookECorrelatorGap() [2/2]

template<unsigned int N, unsigned int M>
ECorrPtr Rivet::CumulantAnalysis::bookECorrelatorGap ( const string & name,
const YODA::Estimate1D & hIn )
inline

Templated version of gapped correlator booking which takes N desired harmonic and M number of particles.

Todo
Rename to book(ECorrPtr, ...)

References bookECorrelator(), Rivet::Correlators::hVec(), and Rivet::Analysis::name().

◆ corrPlot()

void Rivet::CumulantAnalysis::corrPlot ( Scatter2DPtr h,
ECorrPtr e ) const
inline

Put an event-averaged correlator into a Scatter2D.

Reduces to cnTwoInt, but better with a proper name.

References cnTwoInt().

◆ crossSectionErrorPerEvent()

double Rivet::Analysis::crossSectionErrorPerEvent ( ) const
protectedinherited

Get the process cross-section error per generated event in pb. Throws if this hasn't been set.

◆ crossSectionPerEvent()

double Rivet::Analysis::crossSectionPerEvent ( ) const
protectedinherited

Get the process cross-section per generated event in pb. Throws if this hasn't been set.

◆ declare() [1/2]

template<typename PROJ>
const PROJ & Rivet::ProjectionApplier::declare ( const PROJ & proj,
const std::string & name ) const
inlineprotectedinherited

Register a contained projection (user-facing version).

Todo
Add SFINAE to require that PROJ inherit from Projection

Referenced by Rivet::CentralEtHCM::CentralEtHCM(), Rivet::CentralityEstimator::CentralityEstimator(), Rivet::ChargedLeptons::ChargedLeptons(), Rivet::ALICE::CLMultiplicity< true >::CLMultiplicity(), Rivet::DISDiffHadron::DISDiffHadron(), Rivet::DISFinalState::DISFinalState(), Rivet::DISKinematics::DISKinematics(), Rivet::DISLepton::DISLepton(), Rivet::EventMixingBase::EventMixingBase(), Rivet::GammaGammaKinematics::GammaGammaKinematics(), Rivet::GammaGammaLeptons::GammaGammaLeptons(), Rivet::GammaGammaLeptons::GammaGammaLeptons(), Rivet::GeneratedCentrality::GeneratedCentrality(), Rivet::HadronicFinalState::HadronicFinalState(), Rivet::HeavyHadrons::HeavyHadrons(), Rivet::Hemispheres::Hemispheres(), Rivet::InvisibleFinalState::InvisibleFinalState(), Rivet::LeadingParticlesFinalState::LeadingParticlesFinalState(), Rivet::LossyFinalState< FILTER >::LossyFinalState(), Rivet::LossyFinalState< FILTER >::LossyFinalState(), Rivet::MC_pPbMinBiasTrigger::MC_pPbMinBiasTrigger(), Rivet::MC_SumETFwdPbCentrality::MC_SumETFwdPbCentrality(), Rivet::ATLAS::MinBiasTrigger::MinBiasTrigger(), Rivet::MissingMomentum::MissingMomentum(), Rivet::NeutralFinalState::NeutralFinalState(), Rivet::NeutralFinalState::NeutralFinalState(), Rivet::NonHadronicFinalState::NonHadronicFinalState(), Rivet::ParisiTensor::ParisiTensor(), Rivet::PercentileProjection::PercentileProjection(), Rivet::PrimaryHadrons::PrimaryHadrons(), Rivet::PrimaryHadrons::PrimaryHadrons(), Rivet::SmearedMET::SmearedMET(), Rivet::SmearedMET::SmearedMET(), Rivet::SmearedMET::SmearedMET(), Rivet::Spherocity::Spherocity(), Rivet::ATLAS::SumET_PB_Centrality::SumET_PB_Centrality(), Rivet::ATLAS::SumET_PBPB_Centrality::SumET_PBPB_Centrality(), Rivet::TriggerCDFRun0Run1::TriggerCDFRun0Run1(), Rivet::TriggerCDFRun2::TriggerCDFRun2(), Rivet::UndressBeamLeptons::UndressBeamLeptons(), Rivet::ALICE::V0AndTrigger::V0AndTrigger(), Rivet::ALICE::V0Trigger<-1 >::V0Trigger(), Rivet::VetoedFinalState::VetoedFinalState(), Rivet::VisibleFinalState::VisibleFinalState(), Rivet::VisibleFinalState::VisibleFinalState(), Rivet::CentralityProjection::add(), Rivet::SimpleAnalysis::postInit(), Rivet::CentralityBinner< T, MDist >::setProjection(), and Rivet::VetoedFinalState::vetoFinalState().

◆ declare() [2/2]

template<typename PROJ>
const PROJ & Rivet::ProjectionApplier::declare ( const std::string & name,
const PROJ & proj ) const
inlineprotectedinherited

Register a contained projection (user-facing, arg-reordered version).

Todo
Add SFINAE to require that PROJ inherit from Projection

◆ declareCentrality()

const CentralityProjection & Rivet::Analysis::declareCentrality ( const SingleValueProjection & proj,
string calAnaName,
string calHistName,
const string projName,
PercentileOrder pctorder = PercentileOrder::DECREASING )
inherited

Book a CentralityProjection.

Using a SingleValueProjection, proj, giving the value of an experimental observable to be used as a centrality estimator, book a CentralityProjection based on the experimentally measured pecentiles of this observable (as given by the reference data for the calHistName histogram in the calAnaName analysis. If a preloaded file with the output of a run using the calAnaName analysis contains a valid generated calHistName histogram, it will be used as an optional percentile binning. Also if this preloaded file contains a histogram with the name calHistName with an appended "_IMP" This histogram will be used to add an optional centrality percentile based on the generated impact parameter. If increasing is true, a low (high) value of proj is assumed to correspond to a more peripheral (central) event.

◆ description()

virtual std::string Rivet::Analysis::description ( ) const
inlinevirtualinherited

Get a full description of the analysis.

Full textual description of this analysis, what it is useful for, what experimental techniques are applied, etc. Should be treated as a chunk of restructuredText (http://docutils.sourceforge.net/rst.html), with equations to be rendered as LaTeX with amsmath operators.

References Rivet::AnalysisInfo::description(), and info().

◆ divide() [1/6]

template<size_t DbnN, typename... AxisT>
void Rivet::Analysis::divide ( const YODA::BinnedDbn< DbnN, AxisT... > & h1,
const YODA::BinnedDbn< DbnN, AxisT... > & h2,
BinnedEstimatePtr< AxisT... > est ) const
inlineprotectedinherited

Helper for histogram division.

Note
Assigns to the (already registered) output estimate, est. Preserves the path information of the target.

◆ divide() [2/6]

template<typename... AxisT>
void Rivet::Analysis::divide ( const YODA::BinnedEstimate< AxisT... > & e1,
const YODA::BinnedEstimate< AxisT... > & e2,
BinnedEstimatePtr< AxisT... > est ) const
inlineprotectedinherited

Helper for binned estimate division.

Note
Assigns to the (already registered) output estimate, est. Preserves the path information of the target.

◆ divide() [3/6]

void Rivet::Analysis::divide ( const YODA::Counter & c1,
const YODA::Counter & c2,
Estimate0DPtr est ) const
protectedinherited

Helper for histogram division with raw YODA objects.

Note
Assigns to the (already registered) output estimate, est. Preserves the path information of the target.

◆ divide() [4/6]

void Rivet::Analysis::divide ( const YODA::Estimate0D & e1,
const YODA::Estimate0D & e2,
Estimate0DPtr est ) const
protectedinherited

Helper for estimate division with raw YODA objects.

Note
Assigns to the (already registered) output estimate, est. Preserves the path information of the target.

◆ divide() [5/6]

void Rivet::Analysis::divide ( CounterPtr c1,
CounterPtr c2,
Estimate0DPtr est ) const
protectedinherited

Helper for counter division.

Note
Assigns to the (already registered) output estimate, est. Preserves the path information of the target.

◆ divide() [6/6]

void Rivet::Analysis::divide ( Estimate0DPtr e1,
Estimate0DPtr e2,
Estimate0DPtr est ) const
protectedinherited

Helper for counter division.

Note
Assigns to the (already registered) output estimate, est. Preserves the path information of the target.

◆ efficiency() [1/4]

template<size_t DbnN, typename... AxisT>
void Rivet::Analysis::efficiency ( const YODA::BinnedDbn< DbnN, AxisT... > & h1,
const YODA::BinnedDbn< DbnN, AxisT... > & h2,
BinnedEstimatePtr< AxisT... > est ) const
inlineprotectedinherited

Helper for histogram efficiency calculation.

Note
Assigns to the (already registered) output estimate, est. Preserves the path information of the target.

◆ efficiency() [2/4]

template<typename... AxisT>
void Rivet::Analysis::efficiency ( const YODA::BinnedEstimate< AxisT... > & e1,
const YODA::BinnedEstimate< AxisT... > & e2,
BinnedEstimatePtr< AxisT... > est ) const
inlineprotectedinherited

Helper for estimate efficiency calculation.

Note
Assigns to the (already registered) output estimate, est. Preserves the path information of the target.

◆ efficiency() [3/4]

void Rivet::Analysis::efficiency ( const YODA::Counter & c1,
const YODA::Counter & c2,
Estimate0DPtr est ) const
inlineprotectedinherited

Helper for counter efficiency calculation.

Note
Assigns to the (already registered) output estimate, est. Preserves the path information of the target.

◆ efficiency() [4/4]

void Rivet::Analysis::efficiency ( CounterPtr c1,
CounterPtr c2,
Estimate0DPtr est ) const
inlineprotectedinherited

Helper for counter efficiency calculation.

Note
Assigns to the (already registered) output estimate, est. Preserves the path information of the target.

References efficiency().

Referenced by efficiency().

◆ effNumEvents()

double Rivet::Analysis::effNumEvents ( ) const
protectedinherited

Get the effective number of events seen (via the analysis handler).

Note
Use in the finalize phase only.

◆ fillScatter() [1/2]

template<typename F>
void Rivet::CumulantAnalysis::fillScatter ( Scatter2DPtr h,
const vector< double > & binx,
const F func,
vector< pair< double, double > > & yErr ) const
inline

Helper method for turning correlators into Scatter2Ds with error estimates.

Takes h a pointer to the resulting Scatter2D, binx the x-bins, a function func defining the transformation and a vector of errors err. See usage in the methods below. Can also be used directly in the analysis if a user wants to perform an unforseen transformation from correlators to Scatter2D.

◆ fillScatter() [2/2]

template<typename T>
void Rivet::CumulantAnalysis::fillScatter ( Scatter2DPtr h,
const vector< double > & binx,
const T & func )
inlinestatic

Helper method for turning correlators into Scatter2Ds.

Takes h a pointer to the resulting Scatter2D, binx the x-bins and a function func defining the transformation. Makes no attempt at statistical errors. See usage in the methods below. Can also be used directly in the analysis if a user wants to perform an unforseen transformation from correlators to Scatter2D.

Referenced by cnEightInt(), cnFourInt(), cnSixInt(), cnTwoInt(), vnFourDiff(), and vnTwoDiff().

◆ finalize()

virtual void Rivet::Analysis::finalize ( )
inlinevirtualinherited

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.

Reimplemented in Rivet::MC_JETS_BASE, Rivet::MC_KTSPLITTINGS_BASE, and Rivet::MC_PARTICLES_BASE.

◆ get()

template<typename PROJ>
const PROJ & Rivet::ProjectionApplier::get ( const std::string & name) const
inlineinherited

Get the named projection, specifying return type via a template argument (user-facing alias).

Todo
Add SFINAE to require that PROJ inherit from Projection

References getProjection().

Referenced by Rivet::FastJets::FastJets(), and Rivet::FastJets::FastJets().

◆ getAnalysisObject()

template<typename AO = MultiplexAOPtr>
AO Rivet::Analysis::getAnalysisObject ( const std::string & ananame,
const std::string & aoname )
inlineprotectedinherited

Get a data object from another analysis (e.g. preloaded calibration histogram).

References Rivet::MultiplexPtr< T >::get().

◆ getOption() [1/3]

bool Rivet::Analysis::getOption ( std::string optname,
bool def ) const
inlineinherited

Get an option for this analysis instance converted to a bool.

Specialisation for bool, to allow use of "yes/no", "true/false" and "on/off" strings, with fallback casting to bool based on int value. An empty value will be treated as false.

Warning
To avoid accidents, strings not matching one of the above patterns will throw a Rivet::ReadError exception.
Todo
Make this a template-specialisation... needs to be outside the class body?

References getOption(), and Rivet::toLower().

◆ getOption() [2/3]

std::string Rivet::Analysis::getOption ( std::string optname,
const char * def )
inlineinherited

Sane overload for literal character strings (which don't play well with stringstream).

Note this isn't a template specialisation, because we can't return a non-static char*, and T-as-return-type is built into the template function definition.

References getOption().

◆ getOption() [3/3]

template<typename T>
T Rivet::Analysis::getOption ( std::string optname,
T def ) const
inlineinherited

Get an option for this analysis instance converted to a specific type.

The return type is given by the specified def value, or by an explicit template type-argument, e.g. getOption<double>("FOO", 3).

Warning
To avoid accidents, strings not convertible to the requested type will throw a Rivet::ReadError exception.

◆ getProjection() [1/2]

const Projection & Rivet::ProjectionApplier::getProjection ( const std::string & name) const
inlineinherited

Get the named projection (non-templated, so returns as a reference to a Projection base class).

References Rivet::ProjectionHandler::getProjection(), and getProjHandler().

◆ getProjection() [2/2]

◆ getProjectionFromDeclQueue()

template<typename PROJ>
const PROJ & Rivet::ProjectionApplier::getProjectionFromDeclQueue ( const std::string name) const
inlineinherited

Get a named projection from this projection appliers declqueue TODO for TP: Recursion?

References MSG_ERROR.

Referenced by getProjection().

◆ info()

AnalysisInfo & Rivet::Analysis::info ( )
inlineinherited

Get the actual AnalysisInfo object in which all this metadata is stored (non-const).

Note
For internal use!

◆ init()

virtual void Rivet::Analysis::init ( )
inlinevirtualinherited

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.

Reimplemented in Rivet::MC_JETS_BASE, Rivet::MC_KTSPLITTINGS_BASE, and Rivet::MC_PARTICLES_BASE.

◆ integrate()

template<size_t DbnN, typename... AxisT>
void Rivet::Analysis::integrate ( const YODA::BinnedDbn< DbnN, AxisT... > & h,
BinnedEstimatePtr< AxisT... > est ) const
inlineprotectedinherited

Helper for converting a differential histo to an integral one.

Note
Assigns to the (already registered) output estimate, est. Preserves the path information of the target.

◆ name()

◆ nthPow() [1/2]

void Rivet::CumulantAnalysis::nthPow ( Scatter2DPtr h,
const double n,
const double k = 1.0 )
inlinestatic

Take the n th power of all points in h, and put the result back in the same Scatter2D.

Optionally put a k constant below the root.

◆ nthPow() [2/2]

void Rivet::CumulantAnalysis::nthPow ( Scatter2DPtr hOut,
const Scatter2DPtr hIn,
const double & n,
const double & k = 1.0 )
inlinestatic

Take the n th power of all points in hIn and put the result in hOut.

Optionally put a k constant below the root.

Referenced by vnEightInt(), vnFourInt(), vnSixInt(), and vnTwoInt().

◆ numEvents()

size_t Rivet::Analysis::numEvents ( ) const
protectedinherited

Get the number of events seen (via the analysis handler).

Note
Use in the finalize phase only.

◆ postInit()

virtual void Rivet::Analysis::postInit ( )
inlinevirtualinherited

A method called after init(), for cleaner subclassing.

Reimplemented in Rivet::SimpleAnalysis.

◆ preAnalyze()

virtual void Rivet::Analysis::preAnalyze ( const Event & )
inlinevirtualinherited

A method called before analyze(), for cleaner subclassing.

Reimplemented in Rivet::SimpleAnalysis.

◆ rawHookIn()

void Rivet::CumulantAnalysis::rawHookIn ( YODA::AnalysisObjectPtr yao)
inlinefinalvirtual

Reimplemented from Rivet::Analysis.

◆ rawHookOut()

void Rivet::CumulantAnalysis::rawHookOut ( const vector< MultiplexAOPtr > & raos,
size_t iW )
inlinefinalvirtual

Transform RAW ECorrelator Profiles to have content before writing them. Overloaded method from Analysis base class should not be overridden further.

Reimplemented from Rivet::Analysis.

References Rivet::Analysis::name(), Rivet::Analysis::sumW(), and Rivet::Analysis::sumW2().

◆ refData() [1/2]

template<typename T = YODA::Estimate1D>
const T & Rivet::Analysis::refData ( const string & hname) const
inlineprotectedinherited

Get reference data for a named histo

Todo
SFINAE to ensure that the type inherits from YODA::AnalysisObject?

References MSG_ERROR, MSG_TRACE, and name().

◆ refData() [2/2]

template<typename T = YODA::Estimate1D>
const T & Rivet::Analysis::refData ( unsigned int datasetId,
unsigned int xAxisId,
unsigned int yAxisId ) const
inlineprotectedinherited

Get reference data for a numbered histo

Todo
SFINAE to ensure that the type inherits from YODA::AnalysisObject?

References mkAxisCode(), and refData().

◆ registerAO()

template<typename YODAT>
MultiplexPtr< Multiplexer< YODAT > > Rivet::Analysis::registerAO ( const YODAT & yao)
inlineprotectedinherited

Register a new data object, optionally read in preloaded data.

Todo
What about if/when we want to make the final objects the Scatter or binned persistent type?

References analysisObjects(), Rivet::bookingCompatible(), Rivet::MultiplexPtr< T >::get(), getPreload(), MSG_ERROR, MSG_TRACE, MSG_WARNING, and name().

Referenced by book(), book(), book(), book(), book(), book(), book(), book(), book(), book(), and book().

◆ runInfo()

virtual std::string Rivet::Analysis::runInfo ( ) const
inlinevirtualinherited

Information about the events needed as input for this analysis.

Event types, energies, kinematic cuts, particles to be considered stable, etc. etc. Should be treated as a restructuredText bullet list (http://docutils.sourceforge.net/rst.html)

References info(), and Rivet::AnalysisInfo::runInfo().

◆ sampleEnvelope()

template<typename T>
pair< double, double > Rivet::CumulantAnalysis::sampleEnvelope ( T func)
inlinestatic

Calculate the bootstrapped sample envelope.

Calculate the bootstrapped sample envelope for the observable given by correlators and the transformation func.

Referenced by sampleError().

◆ sampleVariance()

template<typename T>
pair< double, double > Rivet::CumulantAnalysis::sampleVariance ( T func)
inlinestatic

Calculate the bootstrapped sample variance.

Calculate the bootstrapped sample variance for the observable given by correlators and the transformation func

Referenced by sampleError().

◆ setProjectionHandler()

void Rivet::ProjectionApplier::setProjectionHandler ( ProjectionHandler & projectionHandler) const
protectedinherited
Todo
AB: Add Doxygen comment, follow surrounding coding style

◆ summary()

virtual std::string Rivet::Analysis::summary ( ) const
inlinevirtualinherited

Get a short description of the analysis.

Short (one sentence) description used as an index entry. Use description() to provide full descriptive paragraphs of analysis details.

References info(), and Rivet::AnalysisInfo::summary().

◆ sumW()

double Rivet::Analysis::sumW ( ) const
protectedinherited

Get the sum of event weights seen (via the analysis handler).

Note
Use in the finalize phase only.

Referenced by Rivet::CumulantAnalysis::rawHookOut(), and sumOfWeights().

◆ sumW2()

double Rivet::Analysis::sumW2 ( ) const
protectedinherited

Get the sum of squared event weights seen (via the analysis handler).

Note
Use in the finalize phase only.

Referenced by Rivet::CumulantAnalysis::rawHookOut().

◆ syncDeclQueue()

void Rivet::Analysis::syncDeclQueue ( )
inlineinherited

Call the projection applier _syncDeclQueue() method.

Note
It should be hidden for all projection appliers other than analyses.

References Rivet::ProjectionApplier::markAsOwned().


The documentation for this class was generated from the following file: