Rivet  1.8.0
Classes | Typedefs | Enumerations | Functions | Variables
Rivet Namespace Reference

Classes

class  FastJets
 Project out jets found using the FastJet package jet algorithms. More...
class  MC_JetAnalysis
 Base class providing common functionality for MC jet validation analyses. More...
class  Analysis
 This is the base class of all analysis classes in Rivet. More...
struct  AnaHandleLess
class  AnalysisHandler
class  AnalysisInfo
class  AnalysisLoader
 Internal class which loads and registers analyses from plugin libs. More...
class  Cmp
class  Cmp< Projection >
 Specialization of Cmp for checking the ordering of two {Projection}s. More...
class  Cmp< double >
 Specialization of Cmp for checking the ordering of two floating point numbers. More...
class  Event
class  Error
 Generic runtime Rivet error. More...
class  RangeError
 Error for e.g. use of invalid bin ranges. More...
class  LogicError
 Error specialisation for places where alg logic has failed. More...
class  PidError
 Error specialisation for failures relating to particle ID codes. More...
class  WeightError
 Errors relating to event/bin weights Arises in computing statistical quantities because e.g. the bin weight is zero or negative. More...
class  HistoHandler
 The projection handler is a central repository for histograms (and other analysis stats objects) to be used in a Rivet analysis run. This eliminates the need for analysis classes to contain large numbers of histogram pointer members, and allows histograms to be accessed via more user-friendly names than C++ variable names allow. More...
class  Jet
 Representation of a clustered jet of particles. More...
class  LorentzTransform
 Object implementing Lorentz transform calculations and boosts. More...
class  Matrix3
 Specialisation of MatrixN to aid 3 dimensional rotations. More...
class  EigenSystem
 Handy object containing results of a diagonalization. More...
struct  EigenPairCmp
 Comparison functor for "eigen-pairs". More...
class  Matrix
 General $ N $-dimensional mathematical matrix object. More...
class  Vector3
 Three-dimensional specialisation of Vector. More...
class  FourVector
 Specialisation of VectorN to a general (non-momentum) Lorentz 4-vector. More...
class  FourMomentum
 Specialized version of the FourVector with momentum/energy functionality. More...
class  Vector
 A minimal base class for $ N $-dimensional vectors. More...
class  Particle
 Representation of particles from a HepMC::GenEvent. More...
class  ParticleBase
 Base class for particle-like things like Particle and Jet. More...
class  ParticleNames
class  Projection
 Base class for all Rivet projections. More...
class  ProjectionApplier
 Common base class for Projection and Analysis, used for internal polymorphism. More...
class  ProjectionHandler
 The projection handler is a central repository for projections to be used in a Rivet analysis run. More...
class  AxesDefinition
 Base class for projections which define a spatial basis. More...
class  Beam
 Project out the incoming beams. More...
class  BeamThrust
class  CentralEtHCM
 Summed $ E_\perp $ of central particles in HCM system. More...
class  ChargedFinalState
 Project only charged final state particles. More...
class  ChargedLeptons
 Get charged final-state leptons. More...
class  ClusteredPhotons
 Find final state photons which in a cone around any particle in the "signal" final state. More...
class  ConstRandomFilter
 Functor used to implement constant random lossiness. More...
class  ConstLossyFinalState
 Randomly lose a constant fraction of particles. More...
class  DISFinalState
 Final state particles boosted to the hadronic center of mass system. More...
class  DISKinematics
 Get the DIS kinematic variables and relevant boosts for an event. More...
class  DISLepton
 Get the incoming and outgoing leptons in a DIS event. More...
class  FinalState
 Project out all final-state particles in an event. Probably the most important projection in Rivet! More...
class  FoxWolframMoments
 Calculate Fox-Wolfram moments. More...
class  FParameter
class  HadronicFinalState
 Project only hadronic final state particles. More...
class  Hemispheres
 Calculate the hemisphere masses and broadenings. More...
class  IdentifiedFinalState
 Produce a final state which only contains specified particle IDs. More...
class  InitialQuarks
 Project out quarks from the hard process in $ e^+ e^- \to Z^0 $ events. More...
class  InvMassFinalState
 Identify particles which can be paired to fit within a given invariant mass window. More...
class  IsolationProjection
class  JetAlg
 Abstract base class for projections which can return a set of Jets. More...
class  JetShape
 Calculate the jet shape. More...
class  LeadingParticlesFinalState
 Get the highest-pT occurrences of FS particles with the specified PDG IDs. More...
class  ClusteredLepton
class  LeptonClusters
 Cluster photons from a given FS to all charged particles (typically leptons) from signal and store the original charged particles and photons as particles() while the newly created clustered lepton objects are accessible as clusteredLeptons() More...
class  LossyFinalState
 Templated FS projection which can lose some of the supplied particles. More...
class  MergedFinalState
 Get final state particles merged from two FinalState projections. More...
class  MissingMomentum
 Calculate missing $ E $, $ E_\perp $ etc. More...
class  Multiplicity
 Count the final-state particles in an event. More...
class  NeutralFinalState
 Project only neutral final state particles. More...
class  NonHadronicFinalState
 Project only hadronic final state particles. More...
class  ParisiTensor
 Calculate the Parisi event shape tensor (or linear momentum tensor). More...
class  PVertex
 Get the position of the primary vertex of an event. More...
class  Sphericity
 Calculate the sphericity event shape. More...
class  Spherocity
 Get the transverse spherocity scalars for hadron-colliders. More...
class  SVertex
 Determine secondary vertices. More...
class  Thrust
 Get the e+ e- thrust basis and the thrust, thrust major and thrust minor scalars. More...
class  TotalVisibleMomentum
 Get the total energy vector, allowing missing $ E_T $ etc. to be calculated. More...
class  TriggerCDFRun0Run1
 Access to the min bias triggers used by CDF in Run 0 and Run 1. More...
class  TriggerCDFRun2
 Access to the min bias triggers used by CDF in Run 0 and Run 1. More...
class  TriggerUA5
 Access to the min bias triggers used by UA5. More...
class  UnstableFinalState
 Project out all physical-but-decayed particles in an event. More...
class  VetoedFinalState
 FS modifier to exclude classes of particles from the final state. More...
class  VisibleFinalState
 Final state modifier excluding particles which are not experimentally visible. More...
class  WFinder
 Convenience finder of leptonically decaying Ws. More...
class  ZFinder
 Convenience finder of leptonically decaying Zs. More...
struct  DPSXPoint
 Container for x-axis point details. More...
struct  DPSXYPoint
 Container for x-axis point details. More...
class  Run
 Interface to handle a run of events read from a HepMC stream or file. More...
class  BinnedHistogram
class  Log

Typedefs

typedef vector
< fastjet::PseudoJet > 
PseudoJets
 Typedef for a collection of PseudoJets.
typedef AnalysisAnalysisPtr
 Smart (shared) pointer for handling projections.
typedef shared_ptr< AnalysisAnaHandle
 Typedef for Analysis (smart) pointer.
typedef Cmp< ProjectionPCmp
 Typedef for Cmp<Projection>
typedef Error Exception
 Rivet::Exception is a synonym for Rivet::Error.
typedef std::map< HistoFormat,
std::string > 
HistoFormatMap
 Typedef for a map of histogram format enums to strings.
typedef std::map< std::string,
HistoFormat
HistoFormatMapR
 Typedef for a map of histogram format name strings to enums.
typedef std::vector< HistoFormatHistoFormatList
 Typedef for a collection of histogram format name enums.
typedef std::vector< JetJets
 Typedef for a collection of Jet objects.
typedef Matrix< 4 > Matrix4
typedef Vector3 ThreeVector
typedef FourVector Vector4
typedef ProjectionProjectionPtr
typedef const ProjectionConstProjectionPtr
typedef shared_ptr< const
Projection
ProjHandle
 Typedef for Projection (smart) pointer.
typedef IsolationProjection
< JetAlg, JetAlg
AllJetsIso
typedef IsolationProjection
< FinalState, FinalState
AllParticleIso
typedef IsolationProjection
< FinalState, JetAlg
ParticleFromJetIso
typedef std::vector< double > BinEdges
 Typedef for a collection of bin edges.
Particle declarations
typedef std::vector< ParticleParticleVector
 Typedef for a vector of Particle objects.
typedef std::pair< Particle,
Particle
ParticlePair
 Typedef for a pair of Particle objects.
PdgId declarations
typedef int PdgId
 Typedef for a PDG ID code.
typedef std::pair< PdgId, PdgIdPdgIdPair
 Typedef for a pair of particle names.

Enumerations

enum  CmpState {
  UNDEFINED = -2, ASC = -1, ORDERED = -1, EQUIVALENT = 0,
  DESC = 1, UNORDERED = 1, ANTIORDERED = 1
}
 Enumerate the possible states of a Cmp object.
enum  HistoFormat { AIDAML, FLAT, ROOT }
 Enumeration of available histogram output formats.
enum  Sign { MINUS = -1, ZERO = 0, PLUS = 1 }
 Enum for signs of numbers.
enum  RapScheme { PSEUDORAPIDITY = 0, ETA = 0, RAPIDITY = 1, YRAP = 1 }
 Enum for rapidity variable to be used in calculating $ R $, applying rapidity cuts, etc.
enum  PhiMapping { MINUSPI_PLUSPI, ZERO_2PI }
 Enum for range of $ \phi $ to be mapped into.

Functions

Vector3 momentum3 (const fastjet::PseudoJet &pj)
 Make a 3-momentum vector from a FastJet pseudo-jet.
FourMomentum momentum (const fastjet::PseudoJet &pj)
 Make a 4-momentum vector from a FastJet pseudo-jet.
