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
RecoTauTag
HLTProducers
src
PFJetsMaxInvMassModule.cc
Go to the documentation of this file.
1
#include "
RecoTauTag/HLTProducers/interface/PFJetsMaxInvMassModule.h
"
2
#include "Math/GenVector/VectorUtil.h"
3
#include "
DataFormats/HLTReco/interface/TriggerTypeDefs.h
"
4
#include "
FWCore/Utilities/interface/EDMException.h
"
5
#include "
CommonTools/Utils/interface/PtComparator.h
"
6
7
//
8
// class declaration
9
//
10
PFJetsMaxInvMassModule::PFJetsMaxInvMassModule
(
const
edm::ParameterSet
& iConfig)
11
: pfJetSrc_(consumes<
reco
::
PFJetCollection
>(iConfig.getParameter<
edm
::
InputTag
>(
"PFJetSrc"
))),
12
maxInvMassPairOnly_(iConfig.getParameter<
bool
>(
"maxInvMassPairOnly"
)),
13
removeMaxInvMassPair_(iConfig.getParameter<
bool
>(
"removeMaxInvMassPair"
)) {
14
produces<reco::PFJetCollection>();
15
}
16
PFJetsMaxInvMassModule::~PFJetsMaxInvMassModule
() {}
17
18
void
PFJetsMaxInvMassModule::produce
(
edm::StreamID
iSId,
edm::Event
&
iEvent
,
const
edm::EventSetup
& iES)
const
{
19
std::unique_ptr<reco::PFJetCollection> addPFJets(
new
reco::PFJetCollection
);
20
21
edm::Handle<reco::PFJetCollection>
jets
;
22
iEvent
.getByToken(
pfJetSrc_
,
jets
);
23
24
unsigned
iCan = 0;
25
unsigned
jCan = 0;
26
double
mjj_max = 0;
27
28
if
(
jets
->size() > 1) {
29
for
(
unsigned
i
= 0;
i
<
jets
->size();
i
++) {
30
for
(
unsigned
j
=
i
+ 1;
j
<
jets
->size();
j
++) {
31
double
test
= ((*jets)[
i
].p4() + (*jets)[
j
].p4()).M();
32
if
(
test
> mjj_max) {
33
mjj_max =
test
;
34
iCan =
i
;
35
jCan =
j
;
36
}
37
}
38
}
39
40
if
(
maxInvMassPairOnly_
) {
41
addPFJets->push_back((*
jets
)[iCan]);
42
addPFJets->push_back((*
jets
)[jCan]);
43
}
else
if
(
removeMaxInvMassPair_
) {
44
for
(
unsigned
i
= 0;
i
<
jets
->size();
i
++) {
45
if
(
i
!= iCan &&
i
!= jCan)
46
addPFJets->push_back((*
jets
)[
i
]);
47
}
48
}
49
}
50
51
iEvent
.put(
std::move
(addPFJets));
52
}
53
54
void
PFJetsMaxInvMassModule::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
55
edm::ParameterSetDescription
desc
;
56
desc
.add<
edm::InputTag
>(
"PFJetSrc"
,
edm::InputTag
(
""
))->setComment(
"Input collection of PFJets that pass a filter"
);
57
desc
.add<
bool
>(
"maxInvMassPairOnly"
,
true
)->setComment(
"Add only max mjj pair"
);
58
desc
.add<
bool
>(
"removeMaxInvMassPair"
,
false
)->setComment(
"Remove max mjj pair and keep all other jets"
);
59
descriptions.
setComment
(
60
"This module produces a collection of PFJets that are cross-cleaned with respect to PFTaus passing a HLT "
61
"filter."
);
62
descriptions.
add
(
"PFJetsMaxInvMassModule"
,
desc
);
63
}
edm::StreamID
Definition:
StreamID.h:30
electrons_cff.bool
bool
Definition:
electrons_cff.py:366
mps_fire.i
i
Definition:
mps_fire.py:428
PFJetsMaxInvMassModule::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
PFJetsMaxInvMassModule.cc:54
edm
HLT enums.
Definition:
AlignableModifier.h:19
PFJetsMaxInvMassModule::maxInvMassPairOnly_
bool maxInvMassPairOnly_
Definition:
PFJetsMaxInvMassModule.h:23
PFJetsMaxInvMassModule::produce
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Definition:
PFJetsMaxInvMassModule.cc:18
HLT_FULL_cff.InputTag
InputTag
Definition:
HLT_FULL_cff.py:89285
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
TriggerTypeDefs.h
PtComparator.h
singleTopDQM_cfi.jets
jets
Definition:
singleTopDQM_cfi.py:42
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:45
edm::Handle< reco::PFJetCollection >
PFJetsMaxInvMassModule.h
EDMException.h
test
Definition:
SmallWORMDict.h:13
ctpps_dqm_sourceclient-live_cfg.test
test
Definition:
ctpps_dqm_sourceclient-live_cfg.py:7
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:57
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
PFJetsMaxInvMassModule::removeMaxInvMassPair_
bool removeMaxInvMassPair_
Definition:
PFJetsMaxInvMassModule.h:24
edm::ParameterSet
Definition:
ParameterSet.h:47
edm::ConfigurationDescriptions::setComment
void setComment(std::string const &value)
Definition:
ConfigurationDescriptions.cc:48
iEvent
int iEvent
Definition:
GenABIO.cc:224
edm::EventSetup
Definition:
EventSetup.h:58
PFJetsMaxInvMassModule::PFJetsMaxInvMassModule
PFJetsMaxInvMassModule(const edm::ParameterSet &)
Definition:
PFJetsMaxInvMassModule.cc:10
PFJetsMaxInvMassModule::pfJetSrc_
const edm::EDGetTokenT< reco::PFJetCollection > pfJetSrc_
Definition:
PFJetsMaxInvMassModule.h:22
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition:
eostools.py:511
reco::PFJetCollection
std::vector< PFJet > PFJetCollection
collection of PFJet objects
Definition:
PFJetCollection.h:14
dqmiolumiharvest.j
j
Definition:
dqmiolumiharvest.py:66
PFJetsMaxInvMassModule::~PFJetsMaxInvMassModule
~PFJetsMaxInvMassModule() override
Definition:
PFJetsMaxInvMassModule.cc:16
edm::Event
Definition:
Event.h:73
edm::InputTag
Definition:
InputTag.h:15
Generated for CMSSW Reference Manual by
1.8.16