00001
00002 #ifndef RIVET_VetoedFinalState_HH
00003 #define RIVET_VetoedFinalState_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
00013 namespace Rivet {
00014
00015
00016 class VetoedFinalState : public FinalState {
00017
00018 public:
00019
00020
00021 typedef map<long, pair<double, double> > VetoDetails;
00022
00023
00024
00025 inline VetoedFinalState(FinalState& fsp)
00026 : _fsproj(fsp)
00027 {
00028 addProjection(_fsproj);
00029 }
00030
00031
00032
00033 inline VetoedFinalState(FinalState& fsp, const VetoDetails& vetocodes)
00034 : _fsproj(fsp), _vetoCodes(vetocodes)
00035 {
00036 addProjection(_fsproj);
00037 }
00038
00039
00040 public:
00041
00042 inline string getName() const {
00043 return "VetoedFinalState";
00044 }
00045
00046 protected:
00047
00048
00049 void project(const Event& e);
00050
00051
00052 int compare(const Projection& p) const;
00053
00054 public:
00055
00056
00057 inline const VetoDetails& getVetoDetails() const {
00058 return _vetoCodes;
00059 }
00060
00061
00062
00063 inline VetoedFinalState& addVetoDetail(const long id, const double ptmin, const double ptmax) {
00064 pair<double, double> ptrange;
00065 ptrange.first = ptmin;
00066 ptrange.second = ptmax;
00067 _vetoCodes.insert(make_pair(id, ptrange));
00068 return *this;
00069 }
00070
00071
00072
00073 inline VetoedFinalState& addVetoPairDetail(const long id, const double ptmin, const double ptmax) {
00074 addVetoPairDetail(id, ptmin, ptmax);
00075 addVetoPairDetail(-id, ptmin, ptmax);
00076 return *this;
00077 }
00078
00079
00080
00081 inline VetoedFinalState& addVetoPairId(const long id) {
00082 addVetoId(id);
00083 addVetoId(-id);
00084 return *this;
00085 }
00086
00087
00088 inline VetoedFinalState& addVetoId(const long id) {
00089 pair<double, double> ptrange;
00090 ptrange.first = 0.0;
00091 ptrange.second = numeric_limits<double>::max();
00092 _vetoCodes.insert(make_pair(id, ptrange));
00093 return *this;
00094 }
00095
00096
00097 inline VetoedFinalState& setVetoDetails(const VetoDetails& ids) {
00098 _vetoCodes = ids;
00099 return *this;
00100 }
00101
00102
00103 inline VetoedFinalState& clearVetoDetails() {
00104 _vetoCodes.clear();
00105 return *this;
00106 }
00107
00108 private:
00109
00110
00111 FinalState _fsproj;
00112
00113
00114 VetoDetails _vetoCodes;
00115
00116 };
00117
00118
00119 }
00120
00121
00122 #endif