string toString (const AnalysisInfo &ai)
 String representation.
std::ostream & operator<< (std::ostream &os, const AnalysisInfo &ai)
 Stream an AnalysisInfo as a text description.
bool compatible (PdgId p, PdgId allowed)
bool compatible (const PdgIdPair &pair, const PdgIdPair &allowedpair)
bool compatible (const ParticlePair &ppair, const PdgIdPair &allowedpair)
 Check particle compatibility of Particle pairs.
bool compatible (const PdgIdPair &allowedpair, const ParticlePair &ppair)
 Check particle compatibility of Particle pairs (for symmetric completeness)
bool compatible (const PdgIdPair &pair, const set< PdgIdPair > &allowedpairs)
set< PdgIdPairintersection (const set< PdgIdPair > &a, const set< PdgIdPair > &b)
 Return the intersection of two sets of {PdgIdPair}s.
template<typename T >
Cmp< T > cmp (const T &t1, const T &t2)
 Global helper function for easy creation of Cmp objects.
Cmp< Projectionpcmp (const Projection &p1, const Projection &p2)
 Global helper function for easy creation of Cmp<Projection> objects.
Cmp< Projectionpcmp (const Projection &parent1, const Projection &parent2, const string &pname)
Cmp< Projectionpcmp (const Projection *parent1, const Projection &parent2, const string &pname)
Cmp< Projectionpcmp (const Projection &parent1, const Projection *parent2, const string &pname)
Cmp< Projectionpcmp (const Projection *parent1, const Projection *parent2, const string &pname)
HistoFormatMap getKnownHistoFormats ()
 Function which returns a map from histogram format enums to the corresponding name strings.
HistoFormatMapR getKnownHistoFormatsR ()
 Function which returns a map from histogram format name strings to the corresponding enums.
HistoFormatList getKnownHistoFormatEnums ()
std::vector< std::string > getKnownHistoFormatNames ()
 Function which returns a vector of all the histogram format name strings.
double deltaR (const Jet &j1, const Jet &j2, RapScheme scheme=PSEUDORAPIDITY)
double deltaR (const Jet &j, const Particle &p, RapScheme scheme=PSEUDORAPIDITY)
double deltaR (const Particle &p, const Jet &j, RapScheme scheme=PSEUDORAPIDITY)
double deltaR (const Jet &j, const FourMomentum &v, RapScheme scheme=PSEUDORAPIDITY)
double deltaR (const Jet &j, const FourVector &v, RapScheme scheme=PSEUDORAPIDITY)
double deltaR (const Jet &j, const Vector3 &v)
double deltaR (const Jet &j, double eta, double phi)
double deltaR (const FourMomentum &v, const Jet &j, RapScheme scheme=PSEUDORAPIDITY)
double deltaR (const FourVector &v, const Jet &j, RapScheme scheme=PSEUDORAPIDITY)
double deltaR (const Vector3 &v, const Jet &j)
double deltaR (double eta, double phi, const Jet &j)
double deltaPhi (const Jet &j1, const Jet &j2)
double deltaPhi (const Jet &j, const Particle &p)
double deltaPhi (const Particle &p, const Jet &j)
double deltaPhi (const Jet &j, const FourMomentum &v)
double deltaPhi (const Jet &j, const FourVector &v)
double deltaPhi (const Jet &j, const Vector3 &v)
double deltaPhi (const Jet &j, double phi)
double deltaPhi (const FourMomentum &v, const Jet &j)
double deltaPhi (const FourVector &v, const Jet &j)
double deltaPhi (const Vector3 &v, const Jet &j)
double deltaPhi (double phi, const Jet &j)
double deltaEta (const Jet &j1, const Jet &j2)
double deltaEta (const Jet &j, const Particle &p)
double deltaEta (const Particle &p, const Jet &j)
double deltaEta (const Jet &j, const FourMomentum &v)
double deltaEta (const Jet &j, const FourVector &v)
double deltaEta (const Jet &j, const Vector3 &v)
double deltaEta (const Jet &j, double eta)
double deltaEta (const FourMomentum &v, const Jet &j)
double deltaEta (const FourVector &v, const Jet &j)
double deltaEta (const Vector3 &v, const Jet &j)
double deltaEta (double eta, const Jet &j)
double lorentzGamma (const double beta)
LorentzTransform inverse (const LorentzTransform &lt)
LorentzTransform combine (const LorentzTransform &a, const LorentzTransform &b)
FourVector transform (const LorentzTransform &lt, const FourVector &v4)
string toString (const LorentzTransform &lt)
ostream & operator<< (std::ostream &out, const LorentzTransform &lt)
template<size_t N>
EigenSystem< N > diagonalize (const Matrix< N > &m)
template<size_t N>
const string toString (const typename EigenSystem< N >::EigenPair &e)
template<size_t N>
ostream & operator<< (std::ostream &out, const typename EigenSystem< N >::EigenPair &e)
template<size_t N>
Matrix< N > multiply (const Matrix< N > &a, const Matrix< N > &b)
template<size_t N>
Matrix< N > divide (const Matrix< N > &, const double)
template<size_t N>
Matrix< N > operator* (const Matrix< N > &a, const Matrix< N > &b)
template<size_t N>
Matrix< N > add (const Matrix< N > &a, const Matrix< N > &b)
template<size_t N>
Matrix< N > subtract (const Matrix< N > &a, const Matrix< N > &b)
template<size_t N>
Matrix< N > operator+ (const Matrix< N > a, const Matrix< N > &b)
template<size_t N>
Matrix< N > operator- (const Matrix< N > a, const Matrix< N > &b)
template<size_t N>
Matrix< N > multiply (const double a, const Matrix< N > &m)
template<size_t N>
Matrix< N > multiply (const Matrix< N > &m, const double a)
template<size_t N>
Matrix< N > operator* (const double a, const Matrix< N > &m)
template<size_t N>
Matrix< N > operator* (const Matrix< N > &m, const double a)
template<size_t N>
Vector< N > multiply (const Matrix< N > &a, const Vector< N > &b)
template<size_t N>
Vector< N > operator* (const Matrix< N > &a, const Vector< N > &b)
template<size_t N>
Matrix< N > transpose (const Matrix< N > &m)
template<size_t N>
Matrix< N > inverse (const Matrix< N > &m)
template<size_t N>
double det (const Matrix< N > &m)
template<size_t N>
double trace (const Matrix< N > &m)
template<size_t N>
string toString (const Matrix< N > &m)
 Make string representation.
template<size_t N>
ostream & operator<< (std::ostream &out, const Matrix< N > &m)
 Stream out string representation.
template<size_t N>
bool fuzzyEquals (const Matrix< N > &ma, const Matrix< N > &mb, double tolerance=1E-5)
 Compare two matrices by index, allowing for numerical precision.
template<size_t N>
bool isZero (const Matrix< N > &m, double tolerance=1E-5)
 External form of numerically safe nullness check.
Vector3 multiply (const double, const Vector3 &)
Vector3 multiply (const Vector3 &, const double)
Vector3 add (const Vector3 &, const Vector3 &)
Vector3 operator* (const double, const Vector3 &)
Vector3 operator* (const Vector3 &, const double)
Vector3 operator/ (const Vector3 &, const double)
Vector3 operator+ (const Vector3 &, const Vector3 &)
Vector3 operator- (const Vector3 &, const Vector3 &)
double dot (const Vector3 &a, const Vector3 &b)
Vector3 cross (const Vector3 &a, const Vector3 &b)
Vector3 subtract (const Vector3 &a, const Vector3 &b)
double angle (const Vector3 &a, const Vector3 &b)
 Angle (in radians) between two 3-vectors.
double polarRadius2 (const Vector3 &v)
 Calculate transverse length sq. $ \rho^2 $ of a 3-vector.
double perp2 (const Vector3 &v)
 Synonym for polarRadius2.
double rho2 (const Vector3 &v)
 Synonym for polarRadius2.
double polarRadius (const Vector3 &v)
 Calculate transverse length $ \rho $ of a 3-vector.
double perp (const Vector3 &v)
 Synonym for polarRadius.
double rho (const Vector3 &v)
 Synonym for polarRadius.
double azimuthalAngle (const Vector3 &v, const PhiMapping mapping=ZERO_2PI)
 Calculate azimuthal angle of a 3-vector. Returns a number in (-pi, pi] or in [0, 2pi) according to the mapping scheme selected.
double phi (const Vector3 &v, const PhiMapping mapping=ZERO_2PI)
 Synonym for azimuthalAngle.
double polarAngle (const Vector3 &v)
 Calculate polar angle of a 3-vector.
double theta (const Vector3 &v)
 Synonym for polarAngle.
double pseudorapidity (const Vector3 &v)
 Calculate pseudorapidity of a 3-vector.
double eta (const Vector3 &v)
 Synonym for pseudorapidity.
double contract (const FourVector &a, const FourVector &b)
 Contract two 4-vectors, with metric signature (+ - - -).
double dot (const FourVector &a, const FourVector &b)
 Contract two 4-vectors, with metric signature (+ - - -).
FourVector multiply (const double a, const FourVector &v)
FourVector multiply (const FourVector &v, const double a)
FourVector operator* (const double a, const FourVector &v)
FourVector operator* (const FourVector &v, const double a)
FourVector operator/ (const FourVector &v, const double a)
FourVector add (const FourVector &a, const FourVector &b)
FourVector operator+ (const FourVector &a, const FourVector &b)
FourVector operator- (const FourVector &a, const FourVector &b)
double invariant (const FourVector &lv)
double angle (const FourVector &a, const FourVector &b)
 Angle (in radians) between spatial parts of two Lorentz vectors.
