thepeg is hosted by Hepforge, IPPP Durham
ThePEG  2.2.1
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 
16 namespace ThePEG {
17 
24 template <class T1, class T2>
25 struct AndMatcher: public MatcherType {
26 
32 
37  static bool Check(const ParticleData & pd) {
38  return T1::Check(pd) && T2::Check(pd);
39  }
40 
41 };
42 
49 template <class T1, class T2>
50 struct OrMatcher: public MatcherType {
51 
57 
62  static bool Check(const ParticleData & pd) {
63  return T1::Check(pd) || T2::Check(pd);
64  }
65 
66 };
67 
74 template <class T>
75 struct 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 */
static bool Check(const ParticleData &pd)
Check match.
static bool Check(const ParticleData &pd)
Check match.
The NotMatcher class represents the boolean not operation for its template argument class of base typ...
This is the main namespace within which all identifiers in ThePEG are declared.
Definition: FactoryBase.h:28
AndMatcher< typename T1::CC, typename T2::CC > CC
Typedef for the class representing the matcher for the charge-gonjugate of particles matched by this ...
NotMatcher< typename T::CC > CC
Typedef for the class representing the matcher for the charge-gonjugate of particles matched by this ...
ParticleData inherits from InterfacedBase and represents the properties of a particle type...
Definition: ParticleData.h:36
MatcherType is an empty non-polymorphic base class for all matcher classes to be used as template arg...
Definition: Matcher.h:107
OrMatcher< typename T1::CC, typename T2::CC > CC
Typedef for the class representing the matcher for the charge-gonjugate of particles matched by this ...
The AndMatcher class represents the boolean and operation between its two template argument classes o...
static bool Check(const ParticleData &pd)
Check match.
The OrMatcher class represents the boolean or operation between its two template argument classes of ...