rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.2
Rivet Namespace Reference

Namespaces

namespace  ALICE
 
namespace  ATLAS
 Common projections for ATLAS trigger conditions and centrality.
 
namespace  Cuts
 Namespace used for ambiguous identifiers.
 
namespace  HepMCUtils
 

Classes

struct  AbsDeltaEtaWRT
 Calculator of \( |\Delta \eta| \) with respect to a given momentum. More...
 
struct  AbsDeltaRapWRT
 Calculator of \( |\Delta y| \) with respect to a given momentum. More...
 
struct  AbsEtaGtr
 Abs pseudorapidity greater-than functor. More...
 
struct  AbsEtaInRange
 Abs pseudorapidity in-range functor. More...
 
struct  AbsEtaLess
 Abs pseudorapidity momentum less-than functor. More...
 
struct  AbsRapGtr
 Abs rapidity greater-than functor. More...
 
struct  AbsRapInRange
 Abs rapidity in-range functor. More...
 
struct  AbsRapLess
 Abs rapidity momentum less-than functor. More...
 
class  Analysis
 This is the base class of all analysis classes in Rivet. More...
 
class  AnalysisHandler
 The key class for coordination of Analysis objects and the event loop. More...
 
class  AnalysisInfo
 Holder of analysis metadata. More...
 
class  AnalysisLoader
 Internal class which loads and registers analyses from plugin libs. More...
 
class  AOPath
 Class representing a YODA path with all its components.
 
class  AxesDefinition
 Base class for projections which define a spatial basis. More...
 
struct  bad_lexical_cast
 Exception class for throwing from lexical_cast when a parse goes wrong. More...
 
class  Beam
 Project out the incoming beams. More...
 
struct  BeamError
 Error specialisation for failures relating to beams. More...
 
class  BeamThrust
 Calculator of the beam-thrust observable. More...
 
struct  BoolJetAND
 Functor for and-combination of selector logic. More...
 
struct  BoolJetFunctor
 Base type for Jet -> bool functors. More...
 
struct  BoolJetNOT
 Functor for inverting selector logic. More...
 
struct  BoolJetOR
 Functor for or-combination of selector logic. More...
 
struct  BoolParticleAND
 Functor for and-combination of selector logic. More...
 
struct  BoolParticleBaseFunctor
 Base type for Particle -> bool functors. More...
 
struct  BoolParticleFunctor
 Base type for Particle -> bool functors. More...
 
struct  BoolParticleNOT
 Functor for inverting selector logic. More...
 
struct  BoolParticleOR
 Functor for or-combination of selector logic. More...
 
class  BRAHMSCentrality
 BRAHMS Centrality projection. More...
 
class  CentralEtHCM
 Summed \( E_\perp \) of central particles in HCM system. More...
 
class  CentralityBinner
 
struct  CentralityBinTraits
 
struct  CentralityBinTraits< Profile1DPtr >
 Traits specialization for Profile histograms.
 
struct  CentralityBinTraits< Profile2DPtr >
 Traits specialization for Profile histograms.
 
struct  CentralityBinTraits< tuple< Types... > >
 
struct  CentralityBinTraits< vector< T > >
 
class  CentralityEstimator
 Base class for projections profile observable value vs the collision centrality. More...
 
class  CentralityProjection
 Used together with the percentile-based analysis objects Percentile and PercentileXaxis. More...
 
class  ChargedFinalState
 Project only charged final state particles. More...
 
class  ChargedLeptons
 Get charged final-state leptons. More...
 
class  Cmp
 
class  Cmp< double >
 Specialization of Cmp for checking the ordering of two floating point numbers.
 
class  Cmp< Projection >
 Specialization of Cmp for checking the ordering of two {Projection}s.
 
class  ConstLossyFinalState
 Randomly lose a constant fraction of particles. More...
 
class  ConstRandomFilter
 Functor used to implement constant random lossiness. More...
 
class  Correlators
 Projection for calculating correlators for flow measurements. More...
 
class  CumulantAnalysis
 Tools for flow analyses. More...
 
class  CutBase
 Base class for Cut selectors.
 
class  Cutflow
 A tracker of numbers & fractions of events passing sequential cuts. More...
 
class  Cutflows
 A container for several Cutflow objects, with some convenient batch access. More...
 
class  DecayedParticles
 Find the decay products of particles in the projection for subsquent analyses. More...
 
struct  DeltaEtaGtr
 \( |\Delta \eta| \) (with respect to another momentum, vec) greater-than functor More...
 
struct  DeltaEtaInRange
 \( \Delta \eta \) (with respect to another 4-momentum, vec) in-range functor More...
 
struct  DeltaEtaLess
 \( |\Delta \eta| \) (with respect to another momentum, vec) less-than functor More...
 
struct  DeltaEtaWRT
 Calculator of \( \Delta \eta \) with respect to a given momentum. More...
 
struct  DeltaPhiGtr
 \( |\Delta \phi| \) (with respect to another momentum, vec) greater-than functor More...
 
struct  DeltaPhiInRange
 \( \Delta \phi \) (with respect to another 4-momentum, vec) in-range functor More...
 
struct  DeltaPhiLess
 \( |\Delta \phi| \) (with respect to another momentum, vec) less-than functor More...
 
struct  DeltaPhiWRT
 Calculator of \( \Delta \phi \) with respect to a given momentum. More...
 
struct  DeltaRapGtr
 \( |\Delta y| \) (with respect to another momentum, vec) greater-than functor More...
 
struct  DeltaRapInRange
 \( \Delta y \) (with respect to another 4-momentum, vec) in-range functor More...
 
struct  DeltaRapLess
 \( |\Delta y| \) (with respect to another momentum, vec) less-than functor More...
 
struct  DeltaRapWRT
 Calculator of \( \Delta y \) with respect to a given momentum. More...
 
struct  DeltaRGtr
 \( \Delta R \) (with respect to another 4-momentum, vec) greater-than functor More...
 
struct  DeltaRInRange
 \( \Delta R \) (with respect to another 4-momentum, vec) in-range functor More...
 
struct  DeltaRLess
 \( \Delta R \) (with respect to another 4-momentum, vec) less-than functor More...
 
struct  DeltaRWRT
 Calculator of \( \Delta R \) with respect to a given momentum. More...
 
class  DileptonFinder
 Convenience finder of leptonically decaying Zs. More...
 
class  DISDiffHadron
 Get the incoming and outgoing hadron in a diffractive ep event. 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  DISRapidityGap
 Get the incoming and outgoing hadron in a diffractive ep event. More...
 
struct  DoubleParticleBaseFunctor
 Base type for Particle -> double functors. More...
 
class  DressedLepton
 A charged lepton meta-particle created by clustering photons close to the bare lepton. More...
 
struct  EigenPairCmp
 Comparison functor for "eigen-pairs".
 
class  EigenSystem
 Handy object containing results of a diagonalization.
 
struct  Error
 Generic runtime Rivet error. More...
 
struct  EtaGtr
 Pseudorapidity greater-than functor. More...
 
struct  EtaInRange
 Pseudorapidity in-range functor. More...
 
struct  EtaLess
 Pseudorapidity less-than functor. More...
 
class  Event
 Representation of a HepMC event, and enabler of Projection caching. More...
 
class  EventMixingBase
 
class  EventMixingCentrality
 EventMixingCentrality has centrality as the mixing observable. More...
 
class  EventMixingFinalState
 EventMixingFinalState has multiplicity as the mixing observable. More...
 
class  FastJets
 Find jets using jet algorithms via the FastJet package. More...
 
class  FillCollector
 FillCollectors which are used to temporarily cache unaggregated fills until collapsed by the Multiplexers via a call to collapseEventGroup(). More...
 
class  FillCollector< Cutflow >
 FillCollector specialisation for all Cutflow-like AO. More...
 
class  FillCollector< YODA::BinnedDbn< 1, AxisT > >
 FillCollector specialisation for Histo1D. More...
 
class  FillCollector< YODA::BinnedDbn< 2, AxisT > >
 FillCollector specialisation for Profile1D. More...
 
class  FillCollector< YODA::BinnedDbn< 2, AxisT1, AxisT2 > >
 FillCollector specialisation for Histo2D. More...
 
class  FillCollector< YODA::BinnedDbn< 3, AxisT1, AxisT2 > >
 FillCollector specialisation for Histo2D. More...
 
class  FillCollector< YODA::BinnedDbn< 3, AxisT1, AxisT2, AxisT3 > >
 FillCollector specialisation for Histo3D. More...
 
class  FillCollector< YODA::BinnedDbn< 4, AxisT1, AxisT2, AxisT3 > >
 FillCollector specialisation for Histo3D. More...
 
class  FillCollector< YODA::BinnedDbn< DbnN, AxisT... > >
 FillCollector specialisation for all BinnedDbn-like AOs. More...
 
class  FillCollector< YODA::BinnedEstimate< AxisT... > >
 FillCollector specialisation for BinnedEstimate. More...
 
class  FillCollector< YODA::Counter >
 FillCollector specialisation for Counter. More...
 
class  FillCollector< YODA::Estimate0D >
 FillCollector specialisation for Estimate. More...
 
class  FillCollector< YODA::ScatterND< N > >
 FillCollector specialisation for ScatterND. More...
 
class  FinalPartons
 
class  FinalState
 Project out all final-state particles in an event. Probably the most important projection in Rivet! More...
 
struct  FirstParticleWith
 Determine whether a particle is the first in a decay chain to meet the cut/function. More...
 
struct  FirstParticleWithout
 Determine whether a particle is the first in a decay chain not to meet the cut/function. More...
 
class  FourMomentum
 Specialized version of the FourVector with momentum/energy functionality. More...
 
class  FourVector
 Specialisation of VectorN to a general (non-momentum) Lorentz 4-vector. More...
 
class  FParameter
 Calculator of the \( F \)-parameter observable. More...
 
class  GammaGammaFinalState
 Final state particles boosted to the hadronic center of mass system. More...
 
class  GammaGammaKinematics
 Get the gamma gamma kinematic variables and relevant boosts for an event. More...
 
class  GammaGammaLeptons
 Get the incoming and outgoing leptons in a gamma gamma collision event in e+e-. More...
 
class  GeneratedCentrality
 
class  GeneratedPercentileProjection
 
class  HadronicFinalState
 Project only hadronic final state particles. More...
 
struct  HasAbsPID
 |PID| matching functor More...
 
struct  HasBTag
 B-tagging functor, with a tag selection cut as the stored state. More...
 
struct  HasCTag
 C-tagging functor, with a tag selection cut as the stored state. More...
 
struct  HasNoTag
 Anti-B/C-tagging functor, with a tag selection cut as the stored state. More...
 
struct  HasParticleAncestorWith
 Determine whether a particle has an ancestor which meets the cut/function. More...
 
struct  HasParticleAncestorWithout
 Determine whether a particle has an ancestor which doesn't meet the cut/function. More...
 
struct  HasParticleChildWith
 Determine whether a particle has a child which meets the cut/function. More...
 
struct  HasParticleChildWithout
 Determine whether a particle has a child which doesn't meet the cut/function. More...
 
struct  HasParticleDescendantWith
 Determine whether a particle has a descendant which meets the cut/function. More...
 
struct  HasParticleDescendantWithout
 Determine whether a particle has a descendant which doesn't meet the cut/function. More...
 
struct  HasParticleParentWith
 Determine whether a particle has an parent which meets the cut/function. More...
 
struct  HasParticleParentWithout
 Determine whether a particle has an parent which doesn't meet the cut/function. More...
 
struct  HasPID
 PID matching functor. More...
 
struct  HasTauTag
 Tau-tagging functor, with a tag selection cut as the stored state. More...
 
class  HeavyHadrons
 Project out the last pre-decay b and c hadrons. More...
 
class  Hemispheres
 Calculate the hemisphere masses and broadenings. More...
 
class  HepMCHeavyIon
 
class  HistoGroup
 
class  HTT
 Wrapper class for configuring use of HEPTopTagger. More...
 
class  IdentifiedFinalState
 Produce a final state which only contains specified particle IDs. More...
 
class  ImpactParameterProjection
 
struct  InfoError
 Error specialisation for failures relating to analysis info. More...
 
class  InitialQuarks
 Project out quarks from the hard process in \( e^+ e^- \to Z^0 \) events. More...
 
class  InvisibleFinalState
 Final state modifier excluding particles which are experimentally visible. More...
 
class  InvMassFinalState
 Identify particles which can be paired to fit within a given invariant mass window. More...
 
struct  IOError
 Error for I/O failures. More...
 
class  Jet
 Representation of a clustered jet of particles. More...
 
struct  JET_BTAG_EFFS
 b-tagging efficiency functor, for more readable b-tag effs and mistag rates More...
 
struct  JET_EFF_CONST
 Take a Jet and return a constant efficiency. More...
 
struct  JetEffFilter
 A functor to return true if Jet j survives a random efficiency selection. More...
 
struct  JetEffSmearFn
 Functor for simultaneous efficiency-filtering and smearing of Jets. More...
 
class  JetFinder
 Abstract base class for projections which can return a set of Jets. More...
 
class  Jets
 Specialised vector of Jet objects. More...
 
class  JetShape
 Calculate transverse jet profiles. More...
 
struct  LastParticleWith
 Determine whether a particle is the last in a decay chain to meet the cut/function. More...
 
struct  LastParticleWithout
 Determine whether a particle is the last in a decay chain not to meet the cut/function. More...
 
class  LeadingParticlesFinalState
 Get the highest-pT occurrences of FS particles with the specified PDG IDs. More...
 
class  LeptonFinder
 Reconstruct leptons, generally including "dressing" with clustered photons. More...
 
class  Log
 Logging system for controlled & formatted writing to stdout. More...
 
struct  LogicError
 Error specialisation for places where alg logic has failed. More...
 
struct  LookupError
 Error relating to looking up analysis objects in the register. More...
 
class  LorentzTransform
 Object implementing Lorentz transform calculations and boosts. More...
 
class  LossyFinalState
 Templated FS projection which can lose some of the supplied particles. More...
 
class  Matrix
 General \( N \)-dimensional mathematical matrix object. More...
 
class  Matrix3
 Specialisation of MatrixN to aid 3 dimensional rotations. More...
 
class  MC_JETS_BASE
 Base class providing common functionality for MC jet validation analyses. More...
 
class  MC_KTSPLITTINGS_BASE
 Base class providing common functionality for MC jet-structure validation analyses. More...
 
class  MC_PARTICLES_BASE
 Base class providing common functionality for MC particle species validation analyses. More...
 
class  MC_pPbMinBiasTrigger
 
class  MC_SumETFwdPbCentrality
 
class  MendelMin
 A genetic algorithm functional minimizer. More...
 
class  MergedFinalState
 Get final state particles merged from two FinalState projections. More...
 
struct  MergeDistance
 
class  METFinder
 Interface for projections that find missing transverse energy/momentum. More...
 
class  MissingMomentum
 Calculate missing \( E \), \( E_\perp \) etc. as complements to the total visible momentum. More...
 
class  MultiplexedAO
 Multiplexer base class. More...
 
class  Multiplexer
 Type-specific multiplexed YODA analysis object. More...
 
class  MultiplexPtr
 
class  NeutralFinalState
 Project only neutral final state particles. More...
 
class  NonHadronicFinalState
 Project only hadronic final state particles. More...
 
class  NonPromptFinalState
 Find final state particles NOT directly connected to the hard process. More...
 
struct  P3_EFF_CONST
 Take a Vector3 and return a constant number. More...
 
struct  P4_EFF_CONST
 Take a FourMomentum and return a constant number. More...
 
class  ParisiTensor
 Calculate the Parisi event shape tensor (or linear momentum tensor). More...
 
class  Particle
 Particle representation, either from a HepMC::GenEvent or reconstructed. More...
 
struct  PARTICLE_EFF_CONST
 Take a Particle and return a constant number. More...
 
class  ParticleBase
 Base class for particle-like things like Particle and Jet. More...
 
struct  ParticleEffFilter
 A functor to return true if Particle p survives a random efficiency selection. More...
 
struct  ParticleEffSmearFn
 Functor for simultaneous efficiency-filtering and smearing of Particles. More...
 
class  ParticleFinder
 Base class for projections which return subsets of an event's particles. More...
 
class  Particles
 Specialised vector of Particle objects. More...
 
class  PartonicTops
 Convenience finder of partonic top quarks. More...
 
class  Percentile
 The Percentile class for centrality binning. More...
 
class  PercentileBase
 PercentileBase is the base class of all Percentile classes. More...
 
class  PercentileProjection
 class for projections that reports the percentile for a given SingleValueProjection when initialized with a Histo1D of the distribution in the SingleValueProjection. More...
 
class  PercentileTBase
 PercentileTBase is the base class of all Percentile classes. More...
 
class  PercentileXaxis
 The PercentileXaxis class for centrality binning. More...
 
struct  PidError
 Error specialisation for failures relating to particle ID codes. More...
 
class  PrimaryHadrons
 Project out the first hadrons from hadronisation. More...
 
class  PrimaryParticles
 Project out primary particles according to definition. More...
 
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  ProjectionTreeGenerator
 Class that deals with generating projection trees (for debugging etc.) More...
 
class  PromptFinalState
 Find final state particles directly connected to the hard process. More...
 
struct  PtGtr
 Transverse momentum greater-than functor. More...
 
struct  PtInRange
 Transverse momentum in-range functor. More...
 
struct  PtLess
 Transverse momentum less-than functor. More...
 
class  PxConePlugin
 
struct  RangeError
 Error for e.g. use of invalid bin ranges. More...
 
