Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
PhysicsTools
PatUtils
src
EventHypothesisTools.cc
Go to the documentation of this file.
1
2
#include "
PhysicsTools/PatUtils/interface/EventHypothesisTools.h
"
3
4
using namespace
pat::eventhypothesis
;
5
6
AndFilter::AndFilter
(
ParticleFilter
*
f1
,
ParticleFilter
*
f2
) : filters_(2) {
7
filters_
.emplace_back(
f1
);
8
filters_
.emplace_back(
f2
);
9
}
10
11
bool
AndFilter::operator()
(
const
CandRefType
&
cand
,
const
std::string
&role)
const
{
12
for
(
const
auto
&it :
filters_
) {
13
if
(!(*it)(
cand
, role))
14
return
false
;
15
}
16
return
true
;
17
}
18
19
OrFilter::OrFilter
(
ParticleFilter
*
f1
,
ParticleFilter
*
f2
) : filters_(2) {
20
filters_
.emplace_back(
f1
);
21
filters_
.emplace_back(
f2
);
22
}
23
24
bool
OrFilter::operator()
(
const
CandRefType
&
cand
,
const
std::string
&role)
const
{
25
for
(
const
auto
&it :
filters_
) {
26
if
((*it)(
cand
, role))
27
return
true
;
28
}
29
return
false
;
30
}
31
32
ByPdgId::ByPdgId
(int32_t pdgCode,
bool
alsoAntiparticle)
33
: pdgCode_(alsoAntiparticle ?
std
::
abs
(pdgCode) : pdgCode), antiparticle_(alsoAntiparticle) {}
34
35
bool
ByPdgId::operator()
(
const
CandRefType
&
cand
,
const
std::string
&role)
const
{
36
return
antiparticle_
? (
std::abs
(
cand
->pdgId()) ==
pdgCode_
) : (
cand
->pdgId() ==
pdgCode_
);
37
}
38
39
ByString::ByString
(
const
std::string
&
cut
) : sel_(
cut
) {}
40
41
bool
ByString::operator()
(
const
CandRefType
&
cand
,
const
std::string
&role)
const
{
return
sel_
(*
cand
); }
pat::eventhypothesis::AndFilter::filters_
std::vector< std::unique_ptr< ParticleFilter > > filters_
Definition:
EventHypothesisTools.h:26
pat::eventhypothesis
Definition:
EventHypothesis.h:15
pat::eventhypothesis::OrFilter::filters_
std::vector< std::unique_ptr< ParticleFilter > > filters_
Definition:
EventHypothesisTools.h:42
pat::eventhypothesis::ByPdgId::pdgCode_
int32_t pdgCode_
Definition:
EventHypothesisTools.h:52
pat::eventhypothesis::ParticleFilter
Definition:
EventHypothesis.h:24
pat::eventhypothesis::AndFilter::operator()
bool operator()(const CandRefType &cand, const std::string &role) const override
Definition:
EventHypothesisTools.cc:11
pat::eventhypothesis::ByString::operator()
bool operator()(const CandRefType &cand, const std::string &role) const override
Definition:
EventHypothesisTools.cc:41
pat::eventhypothesis::AndFilter::AndFilter
AndFilter()
Definition:
EventHypothesisTools.h:16
DeadROC_duringRun.f2
f2
Definition:
DeadROC_duringRun.py:220
EventHypothesisTools.h
cand
Definition:
decayParser.h:32
pat::eventhypothesis::ByPdgId::operator()
bool operator()(const CandRefType &cand, const std::string &role) const override
Definition:
EventHypothesisTools.cc:35
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::Ptr< Candidate >
pat::eventhypothesis::OrFilter::OrFilter
OrFilter()
Definition:
EventHypothesisTools.h:32
std
Definition:
JetResolutionObject.h:76
pat::eventhypothesis::OrFilter::operator()
bool operator()(const CandRefType &cand, const std::string &role) const override
Definition:
EventHypothesisTools.cc:24
pat::eventhypothesis::ByPdgId::antiparticle_
bool antiparticle_
Definition:
EventHypothesisTools.h:53
PA_MinBiasSkim_cff.cut
cut
Definition:
PA_MinBiasSkim_cff.py:13
pat::eventhypothesis::ByString::ByString
ByString(const std::string &cut)
Definition:
EventHypothesisTools.cc:39
pat::eventhypothesis::ByPdgId::ByPdgId
ByPdgId(int32_t pdgCode, bool alsoAntiparticle=true)
Definition:
EventHypothesisTools.cc:32
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
DeadROC_duringRun.f1
f1
Definition:
DeadROC_duringRun.py:219
pat::eventhypothesis::ByString::sel_
StringCutObjectSelector< reco::Candidate > sel_
Definition:
EventHypothesisTools.h:63
Generated for CMSSW Reference Manual by
1.8.16