Rivet API documentation

Rivet 4.1.3
InvisibleFinalState.hh
1// -*- C++ -*-
2#ifndef RIVET_InvisibleFinalState_HH
3#define RIVET_InvisibleFinalState_HH
4
5#include "Rivet/Event.hh"
6#include "Rivet/Particle.hh"
7#include "Rivet/Projection.hh"
8#include "Rivet/Config/RivetCommon.hh"
9#include "Rivet/Projections/FinalState.hh"
10#include "Rivet/Projections/PromptFinalState.hh"
11#include "Rivet/Tools/Logging.hh"
12
13namespace Rivet {
14
15
16 enum class OnlyDirect { YES, NO };
17 using OnlyPrompt = OnlyDirect;
18
21 public:
22
25
27 InvisibleFinalState(OnlyDirect requirepromptness = OnlyDirect::NO,
28 TauDecaysAs taudecays = TauDecaysAs::NONPROMPT,
29 MuDecaysAs mudecays = MuDecaysAs::NONPROMPT)
30 : _requirePromptness(requirepromptness == OnlyDirect::YES),
31 _taudecays(taudecays == TauDecaysAs::PROMPT),
32 _mudecays(mudecays == MuDecaysAs::PROMPT) {
33 setName("InvisibleFinalState");
34 declare(FinalState(), "FS");
35 }
36
39
41
43 using Projection::operator=;
44
45
47 void requirePromptness(bool acc = true,
48 TauDecaysAs taudecays = TauDecaysAs::NONPROMPT,
49 MuDecaysAs mudecays = MuDecaysAs::NONPROMPT) {
50 _requirePromptness = acc;
51 _taudecays = (taudecays == TauDecaysAs::PROMPT);
52 _mudecays = (mudecays == MuDecaysAs::PROMPT);
53 }
54
56 void project(const Event& e);
57
59 CmpState compare(const Projection& p) const;
60
61
62 protected:
63
64 bool _requirePromptness, _taudecays, _mudecays;
65 };
66
67
68}
69
70#endif
Representation of a HepMC event, and enabler of Projection caching.
Definition Event.hh:22
FinalState(const Cut &c=Cuts::OPEN)
Construction using Cuts object.
void requirePromptness(bool acc=true, TauDecaysAs taudecays=TauDecaysAs::NONPROMPT, MuDecaysAs mudecays=MuDecaysAs::NONPROMPT)
Require accepted particles to be prompt.
Definition InvisibleFinalState.hh:47
void project(const Event &e)
Apply the projection on the supplied event.
CmpState compare(const Projection &p) const
Compare projections.
InvisibleFinalState(OnlyDirect requirepromptness=OnlyDirect::NO, TauDecaysAs taudecays=TauDecaysAs::NONPROMPT, MuDecaysAs mudecays=MuDecaysAs::NONPROMPT)
Constructor with specific FinalState.
Definition InvisibleFinalState.hh:27
RIVET_DEFAULT_PROJ_CLONE(InvisibleFinalState)
Clone on the heap.
const PROJ & declare(const PROJ &proj, const std::string &name) const
Register a contained projection (user-facing version).
Definition ProjectionApplier.hh:205
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:146
double p(const ParticleBase &p)
Unbound function access to p.
Definition ParticleBaseUtils.hh:819
Definition LHCbCommon.hh:9