struct  RapGtr
 Rapidity greater-than functor. More...
 
struct  RapInRange
 Rapidity in-range functor. More...
 
struct  RapLess
 Rapidity momentum less-than functor. More...
 
struct  ReadError
 Error for read failures. More...
 
struct  ReferenceTraits
 
struct  ReferenceTraits< YODA::BinnedDbn< DbnN, AxisT... > >
 
struct  ReferenceTraits< YODA::BinnedEstimate< AxisT... > >
 
struct  ReferenceTraits< YODA::Counter >
 
struct  ReferenceTraits< YODA::Estimate0D >
 
struct  ReferenceTraits< YODA::ScatterND< N > >
 
class  RivetONNXrt
 Simple interface class to take care of basic ONNX networks. More...
 
class  Run
 Interface to handle a run of events read from a HepMC stream or file. More...
 
class  SingleValueProjection
 Base class for projections returning a single floating point value. More...
 
class  SmearedJets
 Wrapper projection for smearing Jets with detector resolutions and efficiencies. More...
 
class  SmearedMET
 Wrapper projection for smearing missing (transverse) energy/momentum with detector resolutions. More...
 
class  SmearedParticles
 Wrapper projection for smearing Jets with detector resolutions and efficiencies. More...
 
class  Sphericity
 Calculate the sphericity event shape. More...
 
class  Spherocity
 Get the transverse spherocity scalars for hadron-colliders. More...
 
class  STAR_BES_Centrality
 
class  TauFinder
 Convenience finder of unstable taus. More...
 
class  ThreeMomentum
 Specialized version of the ThreeVector with momentum functionality. More...
 
class  Thrust
 Get the e+ e- thrust basis and the thrust, thrust major and thrust minor scalars. 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  TriggerProjection
 Base class for projections returning a bool corresponding to a trigger. More...
 
class  TriggerUA5
 Access to the min bias triggers used by UA5. More...
 
struct  TupleCentralityBinTraitsHelper
 
struct  TupleCentralityBinTraitsHelper< 0, Types... >
 
struct  TypeBaseHandle
 A polymorphic base type for the AO type handles. More...
 
struct  TypeHandle
 The type-specific handle that can perform type-specific operations for objects of type T. More...
 
class  UndressBeamLeptons
 Incoming lepton beams with collinear photons subtracted. More...
 
class  UnstableParticles
 Project out all physical-but-decayed particles in an event. More...
 
class  UserCentEstimate
 
struct  UserError
 Error specialisation for where the problem is between the chair and the computer. More...
 
class  Vector
 A minimal base class for \( N \)-dimensional vectors. More...
 
class  Vector2
 Two-dimensional specialisation of Vector. More...
 
class  Vector3
 Three-dimensional specialisation of Vector. 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...
 
struct  WeightError
 Errors relating to event/bin weights. More...
 
struct  WriteError
 Error for write failures. More...
 

Typedefs

using AnaHandle = std::shared_ptr< Analysis >
 
using DressedLeptons = vector< DressedLepton >
 Alias for a list of dressed leptons, cf. Particles and Jets.
 
typedef Matrix< 4 > Matrix4
 
typedef Vector2 TwoVector
 
typedef Vector2 V2
 
typedef Vector3 ThreeVector
 
typedef Vector3 V3
 
typedef ThreeMomentum P3
 
typedef FourVector Vector4
 
typedef FourVector V4
 
typedef FourMomentum P4
 
typedef std::pair< Particle, ParticleParticlePair
 Typedef for a pair of Particle objects.
 
typedef std::shared_ptr< const ProjectionProjHandle
 Typedef for Projection (smart) pointer.
 
using ZFinder = DileptonFinder
 Aliases.
 
using LLFinder = DileptonFinder
 
using DirectFinalState = PromptFinalState
 Alias with a more correct name.
 
typedef pair< Particles, double > MixEvent
 A MixEvent is a vector of particles with and associated weight.
 
typedef map< double, std::deque< MixEvent > > MixMap
 
using IndirectFinalState = NonPromptFinalState
 Alias with a more correct name.
 
using MissingMom = MissingMomentum
 A slightly more convenient name, following other Rivet shortening-conventions.
 
using Taus = TauFinder
 
using UnstableFinalState = UnstableParticles
 
using PCmp = Cmp< Projection >
 Typedef for Cmp<Projection>
 
typedef Error Exception
 Rivet::Exception is a synonym for Rivet::Error.
 
using JetSelector = function< bool(const Jet &)>
 std::function instantiation for functors taking a Jet and returning a bool
 
using JetSorter = function< bool(const Jet &, const Jet &)>
 std::function instantiation for functors taking two Jets and returning a bool
 
using hasBTag = HasBTag
 
using hasCTag = HasCTag
 
using hasTauTag = HasTauTag
 
using hasNoTag = HasNoTag
 
using ParticleBaseSelector = function< bool(const ParticleBase &)>
 std::function instantiation for functors taking a ParticleBase and returning a bool
 
using ParticleBaseSorter = function< bool(const ParticleBase &, const ParticleBase &)>
 std::function instantiation for functors taking two ParticleBase and returning a bool
 
using pTGtr = PtGtr
 
using ptGtr = PtGtr
 
using pTLess = PtLess
 
using ptLess = PtLess
 
using pTInRange = PtInRange
 
using ptInRange = PtInRange
 
using etaGtr = EtaGtr
 
using etaLess = EtaLess
 
using etaInRange = EtaInRange
 
using absEtaGtr = AbsEtaGtr
 
using absetaGtr = AbsEtaGtr
 
using absEtaLess = AbsEtaLess
 
using absetaLess = AbsEtaLess
 
using absEtaInRange = AbsEtaInRange
 
using absetaInRange = AbsEtaInRange
 
using rapGtr = RapGtr
 
using rapLess = RapLess
 
using rapInRange = RapInRange
 
using absRapGtr = AbsRapGtr
 
using absrapGtr = AbsRapGtr
 
using absRapLess = AbsRapLess
 
using absrapLess = AbsRapLess
 
using absRapInRange = AbsRapInRange
 
using absrapInRange = AbsRapInRange
 
using deltaRGtr = DeltaRGtr
 
using deltaRLess = DeltaRLess
 
using deltaRInRange = DeltaRInRange
 
using deltaPhiGtr = DeltaPhiGtr
 
using deltaPhiLess = DeltaPhiLess
 
using deltaPhiInRange = DeltaPhiInRange
 
using deltaEtaGtr = DeltaEtaGtr
 
using deltaEtaLess = DeltaEtaLess
 
using deltaEtaInRange = DeltaEtaInRange
 
using deltaRapGtr = DeltaRapGtr
 
using deltaRapLess = DeltaRapLess
 
using deltaRapInRange = DeltaRapInRange
 
using deltaRWRT = DeltaRWRT
 
using deltaPhiWRT = DeltaPhiWRT
 
using deltaEtaWRT = DeltaEtaWRT
 
using absDeltaEtaWRT = AbsDeltaEtaWRT
 
using deltaRapWRT = DeltaRapWRT
 
using absDeltaRapWRT = AbsDeltaRapWRT
 
using hasPID = HasPID
 
using hasAbsPID = HasAbsPID
 
using firstParticleWith = FirstParticleWith
 
using firstParticleWithout = FirstParticleWithout
 
using lastParticleWith = LastParticleWith
 
using lastParticleWithout = LastParticleWithout
 
using hasParticleAncestorWith = HasParticleAncestorWith
 
using hasParticleAncestorWithout = HasParticleAncestorWithout
 
using hasParticleParentWith = HasParticleParentWith
 
using hasParticleParentWithout = HasParticleParentWithout
 
using hasParticleChildWith = HasParticleChildWith
 
using hasParticleChildWithout = HasParticleChildWithout
 
using hasParticleDescendantWith = HasParticleDescendantWith
 
using hasParticleDescendantWithout = HasParticleDescendantWithout
 
typedef std::vector< PseudoJet > PseudoJets
 
using HepMC_IO_type = RivetHepMC::Reader
 
using PdfInfo = RivetHepMC::GenPdfInfo
 
using ConstGenEventPtr = std::shared_ptr< const GenEvent >
 
using Weight = double
 Typedef for weights.
 
template<typename T >
using Fill = pair< typename T::FillType, Weight >
 A single fill is a (FillType, Weight) pair.
 
template<typename T >
using Fills = vector< Fill< T > >
 A collection of several Fill objects.
 
typedef std::vector< FourVectorFourVectors
 
typedef std::vector< FourMomentumFourMomenta
 
Convenient aliases and dimension-specific short-hands
template<typename GroupAxisT , typename... AxisT>
using HistoGroupPtr = std::shared_ptr< HistoGroup< GroupAxisT, AxisT... > >
 
using Histo1DGroupPtr = HistoGroupPtr< double, double >
 
using Histo2DGroupPtr = HistoGroupPtr< double, double, double >
 
Convenience container typedefs
typedef vector< std::string > strings
 
typedef vector< double > doubles
 
typedef vector< float > floats
 
typedef vector< int > ints
 
User-facing analysis object Multiplexers
Note
Every object listed here needs a virtual fill() method in YODA, otherwise the FillCollector fakery won't work.
using MultiplexAOPtr = MultiplexPtr< MultiplexedAO >
 
template<size_t DbnN, typename... AxisT>
using BinnedDbnPtr = MultiplexPtr< Multiplexer< YODA::BinnedDbn< DbnN, AxisT... > > >
 
template<typename... AxisT>
using BinnedHistoPtr = BinnedDbnPtr< sizeof...(AxisT), AxisT... >
 
template<typename... AxisT>
using BinnedProfilePtr = BinnedDbnPtr< sizeof...(AxisT)+1, AxisT... >
 
template<typename... AxisT>
using BinnedEstimatePtr = MultiplexPtr< Multiplexer< YODA::BinnedEstimate< AxisT... > > >
 
template<size_t N>
using ScatterNDPtr = MultiplexPtr< Multiplexer< YODA::ScatterND< N > > >
 
using CounterPtr = MultiplexPtr< Multiplexer< YODA::Counter > >
 
using Estimate0DPtr = MultiplexPtr< Multiplexer< YODA::Estimate0D > >
 
using Histo1DPtr = BinnedHistoPtr< double >
 
using Histo2DPtr = BinnedHistoPtr< double, double >
 
using Histo3DPtr = BinnedHistoPtr< double, double, double >
 
using Profile1DPtr = BinnedProfilePtr< double >
 
using Profile2DPtr = BinnedProfilePtr< double, double >
 
using Profile3DPtr = BinnedProfilePtr< double, double, double >
 
using Estimate1DPtr = BinnedEstimatePtr< double >
 
using Estimate2DPtr = BinnedEstimatePtr< double, double >
 
using Estimate3DPtr = BinnedEstimatePtr< double, double, double >
 
using Scatter1DPtr = ScatterNDPtr< 1 >
 
using Scatter2DPtr = ScatterNDPtr< 2 >
 
using Scatter3DPtr = ScatterNDPtr< 3 >
 

Enumerations

enum class  LeptonOrigin { PROMPT =1 , NODECAY =1 , ALL }
 Accepted classes of lepton origin.
 
enum class  LeptonReco {
  ALL =0 , ALL_BARE =0 , ALL_DRESSED =1 , DIRECT_BARE =2 ,
  PROMPT_BARE =2 , DIRECT_DRESSED =3 , PROMPT_DRESSED =3
}
 Reconstruction/dressing mode for leptons.
 
enum class  DressingType { DR =0 , CONE =0 , CLUSTER =1 , AKT =1 }
 The approach taken to photon dressing of leptons.
 
enum class  PhotonOrigin { NONE =0 , PROMPT =1 , NODECAY =1 , ALL }
 Accepted classes of lepton origin.
 
enum  Sign { MINUS = -1 , ZERO = 0 , PLUS = 1 }
 Enum for signs of numbers.
 
enum  RapScheme { PSEUDORAPIDITY = 0 , ETARAP = 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 , ZERO_PI }
 Enum for range of \( \phi \) to be mapped into.
 
enum class  DISFrame { HCM , XCM , BREIT , LAB }
 Type of DIS boost to apply.
 
enum class  OnlyPrompt { YES , NO }
 
enum class  JetMuons { NONE , DECAY , ALL }
 Enum for the treatment of muons: whether to include all, some, or none in jet-finding.
 
enum class  JetInvisibles { NONE , DECAY , ALL }
 Enum for the treatment of invisible particles: whether to include all, some, or none in jet-finding.
 
enum class  TopDecay {
  ANY =0 , ALL =0 , ELECTRON , MUON ,
  TAU , E_MU , E_MU_TAU , HADRONIC
}
 Enum for categorising top quark decay modes. More...
 
enum class  WhichTop { FIRST , LAST }
 Enum for categorising which top quark to be selected: last (weakly decaying) or first?
 
enum class  PromptEMuFromTau { YES , NO }
 
enum class  InclHadronicTau { YES , NO }
 
enum class  PercentileOrder { INCREASING , DECREASING }
 
enum class  TauDecay { ANY = 0 , ALL = 0 , LEPTONIC , HADRONIC }
 Enumerate types of tau decay.
 
enum class  HTTMode {
  EARLY_MASSRATIO_SORT_MASS , LATE_MASSRATIO_SORT_MASS , EARLY_MASSRATIO_SORT_MODDJADE , LATE_MASSRATIO_SORT_MODDJADE ,
  TWO_STEP_FILTER
}
 HTT operating mode.
 

Functions

std::string toString (const AnalysisInfo &ai)
 String representation.
 
std::ostream & operator<< (std::ostream &os, const AnalysisInfo &ai)
 Stream an AnalysisInfo as a text description.
 
template<typename T , typename FN = T(const ParticleBase&)>
sum (const DressedLeptons &c, FN &&fn, const T &start=T())
 Generic sum function, adding fn(x) for all x in container c, starting with start.
 
Jets operator+ (const Jets &a, const Jets &b)
 
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)
 
std::ostream & operator<< (std::ostream &out, const LorentzTransform &lt)
 
double mT (double pT1, double pT2, double dphi)
 
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>
std::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.
 
Vector2 multiply (const double, const Vector2 &)
 
Vector2 multiply (const Vector2 &, const double)
 
Vector2 add (const Vector2 &, const Vector2 &)
 
Vector2 operator* (const double, const Vector2 &)
 
Vector2 operator* (const Vector2 &, const double)
 
Vector2 operator/ (const Vector2 &, const double)
 
Vector2 operator+ (const Vector2 &, const Vector2 &)
 
Vector2 operator- (const Vector2 &, const Vector2 &)
 
double dot (const Vector2 &a, const Vector2 &b)
 
Vector2 subtract (const Vector2 &a, const Vector2 &b)
 
double angle (const Vector2 &a, const Vector2 &b)
 Angle (in radians) between two 2-vectors.
 
Vector3 multiply (const double a, const Vector3 &v)
 Unbound scalar-product function.
 
Vector3 multiply (const Vector3 &v, const double a)
 Unbound scalar-product function.
 
Vector3 add (const Vector3 &a, const Vector3 &b)
 Unbound vector addition function.
 
Vector3 operator* (const double a, const Vector3 &v)
 Unbound scalar multiplication operator.
 
Vector3 operator* (const Vector3 &v, const double a)
 Unbound scalar multiplication operator.
 
Vector3 operator/ (const Vector3 &v, const double a)
 Unbound scalar division operator.
 
Vector3 operator+ (const Vector3 &a, const Vector3 &b)
 Unbound vector addition operator.
 
Vector3 operator- (const Vector3 &a, const Vector3 &b)
 Unbound vector subtraction operator.
 
ThreeMomentum multiply (const double, const ThreeMomentum &)
 
ThreeMomentum multiply (const ThreeMomentum &, const double)
 
ThreeMomentum add (const ThreeMomentum &, const ThreeMomentum &)
 
ThreeMomentum operator* (const double, const ThreeMomentum &)
 
ThreeMomentum operator* (const ThreeMomentum &, const double)
 
ThreeMomentum operator/ (const ThreeMomentum &, const double)
 
ThreeMomentum operator+ (const ThreeMomentum &, const ThreeMomentum &)
 
ThreeMomentum operator- (const ThreeMomentum &, const ThreeMomentum &)
 
double dot (const Vector3 &a, const Vector3 &b)
 Unbound dot-product function.
 
Vector3 cross (const Vector3 &a, const Vector3 &b)
 Unbound cross-product function.
 
Vector3 subtract (const Vector3 &a, const Vector3 &b)
 Unbound vector subtraction function.
 
double angle (const Vector3 &a, const Vector3 &b)
 Angle (in radians) between two 3-vectors.
 
Vector3 operator+ (const ThreeMomentum &a, const Vector3 &b)
 
Vector3 operator+ (const Vector3 &a, const ThreeMomentum &b)
 
Vector3 operator- (const ThreeMomentum &a, const Vector3 &b)
 
Vector3 operator- (const Vector3 &a, const ThreeMomentum &b)
 
double deltaEta (const Vector3 &a, const Vector3 &b, bool sign=false)
 Calculate the difference in pseudorapidity between two spatial vectors.
 
double deltaEta (const Vector3 &v, double eta2, bool sign=false)
 Calculate the difference in pseudorapidity between two spatial vectors.
 
double deltaEta (double eta1, const Vector3 &v, bool sign=false)
 Calculate the difference in pseudorapidity between two spatial vectors.
 
double deltaPhi (const Vector3 &a, const Vector3 &b, bool sign=false)
 Calculate the difference in azimuthal angle between two spatial vectors.
 
