ThePEG
1.8.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
PDT
CombinedMatcher.h
1
// -*- C++ -*-
2
//
3
// CombinedMatcher.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 1999-2011 Leif Lonnblad
5
//
6
// ThePEG is licenced under version 2 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 */
Generated on Sat Jun 16 2012 16:51:03 for ThePEG by
1.8.1.1