File indexing completed on 2025-04-19 09:05:37
0001
0002 #ifndef RIVET_MC_CENT_Projections_HH
0003 #define RIVET_MC_CENT_Projections_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 namespace Rivet {
0011
0012
0013
0014
0015
0016
0017 class MC_SumETFwdPbCentrality : public SingleValueProjection {
0018 public:
0019
0020
0021 MC_SumETFwdPbCentrality() {
0022 declare(FinalState(Cuts::eta < -3.2 && Cuts::eta > -4.9 && Cuts::pT > 0.1*GeV), "FSSumETFwdCentrality");
0023 }
0024
0025
0026 RIVET_DEFAULT_PROJ_CLONE(MC_SumETFwdPbCentrality);
0027
0028
0029 using Projection::operator =;
0030
0031 protected:
0032
0033
0034 void project(const Event& e) {
0035 clear();
0036 const FinalState& fsfwd = apply<FinalState>(e, "FSSumETFwdCentrality");
0037 double estimate = 0.0;
0038 for (const Particle& p : fsfwd.particles()) estimate += p.Et();
0039 setValue(estimate);
0040 }
0041
0042
0043 CmpState compare(const Projection& p) const {
0044 return mkNamedPCmp(p, "FSSumETFwdCentrality");
0045 }
0046
0047 };
0048
0049
0050
0051
0052
0053
0054 class MC_pPbMinBiasTrigger : public TriggerProjection {
0055 public:
0056
0057
0058 MC_pPbMinBiasTrigger() {
0059 declare(FinalState(Cuts::eta < -3.2 && Cuts::eta > -4.9 && Cuts::pT > 0.1*GeV), "FSSumETFwdCentrality");
0060 declare(ChargedFinalState(Cuts::eta > 2.09 && Cuts::eta < 3.84 && Cuts::pT > 0.1*GeV), "MBB");
0061 declare(ChargedFinalState(Cuts::eta < -2.09 && Cuts::eta > -3.84 && Cuts::pT > 0.1*GeV), "MBF");
0062 }
0063
0064
0065 RIVET_DEFAULT_PROJ_CLONE(MC_pPbMinBiasTrigger);
0066
0067
0068 using Projection::operator =;
0069
0070 protected:
0071
0072
0073 void project(const Event& event) {
0074 pass();
0075 if ( apply<FinalState>(event,"MBF").particles().empty() ||
0076 apply<FinalState>(event,"MBB").particles().empty() )
0077 fail();
0078 }
0079
0080
0081 CmpState compare(const Projection& p) const {
0082 return mkNamedPCmp(p, "MBF") || mkNamedPCmp(p, "MBB");
0083 }
0084
0085 };
0086
0087
0088 }
0089
0090 #endif