File indexing completed on 2025-05-12 09:05:02
0001
0002 #ifndef RIVET_IdentifiedFinalState_HH
0003 #define RIVET_IdentifiedFinalState_HH
0004
0005 #include "Rivet/Projections/FinalState.hh"
0006
0007 namespace Rivet {
0008
0009
0010
0011 class IdentifiedFinalState : public FinalState {
0012 public:
0013
0014
0015
0016
0017
0018 IdentifiedFinalState(const FinalState& fsp, const vector<PdgId>& pids=vector<PdgId>());
0019
0020
0021 IdentifiedFinalState(const FinalState& fsp, PdgId pid);
0022
0023
0024 IdentifiedFinalState(const Cut& c=Cuts::open(), const vector<PdgId>& pids=vector<PdgId>());
0025
0026
0027 IdentifiedFinalState(const vector<PdgId>& pids, const Cut& c=Cuts::open());
0028
0029
0030 IdentifiedFinalState(const Cut& c, PdgId pid);
0031
0032
0033 IdentifiedFinalState(PdgId pid, const Cut& c=Cuts::open());
0034
0035
0036
0037 RIVET_DEFAULT_PROJ_CLONE(IdentifiedFinalState);
0038
0039
0040
0041
0042 using Projection::operator =;
0043
0044
0045
0046 const set<PdgId>& acceptedIds() const {
0047 return _pids;
0048 }
0049
0050
0051 IdentifiedFinalState& acceptId(PdgId pid) {
0052 _pids.insert(pid);
0053 return *this;
0054 }
0055
0056
0057 IdentifiedFinalState& acceptIds(const vector<PdgId>& pids) {
0058 for (const PdgId pid : pids) _pids.insert(pid);
0059 return *this;
0060 }
0061
0062
0063 IdentifiedFinalState& acceptIdPair(PdgId pid) {
0064 _pids.insert(pid);
0065 _pids.insert(-pid);
0066 return *this;
0067 }
0068
0069
0070 IdentifiedFinalState& acceptIdPairs(const vector<PdgId>& pids) {
0071 for (const PdgId pid : pids) {
0072 _pids.insert(pid);
0073 _pids.insert(-pid);
0074 }
0075 return *this;
0076 }
0077
0078
0079 IdentifiedFinalState& acceptNeutrinos() {
0080 acceptIdPair(PID::NU_E);
0081 acceptIdPair(PID::NU_MU);
0082 acceptIdPair(PID::NU_TAU);
0083 return *this;
0084 }
0085
0086
0087 IdentifiedFinalState& acceptChLeptons() {
0088 acceptIdPair(PID::ELECTRON);
0089 acceptIdPair(PID::MUON);
0090 acceptIdPair(PID::TAU);
0091 return *this;
0092 }
0093
0094
0095 void reset() {
0096 _pids.clear();
0097 }
0098
0099
0100 virtual const Particles& remainingParticles() const {
0101 return _remainingParticles;
0102 }
0103
0104
0105
0106 void project(const Event& e);
0107
0108
0109 CmpState compare(const Projection& p) const;
0110
0111
0112 protected:
0113
0114
0115 set<PdgId> _pids;
0116
0117
0118 Particles _remainingParticles;
0119
0120 };
0121
0122
0123 }
0124
0125 #endif