double angle (const Vector3 &a, const FourVector &b)
 Angle (in radians) between spatial parts of two Lorentz vectors.
double angle (const FourVector &a, const Vector3 &b)
 Angle (in radians) between spatial parts of two Lorentz vectors.
double polarRadius2 (const FourVector &v)
 Calculate transverse length sq. $ \rho^2 $ of a Lorentz vector.
double perp2 (const FourVector &v)
 Synonym for polarRadius2.
double rho2 (const FourVector &v)
 Synonym for polarRadius2.
double polarRadius (const FourVector &v)
 Calculate transverse length $ \rho $ of a Lorentz vector.
double perp (const FourVector &v)
 Synonym for polarRadius.
double rho (const FourVector &v)
 Synonym for polarRadius.
double azimuthalAngle (const FourVector &v, const PhiMapping mapping=ZERO_2PI)
 Calculate azimuthal angle of a Lorentz vector.
double phi (const FourVector &v, const PhiMapping mapping=ZERO_2PI)
 Synonym for azimuthalAngle.
double polarAngle (const FourVector &v)
 Calculate polar angle of a Lorentz vector.
double theta (const FourVector &v)
 Synonym for polarAngle.
double pseudorapidity (const FourVector &v)
 Calculate pseudorapidity of a Lorentz vector.
double eta (const FourVector &v)
 Synonym for pseudorapidity.
FourMomentum multiply (const double a, const FourMomentum &v)
FourMomentum multiply (const FourMomentum &v, const double a)
FourMomentum operator* (const double a, const FourMomentum &v)
FourMomentum operator* (const FourMomentum &v, const double a)
FourMomentum operator/ (const FourMomentum &v, const double a)
FourMomentum add (const FourMomentum &a, const FourMomentum &b)
FourMomentum operator+ (const FourMomentum &a, const FourMomentum &b)
FourMomentum operator- (const FourMomentum &a, const FourMomentum &b)
double mass (const FourMomentum &v)
 Get the mass $ m = \sqrt{E^2 - p^2} $ (the Lorentz self-invariant) of a momentum 4-vector.
double massT (const FourMomentum &v)
 Get the transverse mass $ m_T = m \sin{\theta} $ of a momentum 4-vector.
double mass2 (const FourMomentum &v)
 Get the squared mass $ m^2 = E^2 - p^2 $ (the Lorentz self-invariant) of a momentum 4-vector.
double massT2 (const FourMomentum &v)
 Get the squared transverse mass $ m_T^2 = m^2 \sin^2{\theta} $ of a momentum 4-vector.
double rapidity (const FourMomentum &v)
 Calculate the rapidity of a momentum 4-vector.
double pT2 (const FourMomentum &v)
 Calculate the squared transverse momentum $ p_T^2 $ of a momentum 4-vector.
double pT (const FourMomentum &v)
 Calculate the transverse momentum $ p_T $ of a momentum 4-vector.
double Et2 (const FourMomentum &v)
 Calculate the transverse energy squared, $ E_T^2 = E^2 \sin^2{\theta} $ of a momentum 4-vector.
double Et (const FourMomentum &v)
 Calculate the transverse energy $ E_T = E \sin{\theta} $ of a momentum 4-vector.
Vector3 boostVector (const FourMomentum &v)
 Calculate the velocity boost vector of a momentum 4-vector.
template<size_t N>
double mod2 (const Vector< N > &v)
template<size_t N>
double mod (const Vector< N > &v)
template<size_t N>
bool fuzzyEquals (const Vector< N > &va, const Vector< N > &vb, double tolerance=1E-5)
 Compare two vectors by index, allowing for numerical precision.
template<size_t N>
bool isZero (const Vector< N > &v, double tolerance=1E-5)
 External form of numerically safe nullness check.
double deltaR (const Particle &p1, const Particle &p2, RapScheme scheme=PSEUDORAPIDITY)
double deltaR (const Particle &p, const FourMomentum &v, RapScheme scheme=PSEUDORAPIDITY)
double deltaR (const Particle &p, const FourVector &v, RapScheme scheme=PSEUDORAPIDITY)
double deltaR (const Particle &p, const Vector3 &v)
double deltaR (const Particle &p, double eta, double phi)
double deltaR (const FourMomentum &v, const Particle &p, RapScheme scheme=PSEUDORAPIDITY)
double deltaR (const FourVector &v, const Particle &p, RapScheme scheme=PSEUDORAPIDITY)
double deltaR (const Vector3 &v, const Particle &p)
double deltaR (double eta, double phi, const Particle &p)
double deltaPhi (const Particle &p1, const Particle &p2)
double deltaPhi (const Particle &p, const FourMomentum &v)
double deltaPhi (const Particle &p, const FourVector &v)
double deltaPhi (const Particle &p, const Vector3 &v)
double deltaPhi (const Particle &p, double phi)
double deltaPhi (const FourMomentum &v, const Particle &p)
double deltaPhi (const FourVector &v, const Particle &p)
double deltaPhi (const Vector3 &v, const Particle &p)
double deltaPhi (double phi, const Particle &p)
double deltaEta (const Particle &p1, const Particle &p2)
double deltaEta (const Particle &p, const FourMomentum &v)
double deltaEta (const Particle &p, const FourVector &v)
double deltaEta (const Particle &p, const Vector3 &v)
double deltaEta (const Particle &p, double eta)
double deltaEta (const FourMomentum &v, const Particle &p)
double deltaEta (const FourVector &v, const Particle &p)
double deltaEta (const Vector3 &v, const Particle &p)
double deltaEta (double eta, const Particle &p)
const std::string & toParticleName (PdgId p)
 Print a PdgId as a named string.
PdgId toParticleId (const std::string &pname)
 Print a PdgId as a named string.
std::pair< PdgId, PdgIdmake_pdgid_pair (PdgId a, PdgId b)
 Convenience maker of particle ID pairs from PdgIds.
std::pair< PdgId, PdgIdmake_pdgid_pair (const std::string &a, const std::string &b)
 Convenience maker of particle ID pairs from particle names.
std::string toBeamsString (const PdgIdPair &pair)
 Print a PdgIdPair as a string.
template<typename PROJ >
const PROJ & pcast (const Projection &p)
 Convenience method for casting to a const Projection reference.
template<typename PROJ >
const PROJ * pcast (const Projection *p)
 Convenience method for casting to a const Projection pointer.
