File indexing completed on 2025-04-19 09:06:49
0001
0002 #ifndef RIVET_RHIC_COMMON_HH
0003 #define RIVET_RHIC_COMMON_HH
0004
0005 #include "Rivet/Projections/FinalState.hh"
0006 #include "Rivet/Projections/ChargedFinalState.hh"
0007 #include "Rivet/Projections/SingleValueProjection.hh"
0008 #include "Rivet/Projections/TriggerProjection.hh"
0009
0010
0011 namespace Rivet {
0012
0013
0014 class STAR_BES_Centrality : public SingleValueProjection {
0015 public:
0016
0017 STAR_BES_Centrality() {
0018 declare(ChargedFinalState(Cuts::abseta < 0.5 &&
0019 Cuts::absrap < 0.1 && Cuts::pT > 0.2 * GeV),
0020 "STAR_BES_Centrality");
0021 }
0022
0023
0024 virtual ~STAR_BES_Centrality() {}
0025
0026
0027 RIVET_DEFAULT_PROJ_CLONE(STAR_BES_Centrality);
0028
0029
0030 using Projection::operator =;
0031
0032 protected:
0033
0034 void project(const Event& e) {
0035 clear();
0036 double estimate =
0037 apply<FinalState>(e, "STAR_BES_Centrality").particles().size();
0038 setValue(estimate);
0039 }
0040
0041
0042 virtual CmpState compare(const Projection& p) const {
0043 return mkNamedPCmp(p, "STAR_BES_Centrality");
0044 }
0045
0046 };
0047
0048
0049
0050 class BRAHMSCentrality : public SingleValueProjection {
0051 public:
0052
0053
0054 BRAHMSCentrality() : SingleValueProjection() {
0055
0056
0057 declare(ChargedFinalState(Cuts::pT > 0.1*GeV && Cuts::abseta < 2.2),
0058 "ChargedFinalState");
0059 }
0060
0061
0062 virtual ~BRAHMSCentrality() {}
0063
0064
0065 RIVET_DEFAULT_PROJ_CLONE(BRAHMSCentrality);
0066
0067
0068 using Projection::operator =;
0069
0070 protected:
0071
0072
0073
0074 virtual void project(const Event& e) {
0075 clear();
0076 setValue(apply<ChargedFinalState>(e, "ChargedFinalState").particles().size());
0077 }
0078
0079
0080 virtual CmpState compare(const Projection& p) const {
0081 return mkNamedPCmp(p, "ChargedFinalState");
0082 }
0083
0084 };
0085
0086
0087 }
0088
0089 #endif