thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
PDT
StandardMatchers.h
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// StandardMatchers.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_StandardMatchers_H
10
#define ThePEG_StandardMatchers_H
11
// This is the declaration of the AnyMatcher,
12
13
14
#include "Matcher.h"
15
#include "ThePEG/PDT/EnumParticles.h"
16
17
namespace
ThePEG
{
18
37
struct
AnyMatcher
:
public
MatcherType
{
39
typedef
AnyMatcher
CC
;
42
static
bool
Check
(
const
ParticleData
& pd) {
43
return
bool(pd.
id
());
44
}
46
static
string
className
() {
return
"Any"
; }
47
};
49
typedef
Matcher<AnyMatcher>
MatchAny
;
50
51
55
struct
ChargedMatcher
:
public
MatcherType
{
57
typedef
ChargedMatcher
CC
;
60
static
bool
Check
(
const
ParticleData
& pd) {
61
return
PDT::charged
(pd.
iCharge
());
62
}
64
static
string
className
() {
return
"Charged"
; }
65
};
67
typedef
Matcher<ChargedMatcher>
MatchCharged
;
68
69
struct
NegativeMatcher
;
70
74
struct
PositiveMatcher
:
public
MatcherType
{
76
typedef
NegativeMatcher
CC
;
79
static
bool
Check
(
const
ParticleData
& pd) {
80
return
PDT::positive
(pd.
iCharge
());
81
}
83
static
string
className
() {
return
"Positive"
; }
84
};
86
typedef
Matcher<PositiveMatcher>
MatchPositive
;
87
88
92
struct
NeutralMatcher
:
public
MatcherType
{
94
typedef
NeutralMatcher
CC
;
97
static
bool
Check
(
const
ParticleData
& pd) {
98
return
pd.
iCharge
() ==
PDT::Charge0
;
99
}
101
static
string
className
() {
return
"Neutral"
; }
102
};
104
typedef
Matcher<NeutralMatcher>
MatchNeutral
;
105
109
struct
NegativeMatcher
:
public
MatcherType
{
111
typedef
PositiveMatcher
CC
;
114
static
bool
Check
(
const
ParticleData
& pd) {
115
return
PDT::negative
(pd.
iCharge
());
116
}
118
static
string
className
() {
return
"Negative"
; }
119
};
121
typedef
Matcher<NegativeMatcher>
MatchNegative
;
122
126
struct
BaryonMatcher
:
public
MatcherType
{
128
typedef
BaryonMatcher
CC
;
131
static
bool
Check
(
const
ParticleData
& pd) {
return
Check
(pd.
id
()); }
134
static
bool
Check
(
long
id
) {
135
return
(
id
/10)%10 && (
id
/100)%10 && (
id
/1000)%10;
136
}
138
static
string
className
() {
return
"Baryon"
; }
139
};
141
typedef
Matcher<BaryonMatcher>
MatchBaryon
;
142
143
147
struct
MesonMatcher
:
public
MatcherType
{
149
typedef
MesonMatcher
CC
;
152
static
bool
Check
(
const
ParticleData
& pd) {
return
Check
(pd.
id
()); }
155
static
bool
Check
(
long
id
) {
156
return
(
id
/10)%10 && (
id
/100)%10 && (
id
/1000)%10 == 0;
157
}
159
static
string
className
() {
return
"Meson"
; }
160
};
162
typedef
Matcher<MesonMatcher>
MatchMeson
;
163
164
168
struct
DiquarkMatcher
:
public
MatcherType
{
170
typedef
DiquarkMatcher
CC
;
173
static
bool
Check
(
const
ParticleData
& pd) {
return
Check
(pd.
id
()); }
176
static
bool
Check
(
long
id
) {
177
return
id
/10 && (
id
/10)%10 == 0 && (
id
/100)%10 && (
id
/1000)%10;
178
}
180
static
string
className
() {
return
"Diquark"
; }
181
};
183
typedef
Matcher<DiquarkMatcher>
MatchDiquark
;
184
188
struct
QuarkMatcher
:
public
MatcherType
{
190
typedef
QuarkMatcher
CC
;
193
static
bool
Check
(
const
ParticleData
& pd) {
return
Check
(pd.
id
()); }
196
static
bool
Check
(
long
id
) {
197
return
id
&& abs(
id
) < 10;
198
}
200
static
string
className
() {
return
"Quark"
; }
201
};
203
typedef
Matcher<QuarkMatcher>
MatchQuark
;
204
208
struct
LeptonMatcher
:
public
MatcherType
{
210
typedef
LeptonMatcher
CC
;
213
static
bool
Check
(
const
ParticleData
& pd) {
return
Check
(pd.
id
()); }
216
static
bool
Check
(
long
id
) {
217
return
abs(
id
) > 10 && abs(
id
) <= 20;
218
}
220
static
string
className
() {
return
"Lepton"
; }
221
};
223
typedef
Matcher<LeptonMatcher>
MatchLepton
;
224
228
struct
NeutrinoMatcher
:
public
MatcherType
{
230
typedef
NeutrinoMatcher
CC
;
233
static
bool
Check
(
const
ParticleData
& pd) {
return
Check
(pd.
id
()); }
236
static
bool
Check
(
long
id
) {
237
return
abs(
id
)-10 >= 2 && abs(
id
)-10 <= 8 && abs(
id
)%2 == 0;
238
}
240
static
string
className
() {
return
"Neutrino"
; }
241
};
242
244
typedef
Matcher<NeutrinoMatcher>
MatchNeutrino
;
245
246
struct
LightAntiQuarkMatcher
;
247
251
struct
LightQuarkMatcher
:
public
MatcherType
{
253
typedef
LightAntiQuarkMatcher
CC
;
256
static
bool
Check
(
const
ParticleData
& pd) {
return
Check
(pd.
id
()); }
259
static
bool
Check
(
long
id
) {
260
return
id
> 0 &&
id
< 4 ;
261
}
263
static
string
className
() {
return
"LightQuark"
; }
264
};
266
typedef
Matcher<LightQuarkMatcher>
MatchLightQuark
;
267
268
274
struct
LightAntiQuarkMatcher
:
public
MatcherType
{
276
typedef
LightQuarkMatcher
CC
;
279
static
bool
Check
(
const
ParticleData
& pd) {
return
Check
(pd.
id
()); }
282
static
bool
Check
(
long
id
) {
283
return
id < 0 && id > -4 ;
284
}
286
static
string
className
() {
return
"LightAntiQuark"
; }
287
};
289
typedef
Matcher<LightAntiQuarkMatcher>
MatchLightAntiQuark
;
290
295
struct
StandardQCDPartonMatcher
:
public
MatcherType
{
297
typedef
StandardQCDPartonMatcher
CC
;
300
static
bool
Check
(
const
ParticleData
& pd) {
return
Check
(pd.
id
()); }
303
static
bool
Check
(
long
id
) {
304
return
id
&& ( abs(
id
) <= 5 ||
id
==
ParticleID::g
);
305
}
307
static
string
className
() {
return
"StandardQCDParton"
; }
308
};
309
311
typedef
Matcher<StandardQCDPartonMatcher>
MatchStandardQCDParton
;
312
316
struct
PseudoScalarMesonMatcher
:
public
MatcherType
{
318
typedef
PseudoScalarMesonMatcher
CC
;
321
static
bool
Check
(
const
ParticleData
& pd) {
return
Check
(pd.
id
()); }
324
static
bool
Check
(
long
id
) {
325
return
( (abs(
id
)/1000)%1 == 0 && abs(
id
) > 100 && abs(
id
)%10 == 1 ) ||
326
(
id
==
ParticleID::K_L0
||
id
==
ParticleID::K_S0
);
327
}
329
static
string
className
() {
return
"PseudoScalarMeson"
; }
330
};
331
333
typedef
Matcher<PseudoScalarMesonMatcher>
MatchPseudoScalarMeson
;
334
335
339
struct
VectorMesonMatcher
:
public
MatcherType
{
341
typedef
VectorMesonMatcher
CC
;
344
static
bool
Check
(
const
ParticleData
& pd) {
return
Check
(pd.
id
()); }
347
static
bool
Check
(
long
id
) {
348
return
(abs(
id
)/1000)%1 == 0 && abs(
id
) > 100 && abs(
id
)%10 == 3;
349
}
351
static
string
className
() {
return
"VectorMeson"
; }
352
};
353
355
typedef
Matcher<VectorMesonMatcher>
MatchVectorMeson
;
356
357
}
358
359
#endif
/* ThePEG_StandardMatchers_H */
ThePEG::Matcher
Matcher is a templated class inheriting from MatcherBase.
Definition:
Matcher.h:27
ThePEG::PDT::positive
static bool positive(Charge c)
True if the argument corresponds to a positive charge.
Definition:
PDT.h:125
ThePEG::PDT::Charge0
@ Charge0
Uncharged.
Definition:
PDT.h:58
ThePEG::PDT::negative
static bool negative(Charge c)
True if the argument corresponds to a negative charge.
Definition:
PDT.h:132
ThePEG::PDT::charged
static bool charged(Charge c)
True if the argument corresponds to a non-zero charge.
Definition:
PDT.h:118
ThePEG::ParticleData
ParticleData inherits from InterfacedBase and represents the properties of a particle type.
Definition:
ParticleData.h:36
ThePEG::ParticleData::id
long id() const
Return the PDG id number.
Definition:
ParticleData.h:80
ThePEG::ParticleData::iCharge
PDT::Charge iCharge(PDT::Charge)
Set the charge.
ThePEG::ParticleID::K_L0
@ K_L0
(K_L0)
Definition:
EnumParticles.h:189
ThePEG::ParticleID::K_S0
@ K_S0
(K_S0)
Definition:
EnumParticles.h:219
ThePEG::ParticleID::g
@ g
(g)
Definition:
EnumParticles.h:120
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
ThePEG::MatchLightQuark
Matcher< LightQuarkMatcher > MatchLightQuark
Gives a MatcherBase class based on LightQuarkMatcher.
Definition:
StandardMatchers.h:266
ThePEG::MatchLightAntiQuark
Matcher< LightAntiQuarkMatcher > MatchLightAntiQuark
Gives a MatcherBase class based on LightAntiQuarkMatcher.
Definition:
StandardMatchers.h:289
ThePEG::MatchQuark
Matcher< QuarkMatcher > MatchQuark
Gives a MatcherBase class based on QuarkMatcher.
Definition:
StandardMatchers.h:203
ThePEG::MatchStandardQCDParton
Matcher< StandardQCDPartonMatcher > MatchStandardQCDParton
Gives a MatcherBase class based on StandardQCDPartonMatcher.
Definition:
StandardMatchers.h:311
ThePEG::MatchBaryon
Matcher< BaryonMatcher > MatchBaryon
Gives a MatcherBase class based on BaryonMatcher.
Definition:
StandardMatchers.h:141
ThePEG::MatchPositive
Matcher< PositiveMatcher > MatchPositive
Gives a MatcherBase class based on PositiveMatcher.
Definition:
StandardMatchers.h:86
ThePEG::MatchDiquark
Matcher< DiquarkMatcher > MatchDiquark
Gives a MatcherBase class based on DiquarkMatcher.
Definition:
StandardMatchers.h:183
ThePEG::MatchVectorMeson
Matcher< VectorMesonMatcher > MatchVectorMeson
Gives a MatcherBase class based on VectorMesonMatcher.
Definition:
StandardMatchers.h:355
ThePEG::MatchCharged
Matcher< ChargedMatcher > MatchCharged
Gives a MatcherBase class based on ChargedMatcher.
Definition:
StandardMatchers.h:67
ThePEG::MatchAny
Matcher< AnyMatcher > MatchAny
Gives a MatcherBase class based on AnyMatcher.
Definition:
StandardMatchers.h:49
ThePEG::MatchNeutrino
Matcher< NeutrinoMatcher > MatchNeutrino
Gives a MatcherBase class based on VectorMesonMatcher.
Definition:
StandardMatchers.h:244
ThePEG::MatchMeson
Matcher< MesonMatcher > MatchMeson
Gives a MatcherBase class based on MesonMatcher.
Definition:
StandardMatchers.h:162
ThePEG::MatchPseudoScalarMeson
Matcher< PseudoScalarMesonMatcher > MatchPseudoScalarMeson
Gives a MatcherBase class based on PseudoScalarMesonMatcher.
Definition:
StandardMatchers.h:333
ThePEG::MatchLepton
Matcher< LeptonMatcher > MatchLepton
Gives a MatcherBase class based on LeptonMatcher.
Definition:
StandardMatchers.h:223
ThePEG::MatchNeutral
Matcher< NeutralMatcher > MatchNeutral
Gives a MatcherBase class based on NeutralMatcher.
Definition:
StandardMatchers.h:104
ThePEG::MatchNegative
Matcher< NegativeMatcher > MatchNegative
Gives a MatcherBase class based on NegativeMatcher.
Definition:
StandardMatchers.h:121
ThePEG::AnyMatcher
A Matcher class which matches any particle.
Definition:
StandardMatchers.h:37
ThePEG::AnyMatcher::className
static string className()
A simplified but unique class name.
Definition:
StandardMatchers.h:46
ThePEG::AnyMatcher::CC
AnyMatcher CC
Typedef the class matching the complex conjugate particles.
Definition:
StandardMatchers.h:39
ThePEG::AnyMatcher::Check
static bool Check(const ParticleData &pd)
The main static function to check if a given particle type pd matches.
Definition:
StandardMatchers.h:42
ThePEG::BaryonMatcher
A Matcher class which matches any baryon.
Definition:
StandardMatchers.h:126
ThePEG::BaryonMatcher::CC
BaryonMatcher CC
Typedef the class matching the complex conjugate particles.
Definition:
StandardMatchers.h:128
ThePEG::BaryonMatcher::Check
static bool Check(long id)
The main static function to check if a given particle with type id matches.
Definition:
StandardMatchers.h:134
ThePEG::BaryonMatcher::Check
static bool Check(const ParticleData &pd)
The main static function to check if a given particle type pd matches.
Definition:
StandardMatchers.h:131
ThePEG::BaryonMatcher::className
static string className()
A simplified but unique class name.
Definition:
StandardMatchers.h:138
ThePEG::ChargedMatcher
A Matcher class which matches any charged particle.
Definition:
StandardMatchers.h:55
ThePEG::ChargedMatcher::CC
ChargedMatcher CC
Typedef the class matching the complex conjugate particles.
Definition:
StandardMatchers.h:57
ThePEG::ChargedMatcher::Check
static bool Check(const ParticleData &pd)
The main static function to check if a given particle type pd matches.
Definition:
StandardMatchers.h:60
ThePEG::ChargedMatcher::className
static string className()
A simplified but unique class name.
Definition:
StandardMatchers.h:64
ThePEG::DiquarkMatcher
A Matcher class which matches any (anti-)diquark.
Definition:
StandardMatchers.h:168
ThePEG::DiquarkMatcher::Check
static bool Check(const ParticleData &pd)
The main static function to check if a given particle type pd matches.
Definition:
StandardMatchers.h:173
ThePEG::DiquarkMatcher::Check
static bool Check(long id)
The main static function to check if a given particle with type id matches.
Definition:
StandardMatchers.h:176
ThePEG::DiquarkMatcher::className
static string className()
A simplified but unique class name.
Definition:
StandardMatchers.h:180
ThePEG::DiquarkMatcher::CC
DiquarkMatcher CC
Typedef the class matching the complex conjugate particles.
Definition:
StandardMatchers.h:170
ThePEG::LeptonMatcher
A Matcher class which matches any lepton.
Definition:
StandardMatchers.h:208
ThePEG::LeptonMatcher::CC
LeptonMatcher CC
Typedef the class matching the complex conjugate particles.
Definition:
StandardMatchers.h:210
ThePEG::LeptonMatcher::Check
static bool Check(const ParticleData &pd)
The main static function to check if a given particle type pd matches.
Definition:
StandardMatchers.h:213
ThePEG::LeptonMatcher::className
static string className()
A simplified but unique class name.
Definition:
StandardMatchers.h:220
ThePEG::LeptonMatcher::Check
static bool Check(long id)
The main static function to check if a given particle with type id matches.
Definition:
StandardMatchers.h:216
ThePEG::LightAntiQuarkMatcher
A Matcher class which matches any light anti-quark ( , or ).
Definition:
StandardMatchers.h:274
ThePEG::LightAntiQuarkMatcher::CC
LightQuarkMatcher CC
Typedef the class matching the complex conjugate particles.
Definition:
StandardMatchers.h:276
ThePEG::LightAntiQuarkMatcher::className
static string className()
A simplified but unique class name.
Definition:
StandardMatchers.h:286
ThePEG::LightAntiQuarkMatcher::Check
static bool Check(const ParticleData &pd)
The main static function to check if a given particle type pd matches.
Definition:
StandardMatchers.h:279
ThePEG::LightAntiQuarkMatcher::Check
static bool Check(long id)
The main static function to check if a given particle with type id matches.
Definition:
StandardMatchers.h:282
ThePEG::LightQuarkMatcher
A Matcher class which matches any light quark (d,u or s).
Definition:
StandardMatchers.h:251
ThePEG::LightQuarkMatcher::Check
static bool Check(const ParticleData &pd)
The main static function to check if a given particle type pd matches.
Definition:
StandardMatchers.h:256
ThePEG::LightQuarkMatcher::Check
static bool Check(long id)
The main static function to check if a given particle with type id matches.
Definition:
StandardMatchers.h:259
ThePEG::LightQuarkMatcher::CC
LightAntiQuarkMatcher CC
Typedef the class matching the complex conjugate particles.
Definition:
StandardMatchers.h:253
ThePEG::LightQuarkMatcher::className
static string className()
A simplified but unique class name.
Definition:
StandardMatchers.h:263
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::MesonMatcher
A Matcher class which matches any meson.
Definition:
StandardMatchers.h:147
ThePEG::MesonMatcher::CC
MesonMatcher CC
Typedef the class matching the complex conjugate particles.
Definition:
StandardMatchers.h:149
ThePEG::MesonMatcher::className
static string className()
A simplified but unique class name.
Definition:
StandardMatchers.h:159
ThePEG::MesonMatcher::Check
static bool Check(const ParticleData &pd)
The main static function to check if a given particle type pd matches.
Definition:
StandardMatchers.h:152
ThePEG::MesonMatcher::Check
static bool Check(long id)
The main static function to check if a given particle with type id matches.
Definition:
StandardMatchers.h:155
ThePEG::NegativeMatcher
A Matcher class which matches any negatively charged particle.
Definition:
StandardMatchers.h:109
ThePEG::NegativeMatcher::className
static string className()
A simplified but unique class name.
Definition:
StandardMatchers.h:118
ThePEG::NegativeMatcher::Check
static bool Check(const ParticleData &pd)
The main static function to check if a given particle type pd matches.
Definition:
StandardMatchers.h:114
ThePEG::NegativeMatcher::CC
PositiveMatcher CC
Typedef the class matching the complex conjugate particles.
Definition:
StandardMatchers.h:111
ThePEG::NeutralMatcher
A Matcher class which matches any uncharged particle.
Definition:
StandardMatchers.h:92
ThePEG::NeutralMatcher::className
static string className()
A simplified but unique class name.
Definition:
StandardMatchers.h:101
ThePEG::NeutralMatcher::Check
static bool Check(const ParticleData &pd)
The main static function to check if a given particle type pd matches.
Definition:
StandardMatchers.h:97
ThePEG::NeutralMatcher::CC
NeutralMatcher CC
Typedef the class matching the complex conjugate particles.
Definition:
StandardMatchers.h:94
ThePEG::NeutrinoMatcher
A Matcher class which matches any neutrino.
Definition:
StandardMatchers.h:228
ThePEG::NeutrinoMatcher::Check
static bool Check(long id)
The main static function to check if a given particle with type id matches.
Definition:
StandardMatchers.h:236
ThePEG::NeutrinoMatcher::className
static string className()
A simplified but unique class name.
Definition:
StandardMatchers.h:240
ThePEG::NeutrinoMatcher::Check
static bool Check(const ParticleData &pd)
The main static function to check if a given particle type pd matches.
Definition:
StandardMatchers.h:233
ThePEG::NeutrinoMatcher::CC
NeutrinoMatcher CC
Typedef the class matching the complex conjugate particles.
Definition:
StandardMatchers.h:230
ThePEG::PositiveMatcher
A Matcher class which matches any positively charged particle.
Definition:
StandardMatchers.h:74
ThePEG::PositiveMatcher::Check
static bool Check(const ParticleData &pd)
The main static function to check if a given particle type pd matches.
Definition:
StandardMatchers.h:79
ThePEG::PositiveMatcher::className
static string className()
A simplified but unique class name.
Definition:
StandardMatchers.h:83
ThePEG::PositiveMatcher::CC
NegativeMatcher CC
Typedef the class matching the complex conjugate particles.
Definition:
StandardMatchers.h:76
ThePEG::PseudoScalarMesonMatcher
A Matcher class which matches any pseudo scalar meson.
Definition:
StandardMatchers.h:316
ThePEG::PseudoScalarMesonMatcher::Check
static bool Check(long id)
The main static function to check if a given particle with type id matches.
Definition:
StandardMatchers.h:324
ThePEG::PseudoScalarMesonMatcher::Check
static bool Check(const ParticleData &pd)
The main static function to check if a given particle type pd matches.
Definition:
StandardMatchers.h:321
ThePEG::PseudoScalarMesonMatcher::CC
PseudoScalarMesonMatcher CC
Typedef the class matching the complex conjugate particles.
Definition:
StandardMatchers.h:318
ThePEG::PseudoScalarMesonMatcher::className
static string className()
A simplified but unique class name.
Definition:
StandardMatchers.h:329
ThePEG::QuarkMatcher
A Matcher class which matches any (anti-)quark.
Definition:
StandardMatchers.h:188
ThePEG::QuarkMatcher::Check
static bool Check(long id)
The main static function to check if a given particle with type id matches.
Definition:
StandardMatchers.h:196
ThePEG::QuarkMatcher::CC
QuarkMatcher CC
Typedef the class matching the complex conjugate particles.
Definition:
StandardMatchers.h:190
ThePEG::QuarkMatcher::Check
static bool Check(const ParticleData &pd)
The main static function to check if a given particle type pd matches.
Definition:
StandardMatchers.h:193
ThePEG::QuarkMatcher::className
static string className()
A simplified but unique class name.
Definition:
StandardMatchers.h:200
ThePEG::StandardQCDPartonMatcher
A Matcher class which matches any standard QCD parton, ie.
Definition:
StandardMatchers.h:295
ThePEG::StandardQCDPartonMatcher::className
static string className()
A simplified but unique class name.
Definition:
StandardMatchers.h:307
ThePEG::StandardQCDPartonMatcher::Check
static bool Check(const ParticleData &pd)
The main static function to check if a given particle type pd matches.
Definition:
StandardMatchers.h:300
ThePEG::StandardQCDPartonMatcher::Check
static bool Check(long id)
The main static function to check if a given particle with type id matches.
Definition:
StandardMatchers.h:303
ThePEG::StandardQCDPartonMatcher::CC
StandardQCDPartonMatcher CC
Typedef the class matching the complex conjugate particles.
Definition:
StandardMatchers.h:297
ThePEG::VectorMesonMatcher
A Matcher class which matches any vector meson.
Definition:
StandardMatchers.h:339
ThePEG::VectorMesonMatcher::CC
VectorMesonMatcher CC
Typedef the class matching the complex conjugate particles.
Definition:
StandardMatchers.h:341
ThePEG::VectorMesonMatcher::Check
static bool Check(long id)
The main static function to check if a given particle with type id matches.
Definition:
StandardMatchers.h:347
ThePEG::VectorMesonMatcher::Check
static bool Check(const ParticleData &pd)
The main static function to check if a given particle type pd matches.
Definition:
StandardMatchers.h:344
ThePEG::VectorMesonMatcher::className
static string className()
A simplified but unique class name.
Definition:
StandardMatchers.h:351
Generated on Thu Jun 20 2024 14:47:00 for ThePEG by
1.9.6