9 #ifndef ThePEG_MatcherBase_H 10 #define ThePEG_MatcherBase_H 14 #include "ParticleData.h" 15 #include "ThePEG/EventRecord/Particle.h" 274 template <
typename Iterator>
276 for ( ; first != last; ++first )
addPIfMatch(*first);
283 template <
typename Cont>
292 template <
typename Iterator>
294 for ( ; first != last; ++first )
addMIfMatch(*first);
301 template <
typename Cont>
315 pm->theAntiPartner = apm;
316 apm->theAntiPartner = pm;
413 static string className() {
return "ThePEG::MatcherBase"; }
bool checkp(const Particle &p) const
Check if a Particle meets the criteria.
Energy commonMass
The common mass of all matching particles.
PersistentIStream is used to read persistent objects from a stream where they were previously written...
Energy mass() const
Returns the common mass of the matching particles.
MatcherBase & operator=(const MatcherBase &)
Private and non-existent assignment operator.
ThePEG::Ptr< MatcherBase >::pointer PMPtr
Alias for a reference counted pointer to MatcherBase .
PDT::Spin commonSpin
The common spin of all matching particles.
bool positive() const
Are the particles positively charged? If all matching particles are positively charged, return true, otherwise false.
Charge
Definition of enumerated values used for charge information.
Length commonCTau
The common decay length of all matching particles.
The Particle class is used to describe an instance of a particle.
tPDSet matchingParticles
The set of particle data objects matched by this matcher.
ClassTraitsType is an empty, non-polymorphic, base class.
PDT::Charge iCharge() const
Return common charge.
static bool coloured(Colour c)
True if the argument corresponds to a non-zero colour charge.
static bool charged(Charge c)
True if the argument corresponds to a non-zero charge.
int stable() const
Are the particles stable? Returns (0)1 if all matching particles are (un)stable.
void addMIfMatch(Iterator first, Iterator last)
Add a number of particle matchers to the set of matching matchers if they meets the criteria...
const ParticleDataClass & data() const
Access the ParticleData object of this particle type.
bool member(const Container &c, const Key &k)
Check if a given object is a part of a container.
MatcherBase is an abstract base class to be used for objects representing groups of ParticleData obje...
set< tPMPtr > tPMSet
Convenient typedef.
Colour
Definition of enumerated values used for colour information.
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
A concreate implementation of ClassDescriptionBase describing an abstract class with persistent data...
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
Repository inherits from the BaseRepository class.
PDT::Colour iColour() const
If all matching particles have the same colour, the common colour is returned.
This is the main namespace within which all identifiers in ThePEG are declared.
const tPDSet & particles() const
Access to the set of matching particles.
bool matches(const Particle &p) const
Check if a given particle belongs to the set of matches.
ParticleData inherits from InterfacedBase and represents the properties of a particle type...
void addPIfMatch(tPDPtr)
Add a particle to the set of matching particles if it meets the criteria.
bool negative() const
Are the particles negatively charged? If all matching particles are negatively charged, return true, otherwise false.
QTY< 0, 1, 0 >::Type Energy
Energy.
PDT::Colour commonColour
The common colour of all matching particles.
bool coloured() const
Are the particles coloured? If all matching particles are coloured, return true, otherwise false...
int commonStable
The common stability of all matching particles.
bool charged() const
Are the particles charged? If all matching particles are charged, return true, otherwise false...
tPMPtr CC() const
Get the matcher object matching the antiparticles of this.
Spin
Definition of enumerated values used for spin information.
virtual bool check(const ParticleData &) const =0
Check if a particle type meets the criteria.
void addPIfMatch(Iterator first, Iterator last)
Add a number of particles to the set of matching particles if they meets the criteria.
PDT::Spin iSpin() const
Return common spin.
QTY< 1, 0, 0 >::Type Length
Length.
bool matches(const MatcherBase &pm) const
Check if a given particle matcher belongs to the set of matches.
virtual PMPtr pmclone() const =0
Specialized clone method for MatcherBase used by the Repository.
Energy theMinMass
The minimum mass of all matching particles.
tPMPtr theAntiPartner
Pointer to a matcher object which matches all anti particles which are matched by this matcher...
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
Energy theMaxMass
The maximum mass of all matching particles.
Energy minMass() const
Returns the minimum mass of the matching particles.
bool matches(const ParticleData &pd) const
Check if a given particle type belongs to the set of matches.
static bool negative(Charge c)
True if the argument corresponds to a negative charge.
ThePEG::Ptr< ParticleData >::pointer PDPtr
Alias for a reference counted pointer to ParticleData .
Energy commonWidth
The common width of all matching particles.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
RCPtr is a reference counted (smart) pointer.
Length cTau() const
Returns the common decay length of the matching particles.
virtual void doupdate()
Check sanity of the object during the setup phase.
The Interfaced class is derived from the InterfacedBase class adding a couple of things particular to...
void clear()
Clear information about matching particles and matchers.
void addMIfMatch(tPMPtr)
Add a particle matcher to the set of matching matchers if it meets the criteria.
void addMIfMatchFrom(const Cont &c)
Add a number of particle matchers to the set of matching matchers if they meets the criteria...
static void Init()
Standard Init function used to initialize the interface.
static bool positive(Charge c)
True if the argument corresponds to a positive charge.
static void setCC(tPMPtr pm, tPMPtr apm)
Set antipartner.
const tPMSet & matchers() const
Access to the set of matching matchers.
set< tPDPtr > tPDSet
Convenient typedef.
The default concrete implementation of ClassTraitsBase.
Energy width() const
Returns the common width of the matching particles.
MatcherBase()
Default constructor.
Energy maxMass() const
Returns the maximum mass of the matching particles.
static AbstractClassDescription< MatcherBase > initMatcherBase
The static object used to initialize the description of this class.
void addPIfMatchFrom(const Cont &c)
Add a number of particles to the set of matching particles if they meets the criteria.
BaseClassTraits describes the base classes of the templated class.
PDT::Charge commonCharge
The common charge of all matching particles.
virtual ~MatcherBase()
Destructor.
tPMSet matchingMatchers
A set of matchers which matches a subset of this matcher.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...