double deltaPhi (const Vector3 &v, double phi2, bool sign=false)
 Calculate the difference in azimuthal angle between two spatial vectors.
 
double deltaPhi (double phi1, const Vector3 &v, bool sign=false)
 Calculate the difference in azimuthal angle between two spatial vectors.
 
double deltaR2 (const Vector3 &a, const Vector3 &b)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two spatial vectors.
 
double deltaR (const Vector3 &a, const Vector3 &b)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two spatial vectors.
 
double deltaR2 (const Vector3 &v, double eta2, double phi2)
 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 deltaR2 (double eta1, double phi1, const Vector3 &v)
 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.
 
double mT (const Vector3 &vis, const Vector3 &invis)
 
double pT (const Vector3 &a, const Vector3 &b)
 Calculate transverse momentum of pair of 3-vectors.
 
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.
 
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)
 
bool cmpMomByPt (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by decreasing pT.
 
bool cmpMomByAscPt (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing pT.
 
bool cmpMomByP (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by decreasing 3-momentum magnitude |p|.
 
bool cmpMomByAscP (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing 3-momentum magnitude |p|.
 
bool cmpMomByEt (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by decreasing transverse energy.
 
bool cmpMomByAscEt (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing transverse energy.
 
bool cmpMomByE (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by decreasing energy.
 
bool cmpMomByAscE (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing energy.
 
bool cmpMomByMass (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by decreasing mass.
 
bool cmpMomByAscMass (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing mass.
 
bool cmpMomByEta (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing eta (pseudorapidity)
 
bool cmpMomByDescEta (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by decreasing eta (pseudorapidity)
 
bool cmpMomByAbsEta (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing absolute eta (pseudorapidity)
 
bool cmpMomByDescAbsEta (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing absolute eta (pseudorapidity)
 
bool cmpMomByRap (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing rapidity.
 
bool cmpMomByDescRap (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by decreasing rapidity.
 
bool cmpMomByAbsRap (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by increasing absolute rapidity.
 
bool cmpMomByDescAbsRap (const FourMomentum &a, const FourMomentum &b)
 Comparison to give a sorting by decreasing absolute rapidity.
 
template<typename MOMS , typename CMP >
MOMS & isortBy (MOMS &pbs, const CMP &cmp)
 Sort a container of momenta by cmp and return by reference for non-const inputs.
 
template<typename MOMS , typename CMP >
MOMS sortBy (const MOMS &pbs, const CMP &cmp)
 Sort a container of momenta by cmp and return by value for const inputs.
 
template<typename MOMS >
MOMS & isortByPt (MOMS &pbs)
 Sort a container of momenta by pT (decreasing) and return by reference for non-const inputs.
 
template<typename MOMS >
MOMS sortByPt (const MOMS &pbs)
 Sort a container of momenta by pT (decreasing) and return by value for const inputs.
 
template<typename MOMS >
MOMS & isortByE (MOMS &pbs)
 Sort a container of momenta by E (decreasing) and return by reference for non-const inputs.
 
template<typename MOMS >
MOMS sortByE (const MOMS &pbs)
 Sort a container of momenta by E (decreasing) and return by value for const inputs.
 
template<typename MOMS >
MOMS & isortByEt (MOMS &pbs)
 Sort a container of momenta by Et (decreasing) and return by reference for non-const inputs.
 
template<typename MOMS >
MOMS sortByEt (const MOMS &pbs)
 Sort a container of momenta by Et (decreasing) and return by value for const inputs.
 
double mass (const FourMomentum &a, const FourMomentum &b)
 Calculate mass of two 4-vectors.
 
double mass2 (const FourMomentum &a, const FourMomentum &b)
 Calculate mass^2 of two 4-vectors.
 
double mT (const FourMomentum &vis, const FourMomentum &invis)
 
double mT (const FourMomentum &vis, const Vector3 &invis)
 
double mT (const Vector3 &vis, const FourMomentum &invis)
 
double pT (const FourMomentum &vis, const FourMomentum &invis)
 Calculate transverse momentum of two 4-vectors.
 
double pT (const FourMomentum &vis, const Vector3 &invis)
 Calculate transverse momentum of a 4-vector and a 3-vector.
 
double pT (const Vector3 &vis, const FourMomentum &invis)
 Calculate transverse momentum of a 4-vector and a 3-vector.
 
std::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.
 
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.
 
Particles operator+ (const Particles &a, const Particles &b)
 
template<class RandomAccessIterator , class WeightIterator , class RandomNumberGenerator >
void weighted_shuffle (RandomAccessIterator first, RandomAccessIterator last, WeightIterator fw, WeightIterator lw, RandomNumberGenerator &g)
 Make an event mixed together from several events.
 
void pxcone_ (int mode, int ntrak, int itkdm, const double *ptrak, double coner, double epslon, double ovlim, int mxjet, int &njet, double *pjet, int *ipass, int *ijmul, int *ierr)
 
std::string version ()
 A function to get the Rivet version string.
 
bool compatibleBeamID (PdgId p, PdgId allowed)
 Find whether ParticleName p is compatible with the template ParticleName allowed.
 
bool compatibleBeamIDs (const PdgIdPair &pair, const PdgIdPair &allowedpair)
 Find whether PdgIdPair pair is compatible with the template PdgIdPair allowedpair.
 
bool compatibleBeamIDs (const ParticlePair &ppair, const PdgIdPair &allowedpair)
 Check particle compatibility of two Particle pairs.
 
bool compatibleBeamIDs (const ParticlePair &a, const ParticlePair &b)
 Check particle compatibility of two Particle pairs.
 
bool compatibleBeamEnergies (const pair< double, double > &energies, const pair< double, double > &allowedenergies, const double reltol=1e-3)
 Check the energy compatibility of two pairs of particle energies.
 
bool compatibleBeamEnergies (const ParticlePair &ppair, const pair< double, double > &allowedenergies, double reltol=1e-3)
 Check the energy compatibility of a pair of particles.
 
bool compatibleBeamEnergies (const ParticlePair &ppair, const ParticlePair &allowedppair, double reltol=1e-3)
 Check the energy compatibility of two Particle pairs.
 
bool compatibleBeamEnergy (const pair< double, double > &energies, double allowedsqrts, double reltol=1e-3)
 Check the sqrt(s) compatibility of two massless opposing beams.
 
bool compatibleBeamEnergy (const ParticlePair &ppair, const pair< double, double > &allowedenergies, double reltol=1e-3)
 Check the sqrt(s) compatibility of two massless opposing beams.
 
bool compatibleBeamEnergy (const ParticlePair &ppair, const double allowedsqrts, double reltol=1e-3)
 Check the sqrt(s) compatibility of a Particle pair.
 
bool compatibleBeams (const ParticlePair &ppair, const PdgIdPair &allowedpids, double allowedsqrts)
 Check the particle ID and beam-energy compatibility of two Particle pairs.
 
bool compatibleBeams (const ParticlePair &ppair, const PdgIdPair &allowedpids, const pair< double, double > &allowedenergies)
 Check the particle ID and beam-energy compatibility of two Particle pairs.
 
bool compatibleBeams (const ParticlePair &a, const ParticlePair &b)
 Check the particle ID and beam-energy compatibility of two Particle pairs.
 
ParticlePair beams (const Event &e)
 Get beam particles from an event.
 
bool validBeams (const ParticlePair &beams)
 Check if the given beam pair is valid.
 
bool validBeams (const Event &e)
 Check if the event's beam pair is valid.
 
PdgIdPair beamIDs (const ParticlePair &beams)
 Get beam particle IDs from a pair of Particles.
 
PdgIdPair beamIDs (const Event &e)
 Get beam particle IDs from an event.
 
PdgIdPair beamEnergies (const ParticlePair &beams)
 Get beam particle energies from a pair of Particles.
 
PdgIdPair beamEnergies (const Event &e)
 Get beam particle energies from an event.
 
double sqrtS (double ea, double eb)
 Get beam centre-of-mass energy from a pair of beam energies.
 
double sqrtS (const pair< double, double > &energies)
 Get beam centre-of-mass energy from a pair of beam energies.
 
double sqrtS (const FourMomentum &pa, const FourMomentum &pb)
 Get beam centre-of-mass energy from a pair of beam momenta.
 
double sqrtS (const ParticlePair &beams)
 Get beam centre-of-mass energy from a pair of Particles.
 
double sqrtS (const Event &e)
 Get beam centre-of-mass energy from an Event.
 
double asqrtS (const FourMomentum &pa, const FourMomentum &pb)
 
double asqrtS (const ParticlePair &beams)
 
double asqrtS (const Event &e)
 
FourMomentum cmsBoostVec (const FourMomentum &pa, const FourMomentum &pb)
 Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of beam momenta.
 
FourMomentum cmsBoostVec (const ParticlePair &beams)
 Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of Particles.
 
FourMomentum acmsBoostVec (const FourMomentum &pa, const FourMomentum &pb)
 Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of beam momenta.
 
FourMomentum acmsBoostVec (const ParticlePair &beams)
 Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of Particles.
 
Vector3 cmsBetaVec (const FourMomentum &pa, const FourMomentum &pb)
 Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of beam momenta.
 
Vector3 cmsBetaVec (const ParticlePair &beams)
 Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of Particles.
 
Vector3 acmsBetaVec (const FourMomentum &pa, const FourMomentum &pb)
 
Vector3 acmsBetaVec (const ParticlePair &beams)
 
Vector3 cmsGammaVec (const FourMomentum &pa, const FourMomentum &pb)
 Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of beam momenta.
 
Vector3 cmsGammaVec (const ParticlePair &beams)
 Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of Particles.
 
Vector3 acmsGammaVec (const FourMomentum &pa, const FourMomentum &pb)
 
Vector3 acmsGammaVec (const ParticlePair &beams)
 
LorentzTransform cmsTransform (const FourMomentum &pa, const FourMomentum &pb)
 Get the Lorentz transformation to the beam centre-of-mass system (CMS) from a pair of beam momenta.
 
LorentzTransform cmsTransform (const ParticlePair &beams)
 Get the Lorentz transformation to the beam centre-of-mass system (CMS) from a pair of Particles.
 
LorentzTransform acmsTransform (const FourMomentum &pa, const FourMomentum &pb)
 
LorentzTransform acmsTransform (const ParticlePair &beams)
 
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)
 
bool operator== (const Cut &a, const Cut &b)
 Compare two cuts for equality, forwards to the cut-specific implementation.
 
std::ostream & operator<< (std::ostream &os, const Cut &cptr)
 String representation.
 
double ELECTRON_RECOEFF_ATLAS_RUN1 (const Particle &e)
 
double ELECTRON_RECOEFF_ATLAS_RUN2 (const Particle &e)
 
double ELECTRON_EFF_ATLAS_RUN2_LOOSE (const Particle &e)
 ATLAS Run 2 'loose' electron reco+identification efficiency.
 
double ELECTRON_EFF_ATLAS_RUN1_MEDIUM (const Particle &e)
 ATLAS Run 1 'medium' electron reco+identification efficiency.
 
double ELECTRON_EFF_ATLAS_RUN2_MEDIUM (const Particle &e)
 ATLAS Run 2 'medium' electron reco+identification efficiency.
 
double ELECTRON_EFF_ATLAS_RUN1_TIGHT (const Particle &e)
 ATLAS Run 1 'tight' electron reco+identification efficiency.
 
double ELECTRON_EFF_ATLAS_RUN2_TIGHT (const Particle &e)
 ATLAS Run 2 'tight' electron reco+identification efficiency.
 
Particle ELECTRON_SMEAR_ATLAS_RUN1 (const Particle &e)
 ATLAS Run 1 electron reco smearing.
 
Particle ELECTRON_SMEAR_ATLAS_RUN2 (const Particle &e)
 
double ELECTRON_EFF_CMS_RUN1 (const Particle &e)
 CMS Run 1 electron reconstruction efficiency.
 
double ELECTRON_EFF_CMS_RUN2 (const Particle &e)
 
Particle ELECTRON_SMEAR_CMS_RUN1 (const Particle &e)
 CMS electron energy smearing, preserving direction.
 
Particle ELECTRON_SMEAR_CMS_RUN2 (const Particle &e)
 
double PHOTON_EFF_ATLAS_RUN1 (const Particle &y)
 ATLAS Run 2 photon reco efficiency.
 
double PHOTON_EFF_ATLAS_RUN2 (const Particle &y)
 ATLAS Run 2 photon reco efficiency.
 
double PHOTON_EFF_CMS_RUN1 (const Particle &y)
 
double PHOTON_EFF_CMS_RUN2 (const Particle &y)
 
Particle PHOTON_SMEAR_ATLAS_RUN1 (const Particle &y)
 
Particle PHOTON_SMEAR_ATLAS_RUN2 (const Particle &y)
 
Particle PHOTON_SMEAR_CMS_RUN1 (const Particle &y)
 
Particle PHOTON_SMEAR_CMS_RUN2 (const Particle &y)
 
double MUON_EFF_ATLAS_RUN1 (const Particle &m)
 ATLAS Run 1 muon reco efficiency.
 
double MUON_RECOEFF_ATLAS_RUN2 (const Particle &m)
 
double MUON_EFF_ATLAS_RUN2 (const Particle &m)
 ATLAS Run 2 muon reco+ID efficiency.
 
Particle MUON_SMEAR_ATLAS_RUN1 (const Particle &m)
 ATLAS Run 1 muon reco smearing.
 
Particle MUON_SMEAR_ATLAS_RUN2 (const Particle &m)
 
double MUON_EFF_CMS_RUN1 (const Particle &m)
 CMS Run 1 muon reco efficiency.
 
double MUON_EFF_CMS_RUN2 (const Particle &m)
 
Particle MUON_SMEAR_CMS_RUN1 (const Particle &m)
 CMS Run 1 muon reco smearing.
 
Particle MUON_SMEAR_CMS_RUN2 (const Particle &m)
 
double TAU_EFF_ATLAS_RUN1 (const Particle &t)
 ATLAS Run 1 8 TeV tau efficiencies (medium working point)
 
double TAUJET_EFF_ATLAS_RUN1 (const Jet &j)
 ATLAS Run 1 8 TeV tau misID rates (medium working point)
 
double TAU_EFF_ATLAS_RUN2 (const Particle &t)
 ATLAS Run 2 13 TeV tau efficiencies (medium working point)
 
double TAUJET_EFF_ATLAS_RUN2 (const Jet &j)
 ATLAS Run 2 13 TeV tau misID rate (medium working point)
 
Particle TAU_SMEAR_ATLAS_RUN1 (const Particle &t)
 
Particle TAU_SMEAR_ATLAS_RUN2 (const Particle &t)
 
double TAU_EFF_CMS_RUN1 (const Particle &t)
 
double TAU_EFF_CMS_RUN2 (const Particle &t)
 
Particle TAU_SMEAR_CMS_RUN1 (const Particle &t)
 
Particle TAU_SMEAR_CMS_RUN2 (const Particle &t)
 
double JET_BTAG_ATLAS_RUN1 (const Jet &j)
 Return the ATLAS Run 1 jet flavour tagging efficiency for the given Jet, from Delphes.
 
double JET_BTAG_ATLAS_RUN2_MV2C20 (const Jet &j)
 Return the ATLAS Run 2 MC2c20 77% WP jet flavour tagging efficiency for the given Jet.
 
double JET_BTAG_ATLAS_RUN2_MV2C10 (const Jet &j)
 Return the ATLAS Run 2 MC2c10 77% WP jet flavour tagging efficiency for the given Jet.
 
Jet JET_SMEAR_ATLAS_RUN1 (const Jet &j)
 ATLAS Run 1 jet smearing.
 
Jet JET_SMEAR_ATLAS_RUN2 (const Jet &j)
 
Jet JET_SMEAR_CMS_RUN1 (const Jet &j)
 
Jet JET_SMEAR_CMS_RUN2 (const Jet &j)
 
Vector3 MET_SMEAR_IDENTITY (const Vector3 &met, double)
 
Vector3 MET_SMEAR_ATLAS_RUN1 (const Vector3 &met, double set)
 ATLAS Run 1 ETmiss smearing.
 
Vector3 MET_SMEAR_ATLAS_RUN2 (const Vector3 &met, double set)
 
Vector3 MET_SMEAR_CMS_RUN1 (const Vector3 &met, double set)
 
Vector3 MET_SMEAR_CMS_RUN2 (const Vector3 &met, double set)
 
double TRK_EFF_ATLAS_RUN1 (const Particle &p)
 ATLAS Run 1 tracking efficiency.
 
double TRK_EFF_ATLAS_RUN2 (const Particle &p)
 
double TRK_EFF_CMS_RUN1 (const Particle &p)
 CMS Run 1 tracking efficiency.
 
double TRK_EFF_CMS_RUN2 (const Particle &p)
 
double ATLAS_JVT_EFF_LOOSE (const Jet &j)
 Return the efficiency of the ATLAS JVT tagger at > 0.2 W.P.
 
double ATLAS_JVT_EFF_MEDIUM (const Jet &j)
 Return the efficiency of the ATLAS JVT tagger at > 0.4 W.P.
 
double ATLAS_JVT_EFF_TIGHT (const Jet &j)
 Return the efficiency of the ATLAS JVT tagger at > 0.7 W.P.
 
PseudoJets mkPseudoJets (const Particles &ps)
 
PseudoJets mkPseudoJets (const Jets &js)
 
Jets mkJets (const PseudoJets &pjs)
 
BoolJetAND operator&& (const JetSelector &a, const JetSelector &b)
 Operator syntactic sugar for AND construction.
 
BoolJetOR operator|| (const JetSelector &a, const JetSelector &b)
 Operator syntactic sugar for OR construction.
 
BoolJetNOT operator! (const JetSelector &a)
 Operator syntactic sugar for NOT construction.
 
Jetsiselect (Jets &jets, const Cut &c)
 Filter a jet collection in-place to the subset that passes the supplied Cut.
 
Jets select (const Jets &jets, const Cut &c)
 Filter a jet collection in-place to the subset that passes the supplied Cut.
 
Jets select (const Jets &jets, const Cut &c, Jets &out)
 Filter a jet collection in-place to the subset that passes the supplied Cut.
 
Jetsidiscard (Jets &jets, const Cut &c)
 Filter a jet collection in-place to the subset that fails the supplied Cut.
 
Jets discard (const Jets &jets, const Cut &c)
 Filter a jet collection in-place to the subset that fails the supplied Cut.
 
Jets discard (const Jets &jets, const Cut &c, Jets &out)
 Filter a jet collection in-place to the subset that fails the supplied Cut.
 
Jets trimJetsFrac (const PseudoJets &jetsIn, const double frac=0.1)
 
std::ostream & operator<< (Log &log, int level)
 Streaming output to a logger must have a Log::Level/int as its first argument.
 
double P3_EFF_ZERO (const Vector3 &)
 Take a Vector3 and return 0.
 
double P3_EFF_ONE (const Vector3 &)
 Take a Vector3 and return 1.
 
Vector3 P3_SMEAR_IDENTITY (const Vector3 &p)
 Take a Vector3 and return it unmodified.
 
Vector3 P3_SMEAR_PERFECT (const Vector3 &p)
 Alias for P3_SMEAR_IDENTITY.
 
Vector3 P3_SMEAR_LEN_GAUSS (const Vector3 &p, double resolution)
 Smear a Vector3's length using a Gaussian of absolute width resolution.
 
template<typename PBCONTAINER1 , typename PBCONTAINER2 >
void idiscardIfAny (PBCONTAINER1 &tofilter, const PBCONTAINER2 &tocompare, typename std::function< bool(const typename PBCONTAINER1::value_type &, const typename PBCONTAINER2::value_type &)> fn)
 
template<typename PBCONTAINER1 , typename PBCONTAINER2 >
PBCONTAINER1 discardIfAny (const PBCONTAINER1 &tofilter, const PBCONTAINER2 &tocompare, typename std::function< bool(const typename PBCONTAINER1::value_type &, const typename PBCONTAINER2::value_type &)> fn)
 
template<typename PBCONTAINER1 , typename PBCONTAINER2 >
PBCONTAINER1 selectIfAny (const PBCONTAINER1 &tofilter, const PBCONTAINER2 &tocompare, typename std::function< bool(const typename PBCONTAINER1::value_type &, const typename PBCONTAINER2::value_type &)> fn)
 
template<typename PBCONTAINER1 , typename PBCONTAINER2 >
void iselectIfAny (PBCONTAINER1 &tofilter, const PBCONTAINER2 &tocompare, typename std::function< bool(const typename PBCONTAINER1::value_type &, const typename PBCONTAINER2::value_type &)> fn)
 
template<typename PBCONTAINER1 , typename PBCONTAINER2 >
PBCONTAINER1 discardIfAll (const PBCONTAINER1 &tofilter, const PBCONTAINER2 &tocompare, typename std::function< bool(const typename PBCONTAINER1::value_type &, const typename PBCONTAINER2::value_type &)> fn)
 
template<typename PBCONTAINER1 , typename PBCONTAINER2 >
void idiscardIfAll (PBCONTAINER1 &tofilter, const PBCONTAINER2 &tocompare, typename std::function< bool(const typename PBCONTAINER1::value_type &, const typename PBCONTAINER2::value_type &)> fn)
 
template<typename PBCONTAINER1 , typename PBCONTAINER2 >
PBCONTAINER1 selectIfAll (const PBCONTAINER1 &tofilter, const PBCONTAINER2 &tocompare, typename std::function< bool(const typename PBCONTAINER1::value_type &, const typename PBCONTAINER2::value_type &)> fn)
 
template<typename PBCONTAINER1 , typename PBCONTAINER2 >
void iselectIfAll (PBCONTAINER1 &tofilter, const PBCONTAINER2 &tocompare, typename std::function< bool(const typename PBCONTAINER1::value_type &, const typename PBCONTAINER2::value_type &)> fn)
 
template<typename PBCONTAINER1 , typename PBCONTAINER2 >
void idiscardIfAnyDeltaRLess (PBCONTAINER1 &tofilter, const PBCONTAINER2 &tocompare, double dR)
 
template<typename PBCONTAINER1 , typename PBCONTAINER2 >
PBCONTAINER1 discardIfAnyDeltaRLess (const PBCONTAINER1 &tofilter, const PBCONTAINER2 &tocompare, double dR)
 
template<typename PBCONTAINER1 , typename PBCONTAINER2 >
void idiscardIfAnyDeltaPhiLess (PBCONTAINER1 &tofilter, const PBCONTAINER2 &tocompare, double dphi)
 
template<typename PBCONTAINER1 , typename PBCONTAINER2 >
PBCONTAINER1 discardIfAnyDeltaPhiLess (const PBCONTAINER1 &tofilter, const PBCONTAINER2 &tocompare, double dphi)
 
template<typename PBCONTAINER1 , typename PBCONTAINER2 >
PBCONTAINER1 selectIfAnyDeltaRLess (const PBCONTAINER1 &tofilter, const PBCONTAINER2 &tocompare, double dR)
 
template<typename PBCONTAINER1 , typename PBCONTAINER2 >
void iselectIfAnyDeltaRLess (PBCONTAINER1 &tofilter, const PBCONTAINER2 &tocompare, double dR)
 
template<typename PBCONTAINER1 , typename PBCONTAINER2 >
PBCONTAINER1 selectIfAnyDeltaPhiLess (const PBCONTAINER1 &tofilter, const PBCONTAINER2 &tocompare, double dphi)
 
template<typename PBCONTAINER1 , typename PBCONTAINER2 >
void iselectIfAnyDeltaPhiLess (PBCONTAINER1 &tofilter, const PBCONTAINER2 &tocompare, double dphi)
 
template<typename CONTAINER , typename = isCIterable<CONTAINER>>
int closestMassIndex (CONTAINER &&c, double mtarget, double mmin=-DBL_MAX, double mmax=DBL_MAX)
 Return the index from a vector which best matches mass(c[i]) to the target value.
 
template<typename CONTAINER1 , typename CONTAINER2 , typename = isCIterable<CONTAINER1, CONTAINER2>>
pair< int, int > closestMassIndices (CONTAINER1 &&c1, CONTAINER2 &&c2, double mtarget, double mmin=-DBL_MAX, double mmax=DBL_MAX)
 Return the indices from two vectors which best match fn(c1[i], c2[j]) to the target value.
 
template<typename CONTAINER , typename T , typename = isCIterable<CONTAINER>>
int closestMassIndex (CONTAINER &&c, const T &x, double mtarget, double mmin=-DBL_MAX, double mmax=DBL_MAX)
 Return the index from a vector which best matches fn(c[i], x) to the target value.
 
template<typename CONTAINER , typename T , typename = isCIterable<CONTAINER>>
int closestMassIndex (T &&x, CONTAINER &&c, double mtarget, double mmin=-DBL_MAX, double mmax=DBL_MAX)
 Return the index from a vector which best matches fn(x, c[j]) to the target value.
 
int pid (const Particle &p)
 Unbound function access to PID code.
 
int abspid (const Particle &p)
 Unbound function access to abs PID code.
 
bool isSameSign (const Particle &a, const Particle &b)
 
bool isOppSign (const Particle &a, const Particle &b)
 
bool isSameFlav (const Particle &a, const Particle &b)
 
bool isOppFlav (const Particle &a, const Particle &b)
 
bool isOSSF (const Particle &a, const Particle &b)
 
bool isSSSF (const Particle &a, const Particle &b)
 
bool isOSOF (const Particle &a, const Particle &b)
 
bool isSSOF (const Particle &a, const Particle &b)
 
bool oppSign (const Particle &a, const Particle &b)
 Return true if Particles a and b have the opposite charge sign.
 
bool sameSign (const Particle &a, const Particle &b)
 
bool oppCharge (const Particle &a, const Particle &b)
 
bool sameCharge (const Particle &a, const Particle &b)
 
bool diffCharge (const Particle &a, const Particle &b)
 Return true if Particles a and b have a different (not necessarily opposite) charge.
 
bool isFirstWith (const Particle &p, const ParticleSelector &f)
 Determine whether a particle is the first in a decay chain to meet the function requirement.
 
bool isFirstWithout (const Particle &p, const ParticleSelector &f)
 Determine whether a particle is the first in a decay chain not to meet the function requirement.
 
bool isLastWith (const Particle &p, const ParticleSelector &f)
 Determine whether a particle is the last in a decay chain to meet the function requirement.
 
bool isLastWithout (const Particle &p, const ParticleSelector &f)
 Determine whether a particle is the last in a decay chain not to meet the function requirement.
 
bool hasAncestorWith (const Particle &p, const ParticleSelector &f, bool only_physical=true)
 Determine whether a particle has an ancestor which meets the function requirement.
 
bool hasAncestorWithout (const Particle &p, const ParticleSelector &f, bool only_physical=true)
 Determine whether a particle has an ancestor which doesn't meet the function requirement.
 
bool hasParentWith (const Particle &p, const ParticleSelector &f)
 Determine whether a particle has a parent which meets the function requirement.
 
bool hasParentWithout (const Particle &p, const ParticleSelector &f)
 Determine whether a particle has a parent which doesn't meet the function requirement.
 
bool hasChildWith (const Particle &p, const ParticleSelector &f)
 Determine whether a particle has a child which meets the function requirement.
 
bool hasChildWithout (const Particle &p, const ParticleSelector &f)
 Determine whether a particle has a child which doesn't meet the function requirement.
 
bool hasDescendantWith (const Particle &p, const ParticleSelector &f, bool remove_duplicates=true)
 Determine whether a particle has a descendant which meets the function requirement.
 
bool hasDescendantWithout (const Particle &p, const ParticleSelector &f, bool remove_duplicates=true)
 Determine whether a particle has a descendant which doesn't meet the function requirement.
 
bool hasStableDescendantWith (const Particle &p, const ParticleSelector &f)
 Determine whether a particle has a stable descendant which meets the function requirement.
 
bool hasStableDescendantWithout (const Particle &p, const ParticleSelector &f)
 Determine whether a particle has a stable descendant which doesn't meet the function requirement.
 
bool isVisible (const Particle &p)
 Is this particle potentially visible in a detector?
 
bool isDirect (const Particle &p, bool allow_from_direct_tau=false, bool allow_from_direct_mu=false)
 Decide if a given particle is direct, via Particle::isDirect()
 
bool isPrompt (const Particle &p, bool allow_from_prompt_tau=false, bool allow_from_prompt_mu=false)
 Decide if a given particle is prompt, via Particle::isPrompt()
 
bool isStable (const Particle &p)
 Decide if a given particle is stable, via Particle::isStable()
 
bool hasHadronicDecay (const Particle &p)
 Decide if a given particle decays hadronically.
 
bool hasLeptonicDecay (const Particle &p)
 Decide if a given particle decays leptonically (decays, and no hadrons)
 
bool fromBottom (const Particle &p)
 Determine whether the particle is from a b-hadron decay.
 
bool fromCharm (const Particle &p)
 Determine whether the particle is from a c-hadron decay.
 
bool fromHadron (const Particle &p)
 Determine whether the particle is from a hadron decay.
 
bool fromTau (const Particle &p, bool prompt_taus_only=false)
 Determine whether the particle is from a tau decay.
 
bool fromPromptTau (const Particle &p)
 Determine whether the particle is from a prompt tau decay.
 
BoolParticleAND operator&& (const ParticleSelector &a, const ParticleSelector &b)
 Operator syntactic sugar for AND construction.
 
BoolParticleOR operator|| (const ParticleSelector &a, const ParticleSelector &b)
 Operator syntactic sugar for OR construction.
 
BoolParticleNOT operator! (const ParticleSelector &a)
 Operator syntactic sugar for NOT construction.
 
Particlesiselect (Particles &particles, const Cut &c)
 Filter a particle collection in-place to the subset that passes the supplied Cut.
 
Particles select (const Particles &particles, const Cut &c)
 Filter a particle collection in-place to the subset that passes the supplied Cut.
 
Particles select (const Particles &particles, const Cut &c, Particles &out)
 Filter a particle collection in-place to the subset that passes the supplied Cut.
 
Particlesidiscard (Particles &particles, const Cut &c)
 Filter a particle collection in-place to the subset that fails the supplied Cut.
 
Particles discard (const Particles &particles, const Cut &c)
 Filter a particle collection in-place to the subset that fails the supplied Cut.
 
Particles discard (const Particles &particles, const Cut &c, Particles &out)
 Filter a particle collection in-place to the subset that fails the supplied Cut.
 
PdgIdPair pids (const ParticlePair &pp)
 Get the PDG ID codes of a ParticlePair.
 
bool isSame (const Particle &a, const Particle &b)
 Check Particle equivalence.
 
bool containsPID (const Particles &parts, int id, bool abs=false)
 Check for pid membership in a list of particles.
 
bool isRadiative (const Particle &part)
 Check whether a particle is radiative.
 
bool cascadeContains (const Particles &parts, const vector< int > &pids, bool absolute, bool ignorephoton)
 Check whether a set of particles' decay chains can contain the requested list of pids.
 
std::mt19937 & rng ()
 Return a thread-safe random number generator (mainly for internal use)
 
double rand01 ()
 Return a uniformly sampled random number between 0 and 1.
 
double randnorm (double loc, double scale)
 Return a random number sampled from a Gaussian/normal distribution.
 
double randlognorm (double loc, double scale)
 Return a random number sampled from a log-normal distribution.
 
double randcrystalball (double alpha, double n, double mu, double sigma)
 Return a random number sampled from a Crystal Ball distribution.
 
double pNorm (double x, double mu, double sigma)
 Probability density of a Gaussian/normal distribution at x.
 
double pCrystalBall (double x, double alpha, double n, double mu, double sigma)
 Probability density of a Crystal Ball distribution at x.
 
Vector3 momentum3 (const fastjet::PseudoJet &pj)
 Make a 3-momentum vector from a FastJet pseudojet.
 
FourMomentum momentum (const fastjet::PseudoJet &pj)
 Make a 4-momentum vector from a FastJet pseudojet.
 
lwt::JSONConfig readLWTNNConfig (const string &jsonpath)
 Read a LWT DNN config from the JSON path.
 
lwt::GraphConfig readLWTNNGraphConfig (const string &jsonpath)
 Read a LWT Graph config from the JSON path.
 
std::unique_ptr< lwt::LightweightNeuralNetwork > mkLWTNN (const lwt::JSONConfig &jsonconfig)
 Make a LWT DNN from the JSON config object.
 
std::unique_ptr< lwt::LightweightGraph > mkGraphLWTNN (const lwt::GraphConfig &graphconfig)
 Make a LWT Graph from the JSON config object.
 
std::unique_ptr< lwt::LightweightNeuralNetwork > mkLWTNN (const string &jsonpath)
 Make a LWT DNN direct from the JSON config path.
 
std::unique_ptr< lwt::LightweightGraph > mkGraphLWTNN (const string &jsonpath)
 Make a LWT graph direct from the JSON config path.
 
double mT2Sq (const FourMomentum &a, const FourMomentum &b, const Vector3 &ptmiss, double invisiblesMass, double invisiblesMass2=-1)
 Compute asymm mT2**2 using the bisection method.
 
double mT2Sq (const FourMomentum &a, const FourMomentum &b, const FourMomentum &ptmiss, double invisiblesMass, double invisiblesMass2=-1)
 Override for mT2Sq with FourMomentum ptmiss.
 
double mT2 (const FourMomentum &a, const FourMomentum &b, const Vector3 &ptmiss, double invisiblesMass, double invisiblesMass2=-1)
 Compute asymm mT2 using the bisection method.
 
double mT2 (const FourMomentum &a, const FourMomentum &b, const FourMomentum &ptmiss, double invisiblesMass, double invisiblesMass2=-1)
 Override for mT2 with FourMomentum ptmiss.
 
string getONNXFilePath (const string &filename)
 Useful function for getting ONNX file paths.
 
unique_ptr< RivetONNXrtgetONNX (const string &analysisname, const string &suffix=".onnx")
 
bool fileexists (const std::string &path)
 Convenience function for determining if a filesystem path exists.
 
template<typename T >
bool copyAO (YODA::AnalysisObjectPtr src, YODA::AnalysisObjectPtr dst, const double scale=1.0)
 
bool isTmpPath (const std::string &path, const bool tmp_only=false)
 
map< string, YODA::AnalysisObjectPtr > getRefData (const string &papername)
 
string getDatafilePath (const string &papername)
 Get the file system path to the reference file for this paper.
 
template<typename TPtr >
bool bookingCompatible (TPtr a, TPtr b)
 
bool bookingCompatible (CounterPtr, CounterPtr)
 
bool bookingCompatible (YODA::CounterPtr, YODA::CounterPtr)
 
template<size_t N>
bool bookingCompatible (ScatterNDPtr< N > a, ScatterNDPtr< N > b)
 
template<size_t N>
bool bookingCompatible (YODA::ScatterNDPtr< N > a, YODA::ScatterNDPtr< N > b)
 
bool beamInfoCompatible (YODA::AnalysisObjectPtr a, YODA::AnalysisObjectPtr b)
 
template<typename T , typename U >
lexical_cast (const U &in)
 Convert between any types via stringstream.
 
template<typename T >
string to_str (const T &x)
 Convert any object to a string.
 
template<typename T >
string toString (const T &x)
 Convert any object to a string.
 
string & replace_first (string &str, const string &patt, const string &repl)
 Replace the first instance of patt with repl.
 
string & replace_all (string &str, const string &patt, const string &repl)
 Replace all instances of patt with repl.
 
int nocase_cmp (const string &s1, const string &s2)
 Case-insensitive string comparison function.
 
bool nocase_equals (const string &s1, const string &s2)
 Case-insensitive string equality function.
 
string toLower (const string &s)
 Convert a string to lower-case.
 
string toUpper (const string &s)
 Convert a string to upper-case.
 
bool startsWith (const string &s, const string &start)
 Check whether a string start is found at the start of s.
 
bool endsWith (const string &s, const string &end)
 Check whether a string end is found at the end of s.
 
string strcat ()
 
template<typename T , typename... Ts>
string strcat (T value, Ts... fargs)
 Make a string containing the concatenated string representations of each item in the variadic list.
 
template<typename T >
string join (const vector< T > &v, const string &sep=" ")
 Make a string containing the string representations of each item in v, separated by sep.
 
template<>
string join (const vector< string > &v, const string &sep)
 Make a string containing the string representations of each item in v, separated by sep.
 
template<typename T >
string join (const set< T > &s, const string &sep=" ")
 Make a string containing the string representations of each item in s, separated by sep.
 
template<>
string join (const set< string > &s, const string &sep)
 Make a string containing the string representations of each item in s, separated by sep.
 
vector< string > split (const string &s, const string &sep)
 Split a string on a specified separator string.
 
string lpad (const string &s, size_t width, const string &padchar=" ")
 Left-pad the given string s to width width.
 
string rpad (const string &s, size_t width, const string &padchar=" ")
 Right-pad the given string s to width width.
 
vector< string > pathsplit (const string &path)
 Split a path string with colon delimiters.
 
string pathjoin (const vector< string > &paths)
 Join several filesystem paths together with the standard ':' delimiter.
 
string operator/ (const string &a, const string &b)
 Operator for joining strings a and b with filesystem separators.
 
string basename (const string &p)
 Get the basename (i.e. terminal file name) from a path p.
 
string dirname (const string &p)
 Get the dirname (i.e. path to the penultimate directory) from a path p.
 
string file_stem (const string &f)
 Get the stem (i.e. part without a file extension) from a filename f.
 
string file_extn (const string &f)
 Get the file extension from a filename f.
 
template<typename CONTAINER , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
unsigned int count (const CONTAINER &c)
 Return number of true elements in the container c .
 
template<typename CONTAINER , typename FN , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
unsigned int count (const CONTAINER &c, const FN &f)
 Return number of elements in the container c for which f(x) is true.
 
template<typename CONTAINER , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
bool any (const CONTAINER &c)
 Return true if x is true for any x in container c, otherwise false.
 
template<typename CONTAINER , typename FN , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
bool any (const CONTAINER &c, const FN &f)
 Return true if f(x) is true for any x in container c, otherwise false.
 
template<typename CONTAINER , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
bool all (const CONTAINER &c)
 Return true if x is true for all x in container c, otherwise false.
 
template<typename CONTAINER , typename FN , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
bool all (const CONTAINER &c, const FN &f)
 Return true if f(x) is true for all x in container c, otherwise false.
 
template<typename CONTAINER , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
bool none (const CONTAINER &c)
 Return true if x is false for all x in container c, otherwise false.
 
template<typename CONTAINER , typename FN , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
bool none (const CONTAINER &c, const FN &f)
 Return true if f(x) is false for all x in container c, otherwise false.
 
template<typename CONTAINER1 , typename CONTAINER2 , typename FN = typename std::decay_t<CONTAINER2>::value_type( const typename std::decay_t<CONTAINER1>::value_type::ParticleBase&), typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER1>> && is_citerable_v<std::decay_t<CONTAINER2>> >>
const CONTAINER2 & transform (const CONTAINER1 &in, CONTAINER2 &out, FN &&f)
 
template<typename CONTAINER1 , typename RTN , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER1>> >>
std::vector< RTN > transform (const CONTAINER1 &in, const std::function< RTN(typename CONTAINER1::value_type::ParticleBase)> &f)
 
template<typename CONTAINER1 , typename T , typename FN , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER1>> >>
accumulate (const CONTAINER1 &in, const T &init, const FN &f)
 A single-container-arg version of std::accumulate, aka reduce.
 
template<typename CONTAINER , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER::value_type sum (const CONTAINER &c)
 Generic sum function, adding x for all x in container c.
 
template<typename CONTAINER , typename T , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
sum (const CONTAINER &c, const T &start)
 
template<typename CONTAINER , typename T , typename FN = T(const typename std::decay_t<CONTAINER>::value_type&), typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
sum (CONTAINER &&c, FN &&fn, const T &start=T())
 Generic sum function, adding fn(x) for all x in container c, starting with start.
 
template<typename CONTAINER , typename T , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
T & isum (const CONTAINER &c, T &out)
 
template<typename CONTAINER , typename FN , typename T , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
T & isum (const CONTAINER &c, const FN &f, T &out)
 
template<typename CONTAINER , typename FN , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER & idiscard (CONTAINER &c, const FN &f)
 
template<typename CONTAINER , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER & idiscard (CONTAINER &c, const typename CONTAINER::value_type &y)
 Version with element-equality comparison in place of a function.
 
template<typename CONTAINER , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER & idiscard_if_any (CONTAINER &c, const CONTAINER &ys)
 Version with several element-equality comparisons in place of a function.
 
template<typename CONTAINER , typename FN , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER discard (const CONTAINER &c, const FN &f)
 
template<typename CONTAINER , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER discard (const CONTAINER &c, const typename CONTAINER::value_type &y)
 Version with element-equality comparison in place of a function.
 
template<typename CONTAINER , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER discard_if_any (const CONTAINER &c, const CONTAINER &ys)
 Version with several element-equality comparisons in place of a function.
 
template<typename CONTAINER , typename FN , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER & discard (const CONTAINER &c, const FN &f, CONTAINER &out)
 
template<typename CONTAINER , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER & discard (const CONTAINER &c, const typename CONTAINER::value_type &y, CONTAINER &out)
 Version with element-equality comparison in place of a function.
 
template<typename CONTAINER , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER & discard_if_any (const CONTAINER &c, const CONTAINER &ys, CONTAINER &out)
 Version with several element-equality comparisons in place of a function.
 
template<typename CONTAINER , typename FN , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER & iselect (CONTAINER &c, const FN &f)
 
template<typename CONTAINER , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER & iselect_if_any (CONTAINER &c, const CONTAINER &ys)
 Version with several element-equality comparisons in place of a function.
 
template<typename CONTAINER , typename FN , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER select (const CONTAINER &c, const FN &f)
 
template<typename CONTAINER , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER select_if_any (const CONTAINER &c, const CONTAINER &ys)
 Version with several element-equality comparisons in place of a function.
 
template<typename CONTAINER , typename FN , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER & select (const CONTAINER &c, const FN &f, CONTAINER &out)
 
template<typename CONTAINER , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER & select_if_any (const CONTAINER &c, const CONTAINER &ys, CONTAINER &out)
 Version with several element-equality comparisons in place of a function.
 
template<typename CONTAINER , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER slice (const CONTAINER &c, int i, int j)
 Slice of the container elements cf. Python's [i:j] syntax.
 
template<typename CONTAINER , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER slice (const CONTAINER &c, int i)
 Tail slice of the container elements cf. Python's [i:] syntax.
 
template<typename CONTAINER , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER head (const CONTAINER &c, int n)
 Head slice of the n first container elements.
 
template<typename CONTAINER , typename = std::enable_if_t< is_citerable_v<std::decay_t<CONTAINER>> >>
CONTAINER tail (const CONTAINER &c, int n)
 Tail slice of the n last container elements.
 
double min (const vector< double > &in, double errval=DBL_NAN)
 Find the minimum value in the vector.
 
double max (const vector< double > &in, double errval=DBL_NAN)
 Find the maximum value in the vector.
 
pair< double, double > minmax (const vector< double > &in, double errval=DBL_NAN)
 Find the minimum and maximum values in the vector.
 
int min (const vector< int > &in, int errval=-1)
 Find the minimum value in the vector.
 
int max (const vector< int > &in, int errval=-1)
 Find the maximum value in the vector.
 
pair< int, int > minmax (const vector< int > &in, int errval=-1)
 Find the minimum and maximum values in the vector.
 
template<typename CONTAINER , typename FN = double(const typename std::decay_t<CONTAINER>::value_type&), typename = isCIterable<CONTAINER>>
int closestMatchIndex (CONTAINER &&c, FN &&fn, double target, double minval=-DBL_MAX, double maxval=DBL_MAX)
 Return the index from a vector which best matches fn(c[i]) to the target value.
 
template<typename CONTAINER1 , typename CONTAINER2 , typename FN = double(const typename std::decay_t<CONTAINER1>::value_type&, const typename std::decay_t<CONTAINER2>::value_type&), typename = isCIterable<CONTAINER1, CONTAINER2>>
pair< int, int > closestMatchIndices (CONTAINER1 &&c1, CONTAINER2 &&c2, FN &&fn, double target, double minval=-DBL_MAX, double maxval=DBL_MAX)
 Return the indices from two vectors which best match fn(c1[i], c2[j]) to the target value.
 
template<typename CONTAINER , typename T , typename FN = double(const typename std::decay_t<CONTAINER>::value_type&, const std::decay_t<T>&), typename = isCIterable<CONTAINER>>
int closestMatchIndex (CONTAINER &&c, const T &x, FN &&fn, double target, double minval=-DBL_MAX, double maxval=DBL_MAX)
 Return the index from a vector which best matches fn(c[i], x) to the target value.
 
template<typename CONTAINER , typename T , typename FN , typename = isCIterable<CONTAINER>>
int closestMatchIndex (T &&x, CONTAINER &&c, FN &&fn, double target, double minval=-DBL_MAX, double maxval=DBL_MAX)
 Return the index from a vector which best matches fn(x, c[j]) to the target value.
 
template<typename T >
getEnvParam (const std::string name, const T &fallback)
 Get a parameter from a named environment variable, with automatic type conversion.
 
template<class T >
vector< T > slice (const vector< T > &v, int startidx, int endidx)
 Get the contents of a vector between two indices.
 
String representation and streaming support
std::ostream & operator<< (std::ostream &os, const Jet &j)
 Allow a Jet to be passed to an ostream.
 
std::ostream & operator<< (std::ostream &os, const Particle &p)
 Allow a Particle to be passed to an ostream.
 
std::ostream & operator<< (std::ostream &os, const ParticlePair &pp)
 Allow ParticlePair to be passed to an ostream.
 
Comparison functions for safe (floating point) equality tests
template<typename NUM >
std::enable_if_t< std::is_floating_point_v< NUM >, bool > isZero (NUM val, double tolerance=1e-8)
 Compare a number to zero.
 
template<typename NUM >
std::enable_if_t< std::is_integral_v< NUM >, bool > isZero (NUM val, double=1e-5)
 Compare a number to zero.
 
template<typename NUM >
std::enable_if_t< std::is_floating_point_v< NUM >, bool > isNaN (NUM val)
 Check if a number is NaN.
 
template<typename NUM >
std::enable_if_t< std::is_floating_point_v< NUM >, bool > notNaN (NUM val)
 Check if a number is non-NaN.
 
template<typename NUM >
std::enable_if< std::is_floating_point< NUM >::value, NUM >::type sqrt_signed (NUM val)
 Square root of the absolute value with the sign of the argument propagated.
 
template<typename N1 , typename N2 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 > &&(std::is_floating_point_v< N1 >||std::is_floating_point_v< N2 >), bool > fuzzyEquals (N1 a, N2 b, double tolerance=1e-5)
 Compare two numbers for equality with a degree of fuzziness.
 
template<typename N1 , typename N2 >
std::enable_if_t< std::is_integral_v< N1 > &&std::is_integral_v< N2 >, bool > fuzzyEquals (N1 a, N2 b, double)
 Compare two numbers for equality with a degree of fuzziness.
 
template<typename N1 , typename N2 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 >, bool > fuzzyGtrEquals (N1 a, N2 b, double tolerance=1e-5)
 Compare two numbers for >= with a degree of fuzziness.
 
template<typename N1 , typename N2 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 >, bool > fuzzyLessEquals (N1 a, N2 b, double tolerance=1e-5)
 Compare two floating point numbers for <= with a degree of fuzziness.
 
template<typename N1 , typename N2 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 >, signed_if_mixed_t< N1, N2 > > min (N1 a, N2 b)
 Get the minimum of two numbers.
 
template<typename N1 , typename N2 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 >, signed_if_mixed_t< N1, N2 > > max (N1 a, N2 b)
 Get the maximum of two numbers.
 
Miscellaneous numerical helpers
Todo:
Add pair-based versions of the named range-boundary functions
template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, NUM > sqr (NUM a)
 Named number-type squaring operation.
 
template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, NUM > add_quad (NUM a, NUM b)
 Named number-type addition in quadrature operation.
 
template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, NUM > add_quad (NUM a, NUM b, NUM c)
 
double safediv (double num, double den, double fail=0.0)
 
template<typename NUM >
constexpr std::enable_if_t< std::is_arithmetic_v< NUM >, NUM > intpow (NUM val, unsigned int exp)
 A more efficient version of pow for raising numbers to integer powers.
 
template<typename NUM >
constexpr std::enable_if_t< std::is_arithmetic_v< NUM >, int > sign (NUM val)
 Find the sign of a number.
 
Physics statistical distributions
double cdfBW (double x, double mu, double gamma)
 CDF for the Breit-Wigner distribution.
 
double invcdfBW (double p, double mu, double gamma)
 Inverse CDF for the Breit-Wigner distribution.
 
Binning helper functions
vector< double > linspace (size_t nbins, double start, double end, bool include_end=true)
 Make a list of nbins + 1 values equally spaced between start and end inclusive.
 
vector< double > aspace (double step, double start, double end, bool include_end=true, double tol=1e-2)
 Make a list of values equally spaced by step between start and end inclusive.
 
vector< double > fnspace (size_t nbins, double start, double end, const std::function< double(double)> &fn, const std::function< double(double)> &invfn, bool include_end=true)
 
vector< double > logspace (size_t nbins, double start, double end, bool include_end=true)
 Make a list of nbins + 1 values exponentially spaced between start and end inclusive.
 
vector< double > powspace (size_t nbins, double start, double end, double npow, bool include_end=true)
 Make a list of nbins + 1 values power-law spaced between start and end inclusive.
 
vector< double > powdbnspace (size_t nbins, double start, double end, double npow, bool include_end=true)
 Make a list of nbins + 1 values equally spaced in the CDF of x^n between start and end inclusive.
 
vector< double > bwdbnspace (size_t nbins, double start, double end, double mu, double gamma, bool include_end=true)
 Make a list of nbins + 1 values spaced for equal area Breit-Wigner binning between start and end inclusive. mu and gamma are the Breit-Wigner parameters.
 
template<typename NUM1 , typename NUM2 >
std::enable_if_t< std::is_arithmetic_v< NUM1 > &&std::is_arithmetic_v< NUM2 >, int > binIndex (NUM1 val, std::initializer_list< NUM2 > binedges, bool allow_overflow=false)
 Return the bin index of the given value, val, given a vector of bin edges.
 
template<typename NUM , typename CONTAINER >
std::enable_if_t< std::is_arithmetic_v< NUM > &&std::is_arithmetic_v< typename CONTAINER::value_type >, int > binIndex (NUM val, const CONTAINER &binedges, bool allow_overflow=false)
 Return the bin index of the given value, val, given a vector of bin edges.
 
Discrete statistics functions
template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, NUM > median (const vector< NUM > &sample)
 
template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, double > mean (const vector< NUM > &sample)
 
template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, double > mean_err (const vector< NUM > &sample)
 
template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, double > covariance (const vector< NUM > &sample1, const vector< NUM > &sample2)
 
template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, double > covariance_err (const vector< NUM > &sample1, const vector< NUM > &sample2)
 
template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, double > correlation (const vector< NUM > &sample1, const vector< NUM > &sample2)
 
template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, double > correlation_err (const vector< NUM > &sample1, const vector< NUM > &sample2)
 
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].
 
double mapAngle (double angle, PhiMapping mapping)
 Map an angle into the enum-specified range.
 
Phase-space measure helpers
double deltaPhi (double phi1, double phi2, bool sign=false)
 Calculate the difference between two angles in radians.
 
double deltaEta (double eta1, double eta2, bool sign=false)
 
double deltaRap (double y1, double y2, bool sign=false)
 
double deltaR2 (double rap1, double phi1, double rap2, double phi2)
 
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 R \f$ calculations from 4-vectors
double deltaR2 (const FourVector &a, const FourVector &b, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the squared 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors.
 
double deltaR (const FourVector &a, const FourVector &b, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors.
 
double deltaR2 (const FourVector &v, double eta2, double phi2, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the squared 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors.
 
double deltaR (const FourVector &v, double eta2, double phi2, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors.
 
double deltaR2 (double eta1, double phi1, const FourVector &v, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the squared 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors.
 
double deltaR (double eta1, double phi1, const FourVector &v, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors.
 
double deltaR2 (const FourMomentum &a, const FourMomentum &b, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the squared 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors.
 
double deltaR (const FourMomentum &a, const FourMomentum &b, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between two four-vectors.
 
double deltaR2 (const FourMomentum &v, double eta2, double phi2, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the squared 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 deltaR2 (double eta1, double phi1, const FourMomentum &v, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the squared 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 deltaR2 (const FourMomentum &a, const FourVector &b, RapScheme scheme=PSEUDORAPIDITY)
 Calculate the squared 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 deltaR2 (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 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 deltaR2 (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 FourMomentum &a, const Vector3 &b)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between a three-vector and a four-vector.
 
double deltaR2 (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 Vector3 &a, const FourMomentum &b)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between a three-vector and a four-vector.
 
double deltaR2 (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 FourVector &a, const Vector3 &b)
 Calculate the 2D rapidity-azimuthal ("eta-phi") distance between a three-vector and a four-vector.
 
double deltaR2 (const Vector3 &a, const FourVector &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, bool sign=false)
 Calculate the difference in azimuthal angle between two vectors.
 
double deltaPhi (const FourMomentum &v, double phi2, bool sign=false)
 Calculate the difference in azimuthal angle between two vectors.
 
double deltaPhi (double phi1, const FourMomentum &v, bool sign=false)
 Calculate the difference in azimuthal angle between two vectors.
 
double deltaPhi (const FourVector &a, const FourVector &b, bool sign=false)
 Calculate the difference in azimuthal angle between two vectors.
 
double deltaPhi (const FourVector &v, double phi2, bool sign=false)
 Calculate the difference in azimuthal angle between two vectors.
 
double deltaPhi (double phi1, const FourVector &v, bool sign=false)
 Calculate the difference in azimuthal angle between two vectors.
 
double deltaPhi (const FourVector &a, const FourMomentum &b, bool sign=false)
 Calculate the difference in azimuthal angle between two vectors.
 
double deltaPhi (const FourMomentum &a, const FourVector &b, bool sign=false)
 Calculate the difference in azimuthal angle between two vectors.
 
double deltaPhi (const FourVector &a, const Vector3 &b, bool sign=false)
 Calculate the difference in azimuthal angle between two vectors.
 
double deltaPhi (const Vector3 &a, const FourVector &b, bool sign=false)
 Calculate the difference in azimuthal angle between two vectors.
 
double deltaPhi (const FourMomentum &a, const Vector3 &b, bool sign=false)
 Calculate the difference in azimuthal angle between two vectors.
 
double deltaPhi (const Vector3 &a, const FourMomentum &b, bool sign=false)
 Calculate the difference in azimuthal angle between two vectors.
 
\f$ |\Delta eta| \f$ calculations from 4-vectors
double deltaEta (const FourMomentum &a, const FourMomentum &b, bool sign=false)
 Calculate the difference in pseudorapidity between two vectors.
 
double deltaEta (const FourMomentum &v, double eta2, bool sign=false)
 Calculate the difference in pseudorapidity between two vectors.
 
double deltaEta (double eta1, const FourMomentum &v, bool sign=false)
 Calculate the difference in pseudorapidity between two vectors.
 
double deltaEta (const FourVector &a, const FourVector &b, bool sign=false)
 Calculate the difference in pseudorapidity between two vectors.
 
double deltaEta (const FourVector &v, double eta2, bool sign=false)
 Calculate the difference in pseudorapidity between two vectors.
 
double deltaEta (double eta1, const FourVector &v, bool sign=false)
 Calculate the difference in pseudorapidity between two vectors.
 
double deltaEta (const FourVector &a, const FourMomentum &b, bool sign=false)
 Calculate the difference in pseudorapidity between two vectors.
 
double deltaEta (const FourMomentum &a, const FourVector &b, bool sign=false)
 Calculate the difference in pseudorapidity between two vectors.
 
double deltaEta (const FourVector &a, const Vector3 &b, bool sign=false)
 Calculate the difference in pseudorapidity between two vectors.
 
double deltaEta (const Vector3 &a, const FourVector &b, bool sign=false)
 Calculate the difference in pseudorapidity between two vectors.
 
double deltaEta (const FourMomentum &a, const Vector3 &b, bool sign=false)
 Calculate the difference in pseudorapidity between two vectors.
 
double deltaEta (const Vector3 &a, const FourMomentum &b, bool sign=false)
 Calculate the difference in pseudorapidity between two vectors.
 
\f$ |\Delta y| \f$ calculations from 4-momentum vectors
double deltaRap (const FourMomentum &a, const FourMomentum &b, bool sign=false)
 Calculate the difference in rapidity between two 4-momentum vectors.
 
double deltaRap (const FourMomentum &v, double y2, bool sign=false)
 Calculate the difference in rapidity between two 4-momentum vectors.
 
double deltaRap (double y1, const FourMomentum &v, bool sign=false)
 Calculate the difference in rapidity between two 4-momentum vectors.
 
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.
 
deltaR, deltaEta, deltaPhi functions specifically for Particle/Jet arguments
double deltaR (const ParticleBase &p1, const ParticleBase &p2, RapScheme scheme=PSEUDORAPIDITY)
 
double deltaR (const ParticleBase &p, const FourMomentum &v, RapScheme scheme=PSEUDORAPIDITY)
 
double deltaR (const ParticleBase &p, const FourVector &v, RapScheme scheme=PSEUDORAPIDITY)
 
double deltaR (const ParticleBase &p, const Vector3 &v)
 
double deltaR (const ParticleBase &p, double eta, double phi)
 
double deltaR (const FourMomentum &v, const ParticleBase &p, RapScheme scheme=PSEUDORAPIDITY)
 
double deltaR (const FourVector &v, const ParticleBase &p, RapScheme scheme=PSEUDORAPIDITY)
 
double deltaR (const Vector3 &v, const ParticleBase &p)
 
double deltaR (double eta, double phi, const ParticleBase &p)
 
double deltaPhi (const ParticleBase &p1, const ParticleBase &p2, bool sign=false)
 
double deltaPhi (const ParticleBase &p, const FourMomentum &v, bool sign=false)
 
double deltaPhi (const ParticleBase &p, const FourVector &v, bool sign=false)
 
double deltaPhi (const ParticleBase &p, const Vector3 &v, bool sign=false)
 
double deltaPhi (const ParticleBase &p, double phi, bool sign=false)
 
double deltaPhi (const FourMomentum &v, const ParticleBase &p, bool sign=false)
 
double deltaPhi (const FourVector &v, const ParticleBase &p, bool sign=false)
 
double deltaPhi (const Vector3 &v, const ParticleBase &p, bool sign=false)
 
double deltaPhi (double phi, const ParticleBase &p, bool sign=false)
 
double deltaEta (const ParticleBase &p1, const ParticleBase &p2)
 
double deltaEta (const ParticleBase &p, const FourMomentum &v)
 
double deltaEta (const ParticleBase &p, const FourVector &v)
 
double deltaEta (const ParticleBase &p, const Vector3 &v)
 
double deltaEta (const ParticleBase &p, double eta)
 
double deltaEta (const FourMomentum &v, const ParticleBase &p)
 
double deltaEta (const FourVector &v, const ParticleBase &p)
 
double deltaEta (const Vector3 &v, const ParticleBase &p)
 
double deltaEta (double eta, const ParticleBase &p)
 
double deltaRap (const ParticleBase &p1, const ParticleBase &p2)
 
double deltaRap (const ParticleBase &p, const FourMomentum &v)
 
double deltaRap (const ParticleBase &p, double y)
 
double deltaRap (const FourMomentum &v, const ParticleBase &p)
 
double deltaRap (double y, const ParticleBase &p)
 
Cut operator, (const Cut &, const Cut &)=delete
 
Cut & operator, (Cut &, Cut &)=delete
 
Cut operator, (Cut, Cut)=delete
 
Cut constructors
Cut operator== (Cuts::Quantity, double)
 
Cut operator!= (Cuts::Quantity, double)
 
Cut operator< (Cuts::Quantity, double)
 
Cut operator> (Cuts::Quantity, double)
 
Cut operator<= (Cuts::Quantity, double)
 
Cut operator>= (Cuts::Quantity, double)
 
Cut operator== (Cuts::Quantity qty, int i)
 
Cut operator!= (Cuts::Quantity qty, int i)
 
Cut operator< (Cuts::Quantity qty, int i)
 
Cut operator> (Cuts::Quantity qty, int i)
 
Cut operator<= (Cuts::Quantity qty, int i)
 
Cut operator>= (Cuts::Quantity qty, int i)
 
Cut combiners
Cut operator&& (const Cut &aptr, const Cut &bptr)
 
Cut operator|| (const Cut &aptr, const Cut &bptr)
 
Cut operator! (const Cut &cptr)
 Logical NOT operation on a cut.
 
Cut operator& (const Cut &aptr, const Cut &bptr)
 Logical AND operation on two cuts.
 
Cut operator| (const Cut &aptr, const Cut &bptr)
 Logical OR operation on two cuts.
 
Cut operator~ (const Cut &cptr)
 Logical NOT operation on a cut.
 
Cut operator^ (const Cut &aptr, const Cut &bptr)
 Logical XOR operation on two cuts.
 
Combining Percentiles

Follows the naming of functions for the underlying AnalysisObjects: global operators

template<typename T >
Percentile< typename ReferenceTraits< T >::RefT > divide (const Percentile< T > numer, const Percentile< T > denom)
 
template<typename T >
Percentile< typename ReferenceTraits< T >::RefT > divide (const Percentile< T > numer, const Percentile< typename ReferenceTraits< T >::RefT > denom)
 
template<typename T >
Percentile< typename ReferenceTraits< T >::RefT > divide (const Percentile< typename ReferenceTraits< T >::RefT > numer, const Percentile< T > denom)
 
template<typename T >
Percentile< T > add (const Percentile< T > pctla, const Percentile< T > pctlb)
 
template<typename T >
Percentile< typename ReferenceTraits< T >::RefT > add (const Percentile< T > pctla, const Percentile< typename ReferenceTraits< T >::RefT > pctlb)
 
template<typename T >
Percentile< typename ReferenceTraits< T >::RefT > add (const Percentile< typename ReferenceTraits< T >::RefT > pctla, const Percentile< T > pctlb)
 
template<typename T >
Percentile< T > subtract (const Percentile< T > pctla, const Percentile< T > pctlb)
 
template<typename T >
Percentile< typename ReferenceTraits< T >::RefT > subtract (const Percentile< T > pctla, const Percentile< typename ReferenceTraits< T >::RefT > pctlb)
 
template<typename T >
Percentile< typename ReferenceTraits< T >::RefT > subtract (const Percentile< typename ReferenceTraits< T >::RefT > pctla, const Percentile< T > pctlb)
 
template<typename T >
Percentile< typename ReferenceTraits< T >::RefT > multiply (const Percentile< T > pctla, const Percentile< typename ReferenceTraits< T >::RefT > pctlb)
 
template<typename T >
Percentile< typename ReferenceTraits< T >::RefT > multiply (const Percentile< typename ReferenceTraits< T >::RefT > pctla, const Percentile< T > pctlb)
 
template<typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > divide (const PercentileXaxis< T > numer, const PercentileXaxis< T > denom)
 
template<typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > divide (const PercentileXaxis< T > numer, const PercentileXaxis< typename ReferenceTraits< T >::RefT > denom)
 
template<typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > divide (const PercentileXaxis< typename ReferenceTraits< T >::RefT > numer, const PercentileXaxis< T > denom)
 
template<typename T >
PercentileXaxis< T > add (const PercentileXaxis< T > pctla, const PercentileXaxis< T > pctlb)
 
template<typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > add (const PercentileXaxis< T > pctla, const PercentileXaxis< typename ReferenceTraits< T >::RefT > pctlb)
 
template<typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > add (const PercentileXaxis< typename ReferenceTraits< T >::RefT > pctla, const PercentileXaxis< T > pctlb)
 
template<typename T >
PercentileXaxis< T > subtract (const PercentileXaxis< T > pctla, const PercentileXaxis< T > pctlb)
 
template<typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > subtract (const PercentileXaxis< T > pctla, const PercentileXaxis< typename ReferenceTraits< T >::RefT > pctlb)
 
template<typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > subtract (const PercentileXaxis< typename ReferenceTraits< T >::RefT > pctla, const PercentileXaxis< T > pctlb)
 
template<typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > multiply (const PercentileXaxis< T > pctla, const PercentileXaxis< typename ReferenceTraits< T >::RefT > pctlb)
 
template<typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > multiply (const PercentileXaxis< typename ReferenceTraits< T >::RefT > pctla, const PercentileXaxis< T > pctlb)
 
template<typename T >
Percentile< T > operator+ (const Percentile< T > pctla, const Percentile< T > pctlb)
 
template<typename T >
Percentile< T > operator- (const Percentile< T > pctla, const Percentile< T > pctlb)
 
template<typename T >
Percentile< typename ReferenceTraits< T >::RefT > operator/ (const Percentile< T > numer, const Percentile< T > denom)
 
template<typename T >
PercentileXaxis< T > operator+ (const PercentileXaxis< T > pctla, const PercentileXaxis< T > pctlb)
 
template<typename T >
PercentileXaxis< T > operator- (const PercentileXaxis< T > pctla, const PercentileXaxis< T > pctlb)
 
template<typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > operator/ (const PercentileXaxis< T > numer, const PercentileXaxis< T > denom)
 
Installation directory paths
std::string getLibPath ()
 Get library install path.
 
std::string getDataPath ()
 Get data install path.
 
std::string getRivetDataPath ()
 Get Rivet data install path.
 
Analysis library search paths
std::vector< std::string > getAnalysisLibPaths ()
 Get Rivet analysis plugin 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)
 Add a Rivet analysis plugin library search path.
 
std::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
std::vector< std::string > getAnalysisDataPaths ()
 Get Rivet analysis reference data search paths.
 
void setAnalysisDataPaths (const std::vector< std::string > &paths)
 Set the Rivet data file search paths.
 
void addAnalysisDataPath (const std::string &extrapath)
 Add a Rivet data file search path.
 
std::string findAnalysisDataFile (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 general data file search dirs.
 
std::vector< std::string > getAnalysisRefPaths ()
 Get Rivet analysis reference data search paths.
 
std::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.
 
std::vector< std::string > getAnalysisInfoPaths ()
 Get Rivet analysis info metadata search paths.
 
std::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.
 
std::vector< std::string > getAnalysisPlotPaths ()
 Get Rivet analysis plot style search paths.
 
std::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.
 
Streaming containers as string reps
Todo:

Make these named toStr rather than operator<<

Make these generic to any iterable

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.
 
Boolean-return container searching
bool contains (const std::string &s, const std::string &sub)
 Does s contain sub as a substring?
 
template<typename T >
bool contains (const std::initializer_list< T > &il, const T &x)
 Does the init list il contain x?
 
template<typename T >
bool contains (const std::vector< T > &v, const T &x)
 Does the vector v contain x?
 
template<typename T >
bool contains (const std::list< T > &l, const T &x)
 Does the list l contain x?
 
template<typename T >
bool contains (const std::set< T > &s, const T &x)
 Does the set s contain x?
 
template<typename K , typename T >
bool has_key (const std::map< K, T > &m, const K &key)
 Does the map m contain the key key?
 
template<typename K , typename T >
bool has_value (const std::map< K, T > &m, const T &val)
 Does the map m contain the value val?
 
template<typename K , typename T >
const T & retrieve (const std::map< K, T > &m, const K &key, const T &fallback)
 Get the value in map m with key key, or fall back to fallback.
 
template<typename K >
const std::string & retrieve (const std::map< K, std::string > &m, const K &key, const std::string &fallback)
 Get the value in map m with key key, or fall back to fallback (string-value specialisation)
 
template<typename T >
const T & retrieve (const std::map< std::string, T > &m, const std::string &key, const T &fallback)
 Get the value in map m with key key, or fall back to fallback (string-key specialisation)
 
const std::string & retrieve (const std::map< std::string, std::string > &m, const std::string &key, const std::string &fallback)
 Get the value in map m with key key, or fall back to fallback (string-key+value specialisation)
 

Variables

constexpr double pi = M_PI
 
constexpr double twopi = 2*pi
 
constexpr double halfpi = pi/2
 
constexpr double pi2 = pi*pi
 
constexpr double c_light = 2.99792458e8
 
constexpr double degree = pi / 180.0
 
constexpr double PI = M_PI
 
constexpr double TWOPI = 2*M_PI
 A pre-defined value of \( 2\pi \).
 
constexpr double HALFPI = M_PI_2
 A pre-defined value of \( \pi/2 \).
 
constexpr double SQRT2 = M_SQRT2
 A pre-defined value of \( \sqrt{2} \).
 
constexpr double SQRTPI = 2 / M_2_SQRTPI
 A pre-defined value of \( \sqrt{\pi} \).
 
constexpr double INFF = HUGE_VALF
 Pre-defined values of \( \infty \).
 
constexpr double INF = HUGE_VAL
 
constexpr double INFL = HUGE_VALL
 
constexpr double millimeter = 1.
 
constexpr double millimeter2 = millimeter*millimeter
 
constexpr double millimeter3 = millimeter*millimeter*millimeter
 
constexpr double centimeter = 10.*millimeter
 
constexpr double centimeter2 = centimeter*centimeter
 
constexpr double centimeter3 = centimeter*centimeter*centimeter
 
constexpr double meter = 1000.*millimeter
 
constexpr double meter2 = meter*meter
 
constexpr double meter3 = meter*meter*meter
 
constexpr double micrometer = 1.e-6 *meter
 
constexpr double nanometer = 1.e-9 *meter
 
constexpr double angstrom = 1.e-10*meter
 
constexpr double picometer = 1.e-12*meter
 
constexpr double femtometer = 1.e-15*meter
 
constexpr double attometer = 1.e-18*meter
 
constexpr double fermi = femtometer
 
constexpr double mm = millimeter
 
constexpr double mm2 = millimeter2
 
constexpr double mm3 = millimeter3
 
constexpr double cm = centimeter
 
constexpr double cm2 = centimeter2
 
constexpr double cm3 = centimeter3
 
constexpr double m = meter
 
constexpr double m2 = meter2
 
constexpr double m3 = meter3
 
constexpr double picobarn = 1.0
 
constexpr double barn = 1.0e+12* picobarn
 
constexpr double millibarn = 1.0e-3 * barn
 
constexpr double microbarn = 1.0e-6 * barn
 
constexpr double nanobarn = 1.0e-9 * barn
 
constexpr double femtobarn = 1.0e-15 * barn
 
constexpr double attobarn = 1.0e-18 * barn
 
constexpr double nanosecond = 1.0
 
constexpr double second = 1.e+9 *nanosecond
 
constexpr double millisecond = 1.e-3 *second
 
constexpr double microsecond = 1.e-6 *second
 
constexpr double picosecond = 1.e-12*second
 
constexpr double ns = nanosecond
 
constexpr double s = second
 
constexpr double ms = millisecond
 
constexpr double eplus = 1.0
 
constexpr double e_SI = 1.60217733e-19
 
constexpr double gigaelectronvolt = 1.
 
constexpr double electronvolt = 1.e-9*gigaelectronvolt
 
constexpr double kiloelectronvolt = 1.e-6*gigaelectronvolt
 
constexpr double megaelectronvolt = 1.e-3*gigaelectronvolt
 
constexpr double teraelectronvolt = 1.e+3*gigaelectronvolt
 
constexpr double petaelectronvolt = 1.e+6*gigaelectronvolt
 
constexpr double eV = electronvolt
 
constexpr double keV = kiloelectronvolt
 
constexpr double MeV = megaelectronvolt
 
constexpr double GeV = gigaelectronvolt
 
constexpr double TeV = teraelectronvolt
 
constexpr double PeV = petaelectronvolt
 
constexpr double eV2 = eV*eV
 
constexpr double keV2 = keV*keV
 
constexpr double MeV2 = MeV*MeV
 
constexpr double GeV2 = GeV*GeV
 
constexpr double TeV2 = TeV*TeV
 
constexpr double PeV2 = PeV*PeV
 
static constexpr double DBL_NAN = std::numeric_limits<double>::quiet_NaN()
 Convenient const for getting the double NaN value.
 

Ranges and intervals

enum  RangeBoundary { OPEN =0 , SOFT =0 , CLOSED =1 , HARD =1 }
 
template<typename N1 , typename N2 , typename N3 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 > &&std::is_arithmetic_v< N3 >, bool > inRange (N1 value, N2 low, N3 high, RangeBoundary lowbound=CLOSED, RangeBoundary highbound=OPEN)
 Determine if value is in the range low to high, for floating point numbers.
 
template<typename N1 , typename N2 , typename N3 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 > &&std::is_arithmetic_v< N3 >, bool > fuzzyInRange (N1 value, N2 low, N3 high, RangeBoundary lowbound=CLOSED, RangeBoundary highbound=OPEN)
 Determine if value is in the range low to high, for floating point numbers.
 
template<typename N1 , typename N2 , typename N3 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 > &&std::is_arithmetic_v< N3 >, bool > inRange (N1 value, pair< N2, N3 > lowhigh, RangeBoundary lowbound=CLOSED, RangeBoundary highbound=OPEN)
 Alternative version of inRange which accepts a pair for the range arguments.
 
template<typename N1 , typename N2 , typename N3 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 > &&std::is_arithmetic_v< N3 >, bool > in_range (N1 val, N2 low, N3 high)
 Boolean function to determine if value is within the given range.
 
template<typename N1 , typename N2 , typename N3 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 > &&std::is_arithmetic_v< N3 >, bool > in_closed_range (N1 val, N2 low, N3 high)
 Boolean function to determine if value is within the given range.
 
template<typename N1 , typename N2 , typename N3 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 > &&std::is_arithmetic_v< N3 >, bool > in_open_range (N1 val, N2 low, N3 high)
 Boolean function to determine if value is within the given range.
 

Cutflow utilities

using CutflowPtr = MultiplexPtr< Multiplexer< Cutflow > >
 Convenience alias.
 
std::ostream & operator<< (std::ostream &os, const Cutflow &cf)
 Print a Cutflow to a stream.
 
std::ostream & operator<< (std::ostream &os, const CutflowPtr &cf)
 

Cutflows utilities

using CutflowsPtr = std::shared_ptr< Cutflows >
 Convenience alias.
 
std::ostream & operator<< (std::ostream &os, const Cutflows &cfs)
 Print a Cutflows to a stream.
 
std::ostream & operator<< (std::ostream &os, const CutflowsPtr &cfs)
 Print a Cutflows to a stream.
 
typedef function< Jet(const Jet &)> JetSmearFn
 Typedef for Jet smearing functions/functors.
 
typedef function< double(const Jet &)> JetEffFn
 Typedef for Jet efficiency functions/functors.
 
using jetEffFilter = JetEffFilter
 
double JET_EFF_ZERO (const Jet &)
 Take a jet and return a constant 0.
 
double JET_EFF_0 (const Jet &)
 Alias for JET_EFF_ZERO.
 
double JET_FN0 (const Jet &)
 Alias for JET_EFF_ZERO.
 
double JET_EFF_ONE (const Jet &)
 Take a jet and return a constant 1.
 
double JET_EFF_1 (const Jet &)
 Alias for JET_EFF_ONE.
 
double JET_EFF_PERFECT (const Jet &)
 Alias for JET_EFF_ONE.
 
double JET_FN1 (const Jet &)
 Alias for JET_EFF_ONE.
 
double JET_BTAG_PERFECT (const Jet &j)
 Return 1 if the given Jet contains a b, otherwise 0.
 
double JET_CTAG_PERFECT (const Jet &j)
 Return 1 if the given Jet contains a c, otherwise 0.
 
double JET_TAUTAG_PERFECT (const Jet &j)
 Return 1 if the given Jet contains a c, otherwise 0.
 
Jet JET_SMEAR_IDENTITY (const Jet &j)
 
Jet JET_SMEAR_PERFECT (const Jet &j)
 Alias for JET_SMEAR_IDENTITY.
 
template<typename FN >
bool efffilt (const Jet &j, FN &feff)
 Return true if Jet j is chosen to survive a random efficiency selection.
 
typedef std::function< FourMomentum(const FourMomentum &)> P4SmearFn
 Typedef for FourMomentum smearing functions/functors.
 
typedef std::function< double(const FourMomentum &)> P4EffFn
 Typedef for FourMomentum efficiency functions/functors.
 
double P4_EFF_ZERO (const FourMomentum &)
 Take a FourMomentum and return 0.
 
double P4_EFF_ONE (const FourMomentum &)
 Take a FourMomentum and return 1.
 
FourMomentum P4_SMEAR_IDENTITY (const FourMomentum &p)
 Take a FourMomentum and return it unmodified.
 
FourMomentum P4_SMEAR_PERFECT (const FourMomentum &p)
 Alias for P4_SMEAR_IDENTITY.
 
FourMomentum P4_SMEAR_E_GAUSS (const FourMomentum &p, double resolution)
 
FourMomentum P4_SMEAR_PT_GAUSS (const FourMomentum &p, double resolution)
 Smear a FourMomentum's transverse momentum using a Gaussian of absolute width resolution.
 
FourMomentum P4_SMEAR_MASS_GAUSS (const FourMomentum &p, double resolution)
 Smear a FourMomentum's mass using a Gaussian of absolute width resolution.
 
typedef function< Particle(const Particle &)> ParticleSmearFn
 Typedef for Particle smearing functions/functors.
 
typedef function< double(const Particle &)> ParticleEffFn
 Typedef for Particle efficiency functions/functors.
 
using particleEffFilter = ParticleEffFilter
 
double PARTICLE_EFF_ZERO (const Particle &)
 Take a Particle and return 0.
 
double PARTICLE_EFF_0 (const Particle &)
 Alias for PARTICLE_EFF_ZERO.
 
double PARTICLE_FN0 (const Particle &)
 Alias for PARTICLE_EFF_ZERO.
 
double PARTICLE_EFF_ONE (const Particle &)
 Take a Particle and return 1.
 
double PARTICLE_EFF_1 (const Particle &)
 Alias for PARTICLE_EFF_ONE.
 
double PARTICLE_EFF_PERFECT (const Particle &)
 Alias for PARTICLE_EFF_ONE.
 
double PARTICLE_FN1 (const Particle &)
 Alias for PARTICLE_EFF_ONE.
 
Particle PARTICLE_SMEAR_IDENTITY (const Particle &p)
 Take a Particle and return it unmodified.
 
Particle PARTICLE_SMEAR_PERFECT (const Particle &p)
 Alias for PARTICLE_SMEAR_IDENTITY.
 
bool efffilt (const Particle &p, const ParticleEffFn &feff)
 Return true if Particle p is chosen to survive a random efficiency selection.
 

Detailed Description

Authors
Vytautas Vislavicius, Christine O. Rasmussen, Christian Bierlich.

Typedef Documentation

◆ PseudoJets

typedef std::vector<PseudoJet> Rivet::PseudoJets

Typedef for a collection of PseudoJet objects.

Todo:
Make into an explicit container with conversion to Jets and FourMomenta?

◆ Taus

using Rivet::Taus = typedef TauFinder
Todo:
Make this the canonical name in future?

Enumeration Type Documentation

◆ RangeBoundary

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

◆ TopDecay

enum class Rivet::TopDecay
strong

Enum for categorising top quark decay modes.

More specifically, the decay mode of the W from the top. We presume top decay to a W and b quark.

Function Documentation

◆ add_quad() [1/2]

template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, NUM > Rivet::add_quad ( NUM  a,
NUM  b 
)
inline

Named number-type addition in quadrature operation.

Note
Result has the sqrt operation applied.
Todo:
When std::common_type can be used, generalise to multiple numeric types with appropriate return type.

Referenced by ELECTRON_SMEAR_CMS_RUN1(), and MUON_SMEAR_CMS_RUN1().

◆ add_quad() [2/2]

template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, NUM > Rivet::add_quad ( NUM  a,
NUM  b,
NUM  c 
)
inline

Named number-type addition in quadrature operation.

Note
Result has the sqrt operation applied.
Todo:
When std::common_type can be used, generalise to multiple numeric types with appropriate return type.

◆ aspace()

vector< double > Rivet::aspace ( double  step,
double  start,
double  end,
bool  include_end = true,
double  tol = 1e-2 
)
inline

Make a list of values equally spaced by step between start and end inclusive.

The values will start at start and be equally spaced up to the highest increment less than or equal to end. If include_end is given, the end value will be appended if distinct by tol times step.

Note
The arg ordering is "Rivet-like", cf. linspace() and logspace(), as opposed to the Numpy/Matlab arange() function (whose name inspired this, but we preferred to keep the "space" nomenclature for consistence.)
Todo:
Move to HEPUtils

◆ binIndex() [1/2]

template<typename NUM , typename CONTAINER >
std::enable_if_t< std::is_arithmetic_v< NUM > &&std::is_arithmetic_v< typename CONTAINER::value_type >, int > Rivet::binIndex ( NUM  val,
const CONTAINER &  binedges,
bool  allow_overflow = false 
)
inline

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

An underflow always returns -1. If allow_overflow is false (default) an overflow also returns -1, otherwise it returns the Nedge-1, the index of an inclusive bin starting at the last edge.

Note
The binedges vector must be sorted
Todo:
Use std::common_type<NUM1, NUM2>::type x = val; ?

◆ binIndex() [2/2]

template<typename NUM1 , typename NUM2 >
std::enable_if_t< std::is_arithmetic_v< NUM1 > &&std::is_arithmetic_v< NUM2 >, int > Rivet::binIndex ( NUM1  val,
std::initializer_list< NUM2 >  binedges,
bool  allow_overflow = false 
)
inline

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

An underflow always returns -1. If allow_overflow is false (default) an overflow also returns -1, otherwise it returns the Nedge-1, the index of an inclusive bin starting at the last edge.

Note
The binedges vector must be sorted
Todo:
Use std::common_type<NUM1, NUM2>::type x = val; ?

Referenced by ATLAS_JVT_EFF_LOOSE(), ATLAS_JVT_EFF_MEDIUM(), ATLAS_JVT_EFF_TIGHT(), ELECTRON_EFF_ATLAS_RUN1_MEDIUM(), ELECTRON_EFF_ATLAS_RUN1_TIGHT(), ELECTRON_EFF_ATLAS_RUN2_LOOSE(), ELECTRON_EFF_ATLAS_RUN2_TIGHT(), ELECTRON_SMEAR_ATLAS_RUN1(), JET_SMEAR_ATLAS_RUN1(), MUON_EFF_ATLAS_RUN2(), MUON_SMEAR_ATLAS_RUN1(), PHOTON_EFF_ATLAS_RUN1(), PHOTON_EFF_ATLAS_RUN2(), and TAU_SMEAR_ATLAS_RUN1().

◆ bwdbnspace()

vector< double > Rivet::bwdbnspace ( size_t  nbins,
double  start,
double  end,
double  mu,
double  gamma,
bool  include_end = true 
)
inline

Make a list of nbins + 1 values spaced for equal area Breit-Wigner binning between start and end inclusive. mu and gamma are the Breit-Wigner parameters.

Note
The arg ordering and the meaning of the nbins variable is "histogram-like", as opposed to the Numpy/Matlab version, and the start and end arguments are expressed in terms of x rather than its transform.

References cdfBW(), fnspace(), and invcdfBW().

◆ contains()

bool Rivet::contains ( const std::string &  s,
const std::string &  sub 
)
inline

Does s contain sub as a substring?

Todo:
Use SFINAE, Boost.Range, or other template trickery for more generic container matching?

Referenced by basename(), dirname(), discard_if_any(), discard_if_any(), file_extn(), file_stem(), idiscard_if_any(), iselect_if_any(), replace_all(), replace_first(), select_if_any(), and select_if_any().

◆ copyAO()

template<typename T >
bool Rivet::copyAO ( YODA::AnalysisObjectPtr  src,
YODA::AnalysisObjectPtr  dst,
const double  scale = 1.0 
)

If dst is the same subclass as src, copy the contents of src into dst and return true. Otherwise return false.

◆ correlation()

template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, double > Rivet::correlation ( const vector< NUM > &  sample1,
const vector< NUM > &  sample2 
)
inline

Calculate the correlation strength between two samples

Todo:
Support multiple container types via SFINAE

References correlation(), and covariance().

Referenced by correlation(), and correlation_err().

◆ correlation_err()

template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, double > Rivet::correlation_err ( const vector< NUM > &  sample1,
const vector< NUM > &  sample2 
)
inline

Calculate the error of the correlation strength between two samples assuming Poissonian errors

Todo:
Support multiple container types via SFINAE

References correlation(), correlation_err(), covariance(), and covariance_err().

Referenced by correlation_err().

◆ covariance()

template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, double > Rivet::covariance ( const vector< NUM > &  sample1,
const vector< NUM > &  sample2 
)
inline

Calculate the covariance (variance) between two samples

Todo:
Support multiple container types via SFINAE

References mean().

Referenced by correlation(), and correlation_err().

◆ covariance_err()

template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, double > Rivet::covariance_err ( const vector< NUM > &  sample1,
const vector< NUM > &  sample2 
)
inline

Calculate the error on the covariance (variance) of two samples, assuming poissonian errors

Todo:
Support multiple container types via SFINAE

References mean(), and mean_err().

Referenced by correlation_err().

◆ deltaEta()

double Rivet::deltaEta ( double  eta1,
double  eta2,
bool  sign = false 
)
inline

Calculate the abs difference between two pseudorapidities

Note
Just a cosmetic name for analysis code clarity.

References sign().

Referenced by deltaEta(), deltaEta(), deltaEta(), deltaEta(), deltaEta(), deltaEta(), deltaEta(), deltaEta(), deltaEta(), deltaEta(), deltaEta(), deltaEta(), deltaEta(), deltaEta(), and deltaEta().

◆ deltaPhi()

double Rivet::deltaPhi ( double  phi1,
double  phi2,
bool  sign = false 
)
inline

Calculate the difference between two angles in radians.

Returns in the range [0, PI].

References mapAngleMPiToPi(), and sign().

Referenced by deltaPhi(), deltaPhi(), deltaPhi(), deltaPhi(), deltaPhi(), deltaPhi(), deltaPhi(), deltaPhi(), deltaPhi(), deltaPhi(), deltaPhi(), deltaPhi(), deltaPhi(), deltaPhi(), deltaPhi(), deltaR2(), and mT().

◆ deltaR() [1/5]

double Rivet::deltaR ( const FourMomentum a,
const FourMomentum b,
RapScheme  scheme = PSEUDORAPIDITY 
)
inline

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.

References deltaR2().

◆ deltaR() [2/5]

double Rivet::deltaR ( const FourVector a,
const FourVector b,
RapScheme  scheme = PSEUDORAPIDITY 
)
inline

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.

References deltaR2().

◆ deltaR() [3/5]

double Rivet::deltaR ( const FourVector v,
double  eta2,
double  phi2,
RapScheme  scheme = PSEUDORAPIDITY 
)
inline

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.

References deltaR2().

◆ deltaR() [4/5]

double Rivet::deltaR ( double  eta1,
double  phi1,
const FourVector v,
RapScheme  scheme = PSEUDORAPIDITY 
)
inline

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.

References deltaR2().

◆ deltaR() [5/5]

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

Referenced by deltaR(), deltaR(), deltaR(), deltaR(), deltaR(), and JET_BTAG_ATLAS_RUN1().

◆ deltaR2() [1/5]

double Rivet::deltaR2 ( const FourMomentum a,
const FourMomentum b,
RapScheme  scheme = PSEUDORAPIDITY 
)
inline

Calculate the squared 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.

References Rivet::FourVector::azimuthalAngle(), deltaR2(), Rivet::FourMomentum::rapidity(), and Rivet::FourVector::vector3().

◆ deltaR2() [2/5]

double Rivet::deltaR2 ( const FourVector a,
const FourVector b,
RapScheme  scheme = PSEUDORAPIDITY 
)
inline

Calculate the squared 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.

References deltaR2(), and Rivet::FourVector::vector3().

◆ deltaR2() [3/5]

double Rivet::deltaR2 ( const FourVector v,
double  eta2,
double  phi2,
RapScheme  scheme = PSEUDORAPIDITY 
)
inline

Calculate the squared 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.

References deltaR2(), and Rivet::FourVector::vector3().

◆ deltaR2() [4/5]

double Rivet::deltaR2 ( double  eta1,
double  phi1,
const FourVector v,
RapScheme  scheme = PSEUDORAPIDITY 
)
inline

Calculate the squared 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.

References deltaR2(), and Rivet::FourVector::vector3().

◆ deltaR2() [5/5]

double Rivet::deltaR2 ( double  rap1,
double  phi1,
double  rap2,
double  phi2 
)
inline

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

References deltaPhi(), and sqr().

Referenced by deltaR(), deltaR(), deltaR(), deltaR(), deltaR(), deltaR(), deltaR(), deltaR(), deltaR(), deltaR(), deltaR(), deltaR2(), deltaR2(), deltaR2(), deltaR2(), deltaR2(), deltaR2(), deltaR2(), deltaR2(), deltaR2(), deltaR2(), deltaR2(), deltaR2(), deltaR2(), deltaR2(), and deltaR2().

◆ deltaRap()

double Rivet::deltaRap ( double  y1,
double  y2,
bool  sign = false 
)
inline

Calculate the abs difference between two rapidities

Note
Just a cosmetic name for analysis code clarity.

References sign().

Referenced by deltaRap(), deltaRap(), and deltaRap().

◆ fnspace()

vector< double > Rivet::fnspace ( size_t  nbins,
double  start,
double  end,
const std::function< double(double)> &  fn,
const std::function< double(double)> &  invfn,
bool  include_end = true 
)
inline

Produce a vector of x values which are equally spaced in fn(x)

Todo:
Move to HEPUtils

References linspace().

Referenced by bwdbnspace(), logspace(), powdbnspace(), and powspace().

◆ fuzzyEquals() [1/2]

template<typename N1 , typename N2 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 > &&(std::is_floating_point_v< N1 >||std::is_floating_point_v< N2 >), bool > Rivet::fuzzyEquals ( N1  a,
N2  b,
double  tolerance = 1e-5 
)
inline

Compare two numbers for equality with a degree of fuzziness.

This version for floating point types (if any argument is FP) has a degree of fuzziness expressed by the fractional tolerance parameter, for floating point safety.

References isZero().

Referenced by compatibleBeamEnergies(), compatibleBeamEnergy(), compatibleBeamEnergy(), compatibleBeamEnergy(), fuzzyEquals(), fuzzyEquals(), fuzzyGtrEquals(), and fuzzyLessEquals().

◆ fuzzyEquals() [2/2]

template<typename N1 , typename N2 >
std::enable_if_t< std::is_integral_v< N1 > &&std::is_integral_v< N2 >, bool > Rivet::fuzzyEquals ( N1  a,
N2  b,
double   
)
inline

Compare two numbers for equality with a degree of fuzziness.

Simpler SFINAE template specialisation for integers, since there is no FP precision issue.

◆ fuzzyGtrEquals()

template<typename N1 , typename N2 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 >, bool > Rivet::fuzzyGtrEquals ( N1  a,
N2  b,
double  tolerance = 1e-5 
)
inline

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

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

References fuzzyEquals().

Referenced by fuzzyInRange().

◆ fuzzyInRange()

template<typename N1 , typename N2 , typename N3 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 > &&std::is_arithmetic_v< N3 >, bool > Rivet::fuzzyInRange ( N1  value,
N2  low,
N3  high,
RangeBoundary  lowbound = CLOSED,
RangeBoundary  highbound = OPEN 
)
inline

Determine if value is in the range low to high, for floating point numbers.

Interval boundary types are defined by lowbound and highbound. Closed intervals are compared fuzzily.

References fuzzyGtrEquals(), and fuzzyLessEquals().

◆ fuzzyLessEquals()

template<typename N1 , typename N2 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 >, bool > Rivet::fuzzyLessEquals ( N1  a,
N2  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 fuzzyInRange().

◆ getONNX()

unique_ptr< RivetONNXrt > Rivet::getONNX ( const string &  analysisname,
const string &  suffix = ".onnx" 
)
inline

Function to get a RivetONNXrt object from an analysis name Use suffix to help disambiguate if an analysis requires multiple networks.

Todo:
: If ONNX is ever fully integrated into rivet, move to analysis class.

References getONNXFilePath().

◆ getONNXFilePath()

string Rivet::getONNXFilePath ( const string &  filename)
inline

Useful function for getting ONNX file paths.

Based on getDatafilePath from RivetYODA.cc

Try to find an ONNX file matching this analysis name

References findAnalysisDataFile(), getRivetDataPath(), and toString().

Referenced by getONNX().

◆ in_closed_range()

template<typename N1 , typename N2 , typename N3 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 > &&std::is_arithmetic_v< N3 >, bool > Rivet::in_closed_range ( N1  val,
N2  low,
N3  high 
)
inline

Boolean function to determine if value is within the given range.

Note
The interval is closed at both ends.

References inRange().

Referenced by Rivet::PID::isBSMBoson(), Rivet::PID::isDarkMatter(), Rivet::PID::isExotic(), and Rivet::PID::isQuark().

◆ in_open_range()

template<typename N1 , typename N2 , typename N3 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 > &&std::is_arithmetic_v< N3 >, bool > Rivet::in_open_range ( N1  val,
N2  low,
N3  high 
)
inline

Boolean function to determine if value is within the given range.

Note
The interval is open at both ends.

References inRange().

◆ in_range()

template<typename N1 , typename N2 , typename N3 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 > &&std::is_arithmetic_v< N3 >, bool > Rivet::in_range ( N1  val,
N2  low,
N3  high 
)
inline

Boolean function to determine if value is within the given range.

Note
The interval is closed (inclusive) at the low end, and open (exclusive) at the high end.

References inRange().

Referenced by Rivet::PID::isGenSpecific().

◆ inRange()

template<typename N1 , typename N2 , typename N3 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 > &&std::is_arithmetic_v< N3 >, bool > Rivet::inRange ( N1  value,
N2  low,
N3  high,
RangeBoundary  lowbound = CLOSED,
RangeBoundary  highbound = OPEN 
)
inline

◆ invariant()

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

◆ isZero() [1/2]

template<typename NUM >
std::enable_if_t< std::is_floating_point_v< NUM >, bool > Rivet::isZero ( NUM  val,
double  tolerance = 1e-8 
)
inline

Compare a number to zero.

This version for floating point types has a degree of fuzziness expressed by the absolute tolerance parameter, for floating point safety.

Referenced by fuzzyEquals(), Rivet::Matrix< N >::isDiag(), Rivet::Matrix< N >::isEqual(), Rivet::Particle::isSame(), Rivet::Matrix< N >::isZero(), Rivet::Vector< N >::isZero(), mapAngle0To2Pi(), mapAngle0ToPi(), mapAngleMPiToPi(), rapidity(), safediv(), Rivet::LorentzTransform::setBetaVec(), Rivet::LorentzTransform::setGammaVec(), sign(), and toString().

◆ isZero() [2/2]

template<typename NUM >
std::enable_if_t< std::is_integral_v< NUM >, bool > Rivet::isZero ( NUM  val,
double  = 1e-5 
)
inline

Compare a number to zero.

SFINAE template specialisation for integers, since there is no FP precision issue.

◆ linspace()

vector< double > Rivet::linspace ( size_t  nbins,
double  start,
double  end,
bool  include_end = true 
)
inline

Make a list of nbins + 1 values equally spaced between start and end inclusive.

Note
The arg ordering and the meaning of the nbins variable is "histogram-like", as opposed to the Numpy/Matlab version.
Todo:
Move to HEPUtils

Referenced by fnspace().

◆ logspace()

vector< double > Rivet::logspace ( size_t  nbins,
double  start,
double  end,
bool  include_end = true 
)
inline

Make a list of nbins + 1 values exponentially spaced between start and end inclusive.

The naming is because the values are uniformly spaced in log(x).

Note
The arg ordering and the meaning of the nbins variable is "histogram-like", as opposed to the Numpy/Matlab version, and the start and end arguments are expressed in "normal" space, rather than as the logarithms of the start/end values as in Numpy/Matlab.
Todo:
Move to HEPUtils

References fnspace().

◆ max()

template<typename N1 , typename N2 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 >, signed_if_mixed_t< N1, N2 > > Rivet::max ( N1  a,
N2  b 
)
inline

◆ mean()

template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, double > Rivet::mean ( const vector< NUM > &  sample)
inline

Calculate the mean of a sample

Todo:
Support multiple container types via SFINAE

References mean().

Referenced by covariance(), covariance_err(), mean(), Rivet::CumulantAnalysis::vnFourDiff(), and Rivet::CumulantAnalysis::vnTwoDiff().

◆ mean_err()

template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, double > Rivet::mean_err ( const vector< NUM > &  sample)
inline
Todo:
Support multiple container types via SFINAE

Referenced by covariance_err().

◆ median()

template<typename NUM >
std::enable_if_t< std::is_arithmetic_v< NUM >, NUM > Rivet::median ( const vector< NUM > &  sample)
inline

Calculate the median of a sample

Todo:
Support multiple container types via SFINAE

◆ min()

template<typename N1 , typename N2 >
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 >, signed_if_mixed_t< N1, N2 > > Rivet::min ( N1  a,
N2  b 
)
inline

Get the minimum of two numbers.

Note
unsigned integral types are cast to their integer equivalents first

References min().

Referenced by Rivet::CentralityBinner< T, MDist >::add(), ELECTRON_EFF_ATLAS_RUN2_LOOSE(), Rivet::CentralityBinner< T, MDist >::finalize(), MET_SMEAR_ATLAS_RUN2(), min(), min(), and min().

◆ mkGraphLWTNN() [1/2]

std::unique_ptr< lwt::LightweightGraph > Rivet::mkGraphLWTNN ( const lwt::GraphConfig &  graphconfig)

Make a LWT Graph from the JSON config object.

Note graph here means "not linear" rather than a GNN

Referenced by mkGraphLWTNN().

◆ mkGraphLWTNN() [2/2]

std::unique_ptr< lwt::LightweightGraph > Rivet::mkGraphLWTNN ( const string &  jsonpath)

Make a LWT graph direct from the JSON config path.

Note graph here means "not linear" rather than a GNN

References mkGraphLWTNN(), and readLWTNNGraphConfig().

◆ mT()

double Rivet::mT ( double  pT1,
double  pT2,
double  dphi 
)
inline

Calculate transverse mass of two vectors from provided pT and deltaPhi

Note
Several versions taking two vectors are found in Vector4.hh

Referenced by mT(), mT(), mT(), and mT().

◆ mT2()

double Rivet::mT2 ( const FourMomentum a,
const FourMomentum b,
const Vector3 ptmiss,
double  invisiblesMass,
double  invisiblesMass2 = -1 
)
inline

Compute asymm mT2 using the bisection method.

If the second invisible mass is not given, symm mT2 will be calculated.

Note
Cheng/Han arXiv:0810.5178, Lester arXiv:1411.4312

References mT2Sq().

Referenced by mT2().

◆ mT2Sq()

double Rivet::mT2Sq ( const FourMomentum a,
const FourMomentum b,
const Vector3 ptmiss,
double  invisiblesMass,
double  invisiblesMass2 = -1 
)

Compute asymm mT2**2 using the bisection method.

If the second invisible mass is not given, symm mT2**2 will be calculated.

Note
Cheng/Han arXiv:0810.5178, Lester arXiv:1411.4312

Referenced by mT2(), and mT2Sq().

◆ operator&&()

Cut Rivet::operator&& ( const Cut &  aptr,
const Cut &  bptr 
)

Logical AND operation on two cuts

Note
No comparison short-circuiting for overloaded &&!

◆ operator+()

Vector3 Rivet::operator+ ( const ThreeMomentum a,
const Vector3 b 
)
inline
Todo:
Mixed-arg operators: better via SFINAE??
Note
Why does this actually cause compiler trouble, given (V3, V3) is a correct sig-match for (V3,P3) and (P3, P3) is not?

◆ operator,()

Cut Rivet::operator, ( const Cut &  ,
const Cut &   
)
delete

Forbid use of the comma operator between two (or a chain of) Cuts

◆ operator<<()

std::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.

◆ operator||()

Cut Rivet::operator|| ( const Cut &  aptr,
const Cut &  bptr 
)

Logical OR operation on two cuts

Note
No comparison short-circuiting for overloaded ||!

◆ pcmp() [1/4]

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

◆ pcmp() [2/4]

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

◆ pcmp() [3/4]

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

◆ pcmp() [4/4]

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

◆ powdbnspace()

vector< double > Rivet::powdbnspace ( size_t  nbins,
double  start,
double  end,
double  npow,
bool  include_end = true 
)
inline

Make a list of nbins + 1 values equally spaced in the CDF of x^n between start and end inclusive.

The naming is because the values are uniformly spaced in the integral x^n, implementing an inverse-CDF transform cf. random sampling from the power-law distribution. A histogram binned this way and filled with samples from x^n will asymptotically have equal populations and hence stat errors in each bin.

Note
The arg ordering and the meaning of the nbins variable is "histogram-like", as opposed to the Numpy/Matlab version, and the start and end arguments are expressed in terms of x rather than its transform.
Todo:
Move to HEPUtils

References fnspace().

◆ powspace()

vector< double > Rivet::powspace ( size_t  nbins,
double  start,
double  end,
double  npow,
bool  include_end = true 
)
inline

Make a list of nbins + 1 values power-law spaced between start and end inclusive.

The naming is because the values are uniformly spaced in x^n.

Note
The arg ordering and the meaning of the nbins variable is "histogram-like", as opposed to the Numpy/Matlab version, and the start and end arguments are expressed in terms of x rather than its transform.
Todo:
Move to HEPUtils

References fnspace().

◆ readLWTNNGraphConfig()

lwt::GraphConfig Rivet::readLWTNNGraphConfig ( const string &  jsonpath)

Read a LWT Graph config from the JSON path.

Note graph here means "not linear" rather than a GNN

Referenced by mkGraphLWTNN().

◆ safediv()

double Rivet::safediv ( double  num,
double  den,
double  fail = 0.0 
)
inline

Return a/b, or fail if b = 0

Todo:
When std::common_type can be used, generalise to multiple numeric types with appropriate return type.

References isZero().

◆ weighted_shuffle()

template<class RandomAccessIterator , class WeightIterator , class RandomNumberGenerator >
void Rivet::weighted_shuffle ( RandomAccessIterator  first,
RandomAccessIterator  last,
WeightIterator  fw,
WeightIterator  lw,
RandomNumberGenerator &  g 
)

Make an event mixed together from several events.

Project out an event mixed of several events, given a mixing observable (e.g. number of final state particles), defining what should qualify as a mixable event. Binning in the mixing observable is defined in the constructor, as is the number of events one wants to mix with. The method calculateMixingObs() must can be overloaded in derived classes, to provide the definition of the mixing observable, on the provided projection, eg. centrality or something more elaborate.

The implementation can correcly handle mixing of weighted events, but not multi-weighted events. Nor does the implementation attemt to handle calculation of one (or more) event weights for the mixed events. For most common use cases, like calculating a background sample, this is sufficient. If a more elaborate use case ever turns up, this must be reevaluated.

Author
Christian Bierlich chris.nosp@m.tian.nosp@m..bier.nosp@m.lich.nosp@m.@thep.nosp@m..lu..nosp@m.se Weighted random shuffle, similar to std::random_shuffle, which allows the passing of a weight for each element to be shuffled.
Todo:
Move to utils?

Referenced by Rivet::EventMixingBase::particles().

Variable Documentation

◆ INFF

constexpr double Rivet::INFF = HUGE_VALF
constexpr

Pre-defined values of \( \infty \).

See https://en.cppreference.com/w/cpp/types/numeric_limits/infinity

◆ PI

constexpr double Rivet::PI = M_PI
constexpr

Pre-defined numeric type limits A pre-defined value of \( \pi \).

Referenced by mapAngle0ToPi(), and mapAngleMPiToPi().