2 #ifndef RIVET_BeamConstraint_HH 3 #define RIVET_BeamConstraint_HH 5 #include "Rivet/Particle.hh" 14 return (allowed == PID::ANY || p == allowed);
20 inline bool compatible(
const PdgIdPair& pair,
const PdgIdPair& allowedpair) {
21 bool oneToOne =
compatible(pair.first, allowedpair.first);
22 bool twoToTwo =
compatible(pair.second, allowedpair.second);
23 bool oneToTwo =
compatible(pair.first, allowedpair.second);
24 bool twoToOne =
compatible(pair.second, allowedpair.first);
25 return (oneToOne && twoToTwo) || (oneToTwo && twoToOne);
31 const PdgIdPair& allowedpair) {
32 return compatible(PID::make_pdgid_pair(ppair.first.pid(),
33 ppair.second.pid()), allowedpair);
37 const ParticlePair& ppair) {
44 inline bool compatible(
const PdgIdPair& pair,
const set<PdgIdPair>& allowedpairs) {
45 for (set<PdgIdPair>::const_iterator bp = allowedpairs.begin(); bp != allowedpairs.end(); ++bp) {
52 inline set<PdgIdPair>
intersection(
const set<PdgIdPair>& a,
const set<PdgIdPair>& b) {
54 for (set<PdgIdPair>::const_iterator bp = a.begin(); bp != a.end(); ++bp) {
Definition: ALICE_2010_I880049.cc:13
set< PdgIdPair > intersection(const set< PdgIdPair > &a, const set< PdgIdPair > &b)
Return the intersection of two sets of {PdgIdPair}s.
Definition: BeamConstraint.hh:52
bool compatible(PdgId p, PdgId allowed)
Definition: BeamConstraint.hh:13