Rivet: /Users/chrisg/software/rivet/include/Rivet/Analyses/MC_Cent_pPb.hh Source File

| Rivet 3.1.9

MC_Cent_pPb.hh
1// -*- C++ -*-
2#ifndef RIVET_MC_Cent_pPb_HH
3#define RIVET_MC_Cent_pPb_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
10 namespace Rivet {
11
14 class MC_SumETFwdPbCentrality : public SingleValueProjection {
15public:
16
18 MC_SumETFwdPbCentrality() {
19 declare(FinalState(Cuts::eta < -3.2 && Cuts::eta > -4.9 && Cuts::pT > 0.1*GeV),
20 "FSSumETFwdCentrality");
21 }
22
24 DEFAULT_RIVET_PROJ_CLONE(MC_SumETFwdPbCentrality);
25
27 using Projection::operator =;
28
29protected:
30
32 void project(const Event& e) {
33 clear();
34 const FinalState & fsfwd =
35 apply<FinalState>(e, "FSSumETFwdCentrality");
36 double estimate = 0.0;
37 for ( const Particle & p : fsfwd.particles() ) {
38 estimate += p.Et();
39 }
40 set(estimate);
41 }
42
44 CmpState compare(const Projection& p) const {
45 return mkNamedPCmp(p, "FSSumETFwdCentrality");
46 }
47
48};
49
50
53 class MC_pPbMinBiasTrigger : public TriggerProjection {
54public:
55
57 MC_pPbMinBiasTrigger() {
58 declare(FinalState(Cuts::eta < -3.2 && Cuts::eta > -4.9 && Cuts::pT > 0.1*GeV),
59 "FSSumETFwdCentrality");
60 declare(ChargedFinalState(Cuts::eta > 2.09 && Cuts::eta < 3.84 &&
61 Cuts::pT > 0.1*GeV), "MBB");
62 declare(ChargedFinalState(Cuts::eta < -2.09 && Cuts::eta > -3.84 &&
63 Cuts::pT > 0.1*GeV), "MBF");
64 }
65
67 DEFAULT_RIVET_PROJ_CLONE(MC_pPbMinBiasTrigger);
68
70 using Projection::operator =;
71
72protected:
73
75 void project(const Event& event) {
76 pass();
77 if ( applyProjection<FinalState>(event,"MBF").particles().empty() ||
78 applyProjection<FinalState>(event,"MBB").particles().empty() )
79 fail();
80 }
81
83 CmpState compare(const Projection& p) const {
84 return mkNamedPCmp(p, "MBF") || mkNamedPCmp(p, "MBB");
85 }
86
87};
88
89
90}
91
92#endif
Rivet::ChargedFinalState
Project only charged final state particles.
Definition ChargedFinalState.hh:11
Rivet::Event
Representation of a HepMC event, and enabler of Projection caching.
Definition Event.hh:22
Rivet::FinalState
Project out all final-state particles in an event. Probably the most important projection in Rivet!
Definition FinalState.hh:12
Rivet::MC_SumETFwdPbCentrality
Definition MC_Cent_pPb.hh:14
Rivet::MC_SumETFwdPbCentrality::project
void project(const Event &e)
Perform the projection on the Event.
Definition MC_Cent_pPb.hh:32
Rivet::MC_SumETFwdPbCentrality::compare
CmpState compare(const Projection &p) const
Compare projections.
Definition MC_Cent_pPb.hh:44
Rivet::MC_SumETFwdPbCentrality::MC_SumETFwdPbCentrality
MC_SumETFwdPbCentrality()
Constructor.
Definition MC_Cent_pPb.hh:18
Rivet::MC_SumETFwdPbCentrality::DEFAULT_RIVET_PROJ_CLONE
DEFAULT_RIVET_PROJ_CLONE(MC_SumETFwdPbCentrality)
Clone on the heap.
Rivet::MC_pPbMinBiasTrigger
Definition MC_Cent_pPb.hh:53
Rivet::MC_pPbMinBiasTrigger::project
void project(const Event &event)
Perform the projection on the Event.
Definition MC_Cent_pPb.hh:75
Rivet::MC_pPbMinBiasTrigger::DEFAULT_RIVET_PROJ_CLONE
DEFAULT_RIVET_PROJ_CLONE(MC_pPbMinBiasTrigger)
Clone on the heap.
Rivet::MC_pPbMinBiasTrigger::compare
CmpState compare(const Projection &p) const
Compare projections.
Definition MC_Cent_pPb.hh:83
Rivet::MC_pPbMinBiasTrigger::MC_pPbMinBiasTrigger
MC_pPbMinBiasTrigger()
Constructor.
Definition MC_Cent_pPb.hh:57
Rivet::ParticleFinder::particles
virtual const Particles & particles() const
Get the particles in no particular order, with no cuts.
Definition ParticleFinder.hh:52
Rivet::Particle
Particle representation, either from a HepMC::GenEvent or reconstructed.
Definition Particle.hh:53
Rivet::ProjectionApplier::declare
const PROJ & declare(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition ProjectionApplier.hh:170
Rivet::Projection
Base class for all Rivet projections.
Definition Projection.hh:29
Rivet::Projection::mkNamedPCmp
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
Rivet::SingleValueProjection
Base class for projections returning a single floating point value.
Definition SingleValueProjection.hh:17
Rivet::SingleValueProjection::set
void set(double v)
Definition SingleValueProjection.hh:55
Rivet::SingleValueProjection::clear
void clear()
Unset the value.
Definition SingleValueProjection.hh:58
Rivet::TriggerProjection
Base class for projections returning a bool corresponding to a trigger.
Definition TriggerProjection.hh:17
Rivet::TriggerProjection::fail
void fail()
Indicate that the event has failed the trigger.
Definition TriggerProjection.hh:56
Rivet::TriggerProjection::pass
void pass()
Indicate that the event has passed the trigger.
Definition TriggerProjection.hh:46
Rivet::Kin::p
double p(const ParticleBase &p)
Unbound function access to p.
Definition ParticleBaseUtils.hh:684
Rivet
Definition MC_Cent_pPb.hh:10