File indexing completed on 2025-04-19 09:06:47
0001
0002 #ifndef RIVET_ATLAS_COMMON_HH
0003 #define RIVET_ATLAS_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 namespace Rivet {
0011
0012
0013 namespace ATLAS {
0014
0015
0016
0017 class SumET_PB_Centrality: public SingleValueProjection {
0018 public:
0019
0020
0021 SumET_PB_Centrality() {
0022 declare(FinalState(Cuts::eta < -3.2 && Cuts::eta > -4.9 && Cuts::pT > 0.1*GeV),
0023 "SumET_PB_Centrality");
0024 }
0025
0026
0027 RIVET_DEFAULT_PROJ_CLONE(SumET_PB_Centrality);
0028
0029
0030 using Projection::operator =;
0031
0032 protected:
0033
0034
0035 void project(const Event& e) {
0036 clear();
0037 const FinalState & fsfwd =
0038 apply<FinalState>(e, "SumET_PB_Centrality");
0039 double estimate = 0.0;
0040 for ( const Particle & p : fsfwd.particles() ) {
0041 estimate += p.Et();
0042 }
0043 setValue(estimate);
0044 }
0045
0046
0047 CmpState compare(const Projection& p) const {
0048 return mkNamedPCmp(p, "SumET_PB_Centrality");
0049 }
0050
0051 };
0052
0053
0054
0055
0056 class SumET_PBPB_Centrality: public SingleValueProjection {
0057 public:
0058
0059
0060 SumET_PBPB_Centrality() {
0061 declare(FinalState(Cuts::abseta > 3.2 && Cuts::abseta < 4.9 && Cuts::pT > 0.1*GeV),
0062 "SumET_PBPB_Centrality");
0063 }
0064
0065
0066 RIVET_DEFAULT_PROJ_CLONE(SumET_PBPB_Centrality);
0067
0068
0069 using Projection::operator =;
0070
0071 protected:
0072
0073
0074 void project(const Event& e) {
0075 clear();
0076 const FinalState & fsfwd =
0077 apply<FinalState>(e, "SumET_PBPB_Centrality");
0078 double estimate = 0.0;
0079 for ( const Particle & p : fsfwd.particles() ) {
0080 estimate += p.Et();
0081 }
0082 setValue(estimate);
0083 }
0084
0085
0086 CmpState compare(const Projection& p) const {
0087 return mkNamedPCmp(p, "SumET_PBPB_Centrality");
0088 }
0089
0090 };
0091
0092
0093
0094
0095 class MinBiasTrigger: public TriggerProjection {
0096 public:
0097
0098
0099 MinBiasTrigger() {
0100 declare(ChargedFinalState(Cuts::eta > 2.09 && Cuts::eta < 3.84 &&
0101 Cuts::pT > 0.1*GeV), "MBB");
0102 declare(ChargedFinalState(Cuts::eta < -2.09 && Cuts::eta > -3.84 &&
0103 Cuts::pT > 0.1*GeV), "MBF");
0104 }
0105
0106
0107 RIVET_DEFAULT_PROJ_CLONE(MinBiasTrigger);
0108
0109
0110 using Projection::operator =;
0111
0112 protected:
0113
0114
0115 void project(const Event& event) {
0116 pass();
0117 if ( apply<FinalState>(event,"MBF").particles().empty() || apply<FinalState>(event,"MBB").particles().empty() )
0118 fail();
0119 }
0120
0121
0122 CmpState compare(const Projection& p) const {
0123 return mkNamedPCmp(p, "MBF") || mkNamedPCmp(p, "MBB");
0124 }
0125
0126 };
0127
0128
0129 }
0130 }
0131
0132 #endif