File:
CombinedMatcher.h
This file may become a part of CLHEP - a Class Library for High Energy Physics.
This is the definition of the HepCombinedMatcher and HepNotMatcher classes.
HepCombinedMatcher and HepNotMatcher are templated classes used to create combinations of classes derived from HepParticleMatcher.
HepCombinedMatcher<class T1, class Op, class T2> takes three template arguments: T1 and T2 should be derived from HepParticleMatcher and Op should be one of the logical binary operators std::logical_or, std::logical_and or any similarly defined class. In the case of std::logical_and, the resulting class will match all particles matched by the class T1 and T2, and similarly for the case of std::logical_or.
HepNotMatcher<class T> takes one template argument which should be a class derived from HepParticleMatcher. The resulting class will match all particles not matched by the class T.
Assuming that the class ChargedMatcher matches all
charged particles and the class BaryonMatcher
matches all baryons. Then the class
HepCombinedMatcher<ChargedMatcher, std::logical_and,
BaryonMatcher>
will match all charged baryons and the
class
HepNotMatcher<ChargedMatcher>
will
match all uncharged particles.
CLASS HepCombinedMatcher:
template <class T>
CLASS HepNotMatcher: