rivet is hosted by Hepforge, IPPP Durham
Rivet  2.7.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/UnstableFinalState.hh"
7 #include "Rivet/Particle.hh"
8 #include "Rivet/Event.hh"
9 
10 namespace Rivet {
11 
12 
19  class HeavyHadrons : public FinalState {
20  public:
21 
23 
24 
27  HeavyHadrons(const Cut& c=Cuts::open()) {
28  setName("HeavyHadrons");
30  }
31 
34 
36 
37 
39 
40 
42  const Particles& bHadrons() const {
43  return _theBs;
44  }
45 
47  Particles bHadrons(const Cut& c) const {
48  return filter_select(bHadrons(), c);
49  }
50 
53  Particles bHadrons(double ptmin) const {
54  return bHadrons(Cuts::pT > ptmin);
55  }
56 
58  Particles bHadrons(const ParticleSelector& s) const {
59  return filter_select(bHadrons(), s);
60  }
61 
63 
64 
65 
67 
68 
70  const Particles& cHadrons() const {
71  return _theCs;
72  }
73 
75  Particles cHadrons(const Cut& c) const {
76  return filter_select(cHadrons(), c);
77  }
78 
81  Particles cHadrons(double ptmin) const {
82  return cHadrons(Cuts::pT > ptmin);
83  }
84 
86  Particles cHadrons(const ParticleSelector& s) const {
87  return filter_select(cHadrons(), s);
88  }
89 
91 
92 
93  protected:
94 
96  virtual void project(const Event& e);
97 
99  virtual int compare(const Projection& p) const {
100  return mkNamedPCmp(p, "UFS");
101  }
102 
104  Particles _theBs, _theCs;
105 
106  };
107 
108 
109 }
110 
111 
112 #endif
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:133
Definition: ALICE_2010_I880049.cc:13
virtual int compare(const Projection &p) const
Compare projections (only difference is in UFS definition)
Definition: HeavyHadrons.hh:99
Particles bHadrons(const ParticleSelector &s) const
Get weakly decaying b hadrons with a general filter function applied (return by value) ...
Definition: HeavyHadrons.hh:58
Particles bHadrons(double ptmin) const
Definition: HeavyHadrons.hh:53
Project out all physical-but-decayed particles in an event.
Definition: UnstableFinalState.hh:26
Particles cHadrons(double ptmin) const
Definition: HeavyHadrons.hh:81
Definition: Event.hh:22
Jets filter_select(const Jets &jets, const Cut &c)
Filter a jet collection in-place to the subset that passes the supplied Cut.
Definition: JetUtils.hh:143
HeavyHadrons(const Cut &c=Cuts::open())
Definition: HeavyHadrons.hh:27
Particles cHadrons(const ParticleSelector &s) const
Get weakly decaying c hadrons with a general filter function applied (return by value) ...
Definition: HeavyHadrons.hh:86
const Particles & bHadrons() const
Get all weakly decaying b hadrons (return by reference)
Definition: HeavyHadrons.hh:42
const Cut & open()
Fully open cut singleton, accepts everything.
Definition: Cuts.cc:81
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
Definition: Projection.cc:51
Project out all final-state particles in an event. Probably the most important projection in Rivet! ...
Definition: FinalState.hh:12
const PROJ & addProjection(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition: ProjectionApplier.hh:170
DEFAULT_RIVET_PROJ_CLONE(HeavyHadrons)
Clone on the heap.
virtual void project(const Event &e)
Apply the projection to the event.
Definition: HeavyHadrons.cc:7
Base class for all Rivet projections.
Definition: Projection.hh:29
Particles cHadrons(const Cut &c) const
Get weakly decaying c hadrons with a Cut applied (return by value)
Definition: HeavyHadrons.hh:75
const Particles & cHadrons() const
Get all weakly decaying c hadrons (return by reference)
Definition: HeavyHadrons.hh:70
Project out the last pre-decay b and c hadrons.
Definition: HeavyHadrons.hh:19
Particles bHadrons(const Cut &c) const
Get weakly decaying b hadrons with a Cut applied (return by value)
Definition: HeavyHadrons.hh:47