rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.0
HeavyHadrons.hh
1// -*- C++ -*-
2#ifndef RIVET_HeavyHadrons_HH
3#define RIVET_HeavyHadrons_HH
4
5#include "Rivet/Projections/FinalState.hh"
6#include "Rivet/Projections/UnstableParticles.hh"
7#include "Rivet/Particle.hh"
8#include "Rivet/Event.hh"
9
10namespace Rivet {
11
12
19 class HeavyHadrons : public FinalState {
20 public:
21
24
27 HeavyHadrons(const Cut& c=Cuts::open()) {
28 setName("HeavyHadrons");
29 declare(UnstableParticles(c), "UFS");
30 }
31
34
36
38 using Projection::operator =;
39
40
43
45 const Particles& bHadrons() const {
46 return _theBs;
47 }
48
50 Particles bHadrons(const Cut& c) const {
51 return select(bHadrons(), c);
52 }
53
55 Particles bHadrons(const ParticleSelector& s) const {
56 return select(bHadrons(), s);
57 }
58
60
61
62
65
67 const Particles& cHadrons() const {
68 return _theCs;
69 }
70
72 Particles cHadrons(const Cut& c) const {
73 return select(cHadrons(), c);
74 }
75
77 Particles cHadrons(const ParticleSelector& s) const {
78 return select(cHadrons(), s);
79 }
80
82
83
84 protected:
85
87 virtual void project(const Event& e);
88
90 virtual CmpState compare(const Projection& p) const {
91 return mkNamedPCmp(p, "UFS");
92 }
93
95 Particles _theBs, _theCs;
96
97 };
98
99
100}
101
102
103#endif
Representation of a HepMC event, and enabler of Projection caching.
Definition Event.hh:22
Project out all final-state particles in an event. Probably the most important projection in Rivet!
Definition FinalState.hh:12
Project out the last pre-decay b and c hadrons.
Definition HeavyHadrons.hh:19
const Particles & cHadrons() const
Get all weakly decaying c hadrons (return by reference)
Definition HeavyHadrons.hh:67
Particles bHadrons(const ParticleSelector &s) const
Get weakly decaying b hadrons with a general filter function applied (return by value)
Definition HeavyHadrons.hh:55
virtual CmpState compare(const Projection &p) const
Compare projections (only difference is in UFS definition)
Definition HeavyHadrons.hh:90
RIVET_DEFAULT_PROJ_CLONE(HeavyHadrons)
Clone on the heap.
const Particles & bHadrons() const
Get all weakly decaying b hadrons (return by reference)
Definition HeavyHadrons.hh:45
HeavyHadrons(const Cut &c=Cuts::open())
Definition HeavyHadrons.hh:27
Particles cHadrons(const Cut &c) const
Get weakly decaying c hadrons with a Cut applied (return by value)
Definition HeavyHadrons.hh:72
Particles bHadrons(const Cut &c) const
Get weakly decaying b hadrons with a Cut applied (return by value)
Definition HeavyHadrons.hh:50
virtual void project(const Event &e)
Apply the projection to the event.
Particles cHadrons(const ParticleSelector &s) const
Get weakly decaying c hadrons with a general filter function applied (return by value)
Definition HeavyHadrons.hh:77
Specialised vector of Particle objects.
Definition Particle.hh:21
const PROJ & declare(const PROJ &proj, const std::string &name) const
Register a contained projection (user-facing version)
Definition ProjectionApplier.hh:175
Base class for all Rivet projections.
Definition Projection.hh:29
void setName(const std::string &name)
Used by derived classes to set their name.
Definition Projection.hh:148
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
Project out all physical-but-decayed particles in an event.
Definition UnstableParticles.hh:25
Jets select(const Jets &jets, const Cut &c)
Filter a jet collection in-place to the subset that passes the supplied Cut.
Definition JetUtils.hh:152
const Cut & open()
Fully open cut singleton, accepts everything.
Definition MC_CENT_PPB_Projections.hh:10