2 #ifndef RIVET_VetoedFinalState_HH 3 #define RIVET_VetoedFinalState_HH 5 #include "Rivet/Tools/Logging.hh" 6 #include "Rivet/Rivet.hh" 7 #include "Rivet/Particle.hh" 8 #include "Rivet/Event.hh" 9 #include "Rivet/Projection.hh" 10 #include "Rivet/Projections/FinalState.hh" 48 : _vetoCodes(vetocodes)
58 : _vetoCodes(vetocodes)
82 BinaryCut ptrange(ptmin, ptmax);
83 _vetoCodes.insert(make_pair(
id, ptrange));
105 BinaryCut ptrange(0.0, numeric_limits<double>::max());
106 _vetoCodes.insert(make_pair(
id, ptrange));
122 double halfWidth = 0.5*width;
123 BinaryCut massRange(mass - halfWidth, mass + halfWidth);
124 _compositeVetoes.insert(make_pair(nProducts, massRange));
125 _nCompositeDecays.insert(nProducts);
133 _parentVetoes.insert(
id);
152 stringstream st_name;
153 st_name <<
"FS_" << _vetofsnames.
size();
154 string name = st_name.str();
156 _vetofsnames.insert(name);
173 VetoDetails _vetoCodes;
176 CompositeVeto _compositeVetoes;
177 set<int> _nCompositeDecays;
179 typedef set<long> ParentVetos;
182 ParentVetos _parentVetoes;
185 set<string> _vetofsnames;
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:120
Definition: MC_JetAnalysis.hh:9
pair< double, double > BinaryCut
Typedef for a pair of back-to-back cuts.
Definition: VetoedFinalState.hh:21
VetoedFinalState & addDecayProductsVeto(const long id)
Definition: VetoedFinalState.hh:132
VetoedFinalState & vetoNeutrinos()
Veto all neutrinos (convenience method)
Definition: VetoedFinalState.hh:111
VetoedFinalState(const VetoDetails &vetocodes)
Definition: VetoedFinalState.hh:47
VetoedFinalState & addVetoDetail(const long id, const double ptmin, const double ptmax)
Definition: VetoedFinalState.hh:81
FS modifier to exclude classes of particles from the final state.
Definition: VetoedFinalState.hh:16
virtual const Projection * clone() const
Clone on the heap.
Definition: VetoedFinalState.hh:66
void project(const Event &e)
Apply the projection on the supplied event.
Definition: VetoedFinalState.cc:23
const VetoDetails & vetoDetails() const
Get the list of particle IDs and ranges to veto.
Definition: VetoedFinalState.hh:75
int compare(const Projection &p) const
Compare projections.
Definition: VetoedFinalState.cc:11
VetoedFinalState & addVetoPairId(const long id)
Definition: VetoedFinalState.hh:97
virtual std::string name() const
Get the name of the projection.
Definition: Projection.hh:101
VetoedFinalState()
Default constructor.
Definition: VetoedFinalState.hh:33
VetoedFinalState & addVetoOnThisFinalState(const FinalState &fs)
Veto particles from a supplied final state.
Definition: VetoedFinalState.hh:151
VetoedFinalState(const FinalState &fsp)
Constructor with specific FinalState.
Definition: VetoedFinalState.hh:39
VetoedFinalState & reset()
Clear the list of particle IDs and ranges to veto.
Definition: VetoedFinalState.hh:144
VetoedFinalState & addCompositeMassVeto(const double &mass, const double &width, int nProducts=2)
Definition: VetoedFinalState.hh:121
virtual size_t size() const
Access the projected final-state particles.
Definition: FinalState.hh:89
Project out all final-state particles in an event. Probably the most important projection in Rivet! ...
Definition: FinalState.hh:14
const PROJ & addProjection(const PROJ &proj, const std::string &name)
Definition: ProjectionApplier.hh:113
VetoedFinalState & addVetoId(const long id)
Add a particle ID to veto (all range will be vetoed).
Definition: VetoedFinalState.hh:104
FinalState(double mineta=-MAXRAPIDITY, double maxeta=MAXRAPIDITY, double minpt=0.0 *GeV)
Definition: FinalState.cc:9
VetoedFinalState & setVetoDetails(const VetoDetails &ids)
Set the list of particle IDs and ranges to veto.
Definition: VetoedFinalState.hh:138
VetoedFinalState(const FinalState &fsp, const VetoDetails &vetocodes)
Definition: VetoedFinalState.hh:57
double mass(const FourMomentum &v)
Get the mass (the Lorentz self-invariant) of a momentum 4-vector.
Definition: Vector4.hh:539
Base class for all Rivet projections.
Definition: Projection.hh:28
multimap< int, BinaryCut > CompositeVeto
Typedef for a veto on a composite particle mass.
Definition: VetoedFinalState.hh:27
VetoedFinalState & addVetoPairDetail(const long id, const double ptmin, const double ptmax)
Definition: VetoedFinalState.hh:89
map< long, BinaryCut > VetoDetails
Typedef for a vetoing entry.
Definition: VetoedFinalState.hh:24