bool cmpMomByPt (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByAscPt (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByP (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByAscP (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByEt (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByAscEt (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByE (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByAscE (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByDescPseudorapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByAscPseudorapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByDescAbsPseudorapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByAscAbsPseudorapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByDescRapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByAscRapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByDescAbsRapidity (const FourMomentum &a, const FourMomentum &b)
bool cmpMomByAscAbsRapidity (const FourMomentum &a, const FourMomentum &b)
string version ()
 A function to get the Rivet version string.
template<typename T >
std::ostream & operator<< (std::ostream &os, const std::vector< T > &vec)
 Convenient function for streaming out vectors of any streamable object.
template<typename T >
std::ostream & operator<< (std::ostream &os, const std::list< T > &vec)
 Convenient function for streaming out lists of any streamable object.
AIDA::IAnalysisFactory * createAnalysisFactory ()
 Get an AIDA system (LWH impl.)
map< string, BinEdgesgetBinEdges (string papername)
map< string, BinEdgesgetBinEdges (const map< string, vector< DPSXPoint > > &xpoints)
map< string, vector< DPSXPoint > > getDPSXValsErrs (string papername)
map< string, vector< DPSXYPoint > > getDPSXYValsErrs (string papername)
string getDatafilePath (string papername)
 Get the file system path to the AIDA reference file for this paper.
double integral (AIDA::IHistogram1D *histo)
 Return the integral over the histogram bins.
vector< GenParticle * > particles (const GenEvent &ge)
vector< GenParticle * > particles (const GenEvent *ge)
vector< GenVertex * > vertices (const GenEvent &ge)
vector< GenVertex * > vertices (const GenEvent *ge)
const std::pair
< GenVertex::particles_in_const_iterator,
GenVertex::particles_in_const_iterator > 
particles_in (const GenVertex *gv)
const std::pair
< GenVertex::particles_out_const_iterator,
GenVertex::particles_out_const_iterator > 
particles_out (const GenVertex *gv)
vector< GenParticle * > particles (GenVertex *gv, HepMC::IteratorRange range=HepMC::relatives)
std::ostream & operator<< (Log &log, int level)
 Streaming output to a logger must have a Log::Level/int as its first argument.
int nocase_cmp (const string &s1, const string &s2)
string toLower (const string &s)
string toUpper (const string &s)
bool startsWith (const string &s, const string &start)
bool endsWith (const string &s, const string &end)
 Check whether a string end is found at the end of s.
vector< string > pathsplit (const string &path)
 Split a path string with colon delimiters. Ignores zero-length substrings. Designed for getting elements of filesystem paths, naturally.
vector< string > split (const string &path, const string &UNUSED(delim)=":")
string pathjoin (const vector< string > &paths)
 Join several filesystem paths together with a delimiter character. Note that this does NOT join path elements together with a platform-portable directory delimiter, cf. the Python {os.path.join}!
 DECLARE_RIVET_PLUGIN (ALEPH_1991_S2435284)
 DECLARE_RIVET_PLUGIN (ALEPH_1996_S3196992)
 DECLARE_RIVET_PLUGIN (ALEPH_1996_S3486095)
 DECLARE_RIVET_PLUGIN (ALEPH_1999_S4193598)
 DECLARE_RIVET_PLUGIN (ALEPH_2004_S5765862)
 DECLARE_RIVET_PLUGIN (ALICE_2010_S8624100)
 DECLARE_RIVET_PLUGIN (ALICE_2010_S8625980)
 DECLARE_RIVET_PLUGIN (ALICE_2010_S8706239)
 DECLARE_RIVET_PLUGIN (ALICE_2011_S8909580)
 DECLARE_RIVET_PLUGIN (ALICE_2011_S8945144)
 DECLARE_RIVET_PLUGIN (ATLAS_2010_CONF_2010_049)
 DECLARE_RIVET_PLUGIN (ATLAS_2010_S8591806)
 DECLARE_RIVET_PLUGIN (ATLAS_2010_S8817804)
 DECLARE_RIVET_PLUGIN (ATLAS_2010_S8894728)
 DECLARE_RIVET_PLUGIN (ATLAS_2010_S8914702)
 DECLARE_RIVET_PLUGIN (ATLAS_2010_S8918562)
 DECLARE_RIVET_PLUGIN (ATLAS_2010_S8919674)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_CONF_2011_090)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_CONF_2011_098)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_I919017)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_I925932)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_I926145)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_I944826)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_S8924791)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_S8971293)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_S8983313)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_S8994773)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_S9002537)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_S9019561)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_S9041966)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_S9108483)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_S9120807)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_S9126244)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_S9128077)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_S9131140)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_S9212183)
 DECLARE_RIVET_PLUGIN (ATLAS_2011_S9225137)
 DECLARE_RIVET_PLUGIN (ATLAS_2012_I1083318)
 DECLARE_RIVET_PLUGIN (ATLAS_2012_I1084540)
 DECLARE_RIVET_PLUGIN (BELLE_2006_S6265367)
 DECLARE_RIVET_PLUGIN (CDF_1988_S1865951)
 DECLARE_RIVET_PLUGIN (CDF_1990_S2089246)
 DECLARE_RIVET_PLUGIN (CDF_1993_S2742446)
 DECLARE_RIVET_PLUGIN (CDF_1994_S2952106)
 DECLARE_RIVET_PLUGIN (CDF_1996_S3108457)
 DECLARE_RIVET_PLUGIN (CDF_1996_S3349578)
 DECLARE_RIVET_PLUGIN (CDF_1996_S3418421)
 DECLARE_RIVET_PLUGIN (CDF_1997_S3541940)
 DECLARE_RIVET_PLUGIN (CDF_1998_S3618439)
 DECLARE_RIVET_PLUGIN (CDF_2000_S4155203)
 DECLARE_RIVET_PLUGIN (CDF_2000_S4266730)
 DECLARE_RIVET_PLUGIN (CDF_2001_S4517016)
 DECLARE_RIVET_PLUGIN (CDF_2001_S4563131)
 DECLARE_RIVET_PLUGIN (CDF_2001_S4751469)
 DECLARE_RIVET_PLUGIN (CDF_2004_S5839831)
 DECLARE_RIVET_PLUGIN (CDF_2005_S6080774)
 DECLARE_RIVET_PLUGIN (CDF_2005_S6217184)
 DECLARE_RIVET_PLUGIN (CDF_2006_S6450792)
 DECLARE_RIVET_PLUGIN (CDF_2006_S6653332)
 DECLARE_RIVET_PLUGIN (CDF_2007_S7057202)
 DECLARE_RIVET_PLUGIN (CDF_2008_LEADINGJETS)
 DECLARE_RIVET_PLUGIN (CDF_2008_NOTE_9351)
 DECLARE_RIVET_PLUGIN (CDF_2008_S7540469)
 DECLARE_RIVET_PLUGIN (CDF_2008_S7541902)
 DECLARE_RIVET_PLUGIN (CDF_2008_S7782535)
 DECLARE_RIVET_PLUGIN (CDF_2008_S7828950)
 DECLARE_RIVET_PLUGIN (CDF_2008_S8093652)
 DECLARE_RIVET_PLUGIN (CDF_2008_S8095620)
 DECLARE_RIVET_PLUGIN (CDF_2009_NOTE_9936)
 DECLARE_RIVET_PLUGIN (CDF_2009_S8233977)
 DECLARE_RIVET_PLUGIN (CDF_2009_S8383952)
 DECLARE_RIVET_PLUGIN (CDF_2009_S8436959)
 DECLARE_RIVET_PLUGIN (CDF_2010_S8591881_DY)
 DECLARE_RIVET_PLUGIN (CDF_2010_S8591881_QCD)
 DECLARE_RIVET_PLUGIN (CMS_2010_S8547297)
 DECLARE_RIVET_PLUGIN (CMS_2010_S8656010)
 DECLARE_RIVET_PLUGIN (CMS_2011_S8884919)
 DECLARE_RIVET_PLUGIN (CMS_2011_S8941262)
 DECLARE_RIVET_PLUGIN (CMS_2011_S8950903)
 DECLARE_RIVET_PLUGIN (CMS_2011_S8957746)
 DECLARE_RIVET_PLUGIN (CMS_2011_S8968497)
 DECLARE_RIVET_PLUGIN (CMS_2011_S8973270)
 DECLARE_RIVET_PLUGIN (CMS_2011_S8978280)
 DECLARE_RIVET_PLUGIN (CMS_2011_S9086218)
 DECLARE_RIVET_PLUGIN (CMS_2011_S9088458)
 DECLARE_RIVET_PLUGIN (CMS_2011_S9120041)
 DECLARE_RIVET_PLUGIN (CMS_2011_S9215166)
 DECLARE_RIVET_PLUGIN (CMS_QCD_10_024)
 DECLARE_RIVET_PLUGIN (D0_1996_S3214044)
 DECLARE_RIVET_PLUGIN (D0_1996_S3324664)
 DECLARE_RIVET_PLUGIN (D0_2000_S4480767)
 DECLARE_RIVET_PLUGIN (D0_2001_S4674421)
 DECLARE_RIVET_PLUGIN (D0_2004_S5992206)
 DECLARE_RIVET_PLUGIN (D0_2006_S6438750)
 DECLARE_RIVET_PLUGIN (D0_2007_S7075677)
 DECLARE_RIVET_PLUGIN (D0_2008_S6879055)
 DECLARE_RIVET_PLUGIN (D0_2008_S7554427)
 DECLARE_RIVET_PLUGIN (D0_2008_S7662670)
 DECLARE_RIVET_PLUGIN (D0_2008_S7719523)
 DECLARE_RIVET_PLUGIN (D0_2008_S7837160)
 DECLARE_RIVET_PLUGIN (D0_2008_S7863608)
 DECLARE_RIVET_PLUGIN (D0_2009_S8202443)
 DECLARE_RIVET_PLUGIN (D0_2009_S8320160)
 DECLARE_RIVET_PLUGIN (D0_2009_S8349509)
 DECLARE_RIVET_PLUGIN (D0_2010_S8566488)
 DECLARE_RIVET_PLUGIN (D0_2010_S8570965)
 DECLARE_RIVET_PLUGIN (D0_2010_S8671338)
 DECLARE_RIVET_PLUGIN (D0_2010_S8821313)
 DECLARE_RIVET_PLUGIN (DELPHI_1995_S3137023)
 DECLARE_RIVET_PLUGIN (DELPHI_1996_S3430090)
 DECLARE_RIVET_PLUGIN (DELPHI_2002_069_CONF_603)
 DECLARE_RIVET_PLUGIN (DELPHI_2003_WUD_03_11)
 DECLARE_RIVET_PLUGIN (E735_1998_S3905616)
 DECLARE_RIVET_PLUGIN (EXAMPLE)
 DECLARE_RIVET_PLUGIN (H1_1994_S2919893)
 DECLARE_RIVET_PLUGIN (H1_1995_S3167097)
 DECLARE_RIVET_PLUGIN (H1_2000_S4129130)
 DECLARE_RIVET_PLUGIN (JADE_1998_S3612880)
 DECLARE_RIVET_PLUGIN (JADE_OPAL_2000_S4300807)
 DECLARE_RIVET_PLUGIN (LHCB_2010_S8758301)
 DECLARE_RIVET_PLUGIN (LHCB_2011_I917009)
 DECLARE_RIVET_PLUGIN (LHCB_2011_I919315)
 DECLARE_RIVET_PLUGIN (MC_DIJET)
 DECLARE_RIVET_PLUGIN (MC_DIPHOTON)
 DECLARE_RIVET_PLUGIN (MC_GENERIC)
 DECLARE_RIVET_PLUGIN (MC_HJETS)
 DECLARE_RIVET_PLUGIN (MC_IDENTIFIED)
 DECLARE_RIVET_PLUGIN (MC_JETS)
 DECLARE_RIVET_PLUGIN (MC_LEADJETUE)
 DECLARE_RIVET_PLUGIN (MC_PDFS)
 DECLARE_RIVET_PLUGIN (MC_PHOTONJETS)
 DECLARE_RIVET_PLUGIN (MC_PHOTONJETUE)
 DECLARE_RIVET_PLUGIN (MC_SUSY)
 DECLARE_RIVET_PLUGIN (MC_TTBAR)
 DECLARE_RIVET_PLUGIN (MC_VH2BB)
 DECLARE_RIVET_PLUGIN (MC_WJETS)
 DECLARE_RIVET_PLUGIN (MC_WPOL)
 DECLARE_RIVET_PLUGIN (MC_WWJETS)
 DECLARE_RIVET_PLUGIN (MC_XS)
 DECLARE_RIVET_PLUGIN (MC_ZJETS)
 DECLARE_RIVET_PLUGIN (MC_ZZJETS)
 DECLARE_RIVET_PLUGIN (OPAL_1993_S2692198)
 DECLARE_RIVET_PLUGIN (OPAL_1998_S3780481)
 DECLARE_RIVET_PLUGIN (OPAL_2001_S4553896)
 DECLARE_RIVET_PLUGIN (OPAL_2004_S6132243)
 DECLARE_RIVET_PLUGIN (PDG_HADRON_MULTIPLICITIES)
 DECLARE_RIVET_PLUGIN (PDG_HADRON_MULTIPLICITIES_RATIOS)
 DECLARE_RIVET_PLUGIN (SFM_1984_S1178091)
 DECLARE_RIVET_PLUGIN (STAR_2006_S6500200)
 DECLARE_RIVET_PLUGIN (STAR_2006_S6860818)
 DECLARE_RIVET_PLUGIN (STAR_2006_S6870392)
 DECLARE_RIVET_PLUGIN (STAR_2008_S7869363)
 DECLARE_RIVET_PLUGIN (STAR_2008_S7993412)
 DECLARE_RIVET_PLUGIN (STAR_2009_UE_HELEN)
 DECLARE_RIVET_PLUGIN (TASSO_1990_S2148048)
 DECLARE_RIVET_PLUGIN (UA1_1990_S2044935)
 DECLARE_RIVET_PLUGIN (UA5_1982_S875503)
 DECLARE_RIVET_PLUGIN (UA5_1986_S1583476)
 DECLARE_RIVET_PLUGIN (UA5_1987_S1640666)
 DECLARE_RIVET_PLUGIN (UA5_1988_S1867512)
 DECLARE_RIVET_PLUGIN (UA5_1989_S1926373)
 DECLARE_RIVET_PLUGIN (ZEUS_2001_S4815815)
