Rivet API documentation

Rivet 4.1.3
MC_CENT_PPB_Projections.hh
1// -*- C++ -*-
2#ifndef RIVET_MC_CENT_Projections_HH
3#define RIVET_MC_CENT_Projections_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 {
11
12
18 public:
19
22 declare(FinalState(Cuts::eta < -3.2 && Cuts::eta > -4.9 && Cuts::pT > 0.1 * GeV),
23 "FSSumETFwdCentrality");
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, "FSSumETFwdCentrality");
38 double estimate = 0.0;
39 for (const Particle& p : fsfwd.particles()) estimate += p.Et();
40 setValue(estimate);
41 }
42
44 CmpState compare(const Projection& p) const {
45 return mkNamedPCmp(p, "FSSumETFwdCentrality");
46 }
47 };
48
49
55 public:
56
59 declare(FinalState(Cuts::eta < -3.2 && Cuts::eta > -4.9 && Cuts::pT > 0.1 * GeV),
60 "FSSumETFwdCentrality");
61 declare(ChargedFinalState(Cuts::eta > 2.09 && Cuts::eta < 3.84 && Cuts::pT > 0.1 * GeV), "MBB");
62 declare(ChargedFinalState(Cuts::eta < -2.09 && Cuts::eta > -3.84 && Cuts::pT > 0.1 * GeV), "MBF");
63 }
64
67
69 using Projection::operator=;
70
71 protected:
72
74 void project(const Event& event) {
75 pass();
76 if (apply<FinalState>(event, "MBF").particles().empty()
77 || apply<FinalState>(event, "MBB").particles().empty())
78 fail();
79 }
80
82 CmpState compare(const Projection& p) const {
83 return mkNamedPCmp(p, "MBF") || mkNamedPCmp(p, "MBB");
84 }
85 };
86
87
88}
89
90#endif
Project only charged final state particles.
Definition ChargedFinalState.hh:11
Representation of a HepMC event, and enabler of Projection caching.
Definition Event.hh:22
Project out all final-state particles in an event. Probably the most important projection in Rivet!
Definition FinalState.hh:12
RIVET_DEFAULT_PROJ_CLONE(MC_SumETFwdPbCentrality)
Clone on the heap.
void project(const Event &e)
Perform the projection on the Event.
Definition MC_CENT_PPB_Projections.hh:35
CmpState compare(const Projection &p) const
Compare projections.
Definition MC_CENT_PPB_Projections.hh:44
MC_SumETFwdPbCentrality()
Constructor.
Definition MC_CENT_PPB_Projections.hh:21
void project(const Event &event)
Perform the projection on the Event.
Definition MC_CENT_PPB_Projections.hh:74
RIVET_DEFAULT_PROJ_CLONE(MC_pPbMinBiasTrigger)
Clone on the heap.
CmpState compare(const Projection &p) const
Compare projections.
Definition MC_CENT_PPB_Projections.hh:82
MC_pPbMinBiasTrigger()
Constructor.
Definition MC_CENT_PPB_Projections.hh:58
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
Base class for all Rivet projections.
Definition Projection.hh:29
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
Definition LHCbCommon.hh:9