File:
StandardMatchers.h
This file may become a part of CLHEP - a Class Library for High Energy Physics.
This is the definition of the standard particle matchers classes.
The following classes are defined
HEP_PARTICLE_MATCHER(HepBaryonMatcher,"Baryon",pd) {
return HepBoolean( (pd.id()/10)%10 && (pd.id()/100)%10 && (pd.id()/1000)%10 );
}
Matches any baryon
HEP_PARTICLE_MATCHER(HepMesonMatcher,"Meson",pd) {
return HepBoolean( (pd.id()/10)%10 && (pd.id()/100)%10 &&
(pd.id()/1000)%10 == 0 );
}
Matches any baryon
HEP_PARTICLE_MATCHER(HepLeptonMatcher,"Lepton",pd) {
return HepBoolean( abs(pd.id()) > 10 && abs(pd.id()) < 19 );
}
Matches any lepton
HEP_PARTICLE_MATCHER(HepAnyLightQuarkMatcher,"LightQuark",pd) {
return HepBoolean( pd.id() > 0 && pd.id() < 4 );
}
Matches any light quark
HEP_PARTICLE_MATCHER(HepAnyLightAntiQuarkMatcher,"LightAntiQuark",pd) {
return HepBoolean( pd.id() < 0 && pd.id() > -4 );
}
Matches any light antiquark
public: HepMeVMassRangeMatcher(const HepString & m) : HepParticleMatcher(m) {}
virtual ~HepMeVMassRangeMatcher() {}
virtual HepBoolean checkMatch(const HepParticleData & pd ) const { return matchCheck(pd); }
static HepBoolean matchCheck(const HepParticleData & pd) { return pd.mass() > HepDouble(minMass) && pd.mass() <= HepDouble(maxMass); }
};