2 #ifndef RIVET_Projection_HH 3 #define RIVET_Projection_HH 5 #include "Rivet/Projection.fhh" 6 #include "Rivet/ProjectionApplier.hh" 7 #include "Rivet/ProjectionHandler.hh" 8 #include "Rivet/Config/RivetCommon.hh" 9 #include "Rivet/Tools/Cuts.hh" 47 virtual unique_ptr<Projection>
clone()
const = 0;
56 virtual std::string
name()
const {
120 virtual const std::set<PdgIdPair>
beamPairs()
const;
126 _beamPairs.insert(PdgIdPair(beam1, beam2));
137 string logname =
"Rivet.Projection." +
name();
173 set<PdgIdPair> _beamPairs;
185 inline bool std::less<const Rivet::Projection *>::operator()(
const Rivet::Projection* x,
194 #include "Rivet/Event.hh" 195 #include "Rivet/Particle.hh" 196 #include "Rivet/Tools/Cmp.hh" 201 #define DEFAULT_RIVET_PROJ_CLONE(clsname) \ 202 virtual unique_ptr<Projection> clone() const { return unique_ptr<Projection>(new clsname(*this)); } void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:142
Definition: MC_Cent_pPb.hh:10
virtual ~Projection()
The destructor.
Projection()
The default constructor.
virtual unique_ptr< Projection > clone() const =0
Clone on the heap.
virtual Projection & operator=(const Projection &)
Block Projection copying.
friend class Cmp< Projection >
The Cmp specialization for Projection is a friend.
Definition: Projection.hh:36
static Log & getLog(const std::string &name)
virtual const std::set< PdgIdPair > beamPairs() const
Logging system for controlled & formatted writing to stdout.
Definition: Logging.hh:10
virtual void project(const Event &e)=0
Projection & addPdgIdPair(PdgId beam1, PdgId beam2)
Definition: Projection.hh:125
Representation of a HepMC event, and enabler of Projection caching.
Definition: Event.hh:22
Cmp< Projection > mkPCmp(const Projection &otherparent, const std::string &pname) const
bool failed() const
Get the state of the projetion.
Definition: Projection.hh:66
Common base class for Projection and Analysis, used for internal polymorphism.
Definition: ProjectionApplier.hh:21
virtual std::string name() const
Get the name of the projection.
Definition: Projection.hh:56
void fail()
Set the projection in an unvalid state.
Definition: Projection.hh:147
virtual CmpState compare(const Projection &p) const =0
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
bool valid() const
Get the state of the projetion.
Definition: Projection.hh:61
bool before(const Projection &p) const
Base class for all Rivet projections.
Definition: Projection.hh:29
Log & getLog() const
Get a Log object based on the getName() property of the calling projection object.
Definition: Projection.hh:136