Rivet: /Users/chrisg/software/rivet/include/Rivet/Projections/RHICCommon.hh Source File

| Rivet 3.1.9

RHICCommon.hh
1// -*- C++ -*-
2#ifndef RIVET_AtlasCommon_HH
3#define RIVET_AtlasCommon_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
11namespace Rivet {
12
13
14 class STAR_BES_Centrality : public SingleValueProjection {
15 public:
16
17 STAR_BES_Centrality() {
18 declare(ChargedFinalState(Cuts::abseta < 0.5 &&
19 Cuts::absrap < 0.1 && Cuts::pT > 0.2 * GeV),
20 "STAR_BES_Centrality");
21 }
22
23 // Destructor
24 virtual ~STAR_BES_Centrality() {}
25
27 DEFAULT_RIVET_PROJ_CLONE(STAR_BES_Centrality);
28
30 using Projection::operator =;
31
32 protected:
33
34 void project(const Event& e) {
35 clear();
36 double estimate =
37 apply<FinalState>(e, "STAR_BES_Centrality").particles().size();
38 set(estimate);
39 }
40
42 virtual CmpState compare(const Projection& p) const {
43 return mkNamedPCmp(p, "STAR_BES_Centrality");
44 }
45
46 };
47
48
50 class BRAHMSCentrality : public SingleValueProjection {
51 public:
52
53 // Constructor
54 BRAHMSCentrality() : SingleValueProjection() {
55 // Using here the BRAHMS reaction centrality from eg. 1602.01183, which
56 // might not be correct.
57 declare(ChargedFinalState(Cuts::pT > 0.1*GeV && Cuts::abseta < 2.2),
58 "ChargedFinalState");
59 }
60
61 // Destructor
62 virtual ~BRAHMSCentrality() {}
63
64 // Clone on the heap.
65 DEFAULT_RIVET_PROJ_CLONE(BRAHMSCentrality);
66
68 using Projection::operator =;
69
70 protected:
71
72 // Do the projection. Count the number of charged particles in
73 // the specified range.
74 virtual void project(const Event& e) {
75 clear();
76 set(apply<ChargedFinalState>
77 (e, "ChargedFinalState").particles().size());
78 }
79
80 // Compare to another projection.
81 virtual CmpState compare(const Projection& p) const {
82 return mkNamedPCmp(p, "BRAHMSCentrality");
83 }
84
85 };
86
87
88}
89
90#endif
Rivet::BRAHMSCentrality
BRAHMS Centrality projection.
Definition RHICCommon.hh:50
Rivet::BRAHMSCentrality::project
virtual void project(const Event &e)
Definition RHICCommon.hh:74
Rivet::BRAHMSCentrality::compare
virtual CmpState compare(const Projection &p) const
Definition RHICCommon.hh:81
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::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::STAR_BES_Centrality
Definition RHICCommon.hh:14
Rivet::STAR_BES_Centrality::DEFAULT_RIVET_PROJ_CLONE
DEFAULT_RIVET_PROJ_CLONE(STAR_BES_Centrality)
Clone on the heap.
Rivet::STAR_BES_Centrality::compare
virtual CmpState compare(const Projection &p) const
Compare projections.
Definition RHICCommon.hh:42
Rivet::STAR_BES_Centrality::project
void project(const Event &e)
Definition RHICCommon.hh:34
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::SingleValueProjection
SingleValueProjection()
The default constructor.
Definition SingleValueProjection.hh:21
Rivet::SingleValueProjection::clear
void clear()
Unset the value.
Definition SingleValueProjection.hh:58
Rivet::Kin::p
double p(const ParticleBase &p)
Unbound function access to p.
Definition ParticleBaseUtils.hh:684
Rivet
Definition MC_Cent_pPb.hh:10