thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
CombinedMatcher.h
1// -*- C++ -*-
2//
3// CombinedMatcher.h is a part of ThePEG - Toolkit for HEP Event Generation
4// Copyright (C) 1999-2019 Leif Lonnblad
5//
6// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8//
9#ifndef ThePEG_CombinedMatcher_H
10#define ThePEG_CombinedMatcher_H
11// This is the declaration of the AndMatcher, OrMatcher and NotMatcher.
12
13
14#include "Matcher.h"
15
16namespace ThePEG {
17
24template <class T1, class T2>
25struct AndMatcher: public MatcherType {
26
32
37 static bool Check(const ParticleData & pd) {
38 return T1::Check(pd) && T2::Check(pd);
39 }
40
41};
42
49template <class T1, class T2>
50struct OrMatcher: public MatcherType {
51
57
62 static bool Check(const ParticleData & pd) {
63 return T1::Check(pd) || T2::Check(pd);
64 }
65
66};
67
74template <class T>
75struct NotMatcher: public MatcherType {
76
82
88 static bool Check(const ParticleData & pd) {
89 return !T::Check(pd);
90 }
91
92};
93
94}
95
96#endif /* ThePEG_CombinedMatcher_H */
ParticleData inherits from InterfacedBase and represents the properties of a particle type.
Definition: ParticleData.h:36
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
The AndMatcher class represents the boolean and operation between its two template argument classes o...
static bool Check(const ParticleData &pd)
Check match.
AndMatcher< typename T1::CC, typename T2::CC > CC
Typedef for the class representing the matcher for the charge-gonjugate of particles matched by this ...
MatcherType is an empty non-polymorphic base class for all matcher classes to be used as template arg...
Definition: Matcher.h:107
The NotMatcher class represents the boolean not operation for its template argument class of base typ...
static bool Check(const ParticleData &pd)
Check match.
NotMatcher< typename T::CC > CC
Typedef for the class representing the matcher for the charge-gonjugate of particles matched by this ...
The OrMatcher class represents the boolean or operation between its two template argument classes of ...
static bool Check(const ParticleData &pd)
Check match.
OrMatcher< typename T1::CC, typename T2::CC > CC
Typedef for the class representing the matcher for the charge-gonjugate of particles matched by this ...