Rivet API documentation

Rivet 4.1.3
AtlasCommon.hh
1// -*- C++ -*-
2#ifndef RIVET_ATLAS_COMMON_HH
3#define RIVET_ATLAS_COMMON_HH
4
5#include "Rivet/Projections/ChargedFinalState.hh"
6#include "Rivet/Projections/FinalState.hh"
7#include "Rivet/Projections/SingleValueProjection.hh"
8#include "Rivet/Projections/TriggerProjection.hh"
9
10namespace Rivet {
12
13 namespace ATLAS {
14
15
18 public:
19
22 declare(FinalState(Cuts::eta < -3.2 && Cuts::eta > -4.9 && Cuts::pT > 0.1 * GeV),
23 "SumET_PB_Centrality");
24 }
25
28
30 using Projection::operator=;
31
32 protected:
33
35 void project(const Event& e) {
36 clear();
37 const FinalState& fsfwd = apply<FinalState>(e, "SumET_PB_Centrality");
38 double estimate = 0.0;
39 for (const Particle& p : fsfwd.particles()) {
40 estimate += p.Et();
41 }
42 setValue(estimate);
43 }
44
46 CmpState compare(const Projection& p) const {
47 return mkNamedPCmp(p, "SumET_PB_Centrality");
48 }
49 };
50
51
54 public:
55
58 declare(FinalState(Cuts::abseta > 3.2 && Cuts::abseta < 4.9 && Cuts::pT > 0.1 * GeV),
59 "SumET_PBPB_Centrality");
60 }
61
64
66 using Projection::operator=;
67
68 protected:
69
71 void project(const Event& e) {
72 clear();
73 const FinalState& fsfwd = apply<FinalState>(e, "SumET_PBPB_Centrality");
74 double estimate = 0.0;
75 for (const Particle& p : fsfwd.particles()) {
76 estimate += p.Et();
77 }
78 setValue(estimate);
79 }
80
82 CmpState compare(const Projection& p) const {
83 return mkNamedPCmp(p, "SumET_PBPB_Centrality");
84 }
85 };
86
87
90 public:
91
94 declare(ChargedFinalState(Cuts::eta > 2.09 && Cuts::eta < 3.84 && Cuts::pT > 0.1 * GeV), "MBB");
95 declare(ChargedFinalState(Cuts::eta < -2.09 && Cuts::eta > -3.84 && Cuts::pT > 0.1 * GeV), "MBF");
96 }
97
100
102 using Projection::operator=;
103
104 protected:
105
107 void project(const Event& event) {
108 pass();
109 if (apply<FinalState>(event, "MBF").particles().empty()
110 || apply<FinalState>(event, "MBB").particles().empty())
111 fail();
112 }
113
115 CmpState compare(const Projection& p) const {
116 return mkNamedPCmp(p, "MBF") || mkNamedPCmp(p, "MBB");
117 }
118 };
119
120
121 }
122}
123
124#endif
CmpState compare(const Projection &p) const
Compare projections.
Definition AtlasCommon.hh:115
MinBiasTrigger()
Constructor.
Definition AtlasCommon.hh:93
RIVET_DEFAULT_PROJ_CLONE(MinBiasTrigger)
Clone on the heap.
void project(const Event &event)
Perform the projection on the Event.
Definition AtlasCommon.hh:107
SumET_PBPB_Centrality()
Constructor.
Definition AtlasCommon.hh:57
RIVET_DEFAULT_PROJ_CLONE(SumET_PBPB_Centrality)
Clone on the heap.
void project(const Event &e)
Perform the projection on the Event.
Definition AtlasCommon.hh:71
CmpState compare(const Projection &p) const
Compare projections.
Definition AtlasCommon.hh:82
CmpState compare(const Projection &p) const
Compare projections.
Definition AtlasCommon.hh:46
SumET_PB_Centrality()
Constructor.
Definition AtlasCommon.hh:21
RIVET_DEFAULT_PROJ_CLONE(SumET_PB_Centrality)
Clone on the heap.
void project(const Event &e)
Perform the projection on the Event.
Definition AtlasCommon.hh:35
Project only charged final state particles.
Definition ChargedFinalState.hh:11
Project out all final-state particles in an event. Probably the most important projection in Rivet!
Definition FinalState.hh:12
virtual const Particles & particles() const
Get the particles in no particular order, with no cuts.
Definition ParticleFinder.hh:76
Particle representation, either from a HepMC::GenEvent or reconstructed.
Definition Particle.hh:50
std::enable_if_t< std::is_base_of< Projection, PROJ >::value, const PROJ & > apply(const Event &evt, const Projection &proj) const
Apply the supplied projection on event evt.
Definition ProjectionApplier.hh:124
const PROJ & declare(const PROJ &proj, const std::string &name) const
Register a contained projection (user-facing version).
Definition ProjectionApplier.hh:205
Projection()
The default constructor.
friend class Event
Event is a friend.
Definition Projection.hh:33
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
void setValue(double v)
Set the value.
Definition SingleValueProjection.hh:49
SingleValueProjection()
The default constructor.
Definition SingleValueProjection.hh:21
void clear()
Unset the value.
Definition SingleValueProjection.hh:55
void fail()
Indicate that the event has failed the trigger.
Definition TriggerProjection.hh:58
TriggerProjection()
The default constructor.
Definition TriggerProjection.hh:22
void pass()
Indicate that the event has passed the trigger.
Definition TriggerProjection.hh:48
double p(const ParticleBase &p)
Unbound function access to p.
Definition ParticleBaseUtils.hh:819
Common projections for ATLAS trigger conditions and centrality.
Definition AtlasCommon.hh:13
Definition LHCbCommon.hh:9