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;
410 struct ClassTraits<MatcherBase>:
411 public ClassTraitsBase<MatcherBase> {
413 static string className() {
return "ThePEG::MatcherBase"; }
Energy commonMass
The common mass of all matching particles.
PersistentIStream is used to read persistent objects from a stream where they were previously written...
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
MatcherBase & operator=(const MatcherBase &)
Private and non-existent assignment operator.
ThePEG::Ptr< MatcherBase >::pointer PMPtr
Alias for a reference counted pointer to MatcherBase .
Energy mass() const
Returns the common mass of the matching particles.
PDT::Spin commonSpin
The common spin of all matching particles.
Charge
Definition of enumerated values used for charge information.
bool negative() const
Are the particles negatively charged? If all matching particles are negatively charged, return true, otherwise false.
Length commonCTau
The common decay length of all matching particles.
The Particle class is used to describe an instance of a particle.
bool positive() const
Are the particles positively charged? If all matching particles are positively charged, return true, otherwise false.
tPDSet matchingParticles
The set of particle data objects matched by this matcher.
Energy maxMass() const
Returns the maximum mass of the matching particles.
ClassTraitsType is an empty, non-polymorphic, base class.
bool matches(const MatcherBase &pm) const
Check if a given particle matcher belongs to the set of matches.
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.
const ParticleDataClass & data() const
Access the ParticleData object of this particle type.
void addMIfMatch(Iterator first, Iterator last)
Add a number of particle matchers to the set of matching matchers if they meets the criteria...
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.
int stable() const
Are the particles stable? Returns (0)1 if all matching particles are (un)stable.
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.
This is the main namespace within which all identifiers in ThePEG are declared.
PDT::Colour iColour() const
If all matching particles have the same colour, the common colour is returned.
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...
bool matches(const ParticleData &pd) const
Check if a given particle type belongs to the set of matches.
void addPIfMatch(tPDPtr)
Add a particle to the set of matching particles if it meets the criteria.
QTY< 0, 1, 0 >::Type Energy
Energy.
PDT::Colour commonColour
The common colour of all matching particles.
int commonStable
The common stability of all matching particles.
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.
QTY< 1, 0, 0 >::Type Length
Length.
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...
Energy theMaxMass
The maximum mass of all matching particles.
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 .
bool charged() const
Are the particles charged? If all matching particles are charged, return true, otherwise false...
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.
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...
PDT::Spin iSpin() const
Return common spin.
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...
const tPMSet & matchers() const
Access to the set of matching matchers.
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.
tPMPtr CC() const
Get the matcher object matching the antiparticles of this.
static void setCC(tPMPtr pm, tPMPtr apm)
Set antipartner.
Energy minMass() const
Returns the minimum mass of the matching particles.
set< tPDPtr > tPDSet
Convenient typedef.
bool checkp(const Particle &p) const
Check if a Particle meets the criteria.
bool coloured() const
Are the particles coloured? If all matching particles are coloured, return true, otherwise false...
MatcherBase()
Default constructor.
static string className()
Return the name of class T.
const tPDSet & particles() const
Access to the set of matching particles.
static AbstractClassDescription< MatcherBase > initMatcherBase
The static object used to initialize the description of this class.
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
void addPIfMatchFrom(const Cont &c)
Add a number of particles to the set of matching particles if they meets the criteria.
Energy width() const
Returns the common width of the matching particles.
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.
PDT::Charge iCharge() const
Return common charge.
Length cTau() const
Returns the common decay length of the matching particles.