namespace Rivet

Rivet

More…

Namespaces

Name
Rivet::ALICE
Rivet::ATLAS
Common projections for ATLAS trigger conditions and centrality.
Rivet::Cuts
Namespace used for ambiguous identifiers.
Rivet::HepMCUtils
Rivet::Kin
Rivet::PID

Classes

Name
structRivet::AbsDeltaEtaWRT
Calculator of (
structRivet::AbsDeltaRapWRT
Calculator of (
structRivet::AbsEtaGtr
Abs pseudorapidity greater-than functor.
structRivet::AbsEtaInRange
Abs pseudorapidity in-range functor.
structRivet::AbsEtaLess
Abs pseudorapidity momentum less-than functor.
structRivet::AbsRapGtr
Abs rapidity greater-than functor.
structRivet::AbsRapInRange
Abs rapidity in-range functor.
structRivet::AbsRapLess
Abs rapidity momentum less-than functor.
classRivet::Analysis
This is the base class of all analysis classes in Rivet.
classRivet::AnalysisHandler
The key class for coordination of Analysis objects and the event loop.
classRivet::AnalysisInfo
Holder of analysis metadata.
classRivet::AnalysisLoader
Internal class which loads and registers analyses from plugin libs.
classRivet::AxesDefinition
Base class for projections which define a spatial basis.
structRivet::bad_lexical_cast
Exception class for throwing from lexical_cast when a parse goes wrong.
classRivet::Beam
Project out the incoming beams.
classRivet::BeamThrust
Calculator of the beam-thrust observable.
classRivet::BinnedHistogram
A set of booked Histo1DPtr, each in a bin of a second variable.
structRivet::BoolJetAND
Functor for and-combination of selector logic.
structRivet::BoolJetFunctor
Base type for Jet -> bool functors.
structRivet::BoolJetNOT
Functor for inverting selector logic.
structRivet::BoolJetOR
Functor for or-combination of selector logic.
structRivet::BoolParticleAND
Functor for and-combination of selector logic.
structRivet::BoolParticleBaseFunctor
Base type for Particle -> bool functors.
structRivet::BoolParticleFunctor
Base type for Particle -> bool functors.
structRivet::BoolParticleNOT
Functor for inverting selector logic.
structRivet::BoolParticleOR
Functor for or-combination of selector logic.
classRivet::BRAHMSCentrality
BRAHMS Centrality projection.
classRivet::CentralEtHCM
Summed ( E_\perp ) of central particles in HCM system.
classRivet::CentralityBinner
classRivet::CentralityEstimator
Base class for projections profile observable value vs the collision centrality.
classRivet::CentralityProjection
Used together with the percentile-based analysis objects Percentile and PercentileXaxis.
classRivet::ChargedFinalState
Project only charged final state particles.
classRivet::ChargedLeptons
Get charged final-state leptons.
classRivet::ConstLossyFinalState
Randomly lose a constant fraction of particles.
classRivet::ConstRandomFilter
Functor used to implement constant random lossiness.
classRivet::Correlators
Projection for calculating correlators for flow measurements.
classRivet::CumulantAnalysis
Tools for flow analyses.
structRivet::Cutflow
A tracker of numbers & fractions of events passing sequential cuts.
structRivet::Cutflows
A container for several Cutflow objects, with some convenient batch access.
structRivet::DeltaEtaGtr
(
structRivet::DeltaEtaInRange
( \Delta \eta ) (with respect to another 4-momentum, vec) in-range functor
structRivet::DeltaEtaLess
(
structRivet::DeltaEtaWRT
Calculator of ( \Delta \eta ) with respect to a given momentum.
structRivet::DeltaPhiGtr
(
structRivet::DeltaPhiInRange
( \Delta \phi ) (with respect to another 4-momentum, vec) in-range functor
structRivet::DeltaPhiLess
(
structRivet::DeltaPhiWRT
Calculator of ( \Delta \phi ) with respect to a given momentum.
structRivet::DeltaRapGtr
(
structRivet::DeltaRapInRange
( \Delta y ) (with respect to another 4-momentum, vec) in-range functor
structRivet::DeltaRapLess
(
structRivet::DeltaRapWRT
Calculator of ( \Delta y ) with respect to a given momentum.
structRivet::DeltaRGtr
( \Delta R ) (with respect to another 4-momentum, vec) greater-than functor
structRivet::DeltaRInRange
( \Delta R ) (with respect to another 4-momentum, vec) in-range functor
structRivet::DeltaRLess
( \Delta R ) (with respect to another 4-momentum, vec) less-than functor
structRivet::DeltaRWRT
Calculator of ( \Delta R ) with respect to a given momentum.
classRivet::DISDiffHadron
Get the incoming and outgoing hadron in a diffractive ep event.
classRivet::DISFinalState
Final state particles boosted to the hadronic center of mass system.
classRivet::DISKinematics
Get the DIS kinematic variables and relevant boosts for an event.
classRivet::DISLepton
Get the incoming and outgoing leptons in a DIS event.
classRivet::DISRapidityGap
Get the incoming and outgoing hadron in a diffractive ep event.
structRivet::DoubleParticleBaseFunctor
Base type for Particle -> double functors.
classRivet::DressedLepton
A charged lepton meta-particle created by clustering photons close to the bare lepton.
classRivet::DressedLeptons
Cluster photons from a given FS to all charged particles (typically leptons)
structRivet::Error
Generic runtime Rivet error.
structRivet::EtaGtr
Pseudorapidity greater-than functor.
structRivet::EtaInRange
Pseudorapidity in-range functor.
structRivet::EtaLess
Pseudorapidity less-than functor.
classRivet::Event
Representation of a HepMC event, and enabler of Projection caching.
classRivet::EventMixingBase
classRivet::EventMixingCentrality
classRivet::EventMixingFinalState
classRivet::FastJets
Project out jets found using the FastJet package jet algorithms.
classRivet::FinalPartons
classRivet::FinalState
Project out all final-state particles in an event. Probably the most important projection in Rivet!
structRivet::FirstParticleWith
Determine whether a particle is the first in a decay chain to meet the cut/function.
structRivet::FirstParticleWithout
Determine whether a particle is the first in a decay chain not to meet the cut/function.
classRivet::FourMomentum
Specialized version of the FourVector with momentum/energy functionality.
classRivet::FourVector
Specialisation of VectorN to a general (non-momentum) Lorentz 4-vector.
classRivet::FParameter
Calculator of the ( F )-parameter observable.
classRivet::GammaGammaFinalState
Final state particles boosted to the hadronic center of mass system.
classRivet::GammaGammaKinematics
Get the gamma gamma kinematic variables and relevant boosts for an event.
classRivet::GammaGammaLeptons
Get the incoming and outgoing leptons in a gamma gamma collision event in e+e-.
classRivet::GeneratedCentrality
classRivet::GeneratedPercentileProjection
classRivet::HadronicFinalState
Project only hadronic final state particles.
structRivet::HasAbsPID
structRivet::HasBTag
B-tagging functor, with a tag selection cut as the stored state.
structRivet::HasCTag
C-tagging functor, with a tag selection cut as the stored state.
structRivet::HasNoTag
Anti-B/C-tagging functor, with a tag selection cut as the stored state.
structRivet::HasParticleAncestorWith
Determine whether a particle has an ancestor which meets the cut/function.
structRivet::HasParticleAncestorWithout
Determine whether a particle has an ancestor which doesn’t meet the cut/function.
structRivet::HasParticleChildWith
Determine whether a particle has a child which meets the cut/function.
structRivet::HasParticleChildWithout
Determine whether a particle has a child which doesn’t meet the cut/function.
structRivet::HasParticleDescendantWith
Determine whether a particle has a descendant which meets the cut/function.
structRivet::HasParticleDescendantWithout
Determine whether a particle has a descendant which doesn’t meet the cut/function.
structRivet::HasParticleParentWith
Determine whether a particle has an parent which meets the cut/function.
structRivet::HasParticleParentWithout
Determine whether a particle has an parent which doesn’t meet the cut/function.
structRivet::HasPID
PID matching functor.
structRivet::HasTauTag
Tau-tagging functor, with a tag selection cut as the stored state.
classRivet::HeavyHadrons
Project out the last pre-decay b and c hadrons.
classRivet::Hemispheres
Calculate the hemisphere masses and broadenings.
classRivet::HepMCHeavyIon
classRivet::IdentifiedFinalState
Produce a final state which only contains specified particle IDs.
classRivet::ImpactParameterProjection
structRivet::InfoError
Error specialisation for failures relating to analysis info.
classRivet::InitialQuarks
Project out quarks from the hard process in ( e^+ e^- \to Z^0 ) events.
classRivet::InvisibleFinalState
Final state modifier excluding particles which are experimentally visible.
classRivet::InvMassFinalState
Identify particles which can be paired to fit within a given invariant mass window.
structRivet::IOError
Error for I/O failures.
classRivet::Jet
Representation of a clustered jet of particles.
structRivet::JET_BTAG_EFFS
b-tagging efficiency functor, for more readable b-tag effs and mistag rates
structRivet::JET_EFF_CONST
Take a Jet and return a constant efficiency.
structRivet::JetEffFilter
A functor to return true if Jetj survives a random efficiency selection.
structRivet::JetEffSmearFn
Functor for simultaneous efficiency-filtering and smearing of Jets.
classRivet::JetFinder
Abstract base class for projections which can return a set of Jets.
classRivet::Jets
Specialised vector of Jet objects.
classRivet::JetShape
Calculate transverse jet profiles.
structRivet::LastParticleWith
Determine whether a particle is the last in a decay chain to meet the cut/function.
structRivet::LastParticleWithout
Determine whether a particle is the last in a decay chain not to meet the cut/function.
classRivet::LeadingParticlesFinalState
Get the highest-pT occurrences of FS particles with the specified PDG IDs.
classRivet::Log
Logging system for controlled & formatted writing to stdout.
structRivet::LogicError
Error specialisation for places where alg logic has failed.
structRivet::LookupError
Error relating to looking up analysis objects in the register.
classRivet::LorentzTransform
Object implementing Lorentz transform calculations and boosts.
classRivet::LossyFinalState
Templated FS projection which can lose some of the supplied particles.
classRivet::Matrix
General ( N )-dimensional mathematical matrix object.
classRivet::Matrix3
Specialisation of MatrixN to aid 3 dimensional rotations.
classRivet::MC_JetAnalysis
Base class providing common functionality for MC jet validation analyses.
classRivet::MC_JetSplittings
Base class providing common functionality for MC jet validation analyses.
classRivet::MC_ParticleAnalysis
Base class providing common functionality for MC particle species validation analyses.
classRivet::MC_pPbMinBiasTrigger
classRivet::MC_SumETFwdPbCentrality
classRivet::MendelMin
A genetic algorithm functional minimizer.
classRivet::MergedFinalState
Get final state particles merged from two FinalState projections.
classRivet::METFinder
Interface for projections that find missing transverse energy/momentum.
classRivet::MissingMomentum
Calculate missing ( E ), ( E_\perp ) etc. as complements to the total visible momentum.
classRivet::NeutralFinalState
Project only neutral final state particles.
classRivet::NonHadronicFinalState
Project only hadronic final state particles.
classRivet::NonPromptFinalState
Find final state particles NOT directly connected to the hard process.
structRivet::P3_EFF_CONST
Take a Vector3 and return a constant number.
structRivet::P4_EFF_CONST
Take a FourMomentum and return a constant number.
classRivet::ParisiTensor
Calculate the Parisi event shape tensor (or linear momentum tensor).
classRivet::Particle
Particle representation, either from a HepMC::GenEvent or reconstructed.
structRivet::PARTICLE_EFF_CONST
Take a Particle and return a constant number.
classRivet::ParticleBase
Base class for particle-like things like Particle and Jet.
structRivet::ParticleEffFilter
A functor to return true if Particlep survives a random efficiency selection.
structRivet::ParticleEffSmearFn
Functor for simultaneous efficiency-filtering and smearing of Particles.
classRivet::ParticleFinder
Base class for projections which return subsets of an event’s particles.
classRivet::Particles
Specialised vector of Particle objects.
classRivet::PartonicTops
Convenience finder of partonic top quarks.
classRivet::Percentile
The Percentile class for centrality binning.
classRivet::PercentileBase
PercentileBase is the base class of all Percentile classes.
classRivet::PercentileProjection
class for projections that reports the percentile for a given SingleValueProjection when initialized with a Histo1D of the distribution in the SingleValueProjection.
classRivet::PercentileTBase
PercentileTBase is the base class of all Percentile classes.
classRivet::PercentileXaxis
The PercentileXaxis class for centrality binning.
structRivet::PidError
Error specialisation for failures relating to particle ID codes.
classRivet::PrimaryHadrons
Project out the first hadrons from hadronisation.
classRivet::PrimaryParticles
Project out primary particles according to definition.
classRivet::Projection
Base class for all Rivet projections.
classRivet::ProjectionApplier
Common base class for Projection and Analysis, used for internal polymorphism.
classRivet::ProjectionHandler
The projection handler is a central repository for projections to be used in a Rivet analysis run.
classRivet::PromptFinalState
Find final state particles directly connected to the hard process.
structRivet::PtGtr
Transverse momentum greater-than functor.
structRivet::PtInRange
Transverse momentum in-range functor.
structRivet::PtLess
Transverse momentum less-than functor.
structRivet::RangeError
Error for e.g. use of invalid bin ranges.
structRivet::RapGtr
Rapidity greater-than functor.
structRivet::RapInRange
Rapidity in-range functor.
structRivet::RapLess
Rapidity momentum less-than functor.
structRivet::ReadError
Error for read failures.
classRivet::Run
Interface to handle a run of events read from a HepMC stream or file.
classRivet::SingleValueProjection
Base class for projections returning a single floating point value.
classRivet::SmearedJets
Wrapper projection for smearing Jets with detector resolutions and efficiencies.
classRivet::SmearedMET
Wrapper projection for smearing missing (transverse) energy/momentum with detector resolutions.
classRivet::SmearedParticles
Wrapper projection for smearing Jets with detector resolutions and efficiencies.
classRivet::Sphericity
Calculate the sphericity event shape.
classRivet::Spherocity
Get the transverse spherocity scalars for hadron-colliders.
classRivet::STAR_BES_Centrality
Common projections for RHIC experiments’ trigger conditions and centrality.
classRivet::TauFinder
Convenience finder of unstable taus.
classRivet::ThreeMomentum
Specialized version of the ThreeVector with momentum functionality.
classRivet::Thrust
Get the e+ e- thrust basis and the thrust, thrust major and thrust minor scalars.
classRivet::TriggerCDFRun0Run1
Access to the min bias triggers used by CDF in Run 0 and Run 1.
classRivet::TriggerCDFRun2
Access to the min bias triggers used by CDF in Run 0 and Run 1.
classRivet::TriggerProjection
Base class for projections returning a bool corresponding to a trigger.
classRivet::TriggerUA5
Access to the min bias triggers used by UA5.
classRivet::UndressBeamLeptons
Project out the incoming beams, but subtract any colinear photons from lepton beams within a given cone.
classRivet::UnstableParticles
Project out all physical-but-decayed particles in an event.
classRivet::UserCentEstimate
structRivet::UserError
Error specialisation for where the problem is between the chair and the computer.
classRivet::Vector
A minimal base class for ( N )-dimensional vectors.
classRivet::Vector2
Two-dimensional specialisation of Vector.
classRivet::Vector3
Three-dimensional specialisation of Vector.
classRivet::VetoedFinalState
FS modifier to exclude classes of particles from the final state.
classRivet::VisibleFinalState
Final state modifier excluding particles which are not experimentally visible.
structRivet::WeightError
Errors relating to event/bin weights.
classRivet::WFinder
Convenience finder of leptonically decaying W.
structRivet::WriteError
Error for write failures.
classRivet::ZFinder
Convenience finder of leptonically decaying Zs.

Types

Name
enumRangeBoundary { OPEN =0, SOFT =0, CLOSED =1, HARD =1}
typedef std::vector< FourVector >FourVectors
typedef std::vector< FourMomentum >FourMomenta
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 JetEffFilterjetEffFilter
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.
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 ParticleEffFilterparticleEffFilter
typedef vector< std::string >strings
typedef vector< double >doubles
typedef vector< float >floats
typedef vector< int >ints
enumSign { MINUS = -1, ZERO = 0, PLUS = 1}
Enum for signs of numbers.
enumRapScheme { PSEUDORAPIDITY = 0, ETARAP = 0, RAPIDITY = 1, YRAP = 1}
Enum for rapidity variable to be used in calculating ( R ), applying rapidity cuts, etc.
enumPhiMapping { MINUSPI_PLUSPI, ZERO_2PI, ZERO_PI}
Enum for range of ( \phi ) to be mapped into.
typedef std::shared_ptr< Analysis >AnaHandle
typedef Matrix< 4 >Matrix4
typedef Vector2TwoVector
typedef Vector2V2
typedef Vector3ThreeVector
typedef Vector3V3
typedef ThreeMomentumP3
typedef FourVectorVector4
typedef FourVectorV4
typedef FourMomentumP4
typedef std::pair< Particle, Particle >ParticlePair
Typedef for a pair of Particle objects.
typedef std::shared_ptr< const Projection >ProjHandle
Typedef for Projection (smart) pointer.
using PromptFinalStateDirectFinalState
Alias with a more correct name.
typedef pair< Particles, double >MixEvent
typedef map< double, std::deque< MixEvent > >MixMap
using NonPromptFinalStateIndirectFinalState
Alias with a more correct name.
using JetFinderJetAlg
using MissingMomentumMissingMom
A slightly more convenient name, following other Rivet shortening-conventions.
using TauFinderTaus
using UnstableParticlesUnstableFinalState
using Cmp< Projection >PCmp
Typedef for Cmp
typedef ErrorException
Rivet::Exception is a synonym for Rivet::Error.
using function< bool(const Jet &)>JetSelector
std::function instantiation for functors taking a Jet and returning a bool
using function< bool(const Jet &, const Jet &)>JetSorter
std::function instantiation for functors taking two Jets and returning a bool
using HasBTaghasBTag
using HasCTaghasCTag
using HasTauTaghasTauTag
using HasNoTaghasNoTag
using function< bool(const ParticleBase &)>ParticleBaseSelector
std::function instantiation for functors taking a ParticleBase and returning a bool
using function< bool(const ParticleBase &, const ParticleBase &)>ParticleBaseSorter
std::function instantiation for functors taking two ParticleBase and returning a bool
using PtGtrpTGtr
using PtGtrptGtr
using PtLesspTLess
using PtLessptLess
using PtInRangepTInRange
using PtInRangeptInRange
using EtaGtretaGtr
using EtaLessetaLess
using EtaInRangeetaInRange
using AbsEtaGtrabsEtaGtr
using AbsEtaGtrabsetaGtr
using AbsEtaLessabsEtaLess
using AbsEtaLessabsetaLess
using AbsEtaInRangeabsEtaInRange
using AbsEtaInRangeabsetaInRange
using RapGtrrapGtr
using RapLessrapLess
using RapInRangerapInRange
using AbsRapGtrabsRapGtr
using AbsRapGtrabsrapGtr
using AbsRapLessabsRapLess
using AbsRapLessabsrapLess
using AbsRapInRangeabsRapInRange
using AbsRapInRangeabsrapInRange
using DeltaRGtrdeltaRGtr
using DeltaRLessdeltaRLess
using DeltaRInRangedeltaRInRange
using DeltaPhiGtrdeltaPhiGtr
using DeltaPhiLessdeltaPhiLess
using DeltaPhiInRangedeltaPhiInRange
using DeltaEtaGtrdeltaEtaGtr
using DeltaEtaLessdeltaEtaLess
using DeltaEtaInRangedeltaEtaInRange
using DeltaRapGtrdeltaRapGtr
using DeltaRapLessdeltaRapLess
using DeltaRapInRangedeltaRapInRange
using DeltaRWRTdeltaRWRT
using DeltaPhiWRTdeltaPhiWRT
using DeltaEtaWRTdeltaEtaWRT
using AbsDeltaEtaWRTabsDeltaEtaWRT
using DeltaRapWRTdeltaRapWRT
using AbsDeltaRapWRTabsDeltaRapWRT
using HasPIDhasPID
using HasAbsPIDhasAbsPID
using FirstParticleWithfirstParticleWith
using FirstParticleWithoutfirstParticleWithout
using LastParticleWithlastParticleWith
using LastParticleWithoutlastParticleWithout
using HasParticleAncestorWithhasParticleAncestorWith
using HasParticleAncestorWithouthasParticleAncestorWithout
using HasParticleParentWithhasParticleParentWith
using HasParticleParentWithouthasParticleParentWithout
using HasParticleChildWithhasParticleChildWith
using HasParticleChildWithouthasParticleChildWithout
using HasParticleDescendantWithhasParticleDescendantWith
using HasParticleDescendantWithouthasParticleDescendantWithout
typedef std::vector< PseudoJet >PseudoJets
typedef const HepMC::GenParticle *ConstGenParticlePtr
typedef const HepMC::GenVertex *ConstGenVertexPtr
typedef const HepMC::HeavyIon *ConstGenHeavyIonPtr
using HepMC::IO_GenEventHepMC_IO_type
using RivetHepMC::PdfInfoPdfInfo
using std::shared_ptr< const GenEvent >ConstGenEventPtr
using doubleWeight
Typedef for weights.
template <class T >
using pair< typename T::FillType, Weight >
Fill
A single fill is a (FillType, Weight) pair.
template <class T >
using multiset< Fill< T > >
Fills
using rivet_shared_ptr< MultiweightAOWrapper >MultiweightAOPtr
using rivet_shared_ptr< Wrapper< YODA::Histo1D > >Histo1DPtr
using rivet_shared_ptr< Wrapper< YODA::Histo2D > >Histo2DPtr
using rivet_shared_ptr< Wrapper< YODA::Profile1D > >Profile1DPtr
using rivet_shared_ptr< Wrapper< YODA::Profile2D > >Profile2DPtr
using rivet_shared_ptr< Wrapper< YODA::Counter > >CounterPtr
using rivet_shared_ptr< Wrapper< YODA::Scatter1D > >Scatter1DPtr
using rivet_shared_ptr< Wrapper< YODA::Scatter2D > >Scatter2DPtr
using rivet_shared_ptr< Wrapper< YODA::Scatter3D > >Scatter3DPtr

Functions

Name
template <typename N1 ,typename N2 ,typename N3 >
std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type
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< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type
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< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type
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< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type
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< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type
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< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type
in_open_range(N1 val, N2 low, N3 high)
Boolean function to determine if value is within the given range.
doubleJET_EFF_ZERO(const Jet & p)
Take a jet and return a constant 0.
doubleJET_EFF_0(const Jet & p)
Alias for JET_EFF_ZERO.
doubleJET_FN0(const Jet & p)
Alias for JET_EFF_ZERO.
doubleJET_EFF_ONE(const Jet & p)
Take a jet and return a constant 1.
doubleJET_EFF_1(const Jet & p)
Alias for JET_EFF_ONE.
doubleJET_EFF_PERFECT(const Jet & )
Alias for JET_EFF_ONE.
doubleJET_FN1(const Jet & )
Alias for JET_EFF_ONE.
doubleJET_BTAG_PERFECT(const Jet & j)
Return 1 if the given Jet contains a b, otherwise 0.
doubleJET_CTAG_PERFECT(const Jet & j)
Return 1 if the given Jet contains a c, otherwise 0.
doubleJET_TAUTAG_PERFECT(const Jet & j)
Return 1 if the given Jet contains a c, otherwise 0.
JetJET_SMEAR_IDENTITY(const Jet & j)
JetJET_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.
doubleP4_EFF_ZERO(const FourMomentum & )
Take a FourMomentum and return 0.
doubleP4_FN0(const FourMomentum & )
doubleP4_EFF_ONE(const FourMomentum & )
Take a FourMomentum and return 1.
doubleP4_FN1(const FourMomentum & )
FourMomentumP4_SMEAR_IDENTITY(const FourMomentum & p)
Take a FourMomentum and return it unmodified.
FourMomentumP4_SMEAR_PERFECT(const FourMomentum & p)
Alias for P4_SMEAR_IDENTITY.
FourMomentumP4_SMEAR_E_GAUSS(const FourMomentum & p, double resolution)
FourMomentumP4_SMEAR_PT_GAUSS(const FourMomentum & p, double resolution)
Smear a FourMomentum’s transverse momentum using a Gaussian of absolute width resolution.
FourMomentumP4_SMEAR_MASS_GAUSS(const FourMomentum & p, double resolution)
Smear a FourMomentum’s mass using a Gaussian of absolute width resolution.
doublePARTICLE_EFF_ZERO(const Particle & )
Take a Particle and return 0.
doublePARTICLE_EFF_0(const Particle & )
Alias for PARTICLE_EFF_ZERO.
doublePARTICLE_FN0(const Particle & )
Alias for PARTICLE_EFF_ZERO.
doublePARTICLE_EFF_ONE(const Particle & )
Take a Particle and return 1.
doublePARTICLE_EFF_1(const Particle & )
Alias for PARTICLE_EFF_ONE.
doublePARTICLE_EFF_PERFECT(const Particle & )
Alias for PARTICLE_EFF_ONE.
doublePARTICLE_FN1(const Particle & )
Alias for PARTICLE_EFF_ONE.
ParticlePARTICLE_SMEAR_IDENTITY(const Particle & p)
Take a Particle and return it unmodified.
ParticlePARTICLE_SMEAR_PERFECT(const Particle & p)
Alias for PARTICLE_SMEAR_IDENTITY.
boolefffilt(const Particle & p, const ParticleEffFn & feff)
Return true if Particle_p_ is chosen to survive a random efficiency selection.
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.
template <typename NUM >
std::enable_if< std::is_floating_point< NUM >::value, bool >::type
isZero(NUM val, double tolerance =1e-8)
Compare a number to zero.
template <typename NUM >
std::enable_if< std::is_integral< NUM >::value, bool >::type
isZero(NUM val, double =1e-5)
Compare a number to zero.
template <typename NUM >
std::enable_if< std::is_floating_point< NUM >::value, bool >::type
isNaN(NUM val)
Check if a number is NaN.
template <typename NUM >
std::enable_if< std::is_floating_point< NUM >::value, bool >::type
notNaN(NUM val)
Check if a number is non-NaN.
template <typename N1 ,typename N2 >
std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&(std::is_floating_point< N1 >::value
template <typename N1 ,typename N2 >
std::enable_if< std::is_integral< N1 >::value &&std::is_integral< N2 >::value, bool >::type
fuzzyEquals(N1 a, N2 b, double )
Compare two numbers for equality with a degree of fuzziness.
template <typename N1 ,typename N2 >
std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value, bool >::type
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< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value, bool >::type
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< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value, typenamestd::common_type< N1, N2 >::type >::type
min(N1 a, N2 b)
Get the minimum of two numbers.
template <typename N1 ,typename N2 >
std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value, typenamestd::common_type< N1, N2 >::type >::type
max(N1 a, N2 b)
Get the maximum of two numbers.
template <typename NUM >
std::enable_if< std::is_arithmetic< NUM >::value, NUM >::type
sqr(NUM a)
Named number-type squaring operation.
template <typename NUM >
std::enable_if< std::is_arithmetic< NUM >::value, NUM >::type
add_quad(NUM a, NUM b)
Named number-type addition in quadrature operation.
template <typename NUM >
std::enable_if< std::is_arithmetic< NUM >::value, NUM >::type
add_quad(NUM a, NUM b, NUM c)
doublesafediv(double num, double den, double fail =0.0)
template <typename NUM >
std::enable_if< std::is_arithmetic< NUM >::value, NUM >::type
intpow(NUM val, unsigned int exp)
A more efficient version of pow for raising numbers to integer powers.
template <typename NUM >
std::enable_if< std::is_arithmetic< NUM >::value, int >::type
sign(NUM val)
Find the sign of a number.
doublecdfBW(double x, double mu, double gamma)
CDF for the Breit-Wigner distribution.
doubleinvcdfBW(double p, double mu, double gamma)
Inverse CDF for the Breit-Wigner distribution.
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 >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 >bwspace(size_t nbins, double start, double end, double mu, double gamma)
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< std::is_arithmetic< NUM1 >::value &&std::is_arithmetic< NUM2 >::value, int >::type
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< std::is_arithmetic< NUM >::value &&std::is_arithmetic< typenameCONTAINER::value_type >::value, int >::type
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.
template <typename NUM >
std::enable_if< std::is_arithmetic< NUM >::value, NUM >::type
median(const vector< NUM > & sample)
template <typename NUM >
std::enable_if< std::is_arithmetic< NUM >::value, double >::type
mean(const vector< NUM > & sample)
template <typename NUM >
std::enable_if< std::is_arithmetic< NUM >::value, double >::type
mean_err(const vector< NUM > & sample)
template <typename NUM >
std::enable_if< std::is_arithmetic< NUM >::value, double >::type
covariance(const vector< NUM > & sample1, const vector< NUM > & sample2)
template <typename NUM >
std::enable_if< std::is_arithmetic< NUM >::value, double >::type
covariance_err(const vector< NUM > & sample1, const vector< NUM > & sample2)
template <typename NUM >
std::enable_if< std::is_arithmetic< NUM >::value, double >::type
correlation(const vector< NUM > & sample1, const vector< NUM > & sample2)
template <typename NUM >
std::enable_if< std::is_arithmetic< NUM >::value, double >::type
correlation_err(const vector< NUM > & sample1, const vector< NUM > & sample2)
doublemapAngleMPiToPi(double angle)
Map an angle into the range (-PI, PI].
doublemapAngle0To2Pi(double angle)
Map an angle into the range [0, 2PI).
doublemapAngle0ToPi(double angle)
Map an angle into the range [0, PI].
doublemapAngle(double angle, PhiMapping mapping)
Map an angle into the enum-specified range.
doubledeltaPhi(double phi1, double phi2, bool sign =false)
Calculate the difference between two angles in radians.
doubledeltaEta(double eta1, double eta2, bool sign =false)
doubledeltaRap(double y1, double y2, bool sign =false)
doubledeltaR2(double rap1, double phi1, double rap2, double phi2)
doubledeltaR(double rap1, double phi1, double rap2, double phi2)
doublerapidity(double E, double pz)
Calculate a rapidity value from the supplied energy E and longitudinal momentum pz.
doublemT(double pT1, double pT2, double dphi)
doubledeltaR2(const FourVector & a, const FourVector & b, RapScheme scheme =PSEUDORAPIDITY)
Calculate the squared 2D rapidity-azimuthal (“eta-phi”) distance between two four-vectors.
doubledeltaR(const FourVector & a, const FourVector & b, RapScheme scheme =PSEUDORAPIDITY)
Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two four-vectors.
doubledeltaR2(const FourVector & v, double eta2, double phi2, RapScheme scheme =PSEUDORAPIDITY)
Calculate the squared 2D rapidity-azimuthal (“eta-phi”) distance between two four-vectors.
doubledeltaR(const FourVector & v, double eta2, double phi2, RapScheme scheme =PSEUDORAPIDITY)
Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two four-vectors.
doubledeltaR2(double eta1, double phi1, const FourVector & v, RapScheme scheme =PSEUDORAPIDITY)
Calculate the squared 2D rapidity-azimuthal (“eta-phi”) distance between two four-vectors.
doubledeltaR(double eta1, double phi1, const FourVector & v, RapScheme scheme =PSEUDORAPIDITY)
Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two four-vectors.
doubledeltaR2(const FourMomentum & a, const FourMomentum & b, RapScheme scheme =PSEUDORAPIDITY)
Calculate the squared 2D rapidity-azimuthal (“eta-phi”) distance between two four-vectors.
doubledeltaR(const FourMomentum & a, const FourMomentum & b, RapScheme scheme =PSEUDORAPIDITY)
Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two four-vectors.
doubledeltaR2(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.
doubledeltaR(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.
doubledeltaR2(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.
doubledeltaR(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.
doubledeltaR2(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.
doubledeltaR(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.
doubledeltaR2(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.
doubledeltaR(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.
doubledeltaR2(const FourMomentum & a, const Vector3 & b)
Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between a three-vector and a four-vector.
doubledeltaR(const FourMomentum & a, const Vector3 & b)
Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between a three-vector and a four-vector.
doubledeltaR2(const Vector3 & a, const FourMomentum & b)
Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between a three-vector and a four-vector.
doubledeltaR(const Vector3 & a, const FourMomentum & b)
Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between a three-vector and a four-vector.
doubledeltaR2(const FourVector & a, const Vector3 & b)
Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between a three-vector and a four-vector.
doubledeltaR(const FourVector & a, const Vector3 & b)
Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between a three-vector and a four-vector.
doubledeltaR2(const Vector3 & a, const FourVector & b)
Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between a three-vector and a four-vector.
doubledeltaR(const Vector3 & a, const FourVector & b)
Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between a three-vector and a four-vector.
doubledeltaPhi(const FourMomentum & a, const FourMomentum & b, bool sign =false)
Calculate the difference in azimuthal angle between two vectors.
doubledeltaPhi(const FourMomentum & v, double phi2, bool sign =false)
Calculate the difference in azimuthal angle between two vectors.
doubledeltaPhi(double phi1, const FourMomentum & v, bool sign =false)
Calculate the difference in azimuthal angle between two vectors.
doubledeltaPhi(const FourVector & a, const FourVector & b, bool sign =false)
Calculate the difference in azimuthal angle between two vectors.
doubledeltaPhi(const FourVector & v, double phi2, bool sign =false)
Calculate the difference in azimuthal angle between two vectors.
doubledeltaPhi(double phi1, const FourVector & v, bool sign =false)
Calculate the difference in azimuthal angle between two vectors.
doubledeltaPhi(const FourVector & a, const FourMomentum & b, bool sign =false)
Calculate the difference in azimuthal angle between two vectors.
doubledeltaPhi(const FourMomentum & a, const FourVector & b, bool sign =false)
Calculate the difference in azimuthal angle between two vectors.
doubledeltaPhi(const FourVector & a, const Vector3 & b, bool sign =false)
Calculate the difference in azimuthal angle between two vectors.
doubledeltaPhi(const Vector3 & a, const FourVector & b, bool sign =false)
Calculate the difference in azimuthal angle between two vectors.
doubledeltaPhi(const FourMomentum & a, const Vector3 & b, bool sign =false)
Calculate the difference in azimuthal angle between two vectors.
doubledeltaPhi(const Vector3 & a, const FourMomentum & b, bool sign =false)
Calculate the difference in azimuthal angle between two vectors.
doubledeltaEta(const FourMomentum & a, const FourMomentum & b, bool sign =false)
Calculate the difference in pseudorapidity between two vectors.
doubledeltaEta(const FourMomentum & v, double eta2, bool sign =false)
Calculate the difference in pseudorapidity between two vectors.
doubledeltaEta(double eta1, const FourMomentum & v, bool sign =false)
Calculate the difference in pseudorapidity between two vectors.
doubledeltaEta(const FourVector & a, const FourVector & b, bool sign =false)
Calculate the difference in pseudorapidity between two vectors.
doubledeltaEta(const FourVector & v, double eta2, bool sign =false)
Calculate the difference in pseudorapidity between two vectors.
doubledeltaEta(double eta1, const FourVector & v, bool sign =false)
Calculate the difference in pseudorapidity between two vectors.
doubledeltaEta(const FourVector & a, const FourMomentum & b, bool sign =false)
Calculate the difference in pseudorapidity between two vectors.
doubledeltaEta(const FourMomentum & a, const FourVector & b, bool sign =false)
Calculate the difference in pseudorapidity between two vectors.
doubledeltaEta(const FourVector & a, const Vector3 & b, bool sign =false)
Calculate the difference in pseudorapidity between two vectors.
doubledeltaEta(const Vector3 & a, const FourVector & b, bool sign =false)
Calculate the difference in pseudorapidity between two vectors.
doubledeltaEta(const FourMomentum & a, const Vector3 & b, bool sign =false)
Calculate the difference in pseudorapidity between two vectors.
doubledeltaEta(const Vector3 & a, const FourMomentum & b, bool sign =false)
Calculate the difference in pseudorapidity between two vectors.
doubledeltaRap(const FourMomentum & a, const FourMomentum & b, bool sign =false)
Calculate the difference in rapidity between two 4-momentum vectors.
doubledeltaRap(const FourMomentum & v, double y2, bool sign =false)
Calculate the difference in rapidity between two 4-momentum vectors.
doubledeltaRap(double y1, const FourMomentum & v, bool sign =false)
Calculate the difference in rapidity between two 4-momentum vectors.
boolcmpMomByPt(const FourMomentum & a, const FourMomentum & b)
Comparison to give a sorting by decreasing pT.
boolcmpMomByAscPt(const FourMomentum & a, const FourMomentum & b)
Comparison to give a sorting by increasing pT.
boolcmpMomByP(const FourMomentum & a, const FourMomentum & b)
Comparison to give a sorting by decreasing 3-momentum magnitude
boolcmpMomByAscP(const FourMomentum & a, const FourMomentum & b)
Comparison to give a sorting by increasing 3-momentum magnitude
boolcmpMomByEt(const FourMomentum & a, const FourMomentum & b)
Comparison to give a sorting by decreasing transverse energy.
boolcmpMomByAscEt(const FourMomentum & a, const FourMomentum & b)
Comparison to give a sorting by increasing transverse energy.
boolcmpMomByE(const FourMomentum & a, const FourMomentum & b)
Comparison to give a sorting by decreasing energy.
boolcmpMomByAscE(const FourMomentum & a, const FourMomentum & b)
Comparison to give a sorting by increasing energy.
boolcmpMomByMass(const FourMomentum & a, const FourMomentum & b)
Comparison to give a sorting by decreasing mass.
boolcmpMomByAscMass(const FourMomentum & a, const FourMomentum & b)
Comparison to give a sorting by increasing mass.
boolcmpMomByEta(const FourMomentum & a, const FourMomentum & b)
Comparison to give a sorting by increasing eta (pseudorapidity)
boolcmpMomByDescEta(const FourMomentum & a, const FourMomentum & b)
Comparison to give a sorting by decreasing eta (pseudorapidity)
boolcmpMomByAbsEta(const FourMomentum & a, const FourMomentum & b)
Comparison to give a sorting by increasing absolute eta (pseudorapidity)
boolcmpMomByDescAbsEta(const FourMomentum & a, const FourMomentum & b)
Comparison to give a sorting by increasing absolute eta (pseudorapidity)
boolcmpMomByRap(const FourMomentum & a, const FourMomentum & b)
Comparison to give a sorting by increasing rapidity.
boolcmpMomByDescRap(const FourMomentum & a, const FourMomentum & b)
Comparison to give a sorting by decreasing rapidity.
boolcmpMomByAbsRap(const FourMomentum & a, const FourMomentum & b)
Comparison to give a sorting by increasing absolute rapidity.
boolcmpMomByDescAbsRap(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.
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.
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.
doubledeltaR(const ParticleBase & p1, const ParticleBase & p2, RapScheme scheme =PSEUDORAPIDITY)
doubledeltaR(const ParticleBase & p, const FourMomentum & v, RapScheme scheme =PSEUDORAPIDITY)
doubledeltaR(const ParticleBase & p, const FourVector & v, RapScheme scheme =PSEUDORAPIDITY)
doubledeltaR(const ParticleBase & p, const Vector3 & v)
doubledeltaR(const ParticleBase & p, double eta, double phi)
doubledeltaR(const FourMomentum & v, const ParticleBase & p, RapScheme scheme =PSEUDORAPIDITY)
doubledeltaR(const FourVector & v, const ParticleBase & p, RapScheme scheme =PSEUDORAPIDITY)
doubledeltaR(const Vector3 & v, const ParticleBase & p)
doubledeltaR(double eta, double phi, const ParticleBase & p)
doubledeltaPhi(const ParticleBase & p1, const ParticleBase & p2, bool sign =false)
doubledeltaPhi(const ParticleBase & p, const FourMomentum & v, bool sign =false)
doubledeltaPhi(const ParticleBase & p, const FourVector & v, bool sign =false)
doubledeltaPhi(const ParticleBase & p, const Vector3 & v, bool sign =false)
doubledeltaPhi(const ParticleBase & p, double phi, bool sign =false)
doubledeltaPhi(const FourMomentum & v, const ParticleBase & p, bool sign =false)
doubledeltaPhi(const FourVector & v, const ParticleBase & p, bool sign =false)
doubledeltaPhi(const Vector3 & v, const ParticleBase & p, bool sign =false)
doubledeltaPhi(double phi, const ParticleBase & p, bool sign =false)
doubledeltaEta(const ParticleBase & p1, const ParticleBase & p2)
doubledeltaEta(const ParticleBase & p, const FourMomentum & v)
doubledeltaEta(const ParticleBase & p, const FourVector & v)
doubledeltaEta(const ParticleBase & p, const Vector3 & v)
doubledeltaEta(const ParticleBase & p, double eta)
doubledeltaEta(const FourMomentum & v, const ParticleBase & p)
doubledeltaEta(const FourVector & v, const ParticleBase & p)
doubledeltaEta(const Vector3 & v, const ParticleBase & p)
doubledeltaEta(double eta, const ParticleBase & p)
doubledeltaRap(const ParticleBase & p1, const ParticleBase & p2)
doubledeltaRap(const ParticleBase & p, const FourMomentum & v)
doubledeltaRap(const ParticleBase & p, double y)
doubledeltaRap(const FourMomentum & v, const ParticleBase & p)
doubledeltaRap(double y, const ParticleBase & p)
ParticlePairbeams(const Event & e)
Get beam particles from an event.
PdgIdPairbeamIds(const ParticlePair & beams)
PdgIdPairbeamIds(const Event & e)
doublesqrtS(const FourMomentum & pa, const FourMomentum & pb)
Get beam centre-of-mass energy from a pair of beam momenta.
doublesqrtS(const ParticlePair & beams)
Get beam centre-of-mass energy from a pair of Particles.
doublesqrtS(const Event & e)
Get beam centre-of-mass energy from an Event.
doubleasqrtS(const FourMomentum & pa, const FourMomentum & pb)
doubleasqrtS(const ParticlePair & beams)
doubleasqrtS(const Event & e)
FourMomentumcmsBoostVec(const FourMomentum & pa, const FourMomentum & pb)
Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of beam momenta.
FourMomentumcmsBoostVec(const ParticlePair & beams)
Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of Particles.
FourMomentumacmsBoostVec(const FourMomentum & pa, const FourMomentum & pb)
Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of beam momenta.
FourMomentumacmsBoostVec(const ParticlePair & beams)
Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of Particles.
Vector3cmsBetaVec(const FourMomentum & pa, const FourMomentum & pb)
Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of beam momenta.
Vector3cmsBetaVec(const ParticlePair & beams)
Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of Particles.
Vector3acmsBetaVec(const FourMomentum & pa, const FourMomentum & pb)
Vector3acmsBetaVec(const ParticlePair & beams)
Vector3cmsGammaVec(const FourMomentum & pa, const FourMomentum & pb)
Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of beam momenta.
Vector3cmsGammaVec(const ParticlePair & beams)
Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of Particles.
Vector3acmsGammaVec(const FourMomentum & pa, const FourMomentum & pb)
Vector3acmsGammaVec(const ParticlePair & beams)
LorentzTransformcmsTransform(const FourMomentum & pa, const FourMomentum & pb)
Get the Lorentz transformation to the beam centre-of-mass system (CMS) from a pair of beam momenta.
LorentzTransformcmsTransform(const ParticlePair & beams)
Get the Lorentz transformation to the beam centre-of-mass system (CMS) from a pair of Particles.
LorentzTransformacmsTransform(const FourMomentum & pa, const FourMomentum & pb)
LorentzTransformacmsTransform(const ParticlePair & beams)
Cutoperator,(const Cut & , const Cut & ) =delete
Cut &operator,(Cut & , Cut & ) =delete
Cutoperator,(Cut , Cut ) =delete
Cutoperator==(Cuts::Quantity , double )
Cutoperator!=(Cuts::Quantity , double )
Cutoperator<(Cuts::Quantity , double )
Cutoperator>(Cuts::Quantity , double )
Cutoperator<=(Cuts::Quantity , double )
Cutoperator>=(Cuts::Quantity , double )
Cutoperator==(Cuts::Quantity qty, int i)
Cutoperator!=(Cuts::Quantity qty, int i)
Cutoperator<(Cuts::Quantity qty, int i)
Cutoperator>(Cuts::Quantity qty, int i)
Cutoperator<=(Cuts::Quantity qty, int i)
Cutoperator>=(Cuts::Quantity qty, int i)
Cutoperator&&(const Cut & aptr, const Cut & bptr)
Cut**[operator
Cutoperator!(const Cut & cptr)
Logical NOT operation on a cut.
Cutoperator&(const Cut & aptr, const Cut & bptr)
Logical AND operation on two cuts.
Cut**[operator
Cutoperator~(const Cut & cptr)
Logical NOT operation on a cut.
Cutoperator^(const Cut & aptr, const Cut & bptr)
Logical XOR operation on two cuts.
std::ostream &operator«(std::ostream & os, const Cut & cptr)
String representation.
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)
std::stringgetLibPath()
Get library install path.
std::stringgetDataPath()
Get data install path.
std::stringgetRivetDataPath()
Get Rivet data install path.
std::vector< std::string >getAnalysisLibPaths()
Get Rivet analysis plugin library search paths.
voidsetAnalysisLibPaths(const std::vector< std::string > & paths)
Set the Rivet analysis plugin library search paths.
voidaddAnalysisLibPath(const std::string & extrapath)
Add a Rivet analysis plugin library search path.
std::stringfindAnalysisLibFile(const std::string & filename)
Find the first file of the given name in the analysis library search dirs.
std::vector< std::string >getAnalysisDataPaths()
Get Rivet analysis reference data search paths.
voidsetAnalysisDataPaths(const std::vector< std::string > & paths)
Set the Rivet data file search paths.
voidaddAnalysisDataPath(const std::string & extrapath)
Add a Rivet data file search path.
std::stringfindAnalysisDataFile(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::stringfindAnalysisRefFile(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::stringfindAnalysisInfoFile(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::stringfindAnalysisPlotFile(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.
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.
boolcontains(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?
std::stringtoString(const AnalysisInfo & ai)
String representation.
std::ostream &operator«(std::ostream & os, const AnalysisInfo & ai)
Stream an AnalysisInfo as a text description.
Jetsoperator+(const Jets & a, const Jets & b)
LorentzTransforminverse(const LorentzTransform & lt)
LorentzTransformcombine(const LorentzTransform & a, const LorentzTransform & b)
FourVectortransform(const LorentzTransform & lt, const FourVector & v4)
stringtoString(const LorentzTransform & lt)
std::ostream &operator«(std::ostream & out, const LorentzTransform & lt)
template <size_t N>
EigenSystem< N >
diagonalize(const Matrix< N > & m)
template <size_t N>
const string
toString(const typename EigenSystem< N >::EigenPair & e)
template <size_t N>
ostream &
operator«(std::ostream & out, const typename EigenSystem< N >::EigenPair & e)
template <size_t N>
Matrix< N >
multiply(const Matrix< N > & a, const Matrix< N > & b)
template <size_t N>
Matrix< N >
divide(const Matrix< N > & m, const double a)
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.
Vector2multiply(const double a, const Vector2 & v)
Vector2multiply(const Vector2 & v, const double a)
Vector2add(const Vector2 & a, const Vector2 & b)
Vector2operator*(const double a, const Vector2 & v)
Vector2operator*(const Vector2 & v, const double a)
Vector2operator/(const Vector2 & v, const double a)
Vector2operator+(const Vector2 & a, const Vector2 & b)
Vector2operator-(const Vector2 & a, const Vector2 & b)
doubledot(const Vector2 & a, const Vector2 & b)
Vector2subtract(const Vector2 & a, const Vector2 & b)
doubleangle(const Vector2 & a, const Vector2 & b)
Angle (in radians) between two 2-vectors.
Vector3multiply(const double a, const Vector3 & v)
Unbound scalar-product function.
Vector3multiply(const Vector3 & v, const double a)
Unbound scalar-product function.
Vector3add(const Vector3 & a, const Vector3 & b)
Unbound vector addition function.
Vector3operator*(const double a, const Vector3 & v)
Unbound scalar multiplication operator.
Vector3operator*(const Vector3 & v, const double a)
Unbound scalar multiplication operator.
Vector3operator/(const Vector3 & v, const double a)
Unbound scalar division operator.
Vector3operator+(const Vector3 & a, const Vector3 & b)
Unbound vector addition operator.
Vector3operator-(const Vector3 & a, const Vector3 & b)
Unbound vector subtraction operator.
ThreeMomentummultiply(const double a, const ThreeMomentum & v)
ThreeMomentummultiply(const ThreeMomentum & v, const double a)
ThreeMomentumadd(const ThreeMomentum & a, const ThreeMomentum & b)
ThreeMomentumoperator*(const double a, const ThreeMomentum & v)
ThreeMomentumoperator*(const ThreeMomentum & v, const double a)
ThreeMomentumoperator/(const ThreeMomentum & v, const double a)
ThreeMomentumoperator+(const ThreeMomentum & a, const ThreeMomentum & b)
ThreeMomentumoperator-(const ThreeMomentum & a, const ThreeMomentum & b)
doubledot(const Vector3 & a, const Vector3 & b)
Unbound dot-product function.
Vector3cross(const Vector3 & a, const Vector3 & b)
Unbound cross-product function.
Vector3subtract(const Vector3 & a, const Vector3 & b)
Unbound vector subtraction function.
doubleangle(const Vector3 & a, const Vector3 & b)
Angle (in radians) between two 3-vectors.
doubledeltaEta(const Vector3 & a, const Vector3 & b, bool sign =false)
Calculate the difference in pseudorapidity between two spatial vectors.
doubledeltaEta(const Vector3 & v, double eta2, bool sign =false)
Calculate the difference in pseudorapidity between two spatial vectors.
doubledeltaEta(double eta1, const Vector3 & v, bool sign =false)
Calculate the difference in pseudorapidity between two spatial vectors.
doubledeltaPhi(const Vector3 & a, const Vector3 & b, bool sign =false)
Calculate the difference in azimuthal angle between two spatial vectors.
doubledeltaPhi(const Vector3 & v, double phi2, bool sign =false)
Calculate the difference in azimuthal angle between two spatial vectors.
doubledeltaPhi(double phi1, const Vector3 & v, bool sign =false)
Calculate the difference in azimuthal angle between two spatial vectors.
doubledeltaR2(const Vector3 & a, const Vector3 & b)
Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two spatial vectors.
doubledeltaR(const Vector3 & a, const Vector3 & b)
Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two spatial vectors.
doubledeltaR2(const Vector3 & v, double eta2, double phi2)
Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two spatial vectors.
doubledeltaR(const Vector3 & v, double eta2, double phi2)
Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two spatial vectors.
doubledeltaR2(double eta1, double phi1, const Vector3 & v)
Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two spatial vectors.
doubledeltaR(double eta1, double phi1, const Vector3 & v)
Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two spatial vectors.
doublemT(const Vector3 & vis, const Vector3 & invis)
Calculate transverse mass of a visible and an invisible 3-vector.
doublecontract(const FourVector & a, const FourVector & b)
Contract two 4-vectors, with metric signature (+ - - -).
doubledot(const FourVector & a, const FourVector & b)
Contract two 4-vectors, with metric signature (+ - - -).
FourVectormultiply(const double a, const FourVector & v)
FourVectormultiply(const FourVector & v, const double a)
FourVectoroperator*(const double a, const FourVector & v)
FourVectoroperator*(const FourVector & v, const double a)
FourVectoroperator/(const FourVector & v, const double a)
FourVectoradd(const FourVector & a, const FourVector & b)
FourVectoroperator+(const FourVector & a, const FourVector & b)
FourVectoroperator-(const FourVector & a, const FourVector & b)
doubleinvariant(const FourVector & lv)
doubleangle(const FourVector & a, const FourVector & b)
Angle (in radians) between spatial parts of two Lorentz vectors.
doubleangle(const Vector3 & a, const FourVector & b)
Angle (in radians) between spatial parts of two Lorentz vectors.
doubleangle(const FourVector & a, const Vector3 & b)
Angle (in radians) between spatial parts of two Lorentz vectors.
FourMomentummultiply(const double a, const FourMomentum & v)
FourMomentummultiply(const FourMomentum & v, const double a)
FourMomentumoperator*(const double a, const FourMomentum & v)
FourMomentumoperator*(const FourMomentum & v, const double a)
FourMomentumoperator/(const FourMomentum & v, const double a)
FourMomentumadd(const FourMomentum & a, const FourMomentum & b)
FourMomentumoperator+(const FourMomentum & a, const FourMomentum & b)
FourMomentumoperator-(const FourMomentum & a, const FourMomentum & b)
doublemT(const FourMomentum & vis, const FourMomentum & invis)
Calculate transverse mass of a visible and an invisible 4-vector.
doublemT(const FourMomentum & vis, const Vector3 & invis)
Calculate transverse mass of a visible 4-vector and an invisible 3-vector.
doublemT(const Vector3 & vis, const FourMomentum & invis)
Calculate transverse mass of a visible 4-vector and an invisible 3-vector.
std::stringtoString(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.
Particlesoperator+(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)
voidpxcone_(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::stringversion()
A function to get the Rivet version string.
boolcompatible(PdgId p, PdgId allowed)
boolcompatible(const PdgIdPair & pair, const PdgIdPair & allowedpair)
boolcompatible(const ParticlePair & ppair, const PdgIdPair & allowedpair)
Check particle compatibility of Particle pairs.
boolcompatible(const PdgIdPair & allowedpair, const ParticlePair & ppair)
Check particle compatibility of Particle pairs (for symmetric completeness)
boolcompatible(const PdgIdPair & pair, const set< PdgIdPair > & allowedpairs)
set< PdgIdPair >intersection(const set< PdgIdPair > & a, const set< PdgIdPair > & b)
Return the intersection of two sets of {PdgIdPair}s.
template <typename T >
Cmp< T >
cmp(const T & t1, const T & t2)
Global helper function for easy creation of Cmp objects.
Cmp< Projection >pcmp(const Projection & p1, const Projection & p2)
Global helper function for easy creation of Cmp objects.
Cmp< Projection >pcmp(const Projection & parent1, const Projection & parent2, const string & pname)
Cmp< Projection >pcmp(const Projection * parent1, const Projection & parent2, const string & pname)
Cmp< Projection >pcmp(const Projection & parent1, const Projection * parent2, const string & pname)
Cmp< Projection >pcmp(const Projection * parent1, const Projection * parent2, const string & pname)
std::ostream &operator«(std::ostream & os, const Cutflow & cf)
Print a Cutflow to a stream.
std::ostream &operator«(std::ostream & os, const Cutflows & cfs)
Print a Cutflows to a stream.
booloperator==(const Cut & a, const Cut & b)
Compare two cuts for equality, forwards to the cut-specific implementation.
doubleELECTRON_RECOEFF_ATLAS_RUN1(const Particle & e)
doubleELECTRON_RECOEFF_ATLAS_RUN2(const Particle & e)
doubleELECTRON_EFF_ATLAS_RUN2_LOOSE(const Particle & e)
ATLASRun 2 ’loose’ electron reco+identification efficiency.
doubleELECTRON_EFF_ATLAS_RUN1_MEDIUM(const Particle & e)
ATLASRun 1 ‘medium’ electron reco+identification efficiency.
doubleELECTRON_EFF_ATLAS_RUN2_MEDIUM(const Particle & e)
ATLASRun 2 ‘medium’ electron reco+identification efficiency.
doubleELECTRON_EFF_ATLAS_RUN1_TIGHT(const Particle & e)
ATLASRun 1 ’tight’ electron reco+identification efficiency.
doubleELECTRON_EFF_ATLAS_RUN2_TIGHT(const Particle & e)
ATLASRun 2 ’tight’ electron reco+identification efficiency.
ParticleELECTRON_SMEAR_ATLAS_RUN1(const Particle & e)
ATLASRun 1 electron reco smearing.
ParticleELECTRON_SMEAR_ATLAS_RUN2(const Particle & e)
doubleELECTRON_EFF_CMS_RUN1(const Particle & e)
CMS Run 1 electron reconstruction efficiency.
doubleELECTRON_EFF_CMS_RUN2(const Particle & e)
ParticleELECTRON_SMEAR_CMS_RUN1(const Particle & e)
CMS electron energy smearing, preserving direction.
ParticleELECTRON_SMEAR_CMS_RUN2(const Particle & e)
doublePHOTON_EFF_ATLAS_RUN1(const Particle & y)
ATLASRun 2 photon reco efficiency.
doublePHOTON_EFF_ATLAS_RUN2(const Particle & y)
ATLASRun 2 photon reco efficiency.
doublePHOTON_EFF_CMS_RUN1(const Particle & y)
doublePHOTON_EFF_CMS_RUN2(const Particle & y)
ParticlePHOTON_SMEAR_ATLAS_RUN1(const Particle & y)
ParticlePHOTON_SMEAR_ATLAS_RUN2(const Particle & y)
ParticlePHOTON_SMEAR_CMS_RUN1(const Particle & y)
ParticlePHOTON_SMEAR_CMS_RUN2(const Particle & y)
doubleMUON_EFF_ATLAS_RUN1(const Particle & m)
ATLASRun 1 muon reco efficiency.
doubleMUON_RECOEFF_ATLAS_RUN2(const Particle & m)
doubleMUON_EFF_ATLAS_RUN2(const Particle & m)
ATLASRun 2 muon reco+ID efficiency.
ParticleMUON_SMEAR_ATLAS_RUN1(const Particle & m)
ATLASRun 1 muon reco smearing.
ParticleMUON_SMEAR_ATLAS_RUN2(const Particle & m)
doubleMUON_EFF_CMS_RUN1(const Particle & m)
CMS Run 1 muon reco efficiency.
doubleMUON_EFF_CMS_RUN2(const Particle & m)
ParticleMUON_SMEAR_CMS_RUN1(const Particle & m)
CMS Run 1 muon reco smearing.
ParticleMUON_SMEAR_CMS_RUN2(const Particle & m)
doubleTAU_EFF_ATLAS_RUN1(const Particle & t)
ATLASRun 1 8 TeV tau efficiencies (medium working point)
doubleTAUJET_EFF_ATLAS_RUN1(const Jet & j)
ATLASRun 1 8 TeV tau misID rates (medium working point)
doubleTAU_EFF_ATLAS_RUN2(const Particle & t)
ATLASRun 2 13 TeV tau efficiencies (medium working point)
doubleTAUJET_EFF_ATLAS_RUN2(const Jet & j)
ATLASRun 2 13 TeV tau misID rate (medium working point)
ParticleTAU_SMEAR_ATLAS_RUN1(const Particle & t)
ParticleTAU_SMEAR_ATLAS_RUN2(const Particle & t)
doubleTAU_EFF_CMS_RUN1(const Particle & t)
doubleTAU_EFF_CMS_RUN2(const Particle & t)
ParticleTAU_SMEAR_CMS_RUN1(const Particle & t)
ParticleTAU_SMEAR_CMS_RUN2(const Particle & t)
doubleJET_BTAG_ATLAS_RUN1(const Jet & j)
Return the ATLASRun 1 jet flavour tagging efficiency for the given Jet, from Delphes.
doubleJET_BTAG_ATLAS_RUN2_MV2C20(const Jet & j)
Return the ATLASRun 2 MC2c20 77% WP jet flavour tagging efficiency for the given Jet.
doubleJET_BTAG_ATLAS_RUN2_MV2C10(const Jet & j)
Return the ATLASRun 2 MC2c10 77% WP jet flavour tagging efficiency for the given Jet.
JetJET_SMEAR_ATLAS_RUN1(const Jet & j)
ATLASRun 1 jet smearing.
JetJET_SMEAR_ATLAS_RUN2(const Jet & j)
JetJET_SMEAR_CMS_RUN1(const Jet & j)
JetJET_SMEAR_CMS_RUN2(const Jet & j)
Vector3MET_SMEAR_IDENTITY(const Vector3 & met, double )
Vector3MET_SMEAR_ATLAS_RUN1(const Vector3 & met, double set)
ATLASRun 1 ETmiss smearing.
Vector3MET_SMEAR_ATLAS_RUN2(const Vector3 & met, double set)
Vector3MET_SMEAR_CMS_RUN1(const Vector3 & met, double set)
Vector3MET_SMEAR_CMS_RUN2(const Vector3 & met, double set)
doubleTRK_EFF_ATLAS_RUN1(const Particle & p)
ATLASRun 1 tracking efficiency.
doubleTRK_EFF_ATLAS_RUN2(const Particle & p)
doubleTRK_EFF_CMS_RUN1(const Particle & p)
CMS Run 1 tracking efficiency.
doubleTRK_EFF_CMS_RUN2(const Particle & p)
PseudoJetsmkPseudoJets(const Particles & ps)
PseudoJetsmkPseudoJets(const Jets & js)
JetsmkJets(const PseudoJets & pjs)
BoolJetANDoperator&&(const JetSelector & a, const JetSelector & b)
Operator syntactic sugar for AND construction.
BoolJetOR**[operator
BoolJetNOToperator!(const JetSelector & a)
Operator syntactic sugar for NOT construction.
Jets &ifilter_select(Jets & jets, const Cut & c)
Filter a jet collection in-place to the subset that passes the supplied Cut.
Jets &ifilterBy(Jets & jets, const Cut & c)
Jets &iselect(Jets & jets, const Cut & c)
New alias for ifilter_select.
Jetsfilter_select(const Jets & jets, const Cut & c)
Filter a jet collection in-place to the subset that passes the supplied Cut.
JetsfilterBy(const Jets & jets, const Cut & c)
Jetsselect(const Jets & jets, const Cut & c)
New alias for filter_select.
Jetsfilter_select(const Jets & jets, const Cut & c, Jets & out)
Filter a jet collection in-place to the subset that passes the supplied Cut.
JetsfilterBy(const Jets & jets, const Cut & c, Jets & out)
Jetsselect(const Jets & jets, const Cut & c, Jets & out)
New alias for filter_select.
Jets &ifilter_discard(Jets & jets, const Cut & c)
Filter a jet collection in-place to the subset that fails the supplied Cut.
Jets &idiscard(Jets & jets, const Cut & c)
New alias for ifilter_discard.
Jetsfilter_discard(const Jets & jets, const Cut & c)
Filter a jet collection in-place to the subset that fails the supplied Cut.
Jetsdiscard(const Jets & jets, const Cut & c)
New alias for filter_discard.
Jetsfilter_discard(const Jets & jets, const Cut & c, Jets & out)
Filter a jet collection in-place to the subset that fails the supplied Cut.
Jetsdiscard(const Jets & jets, const Cut & c, Jets & out)
New alias for filter_discard.
std::ostream &operator«(Log & log, int level)
Streaming output to a logger must have a Log::Level/int as its first argument.
doubleP3_EFF_ZERO(const Vector3 & p)
Take a Vector3 and return 0.
doubleP3_FN0(const Vector3 & p)
doubleP3_EFF_ONE(const Vector3 & p)
Take a Vector3 and return 1.
doubleP3_FN1(const Vector3 & p)
Vector3P3_SMEAR_IDENTITY(const Vector3 & p)
Take a Vector3 and return it unmodified.
Vector3P3_SMEAR_PERFECT(const Vector3 & p)
Alias for P3_SMEAR_IDENTITY.
Vector3P3_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)
intpid(const Particle & p)
Unbound function access to PID code.
intabspid(const Particle & p)
Unbound function access to abs PID code.
boolisSameSign(const Particle & a, const Particle & b)
boolisOppSign(const Particle & a, const Particle & b)
boolisSameFlav(const Particle & a, const Particle & b)
boolisOppFlav(const Particle & a, const Particle & b)
boolisOSSF(const Particle & a, const Particle & b)
boolisSSSF(const Particle & a, const Particle & b)
boolisOSOF(const Particle & a, const Particle & b)
boolisSSOF(const Particle & a, const Particle & b)
booloppSign(const Particle & a, const Particle & b)
Return true if Particles_a_ and b have the opposite charge sign.
boolsameSign(const Particle & a, const Particle & b)
booloppCharge(const Particle & a, const Particle & b)
boolsameCharge(const Particle & a, const Particle & b)
booldiffCharge(const Particle & a, const Particle & b)
Return true if Particles_a_ and b have a different (not necessarily opposite) charge.
boolisFirstWith(const Particle & p, const ParticleSelector & f)
Determine whether a particle is the first in a decay chain to meet the function requirement.
boolisFirstWithout(const Particle & p, const ParticleSelector & f)
Determine whether a particle is the first in a decay chain not to meet the function requirement.
boolisLastWith(const Particle & p, const ParticleSelector & f)
Determine whether a particle is the last in a decay chain to meet the function requirement.
boolisLastWithout(const Particle & p, const ParticleSelector & f)
Determine whether a particle is the last in a decay chain not to meet the function requirement.
boolhasAncestorWith(const Particle & p, const ParticleSelector & f, bool only_physical =true)
Determine whether a particle has an ancestor which meets the function requirement.
boolhasAncestorWithout(const Particle & p, const ParticleSelector & f, bool only_physical =true)
Determine whether a particle has an ancestor which doesn’t meet the function requirement.
boolhasParentWith(const Particle & p, const ParticleSelector & f)
Determine whether a particle has a parent which meets the function requirement.
boolhasParentWithout(const Particle & p, const ParticleSelector & f)
Determine whether a particle has a parent which doesn’t meet the function requirement.
boolhasChildWith(const Particle & p, const ParticleSelector & f)
Determine whether a particle has a child which meets the function requirement.
boolhasChildWithout(const Particle & p, const ParticleSelector & f)
Determine whether a particle has a child which doesn’t meet the function requirement.
boolhasDescendantWith(const Particle & p, const ParticleSelector & f, bool remove_duplicates =true)
Determine whether a particle has a descendant which meets the function requirement.
boolhasDescendantWithout(const Particle & p, const ParticleSelector & f, bool remove_duplicates =true)
Determine whether a particle has a descendant which doesn’t meet the function requirement.
boolhasStableDescendantWith(const Particle & p, const ParticleSelector & f)
Determine whether a particle has a stable descendant which meets the function requirement.
boolhasStableDescendantWithout(const Particle & p, const ParticleSelector & f)
Determine whether a particle has a stable descendant which doesn’t meet the function requirement.
boolisVisible(const Particle & p)
Is this particle potentially visible in a detector?
boolisDirect(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()
boolisPrompt(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()
boolisStable(const Particle & p)
Decide if a given particle is stable, via Particle::isStable()
boolhasHadronicDecay(const Particle & p)
Decide if a given particle decays hadronically.
boolhasLeptonicDecay(const Particle & p)
Decide if a given particle decays leptonically (decays, and no hadrons)
boolhasAncestor(const Particle & p, PdgId pid)
boolfromBottom(const Particle & p)
Determine whether the particle is from a b-hadron decay.
boolfromCharm(const Particle & p)
Determine whether the particle is from a c-hadron decay.
boolfromHadron(const Particle & p)
Determine whether the particle is from a hadron decay.
boolfromTau(const Particle & p, bool prompt_taus_only =false)
Determine whether the particle is from a tau decay.
boolfromPromptTau(const Particle & p)
Determine whether the particle is from a prompt tau decay.
BoolParticleANDoperator&&(const ParticleSelector & a, const ParticleSelector & b)
Operator syntactic sugar for AND construction.
BoolParticleOR**[operator
BoolParticleNOToperator!(const ParticleSelector & a)
Operator syntactic sugar for NOT construction.
Particles &ifilter_select(Particles & particles, const Cut & c)
Filter a particle collection in-place to the subset that passes the supplied Cut.
Particles &ifilterBy(Particles & particles, const Cut & c)
Particles &iselect(Particles & particles, const Cut & c)
New alias for ifilter_select.
Particlesfilter_select(const Particles & particles, const Cut & c)
Filter a particle collection in-place to the subset that passes the supplied Cut.
ParticlesfilterBy(const Particles & particles, const Cut & c)
Particlesselect(const Particles & particles, const Cut & c)
New alias for ifilter_select.
Particlesfilter_select(const Particles & particles, const Cut & c, Particles & out)
Filter a particle collection in-place to the subset that passes the supplied Cut.
ParticlesfilterBy(const Particles & particles, const Cut & c, Particles & out)
Particlesselect(const Particles & particles, const Cut & c, Particles & out)
New alias for ifilter_select.
Particles &ifilter_discard(Particles & particles, const Cut & c)
Filter a particle collection in-place to the subset that fails the supplied Cut.
Particles &idiscard(Particles & particles, const Cut & c)
New alias for ifilter_discard.
Particlesfilter_discard(const Particles & particles, const Cut & c)
Filter a particle collection in-place to the subset that fails the supplied Cut.
Particlesdiscard(const Particles & particles, const Cut & c)
New alias for filter_discard.
Particlesfilter_discard(const Particles & particles, const Cut & c, Particles & out)
Filter a particle collection in-place to the subset that fails the supplied Cut.
Particlesdiscard(const Particles & particles, const Cut & c, Particles & out)
New alias for filter_discard.
PdgIdPairpids(const ParticlePair & pp)
boolisSame(const Particle & a, const Particle & b)
Check Particle equivalence.
std::mt19937 &rng()
Return a thread-safe random number generator (mainly for internal use)
doublerand01()
Return a uniformly sampled random number between 0 and 1.
doublerandnorm(double loc, double scale)
Return a random number sampled from a Gaussian/normal distribution.
doublerandlognorm(double loc, double scale)
Return a random number sampled from a log-normal distribution.
doublerandcrystalball(double alpha, double n, double mu, double sigma)
Return a random number sampled from a Crystal Ball distribution.
doublepNorm(double x, double mu, double sigma)
Probability density of a Gaussian/normal distribution at x.
doublepCrystalBall(double x, double alpha, double n, double mu, double sigma)
Probability density of a Crystal Ball distribution at x.
Vector3momentum3(const fastjet::PseudoJet & pj)
Make a 3-momentum vector from a FastJet pseudojet.
FourMomentummomentum(const fastjet::PseudoJet & pj)
Make a 4-momentum vector from a FastJet pseudojet.
doublemT2Sq(const FourMomentum & a, const FourMomentum & b, const Vector3 & ptmiss, double invisiblesMass, double invisiblesMass2 =-1)
Compute asymm mT2**2 using the bisection method.
doublemT2Sq(const FourMomentum & a, const FourMomentum & b, const FourMomentum & ptmiss, double invisiblesMass, double invisiblesMass2 =-1)
Override for mT2Sq with FourMomentum ptmiss.
doublemT2(const FourMomentum & a, const FourMomentum & b, const Vector3 & ptmiss, double invisiblesMass, double invisiblesMass2 =-1)
Compute asymm mT2 using the bisection method.
doublemT2(const FourMomentum & a, const FourMomentum & b, const FourMomentum & ptmiss, double invisiblesMass, double invisiblesMass2 =-1)
Override for mT2 with FourMomentum ptmiss.
boolfileexists(const std::string & path)
Convenience function for determining if a filesystem path exists.
map< string, YODA::AnalysisObjectPtr >getRefData(const string & papername)
stringgetDatafilePath(const string & papername)
Get the file system path to the reference file for this paper.
template <typename T >
bool
aocopy(YODA::AnalysisObjectPtr src, YODA::AnalysisObjectPtr dst)
template <typename T >
bool
aocopy(YODA::AnalysisObjectPtr src, YODA::AnalysisObjectPtr dst, double scale)
template <typename T >
bool
aoadd(YODA::AnalysisObjectPtr dst, YODA::AnalysisObjectPtr src, double scale)
boolcopyao(YODA::AnalysisObjectPtr src, YODA::AnalysisObjectPtr dst, double scale =1.0)
booladdaos(YODA::AnalysisObjectPtr dst, YODA::AnalysisObjectPtr src, double scale)
template <typename TPtr >
bool
bookingCompatible(TPtr a, TPtr b)
boolbookingCompatible(CounterPtr a, CounterPtr b)
boolbookingCompatible(YODA::CounterPtr a, YODA::CounterPtr b)
template <typename T ,typename U >
T
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.
intnocase_cmp(const string & s1, const string & s2)
Case-insensitive string comparison function.
boolnocase_equals(const string & s1, const string & s2)
Case-insensitive string equality function.
stringtoLower(const string & s)
Convert a string to lower-case.
stringtoUpper(const string & s)
Convert a string to upper-case.
boolstartsWith(const string & s, const string & start)
Check whether a string start is found at the start of s.
boolendsWith(const string & s, const string & end)
Check whether a string end is found at the end of s.
stringstrcat()
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.
stringjoin(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.
stringjoin(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.
stringlpad(const string & s, size_t width, const string & padchar =” “)
Left-pad the given string s to width width.
stringrpad(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.
stringpathjoin(const vector< string > & paths)
Join several filesystem paths together with the standard ‘:’ delimiter.
stringoperator/(const string & a, const string & b)
Operator for joining strings a and b with filesystem separators.
stringbasename(const string & p)
Get the basename (i.e. terminal file name) from a path p.
stringdirname(const string & p)
Get the dirname (i.e. path to the penultimate directory) from a path p.
stringfile_stem(const string & f)
Get the stem (i.e. part without a file extension) from a filename f.
stringfile_extn(const string & f)
Get the file extension from a filename f.
template <typename CONTAINER >
unsigned int
count(const CONTAINER & c)
Return number of true elements in the container c .
template <typename CONTAINER ,typename FN >
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 >
bool
any(const CONTAINER & c)
Return true if x is true for any x in container c, otherwise false.
template <typename CONTAINER ,typename FN >
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 >
bool
all(const CONTAINER & c)
Return true if x is true for all x in container c, otherwise false.
template <typename CONTAINER ,typename FN >
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 >
bool
none(const CONTAINER & c)
Return true if x is false for all x in container c, otherwise false.
template <typename CONTAINER ,typename FN >
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 >
const CONTAINER2 &
transform(const CONTAINER1 & in, CONTAINER2 & out, const FN & f)
A single-container-arg version of std::transform, aka map.
template <typename CONTAINER1 ,typename T2 >
std::vector< T2 >
transform(const CONTAINER1 & in, const std::function< T2(typename CONTAINER1::value_type)> & f)
template <typename CONTAINER1 ,typename T ,typename FN >
T
accumulate(const CONTAINER1 & in, const T & init, const FN & f)
A single-container-arg version of std::accumulate, aka reduce.
template <typename CONTAINER >
CONTAINER::value_type
sum(const CONTAINER & c)
Generic sum function, adding x for all x in container c.
template <typename CONTAINER ,typename T >
T
sum(const CONTAINER & c, const T & start)
template <typename CONTAINER ,typename FN ,typename T >
T
sum(const CONTAINER & c, const FN & f, const T & start =T())
Generic sum function, adding fn(x) for all x in container c, starting with start.
template <typename CONTAINER ,typename T >
T &
isum(const CONTAINER & c, T & out)
template <typename CONTAINER ,typename FN ,typename T >
T &
isum(const CONTAINER & c, const FN & f, T & out)
template <typename CONTAINER ,typename FN >
CONTAINER &
ifilter_discard(CONTAINER & c, const FN & f)
template <typename CONTAINER ,typename FN >
CONTAINER &
idiscard(CONTAINER & c, const FN & f)
Alias.
template <typename CONTAINER ,typename FN >
CONTAINER
filter_discard(const CONTAINER & c, const FN & f)
template <typename CONTAINER ,typename FN >
CONTAINER &
discard(CONTAINER & c, const FN & f)
Alias.
template <typename CONTAINER ,typename FN >
CONTAINER &
filter_discard(const CONTAINER & c, const FN & f, CONTAINER & out)
template <typename CONTAINER ,typename FN >
CONTAINER &
discard(CONTAINER & c, const FN & f, CONTAINER & out)
Alias.
template <typename CONTAINER ,typename FN >
CONTAINER &
ifilter_select(CONTAINER & c, const FN & f)
template <typename CONTAINER ,typename FN >
CONTAINER &
iselect(CONTAINER & c, const FN & f)
Alias.
template <typename CONTAINER ,typename FN >
CONTAINER
filter_select(const CONTAINER & c, const FN & f)
template <typename CONTAINER ,typename FN >
CONTAINER
select(const CONTAINER & c, const FN & f)
Alias.
template <typename CONTAINER ,typename FN >
CONTAINER &
filter_select(const CONTAINER & c, const FN & f, CONTAINER & out)
template <typename CONTAINER ,typename FN >
CONTAINER &
select(CONTAINER & c, const FN & f, CONTAINER & out)
Alias.
template <typename CONTAINER >
CONTAINER
slice(const CONTAINER & c, int i, int j)
Slice of the container elements cf. Python’s [i:j] syntax.
template <typename CONTAINER >
CONTAINER
slice(const CONTAINER & c, int i)
Tail slice of the container elements cf. Python’s [i:] syntax.
template <typename CONTAINER >
CONTAINER
head(const CONTAINER & c, int n)
Head slice of the n first container elements.
template <typename CONTAINER >
CONTAINER
tail(const CONTAINER & c, int n)
Tail slice of the n last container elements.
doublemin(const vector< double > & in, double errval =DBL_NAN)
Find the minimum value in the vector.
doublemax(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.
intmin(const vector< int > & in, int errval =-1)
Find the minimum value in the vector.
intmax(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 T >
T
getEnvParam(const std::string name, const T & fallback)
Get a parameter from a named environment variable, with automatic type conversion.

Attributes

Name
constexpr doublepi
constexpr doubletwopi
constexpr doublehalfpi
constexpr doublepi2
constexpr doublec_light
constexpr doubledegree
const doublePI
const doubleTWOPI
A pre-defined value of ( 2\pi ).
const doubleHALFPI
A pre-defined value of ( \pi/2 ).
const doubleSQRT2
A pre-defined value of ( \sqrt{2} ).
const doubleSQRTPI
A pre-defined value of ( \sqrt{\pi} ).
const doubleINFF
Pre-defined values of ( \infty ).
const doubleINF
const doubleINFL
constexpr doublemillimeter
constexpr doublemillimeter2
constexpr doublemillimeter3
constexpr doublecentimeter
constexpr doublecentimeter2
constexpr doublecentimeter3
constexpr doublemeter
constexpr doublemeter2
constexpr doublemeter3
constexpr doublemicrometer
constexpr doublenanometer
constexpr doubleangstrom
constexpr doublepicometer
constexpr doublefemtometer
constexpr doubleattometer
constexpr doublefermi
constexpr doublemm
constexpr doublemm2
constexpr doublemm3
constexpr doublecm
constexpr doublecm2
constexpr doublecm3
constexpr doublem
constexpr doublem2
constexpr doublem3
constexpr doublepicobarn
constexpr doublebarn
constexpr doublemillibarn
constexpr doublemicrobarn
constexpr doublenanobarn
constexpr doublefemtobarn
constexpr doubleattobarn
constexpr doublenanosecond
constexpr doublesecond
constexpr doublemillisecond
constexpr doublemicrosecond
constexpr doublepicosecond
constexpr doublens
constexpr doubles
constexpr doublems
constexpr doubleeplus
constexpr doublee_SI
constexpr doublegigaelectronvolt
constexpr doubleelectronvolt
constexpr doublekiloelectronvolt
constexpr doublemegaelectronvolt
constexpr doubleteraelectronvolt
constexpr doublepetaelectronvolt
constexpr doubleeV
constexpr doublekeV
constexpr doubleMeV
constexpr doubleGeV
constexpr doubleTeV
constexpr doublePeV
constexpr doubleeV2
constexpr doublekeV2
constexpr doubleMeV2
constexpr doubleGeV2
constexpr doubleTeV2
constexpr doublePeV2
constexpr doubleDBL_NAN
Convenient const for getting the double NaN value.

Detailed Description

Todo: BinnedHistogram needs to have a list of interbnal members first which then get booked by the analysis. Booking a temporary, and then adding into BinnedHisto is not possible

Types Documentation

enum RangeBoundary

EnumeratorValueDescription
OPEN=0
SOFT=0
CLOSED=1
HARD=1

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

typedef FourVectors

typedef std::vector<FourVector> Rivet::FourVectors;

Typedefs for lists of vector types

typedef FourMomenta

typedef std::vector<FourMomentum> Rivet::FourMomenta;

typedef JetSmearFn

typedef function<Jet(const Jet&)> Rivet::JetSmearFn;

Typedef for Jet smearing functions/functors.

typedef JetEffFn

typedef function<double(const Jet&)> Rivet::JetEffFn;

Typedef for Jet efficiency functions/functors.

using jetEffFilter

using Rivet::jetEffFilter = typedef JetEffFilter;

typedef P4SmearFn

typedef std::function<FourMomentum(const FourMomentum&)> Rivet::P4SmearFn;

Typedef for FourMomentum smearing functions/functors.

typedef P4EffFn

typedef std::function<double(const FourMomentum&)> Rivet::P4EffFn;

Typedef for FourMomentum efficiency functions/functors.

typedef ParticleSmearFn

typedef function<Particle(const Particle&)> Rivet::ParticleSmearFn;

Typedef for Particle smearing functions/functors.

typedef ParticleEffFn

typedef function<double(const Particle&)> Rivet::ParticleEffFn;

Typedef for Particle efficiency functions/functors.

using particleEffFilter

using Rivet::particleEffFilter = typedef ParticleEffFilter;

typedef strings

typedef vector<std::string> Rivet::strings;

typedef doubles

typedef vector<double> Rivet::doubles;

typedef floats

typedef vector<float> Rivet::floats;

typedef ints

typedef vector<int> Rivet::ints;

enum Sign

EnumeratorValueDescription
MINUS-1
ZERO0
PLUS1

Enum for signs of numbers.

enum RapScheme

EnumeratorValueDescription
PSEUDORAPIDITY0
ETARAP0
RAPIDITY1
YRAP1

Enum for rapidity variable to be used in calculating ( R ), applying rapidity cuts, etc.

enum PhiMapping

EnumeratorValueDescription
MINUSPI_PLUSPI
ZERO_2PI
ZERO_PI

Enum for range of ( \phi ) to be mapped into.

typedef AnaHandle

typedef std::shared_ptr<Analysis> Rivet::AnaHandle;

typedef Matrix4

typedef Matrix<4> Rivet::Matrix4;

typedef TwoVector

typedef Vector2 Rivet::TwoVector;

typedef V2

typedef Vector2 Rivet::V2;

typedef ThreeVector

typedef Vector3 Rivet::ThreeVector;

typedef V3

typedef Vector3 Rivet::V3;

typedef P3

typedef ThreeMomentum Rivet::P3;

typedef Vector4

typedef FourVector Rivet::Vector4;

typedef V4

typedef FourVector Rivet::V4;

typedef P4

typedef FourMomentum Rivet::P4;

typedef ParticlePair

typedef std::pair<Particle, Particle> Rivet::ParticlePair;

Typedef for a pair of Particle objects.

typedef ProjHandle

typedef std::shared_ptr<const Projection> Rivet::ProjHandle;

Typedef for Projection (smart) pointer.

using DirectFinalState

using Rivet::DirectFinalState = typedef PromptFinalState;

Alias with a more correct name.

typedef MixEvent

typedef pair<Particles, double> Rivet::MixEvent;

typedef MixMap

typedef map<double, std::deque<MixEvent> > Rivet::MixMap;

using IndirectFinalState

using Rivet::IndirectFinalState = typedef NonPromptFinalState;

Alias with a more correct name.

using JetAlg

using Rivet::JetAlg = typedef JetFinder;

Deprecated:

Use the JetFinder name; JetAlg will be removed and used as a jet-measure enum in future

Backward-compatibility typedef

using MissingMom

using Rivet::MissingMom = typedef MissingMomentum;

A slightly more convenient name, following other Rivet shortening-conventions.

using Taus

using Rivet::Taus = typedef TauFinder;

Todo: Make this the canonical name in future

using UnstableFinalState

using Rivet::UnstableFinalState = typedef UnstableParticles;

using PCmp

using Rivet::PCmp = typedef Cmp<Projection>;

Typedef for Cmp

typedef Exception

typedef Error Rivet::Exception;

Rivet::Exception is a synonym for Rivet::Error.

using JetSelector

using Rivet::JetSelector = typedef function<bool(const Jet&)>;

std::function instantiation for functors taking a Jet and returning a bool

using JetSorter

using Rivet::JetSorter = typedef function<bool(const Jet&, const Jet&)>;

std::function instantiation for functors taking two Jets and returning a bool

using hasBTag

using Rivet::hasBTag = typedef HasBTag;

using hasCTag

using Rivet::hasCTag = typedef HasCTag;

using hasTauTag

using Rivet::hasTauTag = typedef HasTauTag;

using hasNoTag

using Rivet::hasNoTag = typedef HasNoTag;

using ParticleBaseSelector

using Rivet::ParticleBaseSelector = typedef function<bool(const ParticleBase&)>;

std::function instantiation for functors taking a ParticleBase and returning a bool

using ParticleBaseSorter

using Rivet::ParticleBaseSorter = typedef function<bool(const ParticleBase&, const ParticleBase&)>;

std::function instantiation for functors taking two ParticleBase and returning a bool

using pTGtr

using Rivet::pTGtr = typedef PtGtr;

using ptGtr

using Rivet::ptGtr = typedef PtGtr;

using pTLess

using Rivet::pTLess = typedef PtLess;

using ptLess

using Rivet::ptLess = typedef PtLess;

using pTInRange

using Rivet::pTInRange = typedef PtInRange;

using ptInRange

using Rivet::ptInRange = typedef PtInRange;

using etaGtr

using Rivet::etaGtr = typedef EtaGtr;

using etaLess

using Rivet::etaLess = typedef EtaLess;

using etaInRange

using Rivet::etaInRange = typedef EtaInRange;

using absEtaGtr

using Rivet::absEtaGtr = typedef AbsEtaGtr;

using absetaGtr

using Rivet::absetaGtr = typedef AbsEtaGtr;

using absEtaLess

using Rivet::absEtaLess = typedef AbsEtaLess;

using absetaLess

using Rivet::absetaLess = typedef AbsEtaLess;

using absEtaInRange

using Rivet::absEtaInRange = typedef AbsEtaInRange;

using absetaInRange

using Rivet::absetaInRange = typedef AbsEtaInRange;

using rapGtr

using Rivet::rapGtr = typedef RapGtr;

using rapLess

using Rivet::rapLess = typedef RapLess;

using rapInRange

using Rivet::rapInRange = typedef RapInRange;

using absRapGtr

using Rivet::absRapGtr = typedef AbsRapGtr;

using absrapGtr

using Rivet::absrapGtr = typedef AbsRapGtr;

using absRapLess

using Rivet::absRapLess = typedef AbsRapLess;

using absrapLess

using Rivet::absrapLess = typedef AbsRapLess;

using absRapInRange

using Rivet::absRapInRange = typedef AbsRapInRange;

using absrapInRange

using Rivet::absrapInRange = typedef AbsRapInRange;

using deltaRGtr

using Rivet::deltaRGtr = typedef DeltaRGtr;

using deltaRLess

using Rivet::deltaRLess = typedef DeltaRLess;

using deltaRInRange

using Rivet::deltaRInRange = typedef DeltaRInRange;

using deltaPhiGtr

using Rivet::deltaPhiGtr = typedef DeltaPhiGtr;

using deltaPhiLess

using Rivet::deltaPhiLess = typedef DeltaPhiLess;

using deltaPhiInRange

using Rivet::deltaPhiInRange = typedef DeltaPhiInRange;

using deltaEtaGtr

using Rivet::deltaEtaGtr = typedef DeltaEtaGtr;

using deltaEtaLess

using Rivet::deltaEtaLess = typedef DeltaEtaLess;

using deltaEtaInRange

using Rivet::deltaEtaInRange = typedef DeltaEtaInRange;

using deltaRapGtr

using Rivet::deltaRapGtr = typedef DeltaRapGtr;

using deltaRapLess

using Rivet::deltaRapLess = typedef DeltaRapLess;

using deltaRapInRange

using Rivet::deltaRapInRange = typedef DeltaRapInRange;

using deltaRWRT

using Rivet::deltaRWRT = typedef DeltaRWRT;

using deltaPhiWRT

using Rivet::deltaPhiWRT = typedef DeltaPhiWRT;

using deltaEtaWRT

using Rivet::deltaEtaWRT = typedef DeltaEtaWRT;

using absDeltaEtaWRT

using Rivet::absDeltaEtaWRT = typedef AbsDeltaEtaWRT;

using deltaRapWRT

using Rivet::deltaRapWRT = typedef DeltaRapWRT;

using absDeltaRapWRT

using Rivet::absDeltaRapWRT = typedef AbsDeltaRapWRT;

using hasPID

using Rivet::hasPID = typedef HasPID;

using hasAbsPID

using Rivet::hasAbsPID = typedef HasAbsPID;

using firstParticleWith

using Rivet::firstParticleWith = typedef FirstParticleWith;

using firstParticleWithout

using Rivet::firstParticleWithout = typedef FirstParticleWithout;

using lastParticleWith

using Rivet::lastParticleWith = typedef LastParticleWith;

using lastParticleWithout

using Rivet::lastParticleWithout = typedef LastParticleWithout;

using hasParticleAncestorWith

using Rivet::hasParticleAncestorWith = typedef HasParticleAncestorWith;

using hasParticleAncestorWithout

using Rivet::hasParticleAncestorWithout = typedef HasParticleAncestorWithout;

using hasParticleParentWith

using Rivet::hasParticleParentWith = typedef HasParticleParentWith;

using hasParticleParentWithout

using Rivet::hasParticleParentWithout = typedef HasParticleParentWithout;

using hasParticleChildWith

using Rivet::hasParticleChildWith = typedef HasParticleChildWith;

using hasParticleChildWithout

using Rivet::hasParticleChildWithout = typedef HasParticleChildWithout;

using hasParticleDescendantWith

using Rivet::hasParticleDescendantWith = typedef HasParticleDescendantWith;

using hasParticleDescendantWithout

using Rivet::hasParticleDescendantWithout = typedef HasParticleDescendantWithout;

typedef PseudoJets

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

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

Typedef for a collection of PseudoJet objects.

typedef ConstGenParticlePtr

typedef const HepMC::GenParticle* Rivet::ConstGenParticlePtr;

typedef ConstGenVertexPtr

typedef const HepMC::GenVertex* Rivet::ConstGenVertexPtr;

typedef ConstGenHeavyIonPtr

typedef const HepMC::HeavyIon* Rivet::ConstGenHeavyIonPtr;

using HepMC_IO_type

using Rivet::HepMC_IO_type = typedef HepMC::IO_GenEvent;

using PdfInfo

using Rivet::PdfInfo = typedef RivetHepMC::PdfInfo;

using ConstGenEventPtr

using Rivet::ConstGenEventPtr = typedef std::shared_ptr<const GenEvent>;

using Weight

using Rivet::Weight = typedef double;

Typedef for weights.

using Fill

template <class T >
using Rivet::Fill = typedef pair<typename T::FillType, Weight>;

A single fill is a (FillType, Weight) pair.

using Fills

template <class T >
using Rivet::Fills = typedef multiset<Fill<T> >;

Todo: Why a set rather than a vector? Efficiency???

A set of several fill objects.

using MultiweightAOPtr

using Rivet::MultiweightAOPtr = typedef rivet_shared_ptr<MultiweightAOWrapper>;

using Histo1DPtr

using Rivet::Histo1DPtr = typedef rivet_shared_ptr<Wrapper<YODA::Histo1D> >;

using Histo2DPtr

using Rivet::Histo2DPtr = typedef rivet_shared_ptr<Wrapper<YODA::Histo2D> >;

using Profile1DPtr

using Rivet::Profile1DPtr = typedef rivet_shared_ptr<Wrapper<YODA::Profile1D> >;

using Profile2DPtr

using Rivet::Profile2DPtr = typedef rivet_shared_ptr<Wrapper<YODA::Profile2D> >;

using CounterPtr

using Rivet::CounterPtr = typedef rivet_shared_ptr<Wrapper<YODA::Counter> >;

using Scatter1DPtr

using Rivet::Scatter1DPtr = typedef rivet_shared_ptr<Wrapper<YODA::Scatter1D> >;

using Scatter2DPtr

using Rivet::Scatter2DPtr = typedef rivet_shared_ptr<Wrapper<YODA::Scatter2D> >;

using Scatter3DPtr

using Rivet::Scatter3DPtr = typedef rivet_shared_ptr<Wrapper<YODA::Scatter3D> >;

Functions Documentation

function inRange

template <typename N1 ,
typename N2 ,
typename N3 >
inline std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type 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.

Interval boundary types are defined by lowbound and highbound.

function fuzzyInRange

template <typename N1 ,
typename N2 ,
typename N3 >
inline std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type 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.

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

function inRange

template <typename N1 ,
typename N2 ,
typename N3 >
inline std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type 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.

function in_range

template <typename N1 ,
typename N2 ,
typename N3 >
inline std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type in_range(
    N1 val,
    N2 low,
    N3 high
)

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.

function in_closed_range

template <typename N1 ,
typename N2 ,
typename N3 >
inline std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type in_closed_range(
    N1 val,
    N2 low,
    N3 high
)

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

Note: The interval is closed at both ends.

function in_open_range

template <typename N1 ,
typename N2 ,
typename N3 >
inline std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type in_open_range(
    N1 val,
    N2 low,
    N3 high
)

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

Note: The interval is open at both ends.

function JET_EFF_ZERO

inline double JET_EFF_ZERO(
    const Jet & p
)

Take a jet and return a constant 0.

function JET_EFF_0

inline double JET_EFF_0(
    const Jet & p
)

Alias for JET_EFF_ZERO.

function JET_FN0

inline double JET_FN0(
    const Jet & p
)

Alias for JET_EFF_ZERO.

function JET_EFF_ONE

inline double JET_EFF_ONE(
    const Jet & p
)

Take a jet and return a constant 1.

function JET_EFF_1

inline double JET_EFF_1(
    const Jet & p
)

Alias for JET_EFF_ONE.

function JET_EFF_PERFECT

inline double JET_EFF_PERFECT(
    const Jet & 
)

Alias for JET_EFF_ONE.

function JET_FN1

inline double JET_FN1(
    const Jet & 
)

Alias for JET_EFF_ONE.

function JET_BTAG_PERFECT

inline double JET_BTAG_PERFECT(
    const Jet & j
)

Return 1 if the given Jet contains a b, otherwise 0.

Todo: Need to be able to pass a tag pT threshold? -> functor struct

function JET_CTAG_PERFECT

inline double JET_CTAG_PERFECT(
    const Jet & j
)

Return 1 if the given Jet contains a c, otherwise 0.

Todo: Need to be able to pass a tag pT threshold? -> functor struct

function JET_TAUTAG_PERFECT

inline double JET_TAUTAG_PERFECT(
    const Jet & j
)

Return 1 if the given Jet contains a c, otherwise 0.

Todo: Need to be able to pass a tag pT threshold? -> functor struct

function JET_SMEAR_IDENTITY

inline Jet JET_SMEAR_IDENTITY(
    const Jet & j
)

Todo: Modify constituent particle vectors for consistency

Set a null PseudoJet if the Jet is smeared?

Take a jet and return an unmodified copy

function JET_SMEAR_PERFECT

inline Jet JET_SMEAR_PERFECT(
    const Jet & j
)

Alias for JET_SMEAR_IDENTITY.

function efffilt

template <typename FN >
inline bool efffilt(
    const Jet & j,
    FN & feff
)

Return true if Jet_j_ is chosen to survive a random efficiency selection.

function P4_EFF_ZERO

inline double P4_EFF_ZERO(
    const FourMomentum & 
)

Take a FourMomentum and return 0.

function P4_FN0

inline double P4_FN0(
    const FourMomentum & 
)

Deprecated:

Alias for P4_EFF_ZERO

function P4_EFF_ONE

inline double P4_EFF_ONE(
    const FourMomentum & 
)

Take a FourMomentum and return 1.

function P4_FN1

inline double P4_FN1(
    const FourMomentum & 
)

Deprecated:

Alias for P4_EFF_ONE

function P4_SMEAR_IDENTITY

inline FourMomentum P4_SMEAR_IDENTITY(
    const FourMomentum & p
)

Take a FourMomentum and return it unmodified.

function P4_SMEAR_PERFECT

inline FourMomentum P4_SMEAR_PERFECT(
    const FourMomentum & p
)

Alias for P4_SMEAR_IDENTITY.

function P4_SMEAR_E_GAUSS

inline FourMomentum P4_SMEAR_E_GAUSS(
    const FourMomentum & p,
    double resolution
)

Todo: Also make jet versions that update/smear constituents?

Smear a FourMomentum’s energy using a Gaussian of absolute width resolution

function P4_SMEAR_PT_GAUSS

inline FourMomentum P4_SMEAR_PT_GAUSS(
    const FourMomentum & p,
    double resolution
)

Smear a FourMomentum’s transverse momentum using a Gaussian of absolute width resolution.

function P4_SMEAR_MASS_GAUSS

inline FourMomentum P4_SMEAR_MASS_GAUSS(
    const FourMomentum & p,
    double resolution
)

Smear a FourMomentum’s mass using a Gaussian of absolute width resolution.

function PARTICLE_EFF_ZERO

inline double PARTICLE_EFF_ZERO(
    const Particle & 
)

Take a Particle and return 0.

function PARTICLE_EFF_0

inline double PARTICLE_EFF_0(
    const Particle & 
)

Alias for PARTICLE_EFF_ZERO.

function PARTICLE_FN0

inline double PARTICLE_FN0(
    const Particle & 
)

Alias for PARTICLE_EFF_ZERO.

function PARTICLE_EFF_ONE

inline double PARTICLE_EFF_ONE(
    const Particle & 
)

Take a Particle and return 1.

function PARTICLE_EFF_1

inline double PARTICLE_EFF_1(
    const Particle & 
)

Alias for PARTICLE_EFF_ONE.

function PARTICLE_EFF_PERFECT

inline double PARTICLE_EFF_PERFECT(
    const Particle & 
)

Alias for PARTICLE_EFF_ONE.

function PARTICLE_FN1

inline double PARTICLE_FN1(
    const Particle & 
)

Alias for PARTICLE_EFF_ONE.

function PARTICLE_SMEAR_IDENTITY

inline Particle PARTICLE_SMEAR_IDENTITY(
    const Particle & p
)

Take a Particle and return it unmodified.

function PARTICLE_SMEAR_PERFECT

inline Particle PARTICLE_SMEAR_PERFECT(
    const Particle & p
)

Alias for PARTICLE_SMEAR_IDENTITY.

function efffilt

inline bool efffilt(
    const Particle & p,
    const ParticleEffFn & feff
)

Return true if Particle_p_ is chosen to survive a random efficiency selection.

function operator«

std::ostream & operator<<(
    std::ostream & os,
    const Jet & j
)

Allow a Jet to be passed to an ostream.

function operator«

std::ostream & operator<<(
    std::ostream & os,
    const Particle & p
)

Allow a Particle to be passed to an ostream.

function operator«

std::ostream & operator<<(
    std::ostream & os,
    const ParticlePair & pp
)

Allow ParticlePair to be passed to an ostream.

function isZero

template <typename NUM >
inline std::enable_if< std::is_floating_point< NUM >::value, bool >::type isZero(
    NUM val,
    double tolerance =1e-8
)

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.

function isZero

template <typename NUM >
inline std::enable_if< std::is_integral< NUM >::value, bool >::type isZero(
    NUM val,
    double  =1e-5
)

Compare a number to zero.

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

function isNaN

template <typename NUM >
inline std::enable_if< std::is_floating_point< NUM >::value, bool >::type isNaN(
    NUM val
)

Check if a number is NaN.

function notNaN

template <typename NUM >
inline std::enable_if< std::is_floating_point< NUM >::value, bool >::type notNaN(
    NUM val
)

Check if a number is non-NaN.

function fuzzyEquals

template <typename N1 ,
typename N2 >
inline std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&(std::is_floating_point< N1 >::value||std::is_floating_point< N2 >::value), bool >::type fuzzyEquals(
    N1 a,
    N2 b,
    double tolerance =1e-5
)

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.

function fuzzyEquals

template <typename N1 ,
typename N2 >
inline std::enable_if< std::is_integral< N1 >::value &&std::is_integral< N2 >::value, bool >::type fuzzyEquals(
    N1 a,
    N2 b,
    double 
)

Compare two numbers for equality with a degree of fuzziness.

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

function fuzzyGtrEquals

template <typename N1 ,
typename N2 >
inline std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value, bool >::type fuzzyGtrEquals(
    N1 a,
    N2 b,
    double tolerance =1e-5
)

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

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

function fuzzyLessEquals

template <typename N1 ,
typename N2 >
inline std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value, bool >::type fuzzyLessEquals(
    N1 a,
    N2 b,
    double tolerance =1e-5
)

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

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

function min

template <typename N1 ,
typename N2 >
inline std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value, typenamestd::common_type< N1, N2 >::type >::type min(
    N1 a,
    N2 b
)

Get the minimum of two numbers.

function max

template <typename N1 ,
typename N2 >
inline std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value, typenamestd::common_type< N1, N2 >::type >::type max(
    N1 a,
    N2 b
)

Get the maximum of two numbers.

function sqr

template <typename NUM >
inline std::enable_if< std::is_arithmetic< NUM >::value, NUM >::type sqr(
    NUM a
)

Named number-type squaring operation.

function add_quad

template <typename NUM >
inline std::enable_if< std::is_arithmetic< NUM >::value, NUM >::type add_quad(
    NUM a,
    NUM b
)

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.

function add_quad

template <typename NUM >
inline std::enable_if< std::is_arithmetic< NUM >::value, NUM >::type add_quad(
    NUM a,
    NUM b,
    NUM c
)

Note: Result has the sqrt operation applied.

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

Named number-type addition in quadrature operation.

function safediv

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

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

Return a/b, or fail if b = 0

function intpow

template <typename NUM >
inline std::enable_if< std::is_arithmetic< NUM >::value, NUM >::type intpow(
    NUM val,
    unsigned int exp
)

A more efficient version of pow for raising numbers to integer powers.

function sign

template <typename NUM >
inline std::enable_if< std::is_arithmetic< NUM >::value, int >::type sign(
    NUM val
)

Find the sign of a number.

function cdfBW

inline double cdfBW(
    double x,
    double mu,
    double gamma
)

CDF for the Breit-Wigner distribution.

function invcdfBW

inline double invcdfBW(
    double p,
    double mu,
    double gamma
)

Inverse CDF for the Breit-Wigner distribution.

function linspace

inline 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.

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

Todo: Import the YODA version rather than maintain this parallel version?

function aspace

inline 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.

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

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.

function logspace

inline 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.

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: Import the YODA version rather than maintain this parallel version?

function bwspace

inline vector< double > bwspace(
    size_t nbins,
    double start,
    double end,
    double mu,
    double gamma
)

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 “normal” space.

Todo: pdfspace()… from YODA?

function binIndex

template <typename NUM1 ,
typename NUM2 >
inline std::enable_if< std::is_arithmetic< NUM1 >::value &&std::is_arithmetic< NUM2 >::value, int >::type 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.

Note: The binedges vector must be sorted

Todo: Use std::common_type<NUM1, NUM2>::type x = val; ?

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.

function binIndex

template <typename NUM ,
typename CONTAINER >
inline std::enable_if< std::is_arithmetic< NUM >::value &&std::is_arithmetic< typenameCONTAINER::value_type >::value, int >::type 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.

Note: The binedges vector must be sorted

Todo: Use std::common_type<NUM1, NUM2>::type x = val; ?

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.

function median

template <typename NUM >
inline std::enable_if< std::is_arithmetic< NUM >::value, NUM >::type median(
    const vector< NUM > & sample
)

Todo: Support multiple container types via SFINAE

Calculate the median of a sample

function mean

template <typename NUM >
inline std::enable_if< std::is_arithmetic< NUM >::value, double >::type mean(
    const vector< NUM > & sample
)

Todo: Support multiple container types via SFINAE

Calculate the mean of a sample

function mean_err

template <typename NUM >
inline std::enable_if< std::is_arithmetic< NUM >::value, double >::type mean_err(
    const vector< NUM > & sample
)

Todo: Support multiple container types via SFINAE

function covariance

template <typename NUM >
inline std::enable_if< std::is_arithmetic< NUM >::value, double >::type covariance(
    const vector< NUM > & sample1,
    const vector< NUM > & sample2
)

Todo: Support multiple container types via SFINAE

Calculate the covariance (variance) between two samples

function covariance_err

template <typename NUM >
inline std::enable_if< std::is_arithmetic< NUM >::value, double >::type covariance_err(
    const vector< NUM > & sample1,
    const vector< NUM > & sample2
)

Todo: Support multiple container types via SFINAE

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

function correlation

template <typename NUM >
inline std::enable_if< std::is_arithmetic< NUM >::value, double >::type correlation(
    const vector< NUM > & sample1,
    const vector< NUM > & sample2
)

Todo: Support multiple container types via SFINAE

Calculate the correlation strength between two samples

function correlation_err

template <typename NUM >
inline std::enable_if< std::is_arithmetic< NUM >::value, double >::type correlation_err(
    const vector< NUM > & sample1,
    const vector< NUM > & sample2
)

Todo: Support multiple container types via SFINAE

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

function mapAngleMPiToPi

inline double mapAngleMPiToPi(
    double angle
)

Map an angle into the range (-PI, PI].

function mapAngle0To2Pi

inline double mapAngle0To2Pi(
    double angle
)

Map an angle into the range [0, 2PI).

function mapAngle0ToPi

inline double mapAngle0ToPi(
    double angle
)

Map an angle into the range [0, PI].

function mapAngle

inline double mapAngle(
    double angle,
    PhiMapping mapping
)

Map an angle into the enum-specified range.

function deltaPhi

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

Calculate the difference between two angles in radians.

Returns in the range [0, PI].

function deltaEta

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

Note: Just a cosmetic name for analysis code clarity.

Calculate the abs difference between two pseudorapidities

function deltaRap

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

Note: Just a cosmetic name for analysis code clarity.

Calculate the abs difference between two rapidities

function deltaR2

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

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

function deltaR

inline double deltaR(
    double rap1,
    double phi1,
    double rap2,
    double phi2
)

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

function rapidity

inline double rapidity(
    double E,
    double pz
)

Calculate a rapidity value from the supplied energy E and longitudinal momentum pz.

function mT

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

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

Calculate transverse mass of two vectors from provided pT and deltaPhi

function deltaR2

inline double deltaR2(
    const FourVector & 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. 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.

function deltaR

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

Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two four-vectors.

There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter. Use of this scheme option is discouraged in this case since RAPIDITY is only a valid option for vectors whose type is really the FourMomentum derived class.

function deltaR2

inline 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.

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.

function deltaR

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

Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two four-vectors.

There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter.

function deltaR2

inline 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.

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.

function deltaR

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

Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two four-vectors.

There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter.

function deltaR2

inline double deltaR2(
    const FourMomentum & a,
    const FourMomentum & 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.

function deltaR

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

Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two four-vectors.

There is a scheme ambiguity for momentum-type four vectors as to whether the pseudorapidity (a purely geometric concept) or the rapidity (a relativistic energy-momentum quantity) is to be used: this can be chosen via the optional scheme parameter.

function deltaR2

inline 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.

function deltaR

inline 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.

function deltaR2

inline 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.

function deltaR

inline 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.

function deltaR2

inline 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.

function deltaR

inline 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.

function deltaR2

inline 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.

function deltaR

inline 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.

function deltaR2

inline double deltaR2(
    const FourMomentum & a,
    const Vector3 & b
)

Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between a three-vector and a four-vector.

function deltaR

inline double deltaR(
    const FourMomentum & a,
    const Vector3 & b
)

Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between a three-vector and a four-vector.

function deltaR2

inline double deltaR2(
    const Vector3 & a,
    const FourMomentum & b
)

Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between a three-vector and a four-vector.

function deltaR

inline double deltaR(
    const Vector3 & a,
    const FourMomentum & b
)

Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between a three-vector and a four-vector.

function deltaR2

inline double deltaR2(
    const FourVector & a,
    const Vector3 & b
)

Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between a three-vector and a four-vector.

function deltaR

inline double deltaR(
    const FourVector & a,
    const Vector3 & b
)

Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between a three-vector and a four-vector.

function deltaR2

inline double deltaR2(
    const Vector3 & a,
    const FourVector & b
)

Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between a three-vector and a four-vector.

function deltaR

inline double deltaR(
    const Vector3 & a,
    const FourVector & b
)

Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between a three-vector and a four-vector.

function deltaPhi

inline double deltaPhi(
    const FourMomentum & a,
    const FourMomentum & b,
    bool sign =false
)

Calculate the difference in azimuthal angle between two vectors.

function deltaPhi

inline double deltaPhi(
    const FourMomentum & v,
    double phi2,
    bool sign =false
)

Calculate the difference in azimuthal angle between two vectors.

function deltaPhi

inline double deltaPhi(
    double phi1,
    const FourMomentum & v,
    bool sign =false
)

Calculate the difference in azimuthal angle between two vectors.

function deltaPhi

inline double deltaPhi(
    const FourVector & a,
    const FourVector & b,
    bool sign =false
)

Calculate the difference in azimuthal angle between two vectors.

function deltaPhi

inline double deltaPhi(
    const FourVector & v,
    double phi2,
    bool sign =false
)

Calculate the difference in azimuthal angle between two vectors.

function deltaPhi

inline double deltaPhi(
    double phi1,
    const FourVector & v,
    bool sign =false
)

Calculate the difference in azimuthal angle between two vectors.

function deltaPhi

inline double deltaPhi(
    const FourVector & a,
    const FourMomentum & b,
    bool sign =false
)

Calculate the difference in azimuthal angle between two vectors.

function deltaPhi

inline double deltaPhi(
    const FourMomentum & a,
    const FourVector & b,
    bool sign =false
)

Calculate the difference in azimuthal angle between two vectors.

function deltaPhi

inline double deltaPhi(
    const FourVector & a,
    const Vector3 & b,
    bool sign =false
)

Calculate the difference in azimuthal angle between two vectors.

function deltaPhi

inline double deltaPhi(
    const Vector3 & a,
    const FourVector & b,
    bool sign =false
)

Calculate the difference in azimuthal angle between two vectors.

function deltaPhi

inline double deltaPhi(
    const FourMomentum & a,
    const Vector3 & b,
    bool sign =false
)

Calculate the difference in azimuthal angle between two vectors.

function deltaPhi

inline double deltaPhi(
    const Vector3 & a,
    const FourMomentum & b,
    bool sign =false
)

Calculate the difference in azimuthal angle between two vectors.

function deltaEta

inline double deltaEta(
    const FourMomentum & a,
    const FourMomentum & b,
    bool sign =false
)

Calculate the difference in pseudorapidity between two vectors.

function deltaEta

inline double deltaEta(
    const FourMomentum & v,
    double eta2,
    bool sign =false
)

Calculate the difference in pseudorapidity between two vectors.

function deltaEta

inline double deltaEta(
    double eta1,
    const FourMomentum & v,
    bool sign =false
)

Calculate the difference in pseudorapidity between two vectors.

function deltaEta

inline double deltaEta(
    const FourVector & a,
    const FourVector & b,
    bool sign =false
)

Calculate the difference in pseudorapidity between two vectors.

function deltaEta

inline double deltaEta(
    const FourVector & v,
    double eta2,
    bool sign =false
)

Calculate the difference in pseudorapidity between two vectors.

function deltaEta

inline double deltaEta(
    double eta1,
    const FourVector & v,
    bool sign =false
)

Calculate the difference in pseudorapidity between two vectors.

function deltaEta

inline double deltaEta(
    const FourVector & a,
    const FourMomentum & b,
    bool sign =false
)

Calculate the difference in pseudorapidity between two vectors.

function deltaEta

inline double deltaEta(
    const FourMomentum & a,
    const FourVector & b,
    bool sign =false
)

Calculate the difference in pseudorapidity between two vectors.

function deltaEta

inline double deltaEta(
    const FourVector & a,
    const Vector3 & b,
    bool sign =false
)

Calculate the difference in pseudorapidity between two vectors.

function deltaEta

inline double deltaEta(
    const Vector3 & a,
    const FourVector & b,
    bool sign =false
)

Calculate the difference in pseudorapidity between two vectors.

function deltaEta

inline double deltaEta(
    const FourMomentum & a,
    const Vector3 & b,
    bool sign =false
)

Calculate the difference in pseudorapidity between two vectors.

function deltaEta

inline double deltaEta(
    const Vector3 & a,
    const FourMomentum & b,
    bool sign =false
)

Calculate the difference in pseudorapidity between two vectors.

function deltaRap

inline double deltaRap(
    const FourMomentum & a,
    const FourMomentum & b,
    bool sign =false
)

Calculate the difference in rapidity between two 4-momentum vectors.

function deltaRap

inline double deltaRap(
    const FourMomentum & v,
    double y2,
    bool sign =false
)

Calculate the difference in rapidity between two 4-momentum vectors.

function deltaRap

inline double deltaRap(
    double y1,
    const FourMomentum & v,
    bool sign =false
)

Calculate the difference in rapidity between two 4-momentum vectors.

function cmpMomByPt

inline bool cmpMomByPt(
    const FourMomentum & a,
    const FourMomentum & b
)

Comparison to give a sorting by decreasing pT.

function cmpMomByAscPt

inline bool cmpMomByAscPt(
    const FourMomentum & a,
    const FourMomentum & b
)

Comparison to give a sorting by increasing pT.

function cmpMomByP

inline bool cmpMomByP(
    const FourMomentum & a,
    const FourMomentum & b
)

Comparison to give a sorting by decreasing 3-momentum magnitude |p|.

function cmpMomByAscP

inline bool cmpMomByAscP(
    const FourMomentum & a,
    const FourMomentum & b
)

Comparison to give a sorting by increasing 3-momentum magnitude |p|.

function cmpMomByEt

inline bool cmpMomByEt(
    const FourMomentum & a,
    const FourMomentum & b
)

Comparison to give a sorting by decreasing transverse energy.

function cmpMomByAscEt

inline bool cmpMomByAscEt(
    const FourMomentum & a,
    const FourMomentum & b
)

Comparison to give a sorting by increasing transverse energy.

function cmpMomByE

inline bool cmpMomByE(
    const FourMomentum & a,
    const FourMomentum & b
)

Comparison to give a sorting by decreasing energy.

function cmpMomByAscE

inline bool cmpMomByAscE(
    const FourMomentum & a,
    const FourMomentum & b
)

Comparison to give a sorting by increasing energy.

function cmpMomByMass

inline bool cmpMomByMass(
    const FourMomentum & a,
    const FourMomentum & b
)

Comparison to give a sorting by decreasing mass.

function cmpMomByAscMass

inline bool cmpMomByAscMass(
    const FourMomentum & a,
    const FourMomentum & b
)

Comparison to give a sorting by increasing mass.

function cmpMomByEta

inline bool cmpMomByEta(
    const FourMomentum & a,
    const FourMomentum & b
)

Comparison to give a sorting by increasing eta (pseudorapidity)

function cmpMomByDescEta

inline bool cmpMomByDescEta(
    const FourMomentum & a,
    const FourMomentum & b
)

Comparison to give a sorting by decreasing eta (pseudorapidity)

function cmpMomByAbsEta

inline bool cmpMomByAbsEta(
    const FourMomentum & a,
    const FourMomentum & b
)

Comparison to give a sorting by increasing absolute eta (pseudorapidity)

function cmpMomByDescAbsEta

inline bool cmpMomByDescAbsEta(
    const FourMomentum & a,
    const FourMomentum & b
)

Comparison to give a sorting by increasing absolute eta (pseudorapidity)

function cmpMomByRap

inline bool cmpMomByRap(
    const FourMomentum & a,
    const FourMomentum & b
)

Comparison to give a sorting by increasing rapidity.

function cmpMomByDescRap

inline bool cmpMomByDescRap(
    const FourMomentum & a,
    const FourMomentum & b
)

Comparison to give a sorting by decreasing rapidity.

function cmpMomByAbsRap

inline bool cmpMomByAbsRap(
    const FourMomentum & a,
    const FourMomentum & b
)

Comparison to give a sorting by increasing absolute rapidity.

function cmpMomByDescAbsRap

inline bool cmpMomByDescAbsRap(
    const FourMomentum & a,
    const FourMomentum & b
)

Comparison to give a sorting by decreasing absolute rapidity.

function isortBy

template <typename MOMS ,
typename CMP >
inline MOMS & isortBy(
    MOMS & pbs,
    const CMP & cmp
)

Sort a container of momenta by cmp and return by reference for non-const inputs.

Todo: Add sorting by phi [0..2PI]

function sortBy

template <typename MOMS ,
typename CMP >
inline MOMS sortBy(
    const MOMS & pbs,
    const CMP & cmp
)

Sort a container of momenta by cmp and return by value for const inputs.

function isortByPt

template <typename MOMS >
inline MOMS & isortByPt(
    MOMS & pbs
)

Sort a container of momenta by pT (decreasing) and return by reference for non-const inputs.

function sortByPt

template <typename MOMS >
inline MOMS sortByPt(
    const MOMS & pbs
)

Sort a container of momenta by pT (decreasing) and return by value for const inputs.

function isortByE

template <typename MOMS >
inline MOMS & isortByE(
    MOMS & pbs
)

Sort a container of momenta by E (decreasing) and return by reference for non-const inputs.

function sortByE

template <typename MOMS >
inline MOMS sortByE(
    const MOMS & pbs
)

Sort a container of momenta by E (decreasing) and return by value for const inputs.

function isortByEt

template <typename MOMS >
inline MOMS & isortByEt(
    MOMS & pbs
)

Sort a container of momenta by Et (decreasing) and return by reference for non-const inputs.

function sortByEt

template <typename MOMS >
inline MOMS sortByEt(
    const MOMS & pbs
)

Sort a container of momenta by Et (decreasing) and return by value for const inputs.

function toString

template <size_t N>
inline const string toString(
    const Vector< N > & v
)

Make string representation.

function operator«

template <size_t N>
inline std::ostream & operator<<(
    std::ostream & out,
    const Vector< N > & v
)

Stream out string representation.

function fuzzyEquals

template <size_t N>
inline bool fuzzyEquals(
    const Vector< N > & va,
    const Vector< N > & vb,
    double tolerance =1E-5
)

Compare two vectors by index, allowing for numerical precision.

function isZero

template <size_t N>
inline bool isZero(
    const Vector< N > & v,
    double tolerance =1E-5
)

External form of numerically safe nullness check.

function deltaR

inline double deltaR(
    const ParticleBase & p1,
    const ParticleBase & p2,
    RapScheme scheme =PSEUDORAPIDITY
)

function deltaR

inline double deltaR(
    const ParticleBase & p,
    const FourMomentum & v,
    RapScheme scheme =PSEUDORAPIDITY
)

function deltaR

inline double deltaR(
    const ParticleBase & p,
    const FourVector & v,
    RapScheme scheme =PSEUDORAPIDITY
)

function deltaR

inline double deltaR(
    const ParticleBase & p,
    const Vector3 & v
)

function deltaR

inline double deltaR(
    const ParticleBase & p,
    double eta,
    double phi
)

function deltaR

inline double deltaR(
    const FourMomentum & v,
    const ParticleBase & p,
    RapScheme scheme =PSEUDORAPIDITY
)

function deltaR

inline double deltaR(
    const FourVector & v,
    const ParticleBase & p,
    RapScheme scheme =PSEUDORAPIDITY
)

function deltaR

inline double deltaR(
    const Vector3 & v,
    const ParticleBase & p
)

function deltaR

inline double deltaR(
    double eta,
    double phi,
    const ParticleBase & p
)

function deltaPhi

inline double deltaPhi(
    const ParticleBase & p1,
    const ParticleBase & p2,
    bool sign =false
)

function deltaPhi

inline double deltaPhi(
    const ParticleBase & p,
    const FourMomentum & v,
    bool sign =false
)

function deltaPhi

inline double deltaPhi(
    const ParticleBase & p,
    const FourVector & v,
    bool sign =false
)

function deltaPhi

inline double deltaPhi(
    const ParticleBase & p,
    const Vector3 & v,
    bool sign =false
)

function deltaPhi

inline double deltaPhi(
    const ParticleBase & p,
    double phi,
    bool sign =false
)

function deltaPhi

inline double deltaPhi(
    const FourMomentum & v,
    const ParticleBase & p,
    bool sign =false
)

function deltaPhi

inline double deltaPhi(
    const FourVector & v,
    const ParticleBase & p,
    bool sign =false
)

function deltaPhi

inline double deltaPhi(
    const Vector3 & v,
    const ParticleBase & p,
    bool sign =false
)

function deltaPhi

inline double deltaPhi(
    double phi,
    const ParticleBase & p,
    bool sign =false
)

function deltaEta

inline double deltaEta(
    const ParticleBase & p1,
    const ParticleBase & p2
)

function deltaEta

inline double deltaEta(
    const ParticleBase & p,
    const FourMomentum & v
)

function deltaEta

inline double deltaEta(
    const ParticleBase & p,
    const FourVector & v
)

function deltaEta

inline double deltaEta(
    const ParticleBase & p,
    const Vector3 & v
)

function deltaEta

inline double deltaEta(
    const ParticleBase & p,
    double eta
)

function deltaEta

inline double deltaEta(
    const FourMomentum & v,
    const ParticleBase & p
)

function deltaEta

inline double deltaEta(
    const FourVector & v,
    const ParticleBase & p
)

function deltaEta

inline double deltaEta(
    const Vector3 & v,
    const ParticleBase & p
)

function deltaEta

inline double deltaEta(
    double eta,
    const ParticleBase & p
)

function deltaRap

inline double deltaRap(
    const ParticleBase & p1,
    const ParticleBase & p2
)

function deltaRap

inline double deltaRap(
    const ParticleBase & p,
    const FourMomentum & v
)

function deltaRap

inline double deltaRap(
    const ParticleBase & p,
    double y
)

function deltaRap

inline double deltaRap(
    const FourMomentum & v,
    const ParticleBase & p
)

function deltaRap

inline double deltaRap(
    double y,
    const ParticleBase & p
)

function beams

ParticlePair beams(
    const Event & e
)

Get beam particles from an event.

function beamIds

inline PdgIdPair beamIds(
    const ParticlePair & beams
)

Deprecated:

Use pids(beams)

Get beam particle IDs from a pair of Particles

function beamIds

inline PdgIdPair beamIds(
    const Event & e
)

Deprecated:

Use pids(e.beams())

Get beam particle IDs from an event

function sqrtS

double sqrtS(
    const FourMomentum & pa,
    const FourMomentum & pb
)

Get beam centre-of-mass energy from a pair of beam momenta.

function sqrtS

inline double sqrtS(
    const ParticlePair & beams
)

Get beam centre-of-mass energy from a pair of Particles.

function sqrtS

inline double sqrtS(
    const Event & e
)

Get beam centre-of-mass energy from an Event.

function asqrtS

double asqrtS(
    const FourMomentum & pa,
    const FourMomentum & pb
)

Note: Uses a nominal nucleon mass of 0.939 GeV to convert masses to A

Get per-nucleon beam centre-of-mass energy from a pair of beam momenta

function asqrtS

double asqrtS(
    const ParticlePair & beams
)

Note: Uses the sum of nuclear mass numbers A for each beam

Get per-nucleon beam centre-of-mass energy from a pair of Particles

function asqrtS

inline double asqrtS(
    const Event & e
)

Note: Uses the sum of nuclear mass numbers A for each beam

Get per-nucleon beam centre-of-mass energy from an Event

function cmsBoostVec

inline 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.

function cmsBoostVec

inline FourMomentum cmsBoostVec(
    const ParticlePair & beams
)

Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of Particles.

function acmsBoostVec

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.

function acmsBoostVec

FourMomentum acmsBoostVec(
    const ParticlePair & beams
)

Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of Particles.

function cmsBetaVec

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.

function cmsBetaVec

inline Vector3 cmsBetaVec(
    const ParticlePair & beams
)

Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of Particles.

function acmsBetaVec

Vector3 acmsBetaVec(
    const FourMomentum & pa,
    const FourMomentum & pb
)

Note: Uses a nominal nucleon mass of 0.939 GeV to convert masses to A

Get the Lorentz boost to the per-nucleon beam centre-of-mass system (ACMS) from a pair of beam momenta

function acmsBetaVec

Vector3 acmsBetaVec(
    const ParticlePair & beams
)

Note: Uses the sum of nuclear mass numbers A for each beam

Get the Lorentz boost to the per-nucleon beam centre-of-mass system (ACMS) from a pair of Particles

function cmsGammaVec

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.

function cmsGammaVec

inline Vector3 cmsGammaVec(
    const ParticlePair & beams
)

Get the Lorentz boost to the beam centre-of-mass system (CMS) from a pair of Particles.

function acmsGammaVec

Vector3 acmsGammaVec(
    const FourMomentum & pa,
    const FourMomentum & pb
)

Note: Uses a nominal nucleon mass of 0.939 GeV to convert masses to A

Get the Lorentz boost to the per-nucleon beam centre-of-mass system (ACMS) from a pair of beam momenta

function acmsGammaVec

Vector3 acmsGammaVec(
    const ParticlePair & beams
)

Note: Uses the sum of nuclear mass numbers A for each beam

Get the Lorentz boost to the per-nucleon beam centre-of-mass system (ACMS) from a pair of Particles

function cmsTransform

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.

function cmsTransform

inline LorentzTransform cmsTransform(
    const ParticlePair & beams
)

Get the Lorentz transformation to the beam centre-of-mass system (CMS) from a pair of Particles.

function acmsTransform

LorentzTransform acmsTransform(
    const FourMomentum & pa,
    const FourMomentum & pb
)

Note: Uses a nominal nucleon mass of 0.939 GeV to convert masses to A

Get the Lorentz transformation to the per-nucleon beam centre-of-mass system (CMS) from a pair of beam momenta

function acmsTransform

LorentzTransform acmsTransform(
    const ParticlePair & beams
)

Note: Uses the sum of nuclear mass numbers A for each beam

Get the Lorentz transformation to the per-nucleon beam centre-of-mass system (CMS) from a pair of Particles

function operator,

Cut operator,(
    const Cut & ,
    const Cut & 
) =delete

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

function operator,

Cut & operator,(
    Cut & ,
    Cut & 
) =delete

function operator,

Cut operator,(
    Cut ,
    Cut 
) =delete

function operator==

Cut operator==(
    Cuts::Quantity ,
    double 
)

function operator!=

Cut operator!=(
    Cuts::Quantity ,
    double 
)

function operator<

Cut operator<(
    Cuts::Quantity ,
    double 
)

function operator>

Cut operator>(
    Cuts::Quantity ,
    double 
)

function operator<=

Cut operator<=(
    Cuts::Quantity ,
    double 
)

function operator>=

Cut operator>=(
    Cuts::Quantity ,
    double 
)

function operator==

inline Cut operator==(
    Cuts::Quantity qty,
    int i
)

function operator!=

inline Cut operator!=(
    Cuts::Quantity qty,
    int i
)

function operator<

inline Cut operator<(
    Cuts::Quantity qty,
    int i
)

function operator>

inline Cut operator>(
    Cuts::Quantity qty,
    int i
)

function operator<=

inline Cut operator<=(
    Cuts::Quantity qty,
    int i
)

function operator>=

inline Cut operator>=(
    Cuts::Quantity qty,
    int i
)

function operator&&

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

Note: No comparison short-circuiting for overloaded &&!

Logical AND operation on two cuts

function operator||

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

Note: No comparison short-circuiting for overloaded ||!

Logical OR operation on two cuts

function operator!

Cut operator!(
    const Cut & cptr
)

Logical NOT operation on a cut.

function operator&

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

Logical AND operation on two cuts.

function operator|

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

Logical OR operation on two cuts.

function operator~

Cut operator~(
    const Cut & cptr
)

Logical NOT operation on a cut.

function operator^

Cut operator^(
    const Cut & aptr,
    const Cut & bptr
)

Logical XOR operation on two cuts.

function operator«

inline std::ostream & operator<<(
    std::ostream & os,
    const Cut & cptr
)

String representation.

function divide

template <typename T >
Percentile< typename ReferenceTraits< T >::RefT > divide(
    const Percentile< T > numer,
    const Percentile< T > denom
)

function divide

template <typename T >
Percentile< typename ReferenceTraits< T >::RefT > divide(
    const Percentile< T > numer,
    const Percentile< typename ReferenceTraits< T >::RefT > denom
)

function divide

template <typename T >
Percentile< typename ReferenceTraits< T >::RefT > divide(
    const Percentile< typename ReferenceTraits< T >::RefT > numer,
    const Percentile< T > denom
)

function add

template <typename T >
Percentile< T > add(
    const Percentile< T > pctla,
    const Percentile< T > pctlb
)

function add

template <typename T >
Percentile< typename ReferenceTraits< T >::RefT > add(
    const Percentile< T > pctla,
    const Percentile< typename ReferenceTraits< T >::RefT > pctlb
)

function add

template <typename T >
Percentile< typename ReferenceTraits< T >::RefT > add(
    const Percentile< typename ReferenceTraits< T >::RefT > pctla,
    const Percentile< T > pctlb
)

function subtract

template <typename T >
Percentile< T > subtract(
    const Percentile< T > pctla,
    const Percentile< T > pctlb
)

function subtract

template <typename T >
Percentile< typename ReferenceTraits< T >::RefT > subtract(
    const Percentile< T > pctla,
    const Percentile< typename ReferenceTraits< T >::RefT > pctlb
)

function subtract

template <typename T >
Percentile< typename ReferenceTraits< T >::RefT > subtract(
    const Percentile< typename ReferenceTraits< T >::RefT > pctla,
    const Percentile< T > pctlb
)

function multiply

template <typename T >
Percentile< typename ReferenceTraits< T >::RefT > multiply(
    const Percentile< T > pctla,
    const Percentile< typename ReferenceTraits< T >::RefT > pctlb
)

function multiply

template <typename T >
Percentile< typename ReferenceTraits< T >::RefT > multiply(
    const Percentile< typename ReferenceTraits< T >::RefT > pctla,
    const Percentile< T > pctlb
)

function divide

template <typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > divide(
    const PercentileXaxis< T > numer,
    const PercentileXaxis< T > denom
)

function divide

template <typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > divide(
    const PercentileXaxis< T > numer,
    const PercentileXaxis< typename ReferenceTraits< T >::RefT > denom
)

function divide

template <typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > divide(
    const PercentileXaxis< typename ReferenceTraits< T >::RefT > numer,
    const PercentileXaxis< T > denom
)

function add

template <typename T >
PercentileXaxis< T > add(
    const PercentileXaxis< T > pctla,
    const PercentileXaxis< T > pctlb
)

function add

template <typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > add(
    const PercentileXaxis< T > pctla,
    const PercentileXaxis< typename ReferenceTraits< T >::RefT > pctlb
)

function add

template <typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > add(
    const PercentileXaxis< typename ReferenceTraits< T >::RefT > pctla,
    const PercentileXaxis< T > pctlb
)

function subtract

template <typename T >
PercentileXaxis< T > subtract(
    const PercentileXaxis< T > pctla,
    const PercentileXaxis< T > pctlb
)

function subtract

template <typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > subtract(
    const PercentileXaxis< T > pctla,
    const PercentileXaxis< typename ReferenceTraits< T >::RefT > pctlb
)

function subtract

template <typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > subtract(
    const PercentileXaxis< typename ReferenceTraits< T >::RefT > pctla,
    const PercentileXaxis< T > pctlb
)

function multiply

template <typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > multiply(
    const PercentileXaxis< T > pctla,
    const PercentileXaxis< typename ReferenceTraits< T >::RefT > pctlb
)

function multiply

template <typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > multiply(
    const PercentileXaxis< typename ReferenceTraits< T >::RefT > pctla,
    const PercentileXaxis< T > pctlb
)

function operator+

template <typename T >
Percentile< T > operator+(
    const Percentile< T > pctla,
    const Percentile< T > pctlb
)

function operator-

template <typename T >
Percentile< T > operator-(
    const Percentile< T > pctla,
    const Percentile< T > pctlb
)

function operator/

template <typename T >
Percentile< typename ReferenceTraits< T >::RefT > operator/(
    const Percentile< T > numer,
    const Percentile< T > denom
)

function operator+

template <typename T >
PercentileXaxis< T > operator+(
    const PercentileXaxis< T > pctla,
    const PercentileXaxis< T > pctlb
)

function operator-

template <typename T >
PercentileXaxis< T > operator-(
    const PercentileXaxis< T > pctla,
    const PercentileXaxis< T > pctlb
)

function operator/

template <typename T >
PercentileXaxis< typename ReferenceTraits< T >::RefT > operator/(
    const PercentileXaxis< T > numer,
    const PercentileXaxis< T > denom
)

function getLibPath

std::string getLibPath()

Get library install path.

function getDataPath

std::string getDataPath()

Get data install path.

function getRivetDataPath

std::string getRivetDataPath()

Get Rivet data install path.

function getAnalysisLibPaths

std::vector< std::string > getAnalysisLibPaths()

Get Rivet analysis plugin library search paths.

function setAnalysisLibPaths

void setAnalysisLibPaths(
    const std::vector< std::string > & paths
)

Set the Rivet analysis plugin library search paths.

function addAnalysisLibPath

void addAnalysisLibPath(
    const std::string & extrapath
)

Add a Rivet analysis plugin library search path.

function findAnalysisLibFile

std::string findAnalysisLibFile(
    const std::string & filename
)

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

Note: If none found, returns an empty string

function getAnalysisDataPaths

std::vector< std::string > getAnalysisDataPaths()

Get Rivet analysis reference data search paths.

function setAnalysisDataPaths

void setAnalysisDataPaths(
    const std::vector< std::string > & paths
)

Set the Rivet data file search paths.

function addAnalysisDataPath

void addAnalysisDataPath(
    const std::string & extrapath
)

Add a Rivet data file search path.

function findAnalysisDataFile

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.

Note: If none found, returns an empty string

function getAnalysisRefPaths

std::vector< std::string > getAnalysisRefPaths()

Get Rivet analysis reference data search paths.

function findAnalysisRefFile

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.

Note: If none found, returns an empty string

function getAnalysisInfoPaths

std::vector< std::string > getAnalysisInfoPaths()

Get Rivet analysis info metadata search paths.

function findAnalysisInfoFile

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.

Note: If none found, returns an empty string

function getAnalysisPlotPaths

std::vector< std::string > getAnalysisPlotPaths()

Get Rivet analysis plot style search paths.

function findAnalysisPlotFile

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.

Note: If none found, returns an empty string

function operator«

template <typename T >
inline std::ostream & operator<<(
    std::ostream & os,
    const std::vector< T > & vec
)

Convenient function for streaming out vectors of any streamable object.

function operator«

template <typename T >
inline std::ostream & operator<<(
    std::ostream & os,
    const std::list< T > & vec
)

Convenient function for streaming out lists of any streamable object.

function contains

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

Does s contain sub as a substring?

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

function contains

template <typename T >
inline bool contains(
    const std::initializer_list< T > & il,
    const T & x
)

Does the init list il contain x?

function contains

template <typename T >
inline bool contains(
    const std::vector< T > & v,
    const T & x
)

Does the vector v contain x?

function contains

template <typename T >
inline bool contains(
    const std::list< T > & l,
    const T & x
)

Does the list l contain x?

function contains

template <typename T >
inline bool contains(
    const std::set< T > & s,
    const T & x
)

Does the set s contain x?

function has_key

template <typename K ,
typename T >
inline bool has_key(
    const std::map< K, T > & m,
    const K & key
)

Does the map m contain the key key?

function has_value

template <typename K ,
typename T >
inline bool has_value(
    const std::map< K, T > & m,
    const T & val
)

Does the map m contain the value val?

function toString

std::string toString(
    const AnalysisInfo & ai
)

String representation.

function operator«

inline std::ostream & operator<<(
    std::ostream & os,
    const AnalysisInfo & ai
)

Stream an AnalysisInfo as a text description.

function operator+

Jets operator+(
    const Jets & a,
    const Jets & b
)

function inverse

inline LorentzTransform inverse(
    const LorentzTransform & lt
)

function combine

inline LorentzTransform combine(
    const LorentzTransform & a,
    const LorentzTransform & b
)

function transform

inline FourVector transform(
    const LorentzTransform & lt,
    const FourVector & v4
)

function toString

inline string toString(
    const LorentzTransform & lt
)

function operator«

inline std::ostream & operator<<(
    std::ostream & out,
    const LorentzTransform & lt
)

function diagonalize

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

function toString

template <size_t N>
inline const string toString(
    const typename EigenSystem< N >::EigenPair & e
)

function operator«

template <size_t N>
inline ostream & operator<<(
    std::ostream & out,
    const typename EigenSystem< N >::EigenPair & e
)

function multiply

template <size_t N>
inline Matrix< N > multiply(
    const Matrix< N > & a,
    const Matrix< N > & b
)

function divide

template <size_t N>
inline Matrix< N > divide(
    const Matrix< N > & m,
    const double a
)

function operator*

template <size_t N>
inline Matrix< N > operator*(
    const Matrix< N > & a,
    const Matrix< N > & b
)

function add

template <size_t N>
inline Matrix< N > add(
    const Matrix< N > & a,
    const Matrix< N > & b
)

function subtract

template <size_t N>
inline Matrix< N > subtract(
    const Matrix< N > & a,
    const Matrix< N > & b
)

function operator+

template <size_t N>
inline Matrix< N > operator+(
    const Matrix< N > a,
    const Matrix< N > & b
)

function operator-

template <size_t N>
inline Matrix< N > operator-(
    const Matrix< N > a,
    const Matrix< N > & b
)

function multiply

template <size_t N>
inline Matrix< N > multiply(
    const double a,
    const Matrix< N > & m
)

function multiply

template <size_t N>
inline Matrix< N > multiply(
    const Matrix< N > & m,
    const double a
)

function operator*

template <size_t N>
inline Matrix< N > operator*(
    const double a,
    const Matrix< N > & m
)

function operator*

template <size_t N>
inline Matrix< N > operator*(
    const Matrix< N > & m,
    const double a
)

function multiply

template <size_t N>
inline Vector< N > multiply(
    const Matrix< N > & a,
    const Vector< N > & b
)

function operator*

template <size_t N>
inline Vector< N > operator*(
    const Matrix< N > & a,
    const Vector< N > & b
)

function transpose

template <size_t N>
inline Matrix< N > transpose(
    const Matrix< N > & m
)

function inverse

template <size_t N>
inline Matrix< N > inverse(
    const Matrix< N > & m
)

function det

template <size_t N>
inline double det(
    const Matrix< N > & m
)

function trace

template <size_t N>
inline double trace(
    const Matrix< N > & m
)

function toString

template <size_t N>
inline string toString(
    const Matrix< N > & m
)

Make string representation.

function operator«

template <size_t N>
inline std::ostream & operator<<(
    std::ostream & out,
    const Matrix< N > & m
)

Stream out string representation.

function fuzzyEquals

template <size_t N>
inline bool fuzzyEquals(
    const Matrix< N > & ma,
    const Matrix< N > & mb,
    double tolerance =1E-5
)

Compare two matrices by index, allowing for numerical precision.

function isZero

template <size_t N>
inline bool isZero(
    const Matrix< N > & m,
    double tolerance =1E-5
)

External form of numerically safe nullness check.

function multiply

inline Vector2 multiply(
    const double a,
    const Vector2 & v
)

function multiply

inline Vector2 multiply(
    const Vector2 & v,
    const double a
)

function add

inline Vector2 add(
    const Vector2 & a,
    const Vector2 & b
)

function operator*

inline Vector2 operator*(
    const double a,
    const Vector2 & v
)

function operator*

inline Vector2 operator*(
    const Vector2 & v,
    const double a
)

function operator/

inline Vector2 operator/(
    const Vector2 & v,
    const double a
)

function operator+

inline Vector2 operator+(
    const Vector2 & a,
    const Vector2 & b
)

function operator-

inline Vector2 operator-(
    const Vector2 & a,
    const Vector2 & b
)

function dot

inline double dot(
    const Vector2 & a,
    const Vector2 & b
)

function subtract

inline Vector2 subtract(
    const Vector2 & a,
    const Vector2 & b
)

function angle

inline double angle(
    const Vector2 & a,
    const Vector2 & b
)

Angle (in radians) between two 2-vectors.

function multiply

inline Vector3 multiply(
    const double a,
    const Vector3 & v
)

Unbound scalar-product function.

function multiply

inline Vector3 multiply(
    const Vector3 & v,
    const double a
)

Unbound scalar-product function.

function add

inline Vector3 add(
    const Vector3 & a,
    const Vector3 & b
)

Unbound vector addition function.

function operator*

inline Vector3 operator*(
    const double a,
    const Vector3 & v
)

Unbound scalar multiplication operator.

function operator*

inline Vector3 operator*(
    const Vector3 & v,
    const double a
)

Unbound scalar multiplication operator.

function operator/

inline Vector3 operator/(
    const Vector3 & v,
    const double a
)

Unbound scalar division operator.

function operator+

inline Vector3 operator+(
    const Vector3 & a,
    const Vector3 & b
)

Unbound vector addition operator.

function operator-

inline Vector3 operator-(
    const Vector3 & a,
    const Vector3 & b
)

Unbound vector subtraction operator.

function multiply

inline ThreeMomentum multiply(
    const double a,
    const ThreeMomentum & v
)

function multiply

inline ThreeMomentum multiply(
    const ThreeMomentum & v,
    const double a
)

function add

inline ThreeMomentum add(
    const ThreeMomentum & a,
    const ThreeMomentum & b
)

function operator*

inline ThreeMomentum operator*(
    const double a,
    const ThreeMomentum & v
)

function operator*

inline ThreeMomentum operator*(
    const ThreeMomentum & v,
    const double a
)

function operator/

inline ThreeMomentum operator/(
    const ThreeMomentum & v,
    const double a
)

function operator+

inline ThreeMomentum operator+(
    const ThreeMomentum & a,
    const ThreeMomentum & b
)

function operator-

inline ThreeMomentum operator-(
    const ThreeMomentum & a,
    const ThreeMomentum & b
)

function dot

inline double dot(
    const Vector3 & a,
    const Vector3 & b
)

Unbound dot-product function.

function cross

inline Vector3 cross(
    const Vector3 & a,
    const Vector3 & b
)

Unbound cross-product function.

function subtract

inline Vector3 subtract(
    const Vector3 & a,
    const Vector3 & b
)

Unbound vector subtraction function.

function angle

inline double angle(
    const Vector3 & a,
    const Vector3 & b
)

Angle (in radians) between two 3-vectors.

function deltaEta

inline double deltaEta(
    const Vector3 & a,
    const Vector3 & b,
    bool sign =false
)

Calculate the difference in pseudorapidity between two spatial vectors.

function deltaEta

inline double deltaEta(
    const Vector3 & v,
    double eta2,
    bool sign =false
)

Calculate the difference in pseudorapidity between two spatial vectors.

function deltaEta

inline double deltaEta(
    double eta1,
    const Vector3 & v,
    bool sign =false
)

Calculate the difference in pseudorapidity between two spatial vectors.

function deltaPhi

inline double deltaPhi(
    const Vector3 & a,
    const Vector3 & b,
    bool sign =false
)

Calculate the difference in azimuthal angle between two spatial vectors.

function deltaPhi

inline double deltaPhi(
    const Vector3 & v,
    double phi2,
    bool sign =false
)

Calculate the difference in azimuthal angle between two spatial vectors.

function deltaPhi

inline double deltaPhi(
    double phi1,
    const Vector3 & v,
    bool sign =false
)

Calculate the difference in azimuthal angle between two spatial vectors.

function deltaR2

inline double deltaR2(
    const Vector3 & a,
    const Vector3 & b
)

Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two spatial vectors.

function deltaR

inline double deltaR(
    const Vector3 & a,
    const Vector3 & b
)

Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two spatial vectors.

function deltaR2

inline double deltaR2(
    const Vector3 & v,
    double eta2,
    double phi2
)

Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two spatial vectors.

function deltaR

inline double deltaR(
    const Vector3 & v,
    double eta2,
    double phi2
)

Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two spatial vectors.

function deltaR2

inline double deltaR2(
    double eta1,
    double phi1,
    const Vector3 & v
)

Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two spatial vectors.

function deltaR

inline double deltaR(
    double eta1,
    double phi1,
    const Vector3 & v
)

Calculate the 2D rapidity-azimuthal (“eta-phi”) distance between two spatial vectors.

function mT

inline double mT(
    const Vector3 & vis,
    const Vector3 & invis
)

Calculate transverse mass of a visible and an invisible 3-vector.

function contract

inline double contract(
    const FourVector & a,
    const FourVector & b
)

Contract two 4-vectors, with metric signature (+ - - -).

function dot

inline double dot(
    const FourVector & a,
    const FourVector & b
)

Contract two 4-vectors, with metric signature (+ - - -).

function multiply

inline FourVector multiply(
    const double a,
    const FourVector & v
)

function multiply

inline FourVector multiply(
    const FourVector & v,
    const double a
)

function operator*

inline FourVector operator*(
    const double a,
    const FourVector & v
)

function operator*

inline FourVector operator*(
    const FourVector & v,
    const double a
)

function operator/

inline FourVector operator/(
    const FourVector & v,
    const double a
)

function add

inline FourVector add(
    const FourVector & a,
    const FourVector & b
)

function operator+

inline FourVector operator+(
    const FourVector & a,
    const FourVector & b
)

function operator-

inline FourVector operator-(
    const FourVector & a,
    const FourVector & b
)

function invariant

inline double invariant(
    const FourVector & lv
)

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

function angle

inline double angle(
    const FourVector & a,
    const FourVector & b
)

Angle (in radians) between spatial parts of two Lorentz vectors.

function angle

inline double angle(
    const Vector3 & a,
    const FourVector & b
)

Angle (in radians) between spatial parts of two Lorentz vectors.

function angle

inline double angle(
    const FourVector & a,
    const Vector3 & b
)

Angle (in radians) between spatial parts of two Lorentz vectors.

function multiply

inline FourMomentum multiply(
    const double a,
    const FourMomentum & v
)

function multiply

inline FourMomentum multiply(
    const FourMomentum & v,
    const double a
)

function operator*

inline FourMomentum operator*(
    const double a,
    const FourMomentum & v
)

function operator*

inline FourMomentum operator*(
    const FourMomentum & v,
    const double a
)

function operator/

inline FourMomentum operator/(
    const FourMomentum & v,
    const double a
)

function add

inline FourMomentum add(
    const FourMomentum & a,
    const FourMomentum & b
)

function operator+

inline FourMomentum operator+(
    const FourMomentum & a,
    const FourMomentum & b
)

function operator-

inline FourMomentum operator-(
    const FourMomentum & a,
    const FourMomentum & b
)

function mT

inline double mT(
    const FourMomentum & vis,
    const FourMomentum & invis
)

Calculate transverse mass of a visible and an invisible 4-vector.

function mT

inline double mT(
    const FourMomentum & vis,
    const Vector3 & invis
)

Calculate transverse mass of a visible 4-vector and an invisible 3-vector.

function mT

inline double mT(
    const Vector3 & vis,
    const FourMomentum & invis
)

Calculate transverse mass of a visible 4-vector and an invisible 3-vector.

function toString

inline std::string toString(
    const FourVector & lv
)

Render a 4-vector as a string.

function operator«

inline std::ostream & operator<<(
    std::ostream & out,
    const FourVector & lv
)

Write a 4-vector to an ostream.

function operator+

Particles operator+(
    const Particles & a,
    const Particles & b
)

function weighted_shuffle

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

function pxcone_

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
)

function version

std::string version()

A function to get the Rivet version string.

function compatible

inline bool compatible(
    PdgId p,
    PdgId allowed
)

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

function compatible

inline bool compatible(
    const PdgIdPair & pair,
    const PdgIdPair & allowedpair
)

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

function compatible

inline bool compatible(
    const ParticlePair & ppair,
    const PdgIdPair & allowedpair
)

Check particle compatibility of Particle pairs.

function compatible

inline bool compatible(
    const PdgIdPair & allowedpair,
    const ParticlePair & ppair
)

Check particle compatibility of Particle pairs (for symmetric completeness)

function compatible

inline bool compatible(
    const PdgIdPair & pair,
    const set< PdgIdPair > & allowedpairs
)

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

function intersection

inline set< PdgIdPair > intersection(
    const set< PdgIdPair > & a,
    const set< PdgIdPair > & b
)

Return the intersection of two sets of {PdgIdPair}s.

function cmp

template <typename T >
inline Cmp< T > cmp(
    const T & t1,
    const T & t2
)

Global helper function for easy creation of Cmp objects.

function pcmp

inline Cmp< Projection > pcmp(
    const Projection & p1,
    const Projection & p2
)

Global helper function for easy creation of Cmp objects.

function pcmp

inline Cmp< Projection > pcmp(
    const Projection & parent1,
    const Projection & parent2,
    const string & pname
)

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

function pcmp

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

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

function pcmp

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

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

function pcmp

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

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

function operator«

inline std::ostream & operator<<(
    std::ostream & os,
    const Cutflow & cf
)

Print a Cutflow to a stream.

function operator«

inline std::ostream & operator<<(
    std::ostream & os,
    const Cutflows & cfs
)

Print a Cutflows to a stream.

function operator==

inline bool operator==(
    const Cut & a,
    const Cut & b
)

Compare two cuts for equality, forwards to the cut-specific implementation.

function ELECTRON_RECOEFF_ATLAS_RUN1

inline double ELECTRON_RECOEFF_ATLAS_RUN1(
    const Particle & e
)

Todo: Include reco eff (but no e/y discrimination) in forward region

ATLASRun 1 electron reconstruction efficiency

function ELECTRON_RECOEFF_ATLAS_RUN2

inline double ELECTRON_RECOEFF_ATLAS_RUN2(
    const Particle & e
)

ATLASRun 2 electron reco efficiency

Based on https://arxiv.org/pdf/1902.04655.pdf Fig 2

function ELECTRON_EFF_ATLAS_RUN2_LOOSE

inline double ELECTRON_EFF_ATLAS_RUN2_LOOSE(
    const Particle & e
)

ATLASRun 2 ’loose’ electron reco+identification efficiency.

Todo: What about faking by jets or non-electrons?

Values read from Fig 3 of ATL-PHYS-PUB-2015-041

function ELECTRON_EFF_ATLAS_RUN1_MEDIUM

inline double ELECTRON_EFF_ATLAS_RUN1_MEDIUM(
    const Particle & e
)

ATLASRun 1 ‘medium’ electron reco+identification efficiency.

function ELECTRON_EFF_ATLAS_RUN2_MEDIUM

inline double ELECTRON_EFF_ATLAS_RUN2_MEDIUM(
    const Particle & e
)

ATLASRun 2 ‘medium’ electron reco+identification efficiency.

~1% increase over Run 1 informed by Fig 1 in https://cds.cern.ch/record/2157687/files/ATLAS-CONF-2016-024.pdf

function ELECTRON_EFF_ATLAS_RUN1_TIGHT

inline double ELECTRON_EFF_ATLAS_RUN1_TIGHT(
    const Particle & e
)

ATLASRun 1 ’tight’ electron reco+identification efficiency.

function ELECTRON_EFF_ATLAS_RUN2_TIGHT

inline double ELECTRON_EFF_ATLAS_RUN2_TIGHT(
    const Particle & e
)

ATLASRun 2 ’tight’ electron reco+identification efficiency.

~1% increase over Run 1 informed by Fig 1 in https://cds.cern.ch/record/2157687/files/ATLAS-CONF-2016-024.pdf

function ELECTRON_SMEAR_ATLAS_RUN1

inline Particle ELECTRON_SMEAR_ATLAS_RUN1(
    const Particle & e
)

ATLASRun 1 electron reco smearing.

function ELECTRON_SMEAR_ATLAS_RUN2

inline Particle ELECTRON_SMEAR_ATLAS_RUN2(
    const Particle & e
)

Todo: Currently just a copy of the Run 1 version: fix!

ATLASRun 2 electron reco smearing

function ELECTRON_EFF_CMS_RUN1

inline double ELECTRON_EFF_CMS_RUN1(
    const Particle & e
)

CMS Run 1 electron reconstruction efficiency.

Todo: Add charge flip efficiency?

function ELECTRON_EFF_CMS_RUN2

inline double ELECTRON_EFF_CMS_RUN2(
    const Particle & e
)

Todo: Currently just a copy of Run 1: fix!

CMS Run 2 electron reco efficiency

function ELECTRON_SMEAR_CMS_RUN1

inline Particle ELECTRON_SMEAR_CMS_RUN1(
    const Particle & e
)

CMS electron energy smearing, preserving direction.

Calculate resolution for pT > 0.1 GeV, E resolution = |eta| < 0.5 -> sqrt(0.06^2 + pt^2 * 1.3e-3^2) |eta| < 1.5 -> sqrt(0.10^2 + pt^2 * 1.7e-3^2) |eta| < 2.5 -> sqrt(0.25^2 + pt^2 * 3.1e-3^2)

function ELECTRON_SMEAR_CMS_RUN2

inline Particle ELECTRON_SMEAR_CMS_RUN2(
    const Particle & e
)

Todo: Currently just a copy of the Run 1 version: fix!

CMS Run 2 electron reco smearing

function PHOTON_EFF_ATLAS_RUN1

inline double PHOTON_EFF_ATLAS_RUN1(
    const Particle & y
)

ATLASRun 2 photon reco efficiency.

Taken from converted photons, Fig 8, in arXiv:1606.01813

< TodoAllow electron misID? What about jet misID?

function PHOTON_EFF_ATLAS_RUN2

inline double PHOTON_EFF_ATLAS_RUN2(
    const Particle & y
)

ATLASRun 2 photon reco efficiency.

Taken from converted photons, Fig 6, in ATL-PHYS-PUB-2016-014

< TodoAllow electron misID? What about jet misID?

function PHOTON_EFF_CMS_RUN1

inline double PHOTON_EFF_CMS_RUN1(
    const Particle & y
)

Todo: Currently from Delphes

CMS Run 1 photon reco efficiency

< TodoAllow electron misID? What about jet misID?

function PHOTON_EFF_CMS_RUN2

inline double PHOTON_EFF_CMS_RUN2(
    const Particle & y
)

Todo: Currently just a copy of Run 1: fix!

CMS Run 2 photon reco efficiency

< TodoAllow electron misID? What about jet misID?

function PHOTON_SMEAR_ATLAS_RUN1

inline Particle PHOTON_SMEAR_ATLAS_RUN1(
    const Particle & y
)

Todo: Use real photon smearing

function PHOTON_SMEAR_ATLAS_RUN2

inline Particle PHOTON_SMEAR_ATLAS_RUN2(
    const Particle & y
)

function PHOTON_SMEAR_CMS_RUN1

inline Particle PHOTON_SMEAR_CMS_RUN1(
    const Particle & y
)

function PHOTON_SMEAR_CMS_RUN2

inline Particle PHOTON_SMEAR_CMS_RUN2(
    const Particle & y
)

function MUON_EFF_ATLAS_RUN1

inline double MUON_EFF_ATLAS_RUN1(
    const Particle & m
)

ATLASRun 1 muon reco efficiency.

function MUON_RECOEFF_ATLAS_RUN2

inline double MUON_RECOEFF_ATLAS_RUN2(
    const Particle & m
)

ATLASRun 2 muon reco efficiency

From https://arxiv.org/pdf/1603.05598.pdf , Fig3 top

function MUON_EFF_ATLAS_RUN2

inline double MUON_EFF_ATLAS_RUN2(
    const Particle & m
)

ATLASRun 2 muon reco+ID efficiency.

For medium ID, from Fig 3 of https://cds.cern.ch/record/2047831/files/ATL-PHYS-PUB-2015-037.pdf

function MUON_SMEAR_ATLAS_RUN1

inline Particle MUON_SMEAR_ATLAS_RUN1(
    const Particle & m
)

ATLASRun 1 muon reco smearing.

Todo: Add muon loose/medium/tight ID efficiencies? All around 95-98%… ignore?

function MUON_SMEAR_ATLAS_RUN2

inline Particle MUON_SMEAR_ATLAS_RUN2(
    const Particle & m
)

ATLASRun 2 muon reco smearing From https://arxiv.org/abs/1603.05598 , eq (10) and Fig 12

function MUON_EFF_CMS_RUN1

inline double MUON_EFF_CMS_RUN1(
    const Particle & m
)

CMS Run 1 muon reco efficiency.

function MUON_EFF_CMS_RUN2

inline double MUON_EFF_CMS_RUN2(
    const Particle & m
)

Todo: Currently just a copy of Run 1: fix!

CMS Run 2 muon reco efficiency

function MUON_SMEAR_CMS_RUN1

inline Particle MUON_SMEAR_CMS_RUN1(
    const Particle & m
)

CMS Run 1 muon reco smearing.

function MUON_SMEAR_CMS_RUN2

inline Particle MUON_SMEAR_CMS_RUN2(
    const Particle & m
)

Todo: Currently just a copy of the Run 1 version: fix!

CMS Run 2 muon reco smearing

function TAU_EFF_ATLAS_RUN1

inline double TAU_EFF_ATLAS_RUN1(
    const Particle & t
)

ATLASRun 1 8 TeV tau efficiencies (medium working point)

Taken from http://arxiv.org/pdf/1412.7086.pdf 20-40 GeV 1-prong LMT eff|mis = 0.66|1/10, 0.56|1/20, 0.36|1/80 20-40 GeV 3-prong LMT eff|mis = 0.45|1/60, 0.38|1/100, 0.27|1/300

40 GeV 1-prong LMT eff|mis = 0.66|1/15, 0.56|1/25, 0.36|1/80 40 GeV 3-prong LMT eff|mis = 0.45|1/250, 0.38|1/400, 0.27|1/1300

function TAUJET_EFF_ATLAS_RUN1

inline double TAUJET_EFF_ATLAS_RUN1(
    const Jet & j
)

ATLASRun 1 8 TeV tau misID rates (medium working point)

Taken from http://arxiv.org/pdf/1412.7086.pdf 20-40 GeV 1-prong LMT eff|mis = 0.66|1/10, 0.56|1/20, 0.36|1/80 20-40 GeV 3-prong LMT eff|mis = 0.45|1/60, 0.38|1/100, 0.27|1/300

40 GeV 1-prong LMT eff|mis = 0.66|1/15, 0.56|1/25, 0.36|1/80 40 GeV 3-prong LMT eff|mis = 0.45|1/250, 0.38|1/400, 0.27|1/1300

function TAU_EFF_ATLAS_RUN2

inline double TAU_EFF_ATLAS_RUN2(
    const Particle & t
)

ATLASRun 2 13 TeV tau efficiencies (medium working point)

From https://atlas.web.cern.ch/Atlas/GROUPS/PHYSICS/PUBNOTES/ATL-PHYS-PUB-2015-045/ATL-PHYS-PUB-2015-045.pdf LMT 1 prong efficiency/mistag = 0.6|1/30, 0.55|1/50, 0.45|1/120 LMT 3 prong efficiency/mistag = 0.5|1/30, 0.4|1/110, 0.3|1/300

function TAUJET_EFF_ATLAS_RUN2

inline double TAUJET_EFF_ATLAS_RUN2(
    const Jet & j
)

ATLASRun 2 13 TeV tau misID rate (medium working point)

From https://atlas.web.cern.ch/Atlas/GROUPS/PHYSICS/PUBNOTES/ATL-PHYS-PUB-2015-045/ATL-PHYS-PUB-2015-045.pdf LMT 1 prong efficiency/mistag = 0.6|1/30, 0.55|1/50, 0.45|1/120 LMT 3 prong efficiency/mistag = 0.5|1/30, 0.4|1/110, 0.3|1/300

function TAU_SMEAR_ATLAS_RUN1

inline Particle TAU_SMEAR_ATLAS_RUN1(
    const Particle & t
)

Todo: Currently a copy of the jet smearing

ATLASRun 1 tau smearing

TodoAlso need a JES uncertainty component?

TodoIs this the best way to smear? Should we preserve the energy, or pT, or direction?

function TAU_SMEAR_ATLAS_RUN2

inline Particle TAU_SMEAR_ATLAS_RUN2(
    const Particle & t
)

Todo: Currently a copy of the Run 1 version

ATLASRun 2 tau smearing

function TAU_EFF_CMS_RUN1

inline double TAU_EFF_CMS_RUN1(
    const Particle & t
)

Todo: Needs work; this is just a copy of the Run 2 version in Delphes 3.3.2

CMS Run 1 tau efficiency

function TAU_EFF_CMS_RUN2

inline double TAU_EFF_CMS_RUN2(
    const Particle & t
)

Todo: Needs work; this is the dumb version from Delphes 3.3.2

CMS Run 2 tau efficiency

function TAU_SMEAR_CMS_RUN1

inline Particle TAU_SMEAR_CMS_RUN1(
    const Particle & t
)

Todo: Currently a copy of the crappy ATLAS one

CMS Run 1 tau smearing

function TAU_SMEAR_CMS_RUN2

inline Particle TAU_SMEAR_CMS_RUN2(
    const Particle & t
)

Todo: Currently a copy of the Run 1 version

CMS Run 2 tau smearing

function JET_BTAG_ATLAS_RUN1

inline double JET_BTAG_ATLAS_RUN1(
    const Jet & j
)

Return the ATLASRun 1 jet flavour tagging efficiency for the given Jet, from Delphes.

TodoThis form drops past ~100 GeV, asymptotically to zero efficiency… really?!

function JET_BTAG_ATLAS_RUN2_MV2C20

inline double JET_BTAG_ATLAS_RUN2_MV2C20(
    const Jet & j
)

Return the ATLASRun 2 MC2c20 77% WP jet flavour tagging efficiency for the given Jet.

function JET_BTAG_ATLAS_RUN2_MV2C10

inline double JET_BTAG_ATLAS_RUN2_MV2C10(
    const Jet & j
)

Return the ATLASRun 2 MC2c10 77% WP jet flavour tagging efficiency for the given Jet.

function JET_SMEAR_ATLAS_RUN1

inline Jet JET_SMEAR_ATLAS_RUN1(
    const Jet & j
)

ATLASRun 1 jet smearing.

TodoAlso need a JES uncertainty component?

TodoIs this the best way to smear? Should we preserve the energy, or pT, or direction?

function JET_SMEAR_ATLAS_RUN2

inline Jet JET_SMEAR_ATLAS_RUN2(
    const Jet & j
)

Todo: Just a copy of the Run 1 one: improve!!

ATLASRun 2 jet smearing

function JET_SMEAR_CMS_RUN1

inline Jet JET_SMEAR_CMS_RUN1(
    const Jet & j
)

Todo: Just a copy of the suboptimal ATLAS one: improve!!

CMS Run 2 jet smearing

function JET_SMEAR_CMS_RUN2

inline Jet JET_SMEAR_CMS_RUN2(
    const Jet & j
)

Todo: Just a copy of the suboptimal ATLAS one: improve!!

CMS Run 2 jet smearing

function MET_SMEAR_IDENTITY

inline Vector3 MET_SMEAR_IDENTITY(
    const Vector3 & met,
    double 
)

function MET_SMEAR_ATLAS_RUN1

inline Vector3 MET_SMEAR_ATLAS_RUN1(
    const Vector3 & met,
    double set
)

ATLASRun 1 ETmiss smearing.

Based on https://arxiv.org/pdf/1108.5602v2.pdf, Figs 14 and 15

function MET_SMEAR_ATLAS_RUN2

inline Vector3 MET_SMEAR_ATLAS_RUN2(
    const Vector3 & met,
    double set
)

ATLASRun 2 ETmiss smearing

Based on https://arxiv.org/pdf/1802.08168.pdf, Figs 6-9

TodoAllow smearing function to access the whole event, since Njet also affects? Or assume encoded in SET?

function MET_SMEAR_CMS_RUN1

inline Vector3 MET_SMEAR_CMS_RUN1(
    const Vector3 & met,
    double set
)

CMS Run 1 ETmiss smearing From https://arxiv.org/pdf/1411.0511.pdf Table 2, p16 (Z channels)

function MET_SMEAR_CMS_RUN2

inline Vector3 MET_SMEAR_CMS_RUN2(
    const Vector3 & met,
    double set
)

CMS Run 2 ETmiss smearing From http://inspirehep.net/record/1681214/files/JME-17-001-pas.pdf Table 3, p20

function TRK_EFF_ATLAS_RUN1

inline double TRK_EFF_ATLAS_RUN1(
    const Particle & p
)

ATLASRun 1 tracking efficiency.

function TRK_EFF_ATLAS_RUN2

inline double TRK_EFF_ATLAS_RUN2(
    const Particle & p
)

Todo: Currently just a copy of Run 1: fix!

ATLASRun 2 tracking efficiency

function TRK_EFF_CMS_RUN1

inline double TRK_EFF_CMS_RUN1(
    const Particle & p
)

CMS Run 1 tracking efficiency.

function TRK_EFF_CMS_RUN2

inline double TRK_EFF_CMS_RUN2(
    const Particle & p
)

Todo: Currently just a copy of Run 1: fix!

CMS Run 2 tracking efficiency

function mkPseudoJets

inline PseudoJets mkPseudoJets(
    const Particles & ps
)

function mkPseudoJets

inline PseudoJets mkPseudoJets(
    const Jets & js
)

function mkJets

inline Jets mkJets(
    const PseudoJets & pjs
)

function operator&&

inline BoolJetAND operator&&(
    const JetSelector & a,
    const JetSelector & b
)

Operator syntactic sugar for AND construction.

function operator||

inline BoolJetOR operator||(
    const JetSelector & a,
    const JetSelector & b
)

Operator syntactic sugar for OR construction.

function operator!

inline BoolJetNOT operator!(
    const JetSelector & a
)

Operator syntactic sugar for NOT construction.

function ifilter_select

Jets & ifilter_select(
    Jets & jets,
    const Cut & c
)

Filter a jet collection in-place to the subset that passes the supplied Cut.

function ifilterBy

inline Jets & ifilterBy(
    Jets & jets,
    const Cut & c
)

Deprecated:

Use ifilter_select

Alias for ifilter_select

function iselect

inline Jets & iselect(
    Jets & jets,
    const Cut & c
)

New alias for ifilter_select.

function filter_select

inline Jets filter_select(
    const Jets & jets,
    const Cut & c
)

Filter a jet collection in-place to the subset that passes the supplied Cut.

function filterBy

inline Jets filterBy(
    const Jets & jets,
    const Cut & c
)

Deprecated:

Use filter_select

Alias for filter_select

function select

inline Jets select(
    const Jets & jets,
    const Cut & c
)

New alias for filter_select.

function filter_select

inline Jets filter_select(
    const Jets & jets,
    const Cut & c,
    Jets & out
)

Filter a jet collection in-place to the subset that passes the supplied Cut.

function filterBy

inline Jets filterBy(
    const Jets & jets,
    const Cut & c,
    Jets & out
)

Deprecated:

Use filter_select

Alias for filter_select

function select

inline Jets select(
    const Jets & jets,
    const Cut & c,
    Jets & out
)

New alias for filter_select.

function ifilter_discard

Jets & ifilter_discard(
    Jets & jets,
    const Cut & c
)

Filter a jet collection in-place to the subset that fails the supplied Cut.

function idiscard

inline Jets & idiscard(
    Jets & jets,
    const Cut & c
)

New alias for ifilter_discard.

function filter_discard

inline Jets filter_discard(
    const Jets & jets,
    const Cut & c
)

Filter a jet collection in-place to the subset that fails the supplied Cut.

function discard

inline Jets discard(
    const Jets & jets,
    const Cut & c
)

New alias for filter_discard.

function filter_discard

inline Jets filter_discard(
    const Jets & jets,
    const Cut & c,
    Jets & out
)

Filter a jet collection in-place to the subset that fails the supplied Cut.

function discard

inline Jets discard(
    const Jets & jets,
    const Cut & c,
    Jets & out
)

New alias for filter_discard.

function operator«

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

function P3_EFF_ZERO

inline double P3_EFF_ZERO(
    const Vector3 & p
)

Take a Vector3 and return 0.

function P3_FN0

inline double P3_FN0(
    const Vector3 & p
)

Deprecated:

Alias for P3_EFF_ZERO

function P3_EFF_ONE

inline double P3_EFF_ONE(
    const Vector3 & p
)

Take a Vector3 and return 1.

function P3_FN1

inline double P3_FN1(
    const Vector3 & p
)

Deprecated:

Alias for P3_EFF_ONE

function P3_SMEAR_IDENTITY

inline Vector3 P3_SMEAR_IDENTITY(
    const Vector3 & p
)

Take a Vector3 and return it unmodified.

function P3_SMEAR_PERFECT

inline Vector3 P3_SMEAR_PERFECT(
    const Vector3 & p
)

Alias for P3_SMEAR_IDENTITY.

function P3_SMEAR_LEN_GAUSS

inline Vector3 P3_SMEAR_LEN_GAUSS(
    const Vector3 & p,
    double resolution
)

Smear a Vector3’s length using a Gaussian of absolute width resolution.

function idiscardIfAny

template <typename PBCONTAINER1 ,
typename PBCONTAINER2 >
inline void idiscardIfAny(
    PBCONTAINER1 & tofilter,
    const PBCONTAINER2 & tocompare,
    typename std::function< bool(const typename PBCONTAINER1::value_type &, const typename PBCONTAINER2::value_type &)> fn
)

function discardIfAny

template <typename PBCONTAINER1 ,
typename PBCONTAINER2 >
inline PBCONTAINER1 discardIfAny(
    const PBCONTAINER1 & tofilter,
    const PBCONTAINER2 & tocompare,
    typename std::function< bool(const typename PBCONTAINER1::value_type &, const typename PBCONTAINER2::value_type &)> fn
)

function selectIfAny

template <typename PBCONTAINER1 ,
typename PBCONTAINER2 >
inline PBCONTAINER1 selectIfAny(
    const PBCONTAINER1 & tofilter,
    const PBCONTAINER2 & tocompare,
    typename std::function< bool(const typename PBCONTAINER1::value_type &, const typename PBCONTAINER2::value_type &)> fn
)

function iselectIfAny

template <typename PBCONTAINER1 ,
typename PBCONTAINER2 >
inline void iselectIfAny(
    PBCONTAINER1 & tofilter,
    const PBCONTAINER2 & tocompare,
    typename std::function< bool(const typename PBCONTAINER1::value_type &, const typename PBCONTAINER2::value_type &)> fn
)

function discardIfAll

template <typename PBCONTAINER1 ,
typename PBCONTAINER2 >
inline PBCONTAINER1 discardIfAll(
    const PBCONTAINER1 & tofilter,
    const PBCONTAINER2 & tocompare,
    typename std::function< bool(const typename PBCONTAINER1::value_type &, const typename PBCONTAINER2::value_type &)> fn
)

function idiscardIfAll

template <typename PBCONTAINER1 ,
typename PBCONTAINER2 >
inline void idiscardIfAll(
    PBCONTAINER1 & tofilter,
    const PBCONTAINER2 & tocompare,
    typename std::function< bool(const typename PBCONTAINER1::value_type &, const typename PBCONTAINER2::value_type &)> fn
)

function selectIfAll

template <typename PBCONTAINER1 ,
typename PBCONTAINER2 >
inline PBCONTAINER1 selectIfAll(
    const PBCONTAINER1 & tofilter,
    const PBCONTAINER2 & tocompare,
    typename std::function< bool(const typename PBCONTAINER1::value_type &, const typename PBCONTAINER2::value_type &)> fn
)

function iselectIfAll

template <typename PBCONTAINER1 ,
typename PBCONTAINER2 >
inline void iselectIfAll(
    PBCONTAINER1 & tofilter,
    const PBCONTAINER2 & tocompare,
    typename std::function< bool(const typename PBCONTAINER1::value_type &, const typename PBCONTAINER2::value_type &)> fn
)

function idiscardIfAnyDeltaRLess

template <typename PBCONTAINER1 ,
typename PBCONTAINER2 >
inline void idiscardIfAnyDeltaRLess(
    PBCONTAINER1 & tofilter,
    const PBCONTAINER2 & tocompare,
    double dR
)

function discardIfAnyDeltaRLess

template <typename PBCONTAINER1 ,
typename PBCONTAINER2 >
inline PBCONTAINER1 discardIfAnyDeltaRLess(
    const PBCONTAINER1 & tofilter,
    const PBCONTAINER2 & tocompare,
    double dR
)

function idiscardIfAnyDeltaPhiLess

template <typename PBCONTAINER1 ,
typename PBCONTAINER2 >
inline void idiscardIfAnyDeltaPhiLess(
    PBCONTAINER1 & tofilter,
    const PBCONTAINER2 & tocompare,
    double dphi
)

function discardIfAnyDeltaPhiLess

template <typename PBCONTAINER1 ,
typename PBCONTAINER2 >
inline PBCONTAINER1 discardIfAnyDeltaPhiLess(
    const PBCONTAINER1 & tofilter,
    const PBCONTAINER2 & tocompare,
    double dphi
)

function selectIfAnyDeltaRLess

template <typename PBCONTAINER1 ,
typename PBCONTAINER2 >
inline PBCONTAINER1 selectIfAnyDeltaRLess(
    const PBCONTAINER1 & tofilter,
    const PBCONTAINER2 & tocompare,
    double dR
)

function iselectIfAnyDeltaRLess

template <typename PBCONTAINER1 ,
typename PBCONTAINER2 >
inline void iselectIfAnyDeltaRLess(
    PBCONTAINER1 & tofilter,
    const PBCONTAINER2 & tocompare,
    double dR
)

function selectIfAnyDeltaPhiLess

template <typename PBCONTAINER1 ,
typename PBCONTAINER2 >
inline PBCONTAINER1 selectIfAnyDeltaPhiLess(
    const PBCONTAINER1 & tofilter,
    const PBCONTAINER2 & tocompare,
    double dphi
)

function iselectIfAnyDeltaPhiLess

template <typename PBCONTAINER1 ,
typename PBCONTAINER2 >
inline void iselectIfAnyDeltaPhiLess(
    PBCONTAINER1 & tofilter,
    const PBCONTAINER2 & tocompare,
    double dphi
)

function pid

inline int pid(
    const Particle & p
)

Unbound function access to PID code.

function abspid

inline int abspid(
    const Particle & p
)

Unbound function access to abs PID code.

function isSameSign

inline bool isSameSign(
    const Particle & a,
    const Particle & b
)

function isOppSign

inline bool isOppSign(
    const Particle & a,
    const Particle & b
)

function isSameFlav

inline bool isSameFlav(
    const Particle & a,
    const Particle & b
)

function isOppFlav

inline bool isOppFlav(
    const Particle & a,
    const Particle & b
)

function isOSSF

inline bool isOSSF(
    const Particle & a,
    const Particle & b
)

function isSSSF

inline bool isSSSF(
    const Particle & a,
    const Particle & b
)

function isOSOF

inline bool isOSOF(
    const Particle & a,
    const Particle & b
)

function isSSOF

inline bool isSSOF(
    const Particle & a,
    const Particle & b
)

function oppSign

inline bool oppSign(
    const Particle & a,
    const Particle & b
)

Return true if Particles_a_ and b have the opposite charge sign.

Note: Two neutrals returns false

function sameSign

inline bool sameSign(
    const Particle & a,
    const Particle & b
)

Note: Two neutrals returns true

Return true if Particlesa and b have the same charge sign

function oppCharge

inline bool oppCharge(
    const Particle & a,
    const Particle & b
)

Note: Two neutrals returns false

Return true if Particlesa and b have the exactly opposite charge

function sameCharge

inline bool sameCharge(
    const Particle & a,
    const Particle & b
)

Note: Two neutrals returns true

Return true if Particlesa and b have the same charge (including neutral)

function diffCharge

inline bool diffCharge(
    const Particle & a,
    const Particle & b
)

Return true if Particles_a_ and b have a different (not necessarily opposite) charge.

function isFirstWith

inline bool isFirstWith(
    const Particle & p,
    const ParticleSelector & f
)

Determine whether a particle is the first in a decay chain to meet the function requirement.

function isFirstWithout

inline 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.

function isLastWith

inline bool isLastWith(
    const Particle & p,
    const ParticleSelector & f
)

Determine whether a particle is the last in a decay chain to meet the function requirement.

function isLastWithout

inline 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.

function hasAncestorWith

inline bool hasAncestorWith(
    const Particle & p,
    const ParticleSelector & f,
    bool only_physical =true
)

Determine whether a particle has an ancestor which meets the function requirement.

function hasAncestorWithout

inline 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.

function hasParentWith

inline bool hasParentWith(
    const Particle & p,
    const ParticleSelector & f
)

Determine whether a particle has a parent which meets the function requirement.

function hasParentWithout

inline bool hasParentWithout(
    const Particle & p,
    const ParticleSelector & f
)

Determine whether a particle has a parent which doesn’t meet the function requirement.

function hasChildWith

inline bool hasChildWith(
    const Particle & p,
    const ParticleSelector & f
)

Determine whether a particle has a child which meets the function requirement.

function hasChildWithout

inline bool hasChildWithout(
    const Particle & p,
    const ParticleSelector & f
)

Determine whether a particle has a child which doesn’t meet the function requirement.

function hasDescendantWith

inline bool hasDescendantWith(
    const Particle & p,
    const ParticleSelector & f,
    bool remove_duplicates =true
)

Determine whether a particle has a descendant which meets the function requirement.

function hasDescendantWithout

inline 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.

function hasStableDescendantWith

inline bool hasStableDescendantWith(
    const Particle & p,
    const ParticleSelector & f
)

Determine whether a particle has a stable descendant which meets the function requirement.

function hasStableDescendantWithout

inline bool hasStableDescendantWithout(
    const Particle & p,
    const ParticleSelector & f
)

Determine whether a particle has a stable descendant which doesn’t meet the function requirement.

function isVisible

inline bool isVisible(
    const Particle & p
)

Is this particle potentially visible in a detector?

function isDirect

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

A “direct” particle is one directly connected to the hard process. It is a preferred alias for “prompt”, since it has no confusing implications about distinguishability by timing information.

The boolean arguments allow a decay lepton to be considered direct if its parent was a “real” direct lepton.

function isPrompt

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

The boolean arguments allow a decay lepton to be considered prompt if its parent was a “real” prompt lepton.

function isStable

inline bool isStable(
    const Particle & p
)

Decide if a given particle is stable, via Particle::isStable()

function hasHadronicDecay

inline bool hasHadronicDecay(
    const Particle & p
)

Decide if a given particle decays hadronically.

function hasLeptonicDecay

inline bool hasLeptonicDecay(
    const Particle & p
)

Decide if a given particle decays leptonically (decays, and no hadrons)

function hasAncestor

inline bool hasAncestor(
    const Particle & p,
    PdgId pid
)

Deprecated:

Prefer hasAncestorWith

Check whether a given PID is found in the particle’s ancestor list

function fromBottom

inline bool fromBottom(
    const Particle & p
)

Determine whether the particle is from a b-hadron decay.

function fromCharm

inline bool fromCharm(
    const Particle & p
)

Determine whether the particle is from a c-hadron decay.

function fromHadron

inline bool fromHadron(
    const Particle & p
)

Determine whether the particle is from a hadron decay.

function fromTau

inline bool fromTau(
    const Particle & p,
    bool prompt_taus_only =false
)

Determine whether the particle is from a tau decay.

function fromPromptTau

inline bool fromPromptTau(
    const Particle & p
)

Determine whether the particle is from a prompt tau decay.

function operator&&

inline BoolParticleAND operator&&(
    const ParticleSelector & a,
    const ParticleSelector & b
)

Operator syntactic sugar for AND construction.

function operator||

inline BoolParticleOR operator||(
    const ParticleSelector & a,
    const ParticleSelector & b
)

Operator syntactic sugar for OR construction.

function operator!

inline BoolParticleNOT operator!(
    const ParticleSelector & a
)

Operator syntactic sugar for NOT construction.

function ifilter_select

Particles & ifilter_select(
    Particles & particles,
    const Cut & c
)

Filter a particle collection in-place to the subset that passes the supplied Cut.

function ifilterBy

inline Particles & ifilterBy(
    Particles & particles,
    const Cut & c
)

Deprecated:

Use ifilter_select

Alias for ifilter_select

function iselect

inline Particles & iselect(
    Particles & particles,
    const Cut & c
)

New alias for ifilter_select.

function filter_select

inline Particles filter_select(
    const Particles & particles,
    const Cut & c
)

Filter a particle collection in-place to the subset that passes the supplied Cut.

function filterBy

inline Particles filterBy(
    const Particles & particles,
    const Cut & c
)

Deprecated:

Use filter_select

Alias for ifilter_select

function select

inline Particles select(
    const Particles & particles,
    const Cut & c
)

New alias for ifilter_select.

function filter_select

inline Particles filter_select(
    const Particles & particles,
    const Cut & c,
    Particles & out
)

Filter a particle collection in-place to the subset that passes the supplied Cut.

function filterBy

inline Particles filterBy(
    const Particles & particles,
    const Cut & c,
    Particles & out
)

Deprecated:

Use filter_select

Alias for ifilter_select

function select

inline Particles select(
    const Particles & particles,
    const Cut & c,
    Particles & out
)

New alias for ifilter_select.

function ifilter_discard

Particles & ifilter_discard(
    Particles & particles,
    const Cut & c
)

Filter a particle collection in-place to the subset that fails the supplied Cut.

function idiscard

inline Particles & idiscard(
    Particles & particles,
    const Cut & c
)

New alias for ifilter_discard.

function filter_discard

inline Particles filter_discard(
    const Particles & particles,
    const Cut & c
)

Filter a particle collection in-place to the subset that fails the supplied Cut.

function discard

inline Particles discard(
    const Particles & particles,
    const Cut & c
)

New alias for filter_discard.

function filter_discard

inline Particles filter_discard(
    const Particles & particles,
    const Cut & c,
    Particles & out
)

Filter a particle collection in-place to the subset that fails the supplied Cut.

function discard

inline Particles discard(
    const Particles & particles,
    const Cut & c,
    Particles & out
)

New alias for filter_discard.

function pids

inline PdgIdPair pids(
    const ParticlePair & pp
)

Todo: Make ParticlePair a custom class instead?

Get the PDG ID codes of a ParticlePair

function isSame

inline bool isSame(
    const Particle & a,
    const Particle & b
)

Check Particle equivalence.

function rng

std::mt19937 & rng()

Return a thread-safe random number generator (mainly for internal use)

function rand01

double rand01()

Return a uniformly sampled random number between 0 and 1.

function randnorm

double randnorm(
    double loc,
    double scale
)

Return a random number sampled from a Gaussian/normal distribution.

function randlognorm

double randlognorm(
    double loc,
    double scale
)

Return a random number sampled from a log-normal distribution.

function randcrystalball

double randcrystalball(
    double alpha,
    double n,
    double mu,
    double sigma
)

Return a random number sampled from a Crystal Ball distribution.

function pNorm

double pNorm(
    double x,
    double mu,
    double sigma
)

Probability density of a Gaussian/normal distribution at x.

function pCrystalBall

double pCrystalBall(
    double x,
    double alpha,
    double n,
    double mu,
    double sigma
)

Probability density of a Crystal Ball distribution at x.

function momentum3

inline Vector3 momentum3(
    const fastjet::PseudoJet & pj
)

Make a 3-momentum vector from a FastJet pseudojet.

function momentum

inline FourMomentum momentum(
    const fastjet::PseudoJet & pj
)

Make a 4-momentum vector from a FastJet pseudojet.

function mT2Sq

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

Compute asymm mT2**2 using the bisection method.

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

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

function mT2Sq

inline double mT2Sq(
    const FourMomentum & a,
    const FourMomentum & b,
    const FourMomentum & ptmiss,
    double invisiblesMass,
    double invisiblesMass2 =-1
)

Override for mT2Sq with FourMomentum ptmiss.

function mT2

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

Compute asymm mT2 using the bisection method.

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

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

function mT2

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

Override for mT2 with FourMomentum ptmiss.

function fileexists

inline bool fileexists(
    const std::string & path
)

Convenience function for determining if a filesystem path exists.

function getRefData

map< string, YODA::AnalysisObjectPtr > getRefData(
    const string & papername
)

Function to get a map of all the refdata in a paper with the given papername.

function getDatafilePath

string getDatafilePath(
    const string & papername
)

Get the file system path to the reference file for this paper.

Todo: Also provide a Scatter3D getRefData() version?

function aocopy

template <typename T >
inline bool aocopy(
    YODA::AnalysisObjectPtr src,
    YODA::AnalysisObjectPtr dst
)

If dst and src both are of same subclass T, copy the contents of src into dst and return true. Otherwise return false.

function aocopy

template <typename T >
inline bool aocopy(
    YODA::AnalysisObjectPtr src,
    YODA::AnalysisObjectPtr dst,
    double scale
)

If dst and src both are of same subclass T, copy the contents of src into dst and return true. Otherwise return false. The scale argument will be ued to scale the weights of non-scatter types, cf. aoadd().

function aoadd

template <typename T >
inline bool aoadd(
    YODA::AnalysisObjectPtr dst,
    YODA::AnalysisObjectPtr src,
    double scale
)

If dst and src both are of same subclass T, add the contents of src into dst and return true. Otherwise return false.

function copyao

bool copyao(
    YODA::AnalysisObjectPtr src,
    YODA::AnalysisObjectPtr dst,
    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.

function addaos

bool addaos(
    YODA::AnalysisObjectPtr dst,
    YODA::AnalysisObjectPtr src,
    double scale
)

If dst is the same subclass as src, scale the contents of src with scale and add it to dst and return true. Otherwise return false.

function bookingCompatible

template <typename TPtr >
inline bool bookingCompatible(
    TPtr a,
    TPtr b
)

Check if two analysis objects have the same binning or, if not binned, are in other ways compatible.

function bookingCompatible

inline bool bookingCompatible(
    CounterPtr a,
    CounterPtr b
)

function bookingCompatible

inline bool bookingCompatible(
    YODA::CounterPtr a,
    YODA::CounterPtr b
)

function lexical_cast

template <typename T ,
typename U >
T lexical_cast(
    const U & in
)

Convert between any types via stringstream.

function to_str

template <typename T >
inline string to_str(
    const T & x
)

Convert any object to a string.

Just a convenience wrapper for the more general Boost lexical_cast

function toString

template <typename T >
inline string toString(
    const T & x
)

Convert any object to a string.

An alias for to_str() with a more “Rivety” mixedCase name.

function replace_first

inline string & replace_first(
    string & str,
    const string & patt,
    const string & repl
)

Replace the first instance of patt with repl.

function replace_all

inline string & replace_all(
    string & str,
    const string & patt,
    const string & repl
)

Replace all instances of patt with repl.

Note: Finding is interleaved with replacement, so the second search happens after first replacement, etc. This could lead to infinite loops and other counterintuitive behaviours if not careful.

function nocase_cmp

inline int nocase_cmp(
    const string & s1,
    const string & s2
)

Case-insensitive string comparison function.

function nocase_equals

inline bool nocase_equals(
    const string & s1,
    const string & s2
)

Case-insensitive string equality function.

function toLower

inline string toLower(
    const string & s
)

Convert a string to lower-case.

function toUpper

inline string toUpper(
    const string & s
)

Convert a string to upper-case.

function startsWith

inline bool startsWith(
    const string & s,
    const string & start
)

Check whether a string start is found at the start of s.

function endsWith

inline bool endsWith(
    const string & s,
    const string & end
)

Check whether a string end is found at the end of s.

function strcat

inline string strcat()

function strcat

template <typename T ,
typename... Ts>
inline string strcat(
    T value,
    Ts... fargs
)

Make a string containing the concatenated string representations of each item in the variadic list.

function join

template <typename T >
inline string join(
    const vector< T > & v,
    const string & sep =" "
)

Make a string containing the string representations of each item in v, separated by sep.

function join

inline string join(
    const vector< string > & v,
    const string & sep
)

Make a string containing the string representations of each item in v, separated by sep.

function join

template <typename T >
inline string join(
    const set< T > & s,
    const string & sep =" "
)

Make a string containing the string representations of each item in s, separated by sep.

function join

inline string join(
    const set< string > & s,
    const string & sep
)

Make a string containing the string representations of each item in s, separated by sep.

function split

inline vector< string > split(
    const string & s,
    const string & sep
)

Split a string on a specified separator string.

function lpad

inline string lpad(
    const string & s,
    size_t width,
    const string & padchar =" "
)

Left-pad the given string s to width width.

function rpad

inline string rpad(
    const string & s,
    size_t width,
    const string & padchar =" "
)

Right-pad the given string s to width width.

function pathsplit

inline vector< string > pathsplit(
    const string & path
)

Split a path string with colon delimiters.

Ignores zero-length substrings. Designed for getting elements of filesystem paths, naturally.

function pathjoin

inline string pathjoin(
    const vector< string > & paths
)

Join several filesystem paths together with the standard ‘:’ delimiter.

Note that this does NOT join path elements together with a platform-portable directory delimiter, cf. the Python {os.path.join}!

function operator/

inline string operator/(
    const string & a,
    const string & b
)

Operator for joining strings a and b with filesystem separators.

function basename

inline string basename(
    const string & p
)

Get the basename (i.e. terminal file name) from a path p.

function dirname

inline string dirname(
    const string & p
)

Get the dirname (i.e. path to the penultimate directory) from a path p.

function file_stem

inline string file_stem(
    const string & f
)

Get the stem (i.e. part without a file extension) from a filename f.

function file_extn

inline string file_extn(
    const string & f
)

Get the file extension from a filename f.

function count

template <typename CONTAINER >
inline unsigned int count(
    const CONTAINER & c
)

Return number of true elements in the container c .

function count

template <typename CONTAINER ,
typename FN >
inline unsigned int count(
    const CONTAINER & c,
    const FN & f
)

Return number of elements in the container c for which f(x) is true.

function any

template <typename CONTAINER >
inline bool any(
    const CONTAINER & c
)

Return true if x is true for any x in container c, otherwise false.

function any

template <typename CONTAINER ,
typename FN >
inline bool any(
    const CONTAINER & c,
    const FN & f
)

Return true if f(x) is true for any x in container c, otherwise false.

function all

template <typename CONTAINER >
inline bool all(
    const CONTAINER & c
)

Return true if x is true for all x in container c, otherwise false.

function all

template <typename CONTAINER ,
typename FN >
inline bool all(
    const CONTAINER & c,
    const FN & f
)

Return true if f(x) is true for all x in container c, otherwise false.

function none

template <typename CONTAINER >
inline bool none(
    const CONTAINER & c
)

Return true if x is false for all x in container c, otherwise false.

function none

template <typename CONTAINER ,
typename FN >
inline bool none(
    const CONTAINER & c,
    const FN & f
)

Return true if f(x) is false for all x in container c, otherwise false.

function transform

template <typename CONTAINER1 ,
typename CONTAINER2 ,
typename FN >
inline const CONTAINER2 & transform(
    const CONTAINER1 & in,
    CONTAINER2 & out,
    const FN & f
)

A single-container-arg version of std::transform, aka map.

function transform

template <typename CONTAINER1 ,
typename T2 >
inline std::vector< T2 > transform(
    const CONTAINER1 & in,
    const std::function< T2(typename CONTAINER1::value_type)> & f
)

Todo: Make the function template polymorphic… or specific to ParticleBase

A single-container-arg, return-value version of std::transform, aka map

function accumulate

template <typename CONTAINER1 ,
typename T ,
typename FN >
inline T accumulate(
    const CONTAINER1 & in,
    const T & init,
    const FN & f
)

A single-container-arg version of std::accumulate, aka reduce.

function sum

template <typename CONTAINER >
inline CONTAINER::value_type sum(
    const CONTAINER & c
)

Generic sum function, adding x for all x in container c.

Note: Default-constructs the return type – not always possible! Supply an explicit start value if necessary.

function sum

template <typename CONTAINER ,
typename T >
inline T sum(
    const CONTAINER & c,
    const T & start
)

Note: It’s more more flexible here to not use CONTAINER::value_type, allowing implicit casting to T.

Generic sum function, adding x for all x in container c, starting with start

function sum

template <typename CONTAINER ,
typename FN ,
typename T >
inline T sum(
    const CONTAINER & c,
    const FN & f,
    const T & start =T()
)

Generic sum function, adding fn(x) for all x in container c, starting with start.

function isum

template <typename CONTAINER ,
typename T >
inline T & isum(
    const CONTAINER & c,
    T & out
)

Note: It’s more more flexible here to not use CONTAINER::value_type, allowing implicit casting to T.

In-place generic sum function, adding x on to container out for all x in container c

function isum

template <typename CONTAINER ,
typename FN ,
typename T >
inline T & isum(
    const CONTAINER & c,
    const FN & f,
    T & out
)

Note: It’s more more flexible here to not use CONTAINER::value_type, allowing implicit casting to T.

In-place generic sum function, adding fn(x) on to container out for all x in container c

function ifilter_discard

template <typename CONTAINER ,
typename FN >
inline CONTAINER & ifilter_discard(
    CONTAINER & c,
    const FN & f
)

Todo: Use const std::function<bool(typename CONTAINER::value_type)>… but need polymorphism for ParticleBase

Filter a collection in-place, removing the subset that passes the supplied function

function idiscard

template <typename CONTAINER ,
typename FN >
inline CONTAINER & idiscard(
    CONTAINER & c,
    const FN & f
)

Alias.

function filter_discard

template <typename CONTAINER ,
typename FN >
inline CONTAINER filter_discard(
    const CONTAINER & c,
    const FN & f
)

Todo: Use const std::function<bool(typename CONTAINER::value_type)>… but need polymorphism for ParticleBase

Filter a collection by copy, removing the subset that passes the supplied function

< TodoMore efficient would be copy_if with back_inserter…

function discard

template <typename CONTAINER ,
typename FN >
inline CONTAINER & discard(
    CONTAINER & c,
    const FN & f
)

Alias.

function filter_discard

template <typename CONTAINER ,
typename FN >
inline CONTAINER & filter_discard(
    const CONTAINER & c,
    const FN & f,
    CONTAINER & out
)

Note: New container will be replaced, not appended to

Todo: Use const std::function<bool(typename CONTAINER::value_type)>… but need polymorphism for ParticleBase

Filter a collection by copy into a supplied container, removing the subset that passes the supplied function

function discard

template <typename CONTAINER ,
typename FN >
inline CONTAINER & discard(
    CONTAINER & c,
    const FN & f,
    CONTAINER & out
)

Alias.

function ifilter_select

template <typename CONTAINER ,
typename FN >
inline CONTAINER & ifilter_select(
    CONTAINER & c,
    const FN & f
)

Todo: Use const std::function<bool(typename CONTAINER::value_type)>… but need polymorphism for ParticleBase

Filter a collection in-place, keeping the subset that passes the supplied function

function iselect

template <typename CONTAINER ,
typename FN >
inline CONTAINER & iselect(
    CONTAINER & c,
    const FN & f
)

Alias.

function filter_select

template <typename CONTAINER ,
typename FN >
inline CONTAINER filter_select(
    const CONTAINER & c,
    const FN & f
)

Todo: Use const std::function<bool(typename CONTAINER::value_type)>… but need polymorphism for ParticleBase

Filter a collection by copy, keeping the subset that passes the supplied function

< TodoMore efficient would be copy_if with back_inserter … but is that equally container agnostic?

function select

template <typename CONTAINER ,
typename FN >
inline CONTAINER select(
    const CONTAINER & c,
    const FN & f
)

Alias.

function filter_select

template <typename CONTAINER ,
typename FN >
inline CONTAINER & filter_select(
    const CONTAINER & c,
    const FN & f,
    CONTAINER & out
)

Note: New container will be replaced, not appended to

Todo: Use const std::function<bool(typename CONTAINER::value_type)>… but need polymorphism for ParticleBase

Filter a collection by copy into a supplied container, keeping the subset that passes the supplied function

function select

template <typename CONTAINER ,
typename FN >
inline CONTAINER & select(
    CONTAINER & c,
    const FN & f,
    CONTAINER & out
)

Alias.

function slice

template <typename CONTAINER >
inline CONTAINER slice(
    const CONTAINER & c,
    int i,
    int j
)

Slice of the container elements cf. Python’s [i:j] syntax.

The element at the j index is not included in the returned container. i and j can be negative, treated as backward offsets from the end of the container.

function slice

template <typename CONTAINER >
inline CONTAINER slice(
    const CONTAINER & c,
    int i
)

Tail slice of the container elements cf. Python’s [i:] syntax.

Single-index specialisation of slice(c, i, j)

function head

template <typename CONTAINER >
inline CONTAINER head(
    const CONTAINER & c,
    int n
)

Head slice of the n first container elements.

Negative n means to take the head excluding the n -element tail

function tail

template <typename CONTAINER >
inline CONTAINER tail(
    const CONTAINER & c,
    int n
)

Tail slice of the n last container elements.

Negative n means to take the tail from after the n th element

function min

inline double min(
    const vector< double > & in,
    double errval =DBL_NAN
)

Find the minimum value in the vector.

function max

inline double max(
    const vector< double > & in,
    double errval =DBL_NAN
)

Find the maximum value in the vector.

function minmax

inline pair< double, double > minmax(
    const vector< double > & in,
    double errval =DBL_NAN
)

Find the minimum and maximum values in the vector.

function min

inline int min(
    const vector< int > & in,
    int errval =-1
)

Find the minimum value in the vector.

function max

inline int max(
    const vector< int > & in,
    int errval =-1
)

Find the maximum value in the vector.

function minmax

inline pair< int, int > minmax(
    const vector< int > & in,
    int errval =-1
)

Find the minimum and maximum values in the vector.

function getEnvParam

template <typename T >
T getEnvParam(
    const std::string name,
    const T & fallback
)

Get a parameter from a named environment variable, with automatic type conversion.

Note: Return fallback if the variable is not defined, otherwise convert its string to the template type

Todo: Should the param name have to be specific to an analysis? Can specialise as an Analysis member fn.

Attributes Documentation

variable pi

constexpr double pi = M_PI;

variable twopi

constexpr double twopi = 2*pi;

variable halfpi

constexpr double halfpi = pi/2;

variable pi2

constexpr double pi2 = pi*pi;

variable c_light

constexpr double c_light = 2.99792458e8;

variable degree

constexpr double degree = pi / 180.0;

variable PI

static const double PI = M_PI;

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

variable TWOPI

static const double TWOPI = 2*M_PI;

A pre-defined value of ( 2\pi ).

variable HALFPI

static const double HALFPI = M_PI_2;

A pre-defined value of ( \pi/2 ).

variable SQRT2

static const double SQRT2 = M_SQRT2;

A pre-defined value of ( \sqrt{2} ).

variable SQRTPI

static const double SQRTPI = 2 / M_2_SQRTPI;

A pre-defined value of ( \sqrt{\pi} ).

variable INFF

static const double INFF = HUGE_VALF;

Pre-defined values of ( \infty ).

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

variable INF

static const double INF = HUGE_VAL;

variable INFL

static const double INFL = HUGE_VALL;

variable millimeter

constexpr double millimeter = 1.;

variable millimeter2

constexpr double millimeter2 = millimeter*millimeter;

variable millimeter3

constexpr double millimeter3 = millimeter*millimeter*millimeter;

variable centimeter

constexpr double centimeter = 10.*millimeter;

variable centimeter2

constexpr double centimeter2 = centimeter*centimeter;

variable centimeter3

constexpr double centimeter3 = centimeter*centimeter*centimeter;

variable meter

constexpr double meter = 1000.*millimeter;

variable meter2

constexpr double meter2 = meter*meter;

variable meter3

constexpr double meter3 = meter*meter*meter;

variable micrometer

constexpr double micrometer = 1.e-6 *meter;

variable nanometer

constexpr double nanometer = 1.e-9 *meter;

variable angstrom

constexpr double angstrom = 1.e-10*meter;

variable picometer

constexpr double picometer = 1.e-12*meter;

variable femtometer

constexpr double femtometer = 1.e-15*meter;

variable attometer

constexpr double attometer = 1.e-18*meter;

variable fermi

constexpr double fermi = femtometer;

variable mm

constexpr double mm = millimeter;

variable mm2

constexpr double mm2 = millimeter2;

variable mm3

constexpr double mm3 = millimeter3;

variable cm

constexpr double cm = centimeter;

variable cm2

constexpr double cm2 = centimeter2;

variable cm3

constexpr double cm3 = centimeter3;

variable m

constexpr double m = meter;

variable m2

constexpr double m2 = meter2;

variable m3

constexpr double m3 = meter3;

variable picobarn

constexpr double picobarn = 1.0;

variable barn

constexpr double barn = 1.0e+12* picobarn;

variable millibarn

constexpr double millibarn = 1.0e-3 * barn;

variable microbarn

constexpr double microbarn = 1.0e-6 * barn;

variable nanobarn

constexpr double nanobarn = 1.0e-9 * barn;

variable femtobarn

constexpr double femtobarn = 1.0e-15 * barn;

variable attobarn

constexpr double attobarn = 1.0e-18 * barn;

variable nanosecond

constexpr double nanosecond = 1.0;

variable second

constexpr double second = 1.e+9 *nanosecond;

variable millisecond

constexpr double millisecond = 1.e-3 *second;

variable microsecond

constexpr double microsecond = 1.e-6 *second;

variable picosecond

constexpr double picosecond = 1.e-12*second;

variable ns

constexpr double ns = nanosecond;

variable s

constexpr double s = second;

variable ms

constexpr double ms = millisecond;

variable eplus

constexpr double eplus = 1.0;

variable e_SI

constexpr double e_SI = 1.60217733e-19;

variable gigaelectronvolt

constexpr double gigaelectronvolt = 1.;

variable electronvolt

constexpr double electronvolt = 1.e-9*gigaelectronvolt;

variable kiloelectronvolt

constexpr double kiloelectronvolt = 1.e-6*gigaelectronvolt;

variable megaelectronvolt

constexpr double megaelectronvolt = 1.e-3*gigaelectronvolt;

variable teraelectronvolt

constexpr double teraelectronvolt = 1.e+3*gigaelectronvolt;

variable petaelectronvolt

constexpr double petaelectronvolt = 1.e+6*gigaelectronvolt;

variable eV

constexpr double eV = electronvolt;

variable keV

constexpr double keV = kiloelectronvolt;

variable MeV

constexpr double MeV = megaelectronvolt;

variable GeV

constexpr double GeV = gigaelectronvolt;

variable TeV

constexpr double TeV = teraelectronvolt;

variable PeV

constexpr double PeV = petaelectronvolt;

variable eV2

constexpr double eV2 = eV*eV;

variable keV2

constexpr double keV2 = keV*keV;

variable MeV2

constexpr double MeV2 = MeV*MeV;

variable GeV2

constexpr double GeV2 = GeV*GeV;

variable TeV2

constexpr double TeV2 = TeV*TeV;

variable PeV2

constexpr double PeV2 = PeV*PeV;

variable DBL_NAN

static constexpr double DBL_NAN = std::numeric_limits<double>::quiet_NaN();

Convenient const for getting the double NaN value.


Updated on 2022-08-07 at 20:17:16 +0100