thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
PDT
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
31
typedef
AndMatcher<typename T1::CC, typename T2::CC>
CC
;
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
56
typedef
OrMatcher<typename T1::CC, typename T2::CC>
CC
;
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
81
typedef
NotMatcher<typename T::CC>
CC
;
82
88
static
bool
Check
(
const
ParticleData
& pd) {
89
return
!T::Check(pd);
90
}
91
92
};
93
94
}
95
96
#endif
/* ThePEG_CombinedMatcher_H */
ThePEG::ParticleData
ParticleData inherits from InterfacedBase and represents the properties of a particle type.
Definition:
ParticleData.h:36
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
ThePEG::AndMatcher
The AndMatcher class represents the boolean and operation between its two template argument classes o...
Definition:
CombinedMatcher.h:25
ThePEG::AndMatcher::Check
static bool Check(const ParticleData &pd)
Check match.
Definition:
CombinedMatcher.h:37
ThePEG::AndMatcher::CC
AndMatcher< typename T1::CC, typename T2::CC > CC
Typedef for the class representing the matcher for the charge-gonjugate of particles matched by this ...
Definition:
CombinedMatcher.h:31
ThePEG::MatcherType
MatcherType is an empty non-polymorphic base class for all matcher classes to be used as template arg...
Definition:
Matcher.h:107
ThePEG::NotMatcher
The NotMatcher class represents the boolean not operation for its template argument class of base typ...
Definition:
CombinedMatcher.h:75
ThePEG::NotMatcher::Check
static bool Check(const ParticleData &pd)
Check match.
Definition:
CombinedMatcher.h:88
ThePEG::NotMatcher::CC
NotMatcher< typename T::CC > CC
Typedef for the class representing the matcher for the charge-gonjugate of particles matched by this ...
Definition:
CombinedMatcher.h:81
ThePEG::OrMatcher
The OrMatcher class represents the boolean or operation between its two template argument classes of ...
Definition:
CombinedMatcher.h:50
ThePEG::OrMatcher::Check
static bool Check(const ParticleData &pd)
Check match.
Definition:
CombinedMatcher.h:62
ThePEG::OrMatcher::CC
OrMatcher< typename T1::CC, typename T2::CC > CC
Typedef for the class representing the matcher for the charge-gonjugate of particles matched by this ...
Definition:
CombinedMatcher.h:56
Generated on Thu Jun 20 2024 14:47:00 for ThePEG by
1.9.6