Rivet  3.1.2
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 
10 namespace Rivet {
12 
14 public:
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 
27 protected:
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 
44 public:
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.
57 
58 protected:
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
Definition: MC_Cent_pPb.hh:10
BRAHMS Centrality projection.
Definition: RHICCommon.hh:43
Base class for projections returning a single floating point value.
Definition: SingleValueProjection.hh:17
void project(const Event &e)
Definition: RHICCommon.hh:28
DEFAULT_RIVET_PROJ_CLONE(STAR_BES_Centrality)
Clone on the heap.
Representation of a HepMC event, and enabler of Projection caching.
Definition: Event.hh:22
virtual void project(const Event &e)
Definition: RHICCommon.hh:61
const PROJ & declare(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition: ProjectionApplier.hh:170
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
SingleValueProjection()
The default constructor.
Definition: SingleValueProjection.hh:21
virtual CmpState compare(const Projection &p) const
Compare projections.
Definition: RHICCommon.hh:36
Project only charged final state particles.
Definition: ChargedFinalState.hh:11
Common projections for RHIC experiments&#39; trigger conditions and centrality.
Definition: RHICCommon.hh:13
Base class for all Rivet projections.
Definition: Projection.hh:29
virtual CmpState compare(const Projection &p) const
Definition: RHICCommon.hh:68
void clear()
Unset the value.
Definition: SingleValueProjection.hh:54