bool chargedParticleFilter (const Particle &p)
bool hadronFilter (const Particle &p)
bool nonHadronFilter (const Particle &p)
double get2dClosestApproach (const HepMC::GenParticle &track, const Vector3 &vtx3pos)
double get3dClosestApproach (const HepMC::GenParticle &track, const Vector3 &vtx3pos)
double get2dDecayLength (const Vector3 &vtx1, const Vector3 &vtx2, const FourMomentum &jetaxis)
 Return Decay Length Significance between two vertices in transverse plane.
double get3dDecayLength (const Vector3 &vtx1, const Vector3 &vtx2, const FourMomentum &jetaxis)
 Return 3 dimensional Decay Length Significance between vertices.
bool mod2Cmp (const Vector3 &a, const Vector3 &b)
bool isInvisibleFilter (const Particle &p)
Installation directory paths
string getLibPath ()
 Get library install path.
string getDataPath ()
 Get data install path.
string getRivetDataPath ()
 Get Rivet data install path.
Analysis library search paths
void setAnalysisLibPaths (const std::vector< std::string > &paths)
 Set the Rivet analysis plugin library search paths.
void addAnalysisLibPath (const std::string &extrapath)
 Set the Rivet analysis plugin library search paths.
vector< string > getAnalysisLibPaths ()
 Get Rivet analysis plugin library search paths.
string findAnalysisLibFile (const std::string &filename)
 Find the first file of the given name in the analysis library search dirs.
Analysis data/metadata paths and search functions
vector< string > getAnalysisRefPaths ()
 Get Rivet analysis reference data search paths.
string findAnalysisRefFile (const std::string &filename, const std::vector< std::string > &pathprepend=std::vector< std::string >(), const std::vector< std::string > &pathappend=std::vector< std::string >())
 Find the first file of the given name in the ref data file search dirs.
vector< string > getAnalysisInfoPaths ()
 Get Rivet analysis info metadata search paths.
string findAnalysisInfoFile (const std::string &filename, const std::vector< std::string > &pathprepend=std::vector< std::string >(), const std::vector< std::string > &pathappend=std::vector< std::string >())
 Find the first file of the given name in the analysis info file search dirs.
vector< string > getAnalysisPlotPaths ()
 Get Rivet analysis plot style search paths.
string findAnalysisPlotFile (const std::string &filename, const std::vector< std::string > &pathprepend=std::vector< std::string >(), const std::vector< std::string > &pathappend=std::vector< std::string >())
 Find the first file of the given name in the analysis plot file search dirs.
Jet comparison functions for STL sorting
bool cmpJetsByPt (const Jet &a, const Jet &b)
 Compare jets by $ p_\perp $ (descending - usual sorting for HEP) Use this so that highest $ p_\perp $ is at the front of the list.
bool cmpJetsByAscPt (const Jet &a, const Jet &b)
 Compare jets by $ p_\perp $ (ascending) Use this so that lowest $ p_\perp $ is at the front of the list.
bool cmpJetsByP (const Jet &a, const Jet &b)
 Compare jets by descending momentum, $ p $.
bool cmpJetsByAscP (const Jet &a, const Jet &b)
 Compare jets by ascending momentum, $ p $.
bool cmpJetsByEt (const Jet &a, const Jet &b)
 Use this so that highest $ E_\perp $ is at the front of the list.
bool cmpJetsByEtDesc (const Jet &a, const Jet &b)
 Use this so that lowest $ E_\perp $ is at the front of the list.
bool cmpJetsByE (const Jet &a, const Jet &b)
 Compare jets by $ E $ (descending - usual sorting for HEP) Use this so that highest $ E $ is at the front of the list.
bool cmpJetsByAscE (const Jet &a, const Jet &b)
 Compare jets by $ E $ (ascending) Use this so that lowest $ E $ is at the front of the list.
bool cmpJetsByDescPseudorapidity (const Jet &a, const Jet &b)
 Compare jets by $ \eta $ (descending) Use this so that highest $ \eta $ is at the front of the list.
bool cmpJetsByAscPseudorapidity (const Jet &a, const Jet &b)
 Compare jets by $ \eta $ (ascending) Use this so that lowest $ \eta $ is at the front of the list.
bool cmpJetsByDescAbsPseudorapidity (const Jet &a, const Jet &b)
 Compare jets by $ |\eta| $ (descending) Use this so that highest $ |\eta| $ is at the front of the list.
bool cmpJetsByAscAbsPseudorapidity (const Jet &a, const Jet &b)
 Compare jets by $ |\eta| $ (ascending) Use this so that lowest $ |\eta| $ is at the front of the list.
bool cmpJetsByDescRapidity (const Jet &a, const Jet &b)
 Compare jets by $ y $ (descending) Use this so that highest $ y $ is at the front of the list.
bool cmpJetsByAscRapidity (const Jet &a, const Jet &b)
 Compare jets by $ y $ (ascending) Use this so that lowest $ y $ is at the front of the list.
bool cmpJetsByDescAbsRapidity (const Jet &a, const Jet &b)
 Compare jets by $ |y| $ (descending) Use this so that highest $ |y| $ is at the front of the list.
bool cmpJetsByAscAbsRapidity (const Jet &a, const Jet &b)
 Compare jets by $ |y| $ (ascending) Use this so that lowest $ |y| $ is at the front of the list.
Comparison functions for safe floating point equality tests
bool isZero (double val, double tolerance=1E-8)
bool isZero (long val, double UNUSED(tolerance)=1E-8)
bool fuzzyEquals (double a, double b, double tolerance=1E-5)
 Compare two floating point numbers for equality with a degree of fuzziness.
bool fuzzyEquals (long a, long b, double UNUSED(tolerance)=1E-5)
 Compare two integral-type numbers for equality with a degree of fuzziness.
bool fuzzyGtrEquals (double a, double b, double tolerance=1E-5)
 Compare two floating point numbers for >= with a degree of fuzziness.
bool fuzzyGtrEquals (long a, long b, double UNUSED(tolerance)=1E-5)
 Compare two integral-type numbers for >= with a degree of fuzziness.
bool fuzzyLessEquals (double a, double b, double tolerance=1E-5)
 Compare two floating point numbers for <= with a degree of fuzziness.
bool fuzzyLessEquals (long a, long b, double UNUSED(tolerance)=1E-5)
 Compare two integral-type numbers for <= with a degree of fuzziness.
Miscellaneous numerical helpers
template<typename NUM >
NUM sqr (NUM a)
 Named number-type squaring operation.
template<typename Num >
Num add_quad (Num a, Num b)
 Named number-type addition in quadrature operation.
template<typename Num >
Num add_quad (Num a, Num b, Num c)
 Named number-type addition in quadrature operation.
template<typename Num >
Num intpow (Num val, unsigned int exp)
 A more efficient version of pow for raising numbers to integer powers.
int sign (double val)
 Find the sign of a number.
int sign (int val)
 Find the sign of a number.
int sign (long val)
 Find the sign of a number.
Binning helper functions
vector< double > linspace (double start, double end, size_t nbins)
 Make a list of nbins + 1 values equally spaced between start and end inclusive.
vector< double > logspace (double start, double end, size_t nbins)
 Make a list of nbins + 1 values exponentially spaced between start and end inclusive.
template<typename NUM >
int index_between (const NUM &val, const vector< NUM > &binedges)
 Return the bin index of the given value, val, given a vector of bin edges.
Statistics functions
double mean (const vector< int > &sample)
 Calculate the mean of a sample.
double mean_err (const vector< int > &sample)
double covariance (const vector< int > &sample1, const vector< int > &sample2)
 Calculate the covariance (variance) between two samples.
double covariance_err (const vector< int > &sample1, const vector< int > &sample2)
 Calculate the error on the covariance (variance) of two samples, assuming poissonian errors.
double correlation (const vector< int > &sample1, const vector< int > &sample2)
 Calculate the correlation strength between two samples.
double correlation_err (const vector< int > &sample1, const vector< int > &sample2)
 Calculate the error of the correlation strength between two samples assuming Poissonian errors.
