Rivet 3.1.9
TriggerProjection.hh
1// -*- C++ -*-
2#ifndef RIVET_TRIGGERPROJECTION_HH
3#define RIVET_TRIGGERPROJECTION_HH
4
5#include "Rivet/Projection.hh"
6
7namespace Rivet {
8
18 public:
19
21 TriggerProjection() : _passed(true) {
22 setName("TriggerProjection");
23 }
24 virtual ~TriggerProjection() {}
25
28
30 using Projection::operator =;
31
32
35 bool operator()() const {
36 return _passed;
37 }
38
39 protected:
40
41 virtual void project(const Event& e) {
42 pass();
43 }
44
46 void pass() {
47 _passed = true;
48 }
49
51 virtual CmpState compare(const Projection&) const {
52 return CmpState::EQ;
53 }
54
56 void fail() {
57 _passed = false;
58 }
59
60 protected:
61
62 bool _passed;
63
64 };
65
66}
67
68#endif
Representation of a HepMC event, and enabler of Projection caching.
Definition Event.hh:22
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:142
Base class for projections returning a bool corresponding to a trigger.
Definition TriggerProjection.hh:17
virtual CmpState compare(const Projection &) const
Compare projections.
Definition TriggerProjection.hh:51
void fail()
Indicate that the event has failed the trigger.
Definition TriggerProjection.hh:56
bool operator()() const
Definition TriggerProjection.hh:35
DEFAULT_RIVET_PROJ_CLONE(TriggerProjection)
Clone on the heap.
TriggerProjection()
The default constructor.
Definition TriggerProjection.hh:21
virtual void project(const Event &e)
Definition TriggerProjection.hh:41
void pass()
Indicate that the event has passed the trigger.
Definition TriggerProjection.hh:46
Definition MC_Cent_pPb.hh:10