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
HLTrigger
special
plugins
HLTPhysicsDeclared.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: HLTPhysicsDeclared
4
// Class: HLTPhysicsDeclared
5
//
6
// Original Author: Luca Malgeri
7
// Adapted for HLT by: Andrea Bocci
8
9
// user include files
10
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
11
#include "
FWCore/Framework/interface/Event.h
"
12
#include "
FWCore/Framework/interface/EDFilter.h
"
13
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
14
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
15
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
16
#include "
FWCore/Utilities/interface/InputTag.h
"
17
18
#include "
DataFormats/L1GlobalTrigger/interface/L1GtFdlWord.h
"
19
#include "
DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h
"
20
//
21
// class declaration
22
//
23
24
class
HLTPhysicsDeclared
:
public
edm::EDFilter
{
25
public
:
26
explicit
HLTPhysicsDeclared
(
const
edm::ParameterSet
&);
27
~HLTPhysicsDeclared
()
override
;
28
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions);
29
30
private
:
31
bool
filter
(
edm::Event
&,
const
edm::EventSetup
&)
override
;
32
33
bool
m_invert
;
34
edm::InputTag
m_gtDigis
;
35
edm::EDGetTokenT<L1GlobalTriggerReadoutRecord>
m_gtDigisToken
;
36
};
37
38
// system include files
39
#include <memory>
40
41
// user include files
42
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
43
44
using namespace
edm
;
45
46
HLTPhysicsDeclared::HLTPhysicsDeclared
(
const
edm::ParameterSet
&
config
)
47
: m_invert(
config
.getParameter<
bool
>(
"invert"
)),
48
m_gtDigis(
config
.getParameter<
edm
::
InputTag
>(
"L1GtReadoutRecordTag"
)) {
49
m_gtDigisToken
= consumes<L1GlobalTriggerReadoutRecord>(
m_gtDigis
);
50
}
51
52
HLTPhysicsDeclared::~HLTPhysicsDeclared
() =
default
;
53
54
void
HLTPhysicsDeclared::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
55
edm::ParameterSetDescription
desc
;
56
desc
.add<
edm::InputTag
>(
"L1GtReadoutRecordTag"
,
edm::InputTag
(
"hltGtDigis"
));
57
desc
.add<
bool
>(
"invert"
,
false
);
58
descriptions.
add
(
"hltPhysicsDeclared"
,
desc
);
59
}
60
61
bool
HLTPhysicsDeclared::filter
(
edm::Event
&
event
,
const
edm::EventSetup
&
setup
) {
62
bool
accept
=
false
;
63
64
if
(
event
.isRealData()) {
65
// for real data, access the "physics enabled" bit in the L1 GT data
66
edm::Handle<L1GlobalTriggerReadoutRecord>
h_gtDigis;
67
if
(not
event
.getByToken(
m_gtDigisToken
, h_gtDigis)) {
68
edm::LogWarning
(h_gtDigis.
whyFailed
()->category()) << h_gtDigis.
whyFailed
()->what();
69
// not enough informations to make a decision - reject the event
70
return
false
;
71
}
else
{
72
L1GtFdlWord
fdlWord = h_gtDigis->
gtFdlWord
();
73
if
(fdlWord.
physicsDeclared
() == 1)
74
accept
=
true
;
75
}
76
}
else
{
77
// for MC, assume the "physics enabled" bit to be always set
78
accept
=
true
;
79
}
80
81
// if requested, invert the filter decision
82
if
(
m_invert
)
83
accept
= not
accept
;
84
85
return
accept
;
86
}
87
88
// declare this class as a framework plugin
89
#include "
FWCore/Framework/interface/MakerMacros.h
"
90
DEFINE_FWK_MODULE
(
HLTPhysicsDeclared
);
ConfigurationDescriptions.h
electrons_cff.bool
bool
Definition:
electrons_cff.py:366
MessageLogger.h
L1GtFdlWord::physicsDeclared
const cms_uint16_t physicsDeclared() const
get/set "physics declared" bit
Definition:
L1GtFdlWord.h:169
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord >
edm
HLT enums.
Definition:
AlignableModifier.h:19
HLTPhysicsDeclared
Definition:
HLTPhysicsDeclared.cc:24
HLT_FULL_cff.InputTag
InputTag
Definition:
HLT_FULL_cff.py:89285
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
HLTPhysicsDeclared::~HLTPhysicsDeclared
~HLTPhysicsDeclared() override
EDFilter.h
edm::Handle
Definition:
AssociativeIterator.h:50
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition:
MessageLogger.h:122
singleTopDQM_cfi.setup
setup
Definition:
singleTopDQM_cfi.py:37
config
Definition:
config.py:1
accept
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition:
TopDQMHelpers.h:31
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:57
L1GtFdlWord.h
edm::HandleBase::whyFailed
std::shared_ptr< cms::Exception > whyFailed() const
Definition:
HandleBase.h:91
HLTPhysicsDeclared::filter
bool filter(edm::Event &, const edm::EventSetup &) override
Definition:
HLTPhysicsDeclared.cc:61
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
HLTPhysicsDeclared::m_invert
bool m_invert
Definition:
HLTPhysicsDeclared.cc:33
HLTPhysicsDeclared::HLTPhysicsDeclared
HLTPhysicsDeclared(const edm::ParameterSet &)
Definition:
HLTPhysicsDeclared.cc:46
L1GtFdlWord
Definition:
L1GtFdlWord.h:29
edm::EDFilter
Definition:
EDFilter.h:38
edm::EventSetup
Definition:
EventSetup.h:58
HLTPhysicsDeclared::m_gtDigis
edm::InputTag m_gtDigis
Definition:
HLTPhysicsDeclared.cc:34
InputTag.h
HLTPhysicsDeclared::m_gtDigisToken
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_gtDigisToken
Definition:
HLTPhysicsDeclared.cc:35
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
Frameworkfwd.h
ParameterSet.h
HLTPhysicsDeclared::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
HLTPhysicsDeclared.cc:54
event
Definition:
event.py:1
edm::Event
Definition:
Event.h:73
L1GlobalTriggerReadoutRecord::gtFdlWord
const L1GtFdlWord gtFdlWord(int bxInEventValue) const
get / set FDL word (record) in the GT readout record
Definition:
L1GlobalTriggerReadoutRecord.cc:372
edm::InputTag
Definition:
InputTag.h:15
L1GlobalTriggerReadoutRecord.h
Generated for CMSSW Reference Manual by
1.8.16