2 #ifndef RIVET_CENTRALITYPROJECTION_HH 3 #define RIVET_CENTRALITYPROJECTION_HH 5 #include "Rivet/Projections/PercentileProjection.hh" 6 #include "Rivet/Tools/RivetYODA.hh" 47 _projNames.push_back(pname);
54 for (
string pname : _projNames )
55 _values.push_back(apply<SingleValueProjection>(e, pname)());
56 if ( !_values.empty() )
set(_values[0]);
61 return _projNames.empty();
75 if (other->_projNames.size() == 0)
return UNDEFINED;
76 for (
string pname : _projNames) {
78 for (
string p2name : other->_projNames){
79 if (pname != p2name) hasPname =
false;
81 if (!hasPname)
return UNDEFINED;
94 vector<string> _projNames;
97 vector<double> _values;
bool empty() const
Cheek if no internal projections have been added.
Definition: CentralityProjection.hh:60
Definition: ALICE_2010_I880049.cc:13
CentralityProjection is used together with the percentile-based analysis objects Percentile and Perce...
Definition: CentralityProjection.hh:31
Base class for projections returning a single floating point value.
Definition: SingleValueProjection.hh:18
void project(const Event &e)
Perform all internal projections.
Definition: CentralityProjection.hh:52
double operator[](int i) const
Definition: CentralityProjection.hh:67
int compare(const Projection &p) const
Definition: CentralityProjection.hh:72
CentralityProjection()
Default constructor.
Definition: CentralityProjection.hh:36
void add(const SingleValueProjection &p, string pname)
Definition: CentralityProjection.hh:46
const PROJ & declare(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition: ProjectionApplier.hh:160
vector< string > projections() const
THe list of names of the internal projections.
Definition: CentralityProjection.hh:87
Base class for all Rivet projections.
Definition: Projection.hh:29