Angle range mappings
double mapAngleMPiToPi (double angle)
 Map an angle into the range (-PI, PI].
double mapAngle0To2Pi (double angle)
 Map an angle into the range [0, 2PI).
double mapAngle0ToPi (double angle)
 Map an angle into the range [0, PI].
Phase space measure helpers
double deltaPhi (double phi1, double phi2)
 Calculate the difference between two angles in radians.
double deltaEta (double eta1, double eta2)
double deltaR (double rap1, double phi1, double rap2, double phi2)
double rapidity (double E, double pz)
 Calculate a rapidity value from the supplied energy E and longitudinal momentum pz.
\f$ |\Delta eta| \f$ calculations from 3-vectors
double deltaEta (const Vector3 &a, const Vector3 &b)
 Calculate the difference in pseudorapidity between two spatial vectors.
double deltaEta (const Vector3 &v, double eta2)
 Calculate the difference in pseudorapidity between two spatial vectors.
double deltaEta (double eta1, const Vector3 &v)
 Calculate the difference in pseudorapidity between two spatial vectors.
\f$ \Delta phi \f$ calculations from 3-vectors
double deltaPhi (const Vector3 &a, const Vector3 &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const Vector3 &v, double phi2)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (double phi1, const Vector3 &v)
 Calculate the difference in azimuthal angle between two spatial vectors.
