Rivet
1.8.0
|
00001 // -*- C++ -*- 00002 #ifndef RIVET_IdentifiedFinalState_HH 00003 #define RIVET_IdentifiedFinalState_HH 00004 00005 #include "Rivet/Tools/Logging.hh" 00006 #include "Rivet/Rivet.hh" 00007 #include "Rivet/Particle.hh" 00008 #include "Rivet/Event.hh" 00009 #include "Rivet/Projection.hh" 00010 #include "Rivet/Projections/FinalState.hh" 00011 00012 namespace Rivet { 00013 00014 00016 class IdentifiedFinalState : public FinalState { 00017 public: 00018 00020 00021 00023 IdentifiedFinalState(const FinalState& fsp); 00024 00026 IdentifiedFinalState(double etamin=-MAXRAPIDITY, 00027 double etamax=MAXRAPIDITY, 00028 double ptMin=0.0*GeV); 00029 00032 IdentifiedFinalState(const vector<pair<double, double> >& etaRanges, 00033 double ptMin=0.0*GeV); 00034 00036 virtual const Projection* clone() const { 00037 return new IdentifiedFinalState(*this); 00038 } 00040 00041 00042 public: 00043 00045 const set<PdgId>& acceptedIds() const { 00046 return _pids; 00047 } 00048 00050 IdentifiedFinalState& acceptId(PdgId pid) { 00051 _pids.insert(pid); 00052 return *this; 00053 } 00054 00056 IdentifiedFinalState& acceptIds(const vector<PdgId>& pids) { 00057 foreach (const PdgId pid, pids) { 00058 _pids.insert(pid); 00059 } 00060 return *this; 00061 } 00062 00064 IdentifiedFinalState& acceptIdPair(PdgId pid) { 00065 _pids.insert(pid); 00066 _pids.insert(-pid); 00067 return *this; 00068 } 00069 00071 IdentifiedFinalState& acceptIdPairs(const vector<PdgId>& pids) { 00072 foreach (const PdgId pid, pids) { 00073 _pids.insert(pid); 00074 _pids.insert(-pid); 00075 } 00076 return *this; 00077 } 00078 00080 IdentifiedFinalState& acceptNeutrinos() { 00081 acceptIdPair(NU_E); 00082 acceptIdPair(NU_MU); 00083 acceptIdPair(NU_TAU); 00084 return *this; 00085 } 00086 00088 IdentifiedFinalState& acceptChLeptons() { 00089 acceptIdPair(ELECTRON); 00090 acceptIdPair(MUON); 00091 acceptIdPair(TAU); 00092 return *this; 00093 } 00094 00096 void reset() { 00097 _pids.clear(); 00098 } 00099 00100 00101 protected: 00102 00104 void project(const Event& e); 00105 00107 int compare(const Projection& p) const; 00108 00109 00110 private: 00111 00113 set<PdgId> _pids; 00114 00115 }; 00116 00117 00118 } 00119 00120 00121 #endif