rivet is hosted by Hepforge, IPPP Durham
Rivet 3.1.6
TriggerProjection.hh
1// -*- C++ -*-
2#ifndef RIVET_TRIGGERPROJECTION_HH
3#define RIVET_TRIGGERPROJECTION_HH
4
5#include "Rivet/Projection.hh"
6
7namespace Rivet {
8
20
21public:
22
24 TriggerProjection() : _passed(true) {
25 setName("TriggerProjection");
26 }
27 virtual ~TriggerProjection() {}
28
31
34 bool operator()() const {
35 return _passed;
36 }
37
38protected:
39
40 virtual void project(const Event& e) {
41 pass();
42 }
43
45 void pass() {
46 _passed = true;
47 }
48
50 virtual CmpState compare(const Projection&) const {
51 return CmpState::EQ;
52 }
53
55 void fail() {
56 _passed = false;
57 }
58
59private:
60
61 bool _passed;
62
63};
64
65}
66
67#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:19
virtual CmpState compare(const Projection &) const
Compare projections.
Definition: TriggerProjection.hh:50
void fail()
Indicate that the event has failed the trigger.
Definition: TriggerProjection.hh:55
bool operator()() const
Definition: TriggerProjection.hh:34
DEFAULT_RIVET_PROJ_CLONE(TriggerProjection)
Clone on the heap.
TriggerProjection()
The default constructor.
Definition: TriggerProjection.hh:24
virtual void project(const Event &e)
Definition: TriggerProjection.hh:40
void pass()
Indicate that the event has passed the trigger.
Definition: TriggerProjection.hh:45
Definition: MC_Cent_pPb.hh:10