rivet is hosted by Hepforge, IPPP Durham
Rivet  2.7.0
Rivet::PercentileXaxis< T > Class Template Reference

The PercentileXaxis class for centrality binning. More...

#include <Percentile.hh>

Inheritance diagram for Rivet::PercentileXaxis< T >:
Rivet::PercentileTBase< T > Rivet::PercentileBase

Public Member Functions

 PercentileXaxis (Analysis *ana, string projName)
 the main constructor More...
 
 PercentileXaxis ()
 Default constructor.
 
 ~PercentileXaxis ()
 Empty destructor.
 
template<typename... Args>
void fill (Args... args)
 
PercentileXaxis< T > & operator-= (const PercentileXaxis< T > &rhs)
 Subtract the contents fro another PecentileXaxis.
 
PercentileXaxis< T > & operator+= (const PercentileXaxis< T > &rhs)
 Add the contents fro another PecentileXaxis.
 
PercentileXaxis< T > * operator-> ()
 Make this object look like a pointer.
 
PercentileXaxis< T > & operator-> * (function< void(T &)> f)
 Pointer to member operator.
 
- Public Member Functions inherited from Rivet::PercentileTBase< T >
 PercentileTBase (Analysis *ana, string projName)
 the main constructor More...
 
 PercentileTBase ()
 Default constructor.
 
 ~PercentileTBase ()
 Empty destructor.
 
void add (shared_ptr< T > ao, CounterPtr cnt, pair< float, float > cent={0.0, 100.0})
 add a new percentile bin. More...
 
bool add (const PercentileBase &other, const vector< TPtr > &tv)
 Copy the information from an other Percentile object. More...
 
bool init (const Event &event)
 initialize for a new event. Select which AnalysisObjects should be filled for this event. Keeps track of the number of events seen for each centrality bin and AnalysisAbject.
 
void normalizePerEvent ()
 Normalize each AnalysisObject. More...
 
void scale (float scale)
 Simple scaling of each AnalysisObject.
 
void exec (function< void(T &)> f)
 Execute a function for each AnalysisObject.
 
const vector< pair< shared_ptr< T >, shared_ptr< Counter > > > & analysisObjects () const
 Access the underlyng AnalysisObjects. More...
 
- Public Member Functions inherited from Rivet::PercentileBase
 PercentileBase (Analysis *ana, string projName)
 the main constructor More...
 
 PercentileBase ()
 Default constructor.
 
void selectBins (const Event &)
 
void copyFrom (const PercentileBase &other)
 Copy information from other PercentileBase.
 
bool compatible (const PercentileBase &other) const
 check if other PercentileBase is compatible with this.
 
const vector< pair< float, float > > & centralities () const
 

Additional Inherited Members

- Public Types inherited from Rivet::PercentileTBase< T >
typedef T::Ptr TPtr
 Convenient typedef.
 
- Static Public Member Functions inherited from Rivet::PercentileBase
static bool inRange (double x, pair< float, float > range)
 Helper function to check if x is within range.
 

Detailed Description

template<class T>
class Rivet::PercentileXaxis< T >

The PercentileXaxis class for centrality binning.

The PercentileXaxis class automatically handles the x-axis of an AnalysisObject when the x-axis is to be the centrality of an event. This could also be done by eg. filling directly a Histo1D with the result of a CentralityProjection. However, since the CentralityProjection may handle several centrality definitions at the same time it is reasonable to instead use PercentileXaxis<Histo1D> which will fill one histogram for each centrality definition.

Operationally this class works like the Percentile class, but only one centrality bin (0-100) is included. When fill()ed the first argument is always given by the assigned CentralityProjection.

Constructor & Destructor Documentation

◆ PercentileXaxis()

template<class T>
Rivet::PercentileXaxis< T >::PercentileXaxis ( Analysis ana,
string  projName 
)
inline

the main constructor

requiring a pointer, ana, to the Analysis to which this object belongs and the name of the CentralityProjection, projname, to be used.

Member Function Documentation

◆ fill()

template<class T>
template<typename... Args>
void Rivet::PercentileXaxis< T >::fill ( Args...  args)
inline

Fill each AnalysisObject selected in the last call to PercentileTBase<T>init


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