rivet is hosted by Hepforge, IPPP Durham
Rivet 3.1.6
RHICCommon.hh
1// -*- C++ -*-
2#ifndef RIVET_ATLAS_COMMON_HH
3#define RIVET_ATLAS_COMMON_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 {
12
14public:
16 declare(ChargedFinalState(Cuts::abseta < 0.5 &&
17 Cuts::absrap < 0.1 && Cuts::pT > 0.2 * GeV),
18 "STAR_BES_Centrality");
19 }
20
21 // Destructor
22 virtual ~STAR_BES_Centrality() {}
23
26
27protected:
28 void project(const Event& e) {
29 clear();
30 double estimate =
31 apply<FinalState>(e, "STAR_BES_Centrality").particles().size();
32 set(estimate);
33 }
34
36 virtual CmpState compare(const Projection& p) const {
37 return mkNamedPCmp(p, "STAR_BES_Centrality");
38 }
39};
40
41
44public:
45 // Constructor
47 // Using here the BRAHMS reaction centrality from eg. 1602.01183, which
48 // might not be correct.
49 declare(ChargedFinalState(Cuts::pT > 0.1*GeV && Cuts::abseta < 2.2),
50 "ChargedFinalState");
51 }
52 // Destructor
53 virtual ~BRAHMSCentrality() {}
54
55 // Clone on the heap.
56 DEFAULT_RIVET_PROJ_CLONE(BRAHMSCentrality);
57
58protected:
59 // Do the projection. Count the number of charged particles in
60 // the specified range.
61 virtual void project(const Event& e) {
62 clear();
63 set(apply<ChargedFinalState>
64 (e, "ChargedFinalState").particles().size());
65 }
66
67 // Compare to another projection.
68 virtual CmpState compare(const Projection& p) const {
69 return mkNamedPCmp(p, "BRAHMSCentrality");
70 }
71
72};
73}
74#endif
BRAHMS Centrality projection.
Definition: RHICCommon.hh:43
virtual void project(const Event &e)
Definition: RHICCommon.hh:61
virtual CmpState compare(const Projection &p) const
Definition: RHICCommon.hh:68
Project only charged final state particles.
Definition: ChargedFinalState.hh:11
Representation of a HepMC event, and enabler of Projection caching.
Definition: Event.hh:22
const PROJ & declare(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition: ProjectionApplier.hh:170
Base class for all Rivet projections.
Definition: Projection.hh:29
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
Common projections for RHIC experiments' trigger conditions and centrality.
Definition: RHICCommon.hh:13
DEFAULT_RIVET_PROJ_CLONE(STAR_BES_Centrality)
Clone on the heap.
virtual CmpState compare(const Projection &p) const
Compare projections.
Definition: RHICCommon.hh:36
void project(const Event &e)
Definition: RHICCommon.hh:28
Base class for projections returning a single floating point value.
Definition: SingleValueProjection.hh:17
void set(double v)
Definition: SingleValueProjection.hh:51
SingleValueProjection()
The default constructor.
Definition: SingleValueProjection.hh:21
void clear()
Unset the value.
Definition: SingleValueProjection.hh:54
double p(const ParticleBase &p)
Unbound function access to p.
Definition: ParticleBaseUtils.hh:653
Definition: MC_Cent_pPb.hh:10