rivet is hosted by Hepforge, IPPP Durham
Rivet 4.0.0
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/FinalState.hh"
6#include "Rivet/Projections/ChargedFinalState.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), "FSSumETFwdCentrality");
23 }
24
27
29 using Projection::operator =;
30
31 protected:
32
34 void project(const Event& e) {
35 clear();
36 const FinalState& fsfwd = apply<FinalState>(e, "FSSumETFwdCentrality");
37 double estimate = 0.0;
38 for (const Particle& p : fsfwd.particles()) estimate += p.Et();
39 setValue(estimate);
40 }
41
43 CmpState compare(const Projection& p) const {
44 return mkNamedPCmp(p, "FSSumETFwdCentrality");
45 }
46
47 };
48
49
55 public:
56
59 declare(FinalState(Cuts::eta < -3.2 && Cuts::eta > -4.9 && Cuts::pT > 0.1*GeV), "FSSumETFwdCentrality");
60 declare(ChargedFinalState(Cuts::eta > 2.09 && Cuts::eta < 3.84 && Cuts::pT > 0.1*GeV), "MBB");
61 declare(ChargedFinalState(Cuts::eta < -2.09 && Cuts::eta > -3.84 && Cuts::pT > 0.1*GeV), "MBF");
62 }
63
66
68 using Projection::operator =;
69
70 protected:
71
73 void project(const Event& event) {
74 pass();
75 if ( apply<FinalState>(event,"MBF").particles().empty() ||
76 apply<FinalState>(event,"MBB").particles().empty() )
77 fail();
78 }
79
81 CmpState compare(const Projection& p) const {
82 return mkNamedPCmp(p, "MBF") || mkNamedPCmp(p, "MBB");
83 }
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
Definition MC_CENT_PPB_Projections.hh:17
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:34
CmpState compare(const Projection &p) const
Compare projections.
Definition MC_CENT_PPB_Projections.hh:43
MC_SumETFwdPbCentrality()
Constructor.
Definition MC_CENT_PPB_Projections.hh:21
Definition MC_CENT_PPB_Projections.hh:54
void project(const Event &event)
Perform the projection on the Event.
Definition MC_CENT_PPB_Projections.hh:73
RIVET_DEFAULT_PROJ_CLONE(MC_pPbMinBiasTrigger)
Clone on the heap.
CmpState compare(const Projection &p) const
Compare projections.
Definition MC_CENT_PPB_Projections.hh:81
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:65
Particle representation, either from a HepMC::GenEvent or reconstructed.
Definition Particle.hh:45
const PROJ & declare(const PROJ &proj, const std::string &name) const
Register a contained projection (user-facing version)
Definition ProjectionApplier.hh:175
Base class for all Rivet projections.
Definition Projection.hh:29
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
Base class for projections returning a single floating point value.
Definition SingleValueProjection.hh:17
void setValue(double v)
Set the value.
Definition SingleValueProjection.hh:48
void clear()
Unset the value.
Definition SingleValueProjection.hh:54
Base class for projections returning a bool corresponding to a trigger.
Definition TriggerProjection.hh:18
void fail()
Indicate that the event has failed the trigger.
Definition TriggerProjection.hh:57
void pass()
Indicate that the event has passed the trigger.
Definition TriggerProjection.hh:47
Definition MC_CENT_PPB_Projections.hh:10