Rivet: /Users/chrisg/software/rivet/include/Rivet/Projections/TauFinder.hh Source File

| Rivet 3.1.9

TauFinder.hh
1#ifndef RIVET_TauFinder_HH
2#define RIVET_TauFinder_HH
3
4#include "Rivet/Projections/FinalState.hh"
5#include "Rivet/Projections/UnstableParticles.hh"
6
7namespace Rivet {
8
9
13 class TauFinder : public FinalState {
14 public:
15
16 enum class DecayMode {
17 ANY = 0,
18 ALL = 0,
19 LEPTONIC,
20 HADRONIC
21 };
22
23 static bool isHadronic(const Particle& tau) {
24 assert(tau.abspid() == PID::TAU);
25 return any(tau.stableDescendants(), isHadron);
26 }
27
28 static bool isLeptonic(const Particle& tau) {
29 return !isHadronic(tau);
30 }
31
32
33 TauFinder(DecayMode decaymode=DecayMode::ANY, const Cut& cut=Cuts::open()) {
35 setName("TauFinder");
36 _decmode = decaymode;
37 declare(UnstableParticles(cut), "UFS");
38 }
39
40
42 DEFAULT_RIVET_PROJ_CLONE(TauFinder);
43
45 using Projection::operator =;
46
47
48 const Particles& taus() const { return _theParticles; }
49
50
51 protected:
52
54 void project(const Event& e);
55
57 virtual CmpState compare(const Projection& p) const;
58
59
60 protected:
61
63 DecayMode _decmode;
64
65 };
66
67
69 using Taus = TauFinder;
70
71
72}
73
74
75#endif
Rivet::Event
Representation of a HepMC event, and enabler of Projection caching.
Definition Event.hh:22
Rivet::FinalState
Project out all final-state particles in an event. Probably the most important projection in Rivet!
Definition FinalState.hh:12
Rivet::Particle
Particle representation, either from a HepMC::GenEvent or reconstructed.
Definition Particle.hh:53
Rivet::Particle::abspid
PdgId abspid() const
Absolute value of the PDG ID code.
Definition Particle.hh:199
Rivet::Particle::stableDescendants
Particles stableDescendants(const Cut &c=Cuts::OPEN) const
Rivet::Particles
Specialised vector of Particle objects.
Definition Particle.hh:25
Rivet::ProjectionApplier::declare
const PROJ & declare(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition ProjectionApplier.hh:170
Rivet::Projection
Base class for all Rivet projections.
Definition Projection.hh:29
Rivet::Projection::setName
void setName(const std::string &name)
Used by derived classes to set their name.
Definition Projection.hh:142
Rivet::TauFinder
Convenience finder of unstable taus.
Definition TauFinder.hh:13
Rivet::TauFinder::TauFinder
TauFinder(DecayMode decaymode=DecayMode::ANY, const Cut &cut=Cuts::open())
Definition TauFinder.hh:33
Rivet::TauFinder::compare
virtual CmpState compare(const Projection &p) const
Compare with other projections.
Rivet::TauFinder::project
void project(const Event &e)
Apply the projection on the supplied event.
Rivet::TauFinder::DEFAULT_RIVET_PROJ_CLONE
DEFAULT_RIVET_PROJ_CLONE(TauFinder)
Clone on the heap.
Rivet::UnstableParticles
Project out all physical-but-decayed particles in an event.
Definition UnstableParticles.hh:25
Rivet::any
bool any(const CONTAINER &c)
Return true if x is true for any x in container c, otherwise false.
Definition Utils.hh:325
Rivet::Kin::p
double p(const ParticleBase &p)
Unbound function access to p.
Definition ParticleBaseUtils.hh:684
Rivet::Cuts::open
const Cut & open()
Fully open cut singleton, accepts everything.
Rivet
Definition MC_Cent_pPb.hh:10