\f$ \Delta R \f$ calculations from 3-vectors
double deltaR (const Vector3 &a, const Vector3 &b)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two spatial vectors.
double deltaR (const Vector3 &v, double eta2, double phi2)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two spatial vectors.
double deltaR (double eta1, double phi1, const Vector3 &v)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two spatial vectors.
\f$ \Delta R \f$ calculations from 4-vectors
double deltaR (const FourVector &a, const FourVector &b, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors. There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter. Use of this scheme option is discouraged in this case since RAPIDITY is only a valid option for vectors whose type is really the FourMomentum derived class.
double deltaR (const FourVector &v, double eta2, double phi2, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors. There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter.
double deltaR (double eta1, double phi1, const FourVector &v, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors. There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter.
double deltaR (const FourMomentum &a, const FourMomentum &b, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors. There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter.
double deltaR (const FourMomentum &v, double eta2, double phi2, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors. There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter.
double deltaR (double eta1, double phi1, const FourMomentum &v, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors. There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter.
double deltaR (const FourMomentum &a, const FourVector &b, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors. There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter.
double deltaR (const FourVector &a, const FourMomentum &b, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors. There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter.
double deltaR (const FourMomentum &a, const Vector3 &b)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between a three-vector and a four-vector.
double deltaR (const Vector3 &a, const FourMomentum &b)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between a three-vector and a four-vector.
double deltaR (const FourVector &a, const Vector3 &b)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between a three-vector and a four-vector.
double deltaR (const Vector3 &a, const FourVector &b)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between a three-vector and a four-vector.
\f$ \Delta phi \f$ calculations from 4-vectors
double deltaPhi (const FourMomentum &a, const FourMomentum &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const FourMomentum &v, double phi2)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (double phi1, const FourMomentum &v)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const FourVector &a, const FourVector &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const FourVector &v, double phi2)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (double phi1, const FourVector &v)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const FourVector &a, const FourMomentum &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const FourMomentum &a, const FourVector &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const FourVector &a, const Vector3 &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const Vector3 &a, const FourVector &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const FourMomentum &a, const Vector3 &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaPhi (const Vector3 &a, const FourMomentum &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
\f$ |\Delta eta| \f$ calculations from 4-vectors
double deltaEta (const FourMomentum &a, const FourMomentum &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (const FourMomentum &v, double eta2)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (double eta1, const FourMomentum &v)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (const FourVector &a, const FourVector &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (const FourVector &v, double eta2)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (double eta1, const FourVector &v)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (const FourVector &a, const FourMomentum &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (const FourMomentum &a, const FourVector &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (const FourVector &a, const Vector3 &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (const Vector3 &a, const FourVector &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (const FourMomentum &a, const Vector3 &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
double deltaEta (const Vector3 &a, const FourMomentum &b)
 Calculate the difference in azimuthal angle between two spatial vectors.
4-vector string representations
const string toString (const FourVector &lv)
 Render a 4-vector as a string.
std::ostream & operator<< (std::ostream &out, const FourVector &lv)
 Write a 4-vector to an ostream.
String representations of vectors
template<size_t N>
const string toString (const Vector< N > &v)
 Make string representation.
template<size_t N>
std::ostream & operator<< (std::ostream &out, const Vector< N > &v)
 Stream out string representation.
String representation
std::string toString (const ParticlePair &pair)
 Print a ParticlePair as a string.
std::ostream & operator<< (std::ostream &os, const ParticlePair &pp)
 Allow ParticlePair to be passed to an ostream.
Comparison functors
bool cmpParticleByPt (const Particle &a, const Particle &b)
 Sort by descending transverse momentum, $ p_\perp $.
bool cmpParticleByAscPt (const Particle &a, const Particle &b)
 Sort by ascending transverse momentum, $ p_\perp $.
bool cmpParticleByP (const Particle &a, const Particle &b)
 Sort by descending momentum, $ p $.
bool cmpParticleByAscP (const Particle &a, const Particle &b)
 Sort by ascending momentum, $ p $.
bool cmpParticleByEt (const Particle &a, const Particle &b)
 Sort by descending transverse energy, $ E_\perp $.
bool cmpParticleByAscEt (const Particle &a, const Particle &b)
 Sort by ascending transverse energy, $ E_\perp $.
bool cmpParticleByE (const Particle &a, const Particle &b)
 Sort by descending energy, $ E $.
bool cmpParticleByAscE (const Particle &a, const Particle &b)
 Sort by ascending energy, $ E $.
bool cmpParticleByDescPseudorapidity (const Particle &a, const Particle &b)
 Sort by descending pseudorapidity, $ \eta $.
bool cmpParticleByAscPseudorapidity (const Particle &a, const Particle &b)
 Sort by ascending pseudorapidity, $ \eta $.
bool cmpParticleByDescAbsPseudorapidity (const Particle &a, const Particle &b)
 Sort by descending absolute pseudorapidity, $ |\eta| $.
bool cmpParticleByAscAbsPseudorapidity (const Particle &a, const Particle &b)
 Sort by ascending absolute pseudorapidity, $ |\eta| $.
bool cmpParticleByDescRapidity (const Particle &a, const Particle &b)
 Sort by descending rapidity, $ y $.
bool cmpParticleByAscRapidity (const Particle &a, const Particle &b)
 Sort by ascending rapidity, $ y $.
bool cmpParticleByDescAbsRapidity (const Particle &a, const Particle &b)
 Sort by descending absolute rapidity, $ |y| $.
bool cmpParticleByAscAbsRapidity (const Particle &a, const Particle &b)
 Sort by ascending absolute rapidity, $ |y| $.
Stand-alone functions
ParticlePair beams (const Event &e)
 Function to get beam particles from an event.
PdgIdPair beamIds (const Event &e)
 Function to get beam particle IDs from an event.
PdgIdPair beamIds (const ParticlePair &beams)
 Function to get beam particle IDs from a pair of particles.
double sqrtS (const Event &e)
 Function to get beam centre of mass energy from an event.
double sqrtS (const ParticlePair &beams)
 Function to get beam centre of mass energy from a pair of particles.
double sqrtS (const FourMomentum &pa, const FourMomentum &pb)
 Function to get beam centre of mass energy from a pair of beam momenta.

Variables

static const double pi = 3.14159265358979323846
static const double twopi = 2*pi
static const double halfpi = pi/2
static const double pi2 = pi*pi
static const double Avogadro = 6.0221367e+23/mole
static const double c_light = 2.99792458e+8 * m/s
static const double c_squared = c_light * c_light
static const double h_Planck = 6.6260755e-34 * joule*s
static const double hbar_Planck = h_Planck/twopi
static const double hbarc = hbar_Planck * c_light
static const double hbarc_squared = hbarc * hbarc
static const double electron_charge = - eplus
static const double e_squared = eplus * eplus
static const double electron_mass_c2 = 0.51099906 * MeV
static const double proton_mass_c2 = 938.27231 * MeV
static const double neutron_mass_c2 = 939.56563 * MeV
static const double amu_c2 = 931.49432 * MeV
static const double amu = amu_c2/c_squared
static const double mu0 = 4*pi*1.e-7 * henry/m
static const double epsilon0 = 1./(c_squared*mu0)
static const double elm_coupling = e_squared/(4*pi*epsilon0)
static const double fine_structure_const = elm_coupling/hbarc
static const double classic_electr_radius = elm_coupling/electron_mass_c2
static const double electron_Compton_length = hbarc/electron_mass_c2
static const double Bohr_radius = electron_Compton_length/fine_structure_const
static const double alpha_rcl2
static const double twopi_mc2_rcl2
static const double k_Boltzmann = 8.617385e-11 * MeV/kelvin
static const double STP_Temperature = 273.15*kelvin
static const double STP_Pressure = 1.*atmosphere
static const double kGasThreshold = 10.*mg/cm3
static const double universe_mean_density = 1.e-25*g/cm3
const double MAXDOUBLE = std::numeric_limits<double>::max()
const double MAXINT = std::numeric_limits<int>::max()
const double PI = M_PI
 A pre-defined value of $ \pi $.
const double TWOPI = 2*M_PI
 A pre-defined value of $ 2\pi $.
const double HALFPI = M_PI_2
 A pre-defined value of $ \pi/2 $.
static const double millimeter = 1.
static const double millimeter2 = millimeter*millimeter
static const double millimeter3 = millimeter*millimeter*millimeter
static const double centimeter = 10.*millimeter
static const double centimeter2 = centimeter*centimeter
static const double centimeter3 = centimeter*centimeter*centimeter
static const double meter = 1000.*millimeter
static const double meter2 = meter*meter
static const double meter3 = meter*meter*meter
static const double kilometer = 1000.*meter
static const double kilometer2 = kilometer*kilometer
static const double kilometer3 = kilometer*kilometer*kilometer
static const double parsec = 3.0856775807e+16*meter
static const double micrometer = 1.e-6 *meter
static const double nanometer = 1.e-9 *meter
static const double angstrom = 1.e-10*meter
static const double picometer = 1.e-12*meter
static const double femtometer = 1.e-15*meter
static const double attometer = 1.e-18*meter
static const double fermi = femtometer
static const double mm = millimeter
static const double mm2 = millimeter2
static const double mm3 = millimeter3
static const double cm = centimeter
static const double cm2 = centimeter2
static const double cm3 = centimeter3
static const double m = meter
static const double m2 = meter2
static const double m3 = meter3
static const double km = kilometer
static const double km2 = kilometer2
static const double km3 = kilometer3
static const double pc = parsec
static const double picobarn = 1.0
static const double barn = 1.0e+12* picobarn
static const double millibarn = 1.0e-3 * barn
static const double microbarn = 1.0e-6 * barn
static const double nanobarn = 1.0e-9 * barn
static const double femtobarn = 1.0e-15 * barn
static const double attobarn = 1.0e-18 * barn
static const double radian = 1.
static const double milliradian = 1.e-3*radian
static const double degree = (3.14159265358979323846/180.0)*radian
static const double steradian = 1.
static const double rad = radian
static const double mrad = milliradian
static const double sr = steradian
static const double deg = degree
static const double nanosecond = 1.0
static const double second = 1.e+9 *nanosecond
static const double millisecond = 1.e-3 *second
static const double microsecond = 1.e-6 *second
static const double picosecond = 1.e-12*second
static const double hertz = 1.0/second
static const double kilohertz = 1.e+3*hertz
static const double megahertz = 1.e+6*hertz
static const double ns = nanosecond
static const double s = second
static const double ms = millisecond
static const double eplus = 1.0
static const double e_SI = 1.60217733e-19
static const double coulomb = eplus/e_SI
static const double gigaelectronvolt = 1.
static const double electronvolt = 1.e-9*gigaelectronvolt
static const double kiloelectronvolt = 1.e-6*gigaelectronvolt
static const double megaelectronvolt = 1.e-3*gigaelectronvolt
static const double teraelectronvolt = 1.e+3*gigaelectronvolt
static const double petaelectronvolt = 1.e+6*gigaelectronvolt
static const double joule = electronvolt/e_SI
static const double eV = electronvolt
static const double keV = kiloelectronvolt
static const double MeV = megaelectronvolt
static const double GeV = gigaelectronvolt
static const double TeV = teraelectronvolt
static const double PeV = petaelectronvolt
static const double eV2 = eV*eV
static const double keV2 = keV*keV
static const double MeV2 = MeV*MeV
static const double GeV2 = GeV*GeV
static const double TeV2 = TeV*TeV
static const double PeV2 = PeV*PeV
static const double kilogram = joule*second*second/(meter*meter)
static const double gram = 1.e-3*kilogram
static const double milligram = 1.e-3*gram
static const double kg = kilogram
static const double g = gram
static const double mg = milligram
static const double watt = joule/second
static const double newton = joule/meter
static const double hep_pascal = newton/m2
static const double bar = 100000*pascal
static const double atmosphere = 101325*pascal
static const double ampere = coulomb/second
static const double milliampere = 1.e-3*ampere
static const double microampere = 1.e-6*ampere
static const double nanoampere = 1.e-9*ampere
static const double megavolt = megaelectronvolt/eplus
static const double kilovolt = 1.e-3*megavolt
static const double volt = 1.e-6*megavolt
static const double ohm = volt/ampere
static const double farad = coulomb/volt
static const double millifarad = 1.e-3*farad
static const double microfarad = 1.e-6*farad
static const double nanofarad = 1.e-9*farad
static const double picofarad = 1.e-12*farad
static const double weber = volt*second
static const double tesla = volt*second/meter2
static const double gauss = 1.e-4*tesla
static const double kilogauss = 1.e-1*tesla
static const double henry = weber/ampere
static const double kelvin = 1.
static const double mole = 1.
static const double becquerel = 1./second
static const double curie = 3.7e+10 * becquerel
static const double gray = joule/kilogram
static const double candela = 1.
static const double lumen = candela*steradian
static const double lux = lumen/meter2
static const double perCent = 0.01
static const double perThousand = 0.001
static const double perMillion = 0.000001
static const double MAXRAPIDITY = 100000.0
 A sensible default maximum value of rapidity for Rivet analyses to use.
static const double MaxRapidity = 100000.0
Static const convenience particle ID names
static const PdgId ELECTRON = 11
static const PdgId POSITRON = -11
static const PdgId PROTON = 2212
static const PdgId ANTIPROTON = -2212
static const PdgId PHOTON = 22
static const PdgId NEUTRON = 2112
static const PdgId ANTINEUTRON = -2112
static const PdgId MUON = 13
static const PdgId ANTIMUON = -13
static const PdgId NU_E = 12
static const PdgId NU_EBAR = -12
static const PdgId NU_MU = 14
static const PdgId NU_MUBAR = -14
static const PdgId NU_TAU = 16
static const PdgId NU_TAUBAR = -16
static const PdgId PIPLUS = 211
static const PdgId PIMINUS = -211
static const PdgId PI0 = 111
static const PdgId K0L = 130
static const PdgId K0S = 310
static const PdgId KPLUS = 321
static const PdgId KMINUS = -321
static const PdgId LAMBDA = 3122
static const PdgId LAMBDABAR = -3122
static const PdgId XIMINUS = 3312
static const PdgId XIPLUS = -3312
static const PdgId OMEGAMINUS = 3334
static const PdgId OMEGAPLUS = -3334
static const PdgId TAU = 15
static const PdgId ANTITAU = -15
static const PdgId EMINUS = 11
static const PdgId EPLUS = -11
static const PdgId P = 2212
static const PdgId PBAR = -2212
static const PdgId GLUON = 21
static const PdgId GAMMA = 22
static const PdgId WPLUSBOSON = 24
static const PdgId WMINUSBOSON = -24
static const PdgId ZBOSON = 23
static const PdgId HIGGS = 25
static const PdgId DQUARK = 1
static const PdgId UQUARK = 2
static const PdgId SQUARK = 3
static const PdgId CQUARK = 4
static const PdgId BQUARK = 5
static const PdgId TQUARK = 6
static const PdgId ANY = 10000

Ranges and intervals

enum  RangeBoundary { OPEN = 0, SOFT = 0, CLOSED = 1, HARD = 1 }
template<typename NUM >
bool inRange (NUM value, NUM low, NUM high, RangeBoundary lowbound=CLOSED, RangeBoundary highbound=OPEN)
 Determine if value is in the range low to high, for floating point numbers.
template<typename NUM >
bool inRange (NUM value, pair< NUM, NUM > lowhigh, RangeBoundary lowbound=CLOSED, RangeBoundary highbound=OPEN)
 Alternative version of inRange for doubles, which accepts a pair for the range arguments.
bool inRange (int value, int low, int high, RangeBoundary lowbound=CLOSED, RangeBoundary highbound=CLOSED)
 Determine if value is in the range low to high, for integer types.
bool inRange (int value, pair< int, int > lowhigh, RangeBoundary lowbound=CLOSED, RangeBoundary highbound=OPEN)
 Alternative version of inRange for ints, which accepts a pair for the range arguments.

Detailed Description

Author:
Andy Buckley
Date:
2009-01-30
Todo:
Include more projections as required, e.g. ChargedFinalState, FastJets, ZFinder...
Todo:
Include more projections as required, e.g. ChargedFinalState, FastJets, ZFinder...

Enumeration Type Documentation

Represents whether an interval is open (non-inclusive) or closed (inclusive).

For example, the interval $ [0, \pi) $ is closed (an inclusive boundary) at 0, and open (a non-inclusive boundary) at $ \pi $.


Function Documentation

bool Rivet::compatible ( PdgId  p,
PdgId  allowed 
) [inline]

Find whether ParticleName p is compatible with the template ParticleName allowed. Effectively this is asking whether p is a subset of allowed.

Referenced by Rivet::AnalysisHandler::analyze(), compatible(), and intersection().

bool Rivet::compatible ( const PdgIdPair &  pair,
const PdgIdPair &  allowedpair 
) [inline]

Find whether PdgIdPair pair is compatible with the template PdgIdPair allowedpair. This assesses whether either of the two possible pairings of pair's constituents is compatible.

References compatible().

bool Rivet::compatible ( const PdgIdPair &  pair,
const set< PdgIdPair > &  allowedpairs 
) [inline]

Find whether a PdgIdPair pair is compatible with at least one template beam pair in a set allowedpairs.

References compatible().

double Rivet::deltaEta ( double  eta1,
double  eta2 
) [inline]

Calculate the difference between two pseudorapidities, returning the unsigned value.

double Rivet::deltaPhi ( double  phi1,
double  phi2 
) [inline]

Calculate the difference between two angles in radians.

Returns in the range [0, PI].

References mapAngle0ToPi().

double Rivet::deltaR ( double  rap1,
double  phi1,
double  rap2,
double  phi2 
) [inline]

Calculate the distance between two points in 2D rapidity-azimuthal ("\f$ \eta-\phi \f$") space. The phi values are given in radians.

References sqr().

template<size_t N>
EigenSystem< N > Rivet::diagonalize ( const Matrix< N > &  m)

Diagonalize an NxN matrix, returning a collection of pairs of eigenvalues and eigenvectors, ordered decreasing in eigenvalue.

References Rivet::Vector< N >::set().

string Rivet::findAnalysisInfoFile ( const string &  filename,
const vector< string > &  pathprepend = std::vector<std::string>(),
const vector< string > &  pathappend = std::vector<std::string>() 
)

Find the first file of the given name in the analysis info file search dirs.

Note:
If none found, returns an empty string

References getAnalysisInfoPaths().

Referenced by Rivet::AnalysisInfo::make().

string Rivet::findAnalysisLibFile ( const string &  filename)

Find the first file of the given name in the analysis library search dirs.

Note:
If none found, returns an empty string

References getAnalysisLibPaths().

string Rivet::findAnalysisPlotFile ( const string &  filename,
const vector< string > &  pathprepend = std::vector<std::string>(),
const vector< string > &  pathappend = std::vector<std::string>() 
)

Find the first file of the given name in the analysis plot file search dirs.

Note:
If none found, returns an empty string

References getAnalysisPlotPaths().

string Rivet::findAnalysisRefFile ( const string &  filename,
const vector< string > &  pathprepend = std::vector<std::string>(),
const vector< string > &  pathappend = std::vector<std::string>() 
)

Find the first file of the given name in the ref data file search dirs.

Note:
If none found, returns an empty string

References getAnalysisRefPaths().

Referenced by getDatafilePath().

bool Rivet::fuzzyEquals ( double  a,
double  b,
double  tolerance = 1E-5 
) [inline]

Compare two floating point numbers for equality with a degree of fuzziness.

The tolerance parameter is fractional, based on absolute values of the args.

References isZero().

Referenced by Rivet::AnalysisHandler::analyze(), Rivet::Sphericity::compare(), fuzzyEquals(), fuzzyGtrEquals(), fuzzyLessEquals(), and Rivet::Run::readEvent().

bool Rivet::fuzzyEquals ( long  a,
long  b,
double   UNUSEDtolerance = 1E-5 
) [inline]

Compare two integral-type numbers for equality with a degree of fuzziness.

Since there is no risk of floating point error with integral types, this function just exists in case fuzzyEquals is accidentally used on an integer type, to avoid implicit type conversion. The tolerance parameter is ignored, even if it would have an absolute magnitude greater than 1.

bool Rivet::fuzzyGtrEquals ( double  a,
double  b,
double  tolerance = 1E-5 
) [inline]

Compare two floating point numbers for >= with a degree of fuzziness.

The tolerance parameter on the equality test is as for fuzzyEquals.

References fuzzyEquals().

Referenced by inRange().

bool Rivet::fuzzyGtrEquals ( long  a,
long  b,
double   UNUSEDtolerance = 1E-5 
) [inline]

Compare two integral-type numbers for >= with a degree of fuzziness.

Since there is no risk of floating point error with integral types, this function just exists in case fuzzyGtrEquals is accidentally used on an integer type, to avoid implicit type conversion. The tolerance parameter is ignored, even if it would have an absolute magnitude greater than 1.

bool Rivet::fuzzyLessEquals ( double  a,
double  b,
double  tolerance = 1E-5 
) [inline]

Compare two floating point numbers for <= with a degree of fuzziness.

The tolerance parameter on the equality test is as for fuzzyEquals.

References fuzzyEquals().

Referenced by inRange().

bool Rivet::fuzzyLessEquals ( long  a,
long  b,
double   UNUSEDtolerance = 1E-5 
) [inline]

Compare two integral-type numbers for <= with a degree of fuzziness.

Since there is no risk of floating point error with integral types, this function just exists in case fuzzyLessEquals is accidentally used on an integer type, to avoid implicit type conversion. The tolerance parameter is ignored, even if it would have an absolute magnitude greater than 1.

double Rivet::get2dClosestApproach ( const HepMC::GenParticle &  track,
const Vector3 &  vtx3pos 
) [inline]
Todo:
Whoa! - implicit constructors from hell!

References sqr().

map< string, BinEdges > Rivet::getBinEdges ( string  papername)

Function to get a map of all the bin edge vectors in a paper with the given papername.

References getBinEdges(), and getDPSXValsErrs().

Referenced by getBinEdges().

map< string, vector< DPSXPoint > > Rivet::getDPSXValsErrs ( string  papername)

Check path to make sure that this is a reference histogram.

Todo:
Check that "path" matches filename
Todo:
Throw an exception here?
Todo:
Rethrow as a general XML failure.

Check path to make sure that this is a reference histogram.

Todo:
Check that "path" matches filename
Todo:
Throw an exception here?
Todo:
Rethrow as a general XML failure.

References getDatafilePath(), and getDPSXValsErrs().

Referenced by getBinEdges(), and getDPSXValsErrs().

map< string, vector< DPSXYPoint > > Rivet::getDPSXYValsErrs ( string  papername)

Check path to make sure that this is a reference histogram.

Todo:
Check that "path" matches filename
Todo:
Throw an exception here?
Todo:
Rethrow as a general XML failure.

Check path to make sure that this is a reference histogram.

Todo:
Check that "path" matches filename
Todo:
Throw an exception here?
Todo:
Rethrow as a general XML failure.

References getDatafilePath(), and getDPSXYValsErrs().

Referenced by getDPSXYValsErrs().

Function which returns a vector of all the histogram format values in the HistoFormat enum.

References getKnownHistoFormats().

template<typename NUM >
int Rivet::index_between ( const NUM &  val,
const vector< NUM > &  binedges 
) [inline]

Return the bin index of the given value, val, given a vector of bin edges.

NB. The binedges vector must be sorted

References inRange().

Referenced by Rivet::JetShape::calc().

template<typename NUM >
bool Rivet::inRange ( NUM  value,
NUM  low,
NUM  high,
RangeBoundary  lowbound = CLOSED,
RangeBoundary  highbound = OPEN 
) [inline]
bool Rivet::inRange ( int  value,
int  low,
int  high,
RangeBoundary  lowbound = CLOSED,
RangeBoundary  highbound = CLOSED 
) [inline]

Determine if value is in the range low to high, for integer types.

Interval boundary types are defined by lowbound and highbound.

Todo:
Optimise to one-line at compile time?
double Rivet::invariant ( const FourVector &  lv) [inline]

Calculate the Lorentz self-invariant of a 4-vector. $ v_\mu v^\mu = g_{\mu\nu} x^\mu x^\nu $.

Referenced by Rivet::DISKinematics::project().

bool Rivet::isZero ( double  val,
double  tolerance = 1E-8 
) [inline]
bool Rivet::isZero ( long  val,
double   UNUSEDtolerance = 1E-8 
) [inline]

Compare an integral-type number to zero.

Since there is no risk of floating point error, this function just exists in case isZero is accidentally used on an integer type, to avoid implicit type conversion. The tolerance parameter is ignored.

template<size_t N>
double Rivet::mod ( const Vector< N > &  v) [inline]

Calculate the modulus of a vector. $ \sqrt{\sum_{i=1}^N x_i^2} $.

References Rivet::Vector< N >::mod().

Referenced by Rivet::Hemispheres::project().

template<size_t N>
double Rivet::mod2 ( const Vector< N > &  v) [inline]

Calculate the modulus-squared of a vector. $ \sum_{i=1}^N x_i^2 $.

References Rivet::Vector< N >::mod2().

ostream & Rivet::operator<< ( Log &  log,
int  level 
)

Streaming output to a logger must have a Log::Level/int as its first argument.

The streaming operator can use Log's internals.

References Rivet::Log::formatMessage(), and Rivet::Log::isActive().

Cmp<Projection> Rivet::pcmp ( const Projection &  parent1,
const Projection &  parent2,
const string &  pname 
) [inline]

Global helper function for easy creation of Cmp<Projection> objects from two parent projections and their common name for the projection to be compared.

References Rivet::ProjectionApplier::getProjection().

Cmp<Projection> Rivet::pcmp ( const Projection *  parent1,
const Projection &  parent2,
const string &  pname 
) [inline]

Global helper function for easy creation of Cmp<Projection> objects from two parent projections and their common name for the projection to be compared. This version takes one parent as a pointer.

References Rivet::ProjectionApplier::getProjection().

Cmp<Projection> Rivet::pcmp ( const Projection &  parent1,
const Projection *  parent2,
const string &  pname 
) [inline]

Global helper function for easy creation of Cmp<Projection> objects from two parent projections and their common name for the projection to be compared. This version takes one parent as a pointer.

References Rivet::ProjectionApplier::getProjection().

Cmp<Projection> Rivet::pcmp ( const Projection *  parent1,
const Projection *  parent2,
const string &  pname 
) [inline]

Global helper function for easy creation of Cmp<Projection> objects from two parent projections and their common name for the projection to be compared.

References Rivet::ProjectionApplier::getProjection().

vector<string> Rivet::split ( const string &  path,
const string &  UNUSEDdelim = ":" 
) [inline]
Deprecated:
Use pathsplit instead.

References pathsplit().

Referenced by Rivet::FastJets::splitJet().


Variable Documentation

const double Rivet::alpha_rcl2 [static]
Initial value:
 fine_structure_const
                                     *classic_electr_radius
                                     *classic_electr_radius
const double Rivet::MaxRapidity = 100000.0 [static]
const double Rivet::twopi_mc2_rcl2 [static]
Initial value:
 twopi*electron_mass_c2
                                               *classic_electr_radius
                                               *classic_electr_radius