HackAnalysis  2
Classes | Functions
HEP Namespace Reference

Modified by Mark Goodsell goods.nosp@m.ell@.nosp@m.lpthe.nosp@m..jus.nosp@m.sieu..nosp@m.fr More...

Classes

class  charged_track
 
class  Binning1D
 
class  Binning2D
 
class  BinnedFn1D
 
class  BinnedFn2D
 
class  Jet
 
class  Particle
 
class  P4
 A 4-momentum class for vectors. More...
 
class  P3
 
class  PileupEvent
 
class  Event
 Simple event class, separating particles into classes. More...
 

Functions

bool _cmpPtDesc (const Jet *a, const Jet *b)
 Function/functor for container<const Jet*> sorting (cf. std::less)
 
double ET2 (P4 p4)
 
double ET (P4 p4)
 
bool compare_pT (const HEP::Particle *p1, const HEP::Particle *p2)
 
bool compare_pTJ (const HEP::Jet *p1, const HEP::Jet *p2)
 
bool vertex_match (const HEP::P4 &v1, const HEP::P4 &v2)
 
double mCT2 (const HEP::P4 &v1, const HEP::P4 &v2)
 
double mCT (const HEP::P4 &v1, const HEP::P4 &v2)
 
template<typename T1 >
double HT (std::vector< T1 * > v1)
 
Numerical helpers
template<typename N1 >
constexpr std::enable_if< std::is_arithmetic< N1 >::value, int >::type sign (const N1 &val)
 Convenience function for getting the sign of a number.
 
template<typename N1 >
constexpr std::enable_if< std::is_arithmetic< N1 >::value, N1 >::type sqr (const N1 val)
 Convenience function for squaring (better than repeating long expressions/calcs or using intermediates)
 
template<typename N1 , typename N2 >
constexpr std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value, typename std::common_type< N1, N2 >::type >::type add_quad (const N1 &a, const N2 &b)
 Convenience function for adding two numbers in quadrature.
 
template<typename N1 , typename N2 , typename N3 >
constexpr std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, typename std::common_type< N1, N2, N3 >::type >::type add_quad (const N1 &a, const N2 &b, const N3 &c)
 Convenience function for adding three numbers in quadrature.
 
Range helpers
template<typename N1 , typename N2 , typename N3 >
constexpr std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type in_range (const N1 &val, const N2 &low, const N3 &high)
 Boolean function to determine if value is within the given range. More...
 
template<typename N1 , typename N2 , typename N3 >
constexpr std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type in_closed_range (const N1 &val, const N2 &low, const N3 &high)
 Boolean function to determine if value is within the given range. More...
 
template<typename N1 , typename N2 , typename N3 >
constexpr std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type in_open_range (const N1 &val, const N2 &low, const N3 &high)
 Boolean function to determine if value is within the given range. More...
 
std::vector< double > linspace (size_t nbins, double start, double end, bool include_end=true)
 Make a list of nbins + 1 values linearly spaced between start and end inclusive.
 
std::vector< double > logspace (size_t nbins, double start, double end, double offset=0, bool include_end=true)
 Make a list of nbins + 1 values exponentially spaced between start and end inclusive.
 
Physics maths utils
double deltaphi (double a, double b)
 
Random numbers and sampling
double rand01 ()
 
Container utils
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 , 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 , typename T >
bool contains (const CONTAINER &c, const T &x)
 Return true if x is found in container c, otherwise false.
 
String representations
std::string to_str (const P4 &p4)
 Make a string representation of the vector.
 
std::ostream & operator<< (std::ostream &ostr, const P4 &p4)
 Write a string representation of the vector to the provided stream.
 
double dot (const P4 &a, const P4 &b)
 Convenience "external" functions. More...
 
double angle (const P4 &a, const P4 &b)
 Angle between two vectors.
 
double deltaPhi (const P4 &a, const P4 &b)
 Difference in phi between two vectors.
 
double deltaEta (const P4 &a, const P4 &b)
 Difference in pseudorapidity between two vectors.
 
double deltaRap (const P4 &a, const P4 &b)
 Difference in rapidity between two vectors.
 
double deltaR2_eta (const P4 &a, const P4 &b)
 Difference in pseudorapidity-based R^2 between two vectors.
 
double deltaR_eta (const P4 &a, const P4 &b)
 Difference in pseudorapidity-based R between two vectors.
 
double deltaR2_rap (const P4 &a, const P4 &b)
 Difference in rapidity-based R^2 between two vectors.
 
double deltaR_rap (const P4 &a, const P4 &b)
 Difference in rapidity-based R between two vectors.
 
std::string to_str (const P3 &p3)
 Make a string representation of the vector.
 
std::ostream & operator<< (std::ostream &ostr, const P3 &p3)
 Write a string representation of the vector to the provided stream.
 
double Dot (const P3 &a, const P3 &b)
 Convenience "external" functions. More...
 
double angle (const P3 &a, const P3 &b)
 Angle between two vectors.
 
double deltaPhi (const P3 &a, const P3 &b)
 Difference in phi between two vectors.
 
double deltaEta (const P3 &a, const P3 &b)
 Difference in pseudorapidity between two vectors.
 
double deltaR2_eta (const P3 &a, const P3 &b)
 Difference in pseudorapidity-based R^2 between two vectors.
 
double deltaR_eta (const P3 &a, const P3 &b)
 Difference in pseudorapidity-based R between two vectors.
 
Operators taking two vectors
P4 operator+ (const P4 &a, const P4 &b)
 
P4 operator- (const P4 &a, const P4 &b)
 
P4 operator* (const P4 &a, double f)
 
P4 operator* (double f, const P4 &a)
 
P4 operator/ (const P4 &a, double f)
 
P3 operator+ (const P3 &a, const P3 &b)
 
P3 operator- (const P3 &a, const P3 &b)
 
P3 operator* (const P3 &a, double f)
 
P3 operator* (double f, const P3 &a)
 
P3 operator/ (const P3 &a, double f)
 

Detailed Description

Modified by Mark Goodsell goods.nosp@m.ell@.nosp@m.lpthe.nosp@m..jus.nosp@m.sieu..nosp@m.fr

This header file loads the various heputils files

In addition it defines some helper functions and, most importantly the Event and PileupEvent classes

Function Documentation

◆ Dot()

double HEP::Dot ( const P3 a,
const P3 b 
)
inline

Convenience "external" functions.

Lorentz inner product between two vectors

◆ dot()

double HEP::dot ( const P4 a,
const P4 b 
)
inline

Convenience "external" functions.

Lorentz inner product between two vectors

◆ ET2()

double HEP::ET2 ( P4  p4)
inline

Function to compute square of transverse energy

◆ in_closed_range()

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

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

Note
The interval is closed at both ends.

◆ in_open_range()

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

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

Note
The interval is open at both ends.

◆ in_range()

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

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.