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
n
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
c
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
src
RecoMET
METAlgorithms
src
METAlgo.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: METAlgorithms
4
// Class: METAlgo
5
//
6
// Original Authors: Michael Schmitt, Richard Cavanaugh The University of Florida
7
// Created: May 31, 2005
8
//
9
10
//____________________________________________________________________________||
11
#include "
RecoMET/METAlgorithms/interface/METAlgo.h
"
12
#include "
DataFormats/Candidate/interface/Candidate.h
"
13
#include "
DataFormats/Math/interface/LorentzVector.h
"
14
15
//____________________________________________________________________________||
16
CommonMETData
METAlgo::run
(
const
edm::View<reco::Candidate>
&
candidates
,
17
double
globalThreshold
,
18
edm::ValueMap<float>
const
*
weights
) {
19
math::XYZTLorentzVector
p4;
20
for
(
auto
const
& candPtr :
candidates
.ptrs()) {
21
const
reco::Candidate
*
cand
= candPtr.get();
22
float
weight
= (
weights
!=
nullptr
) ? (*
weights
)[candPtr] : 1.0;
23
if
(!(
cand
->et() *
weight
>
globalThreshold
))
24
continue
;
25
p4 +=
cand
->p4() *
weight
;
26
}
27
math::XYZTLorentzVector
met
= -p4;
28
29
CommonMETData
ret
;
30
ret
.mex =
met
.Px();
31
ret
.mey =
met
.Py();
32
33
ret
.mez =
met
.Pz();
// included here since it might be useful
34
// for Data Quality Monitering as it should be
35
// symmetrically distributed about the origin
36
37
ret
.met =
met
.Pt();
38
39
double
et
= 0.0;
40
for
(
auto
const
& candPtr :
candidates
.ptrs()) {
41
const
reco::Candidate
*
cand
= candPtr.get();
42
float
weight
= (
weights
!=
nullptr
) ? (*
weights
)[candPtr] : 1.0;
43
if
(!(
cand
->et() *
weight
>
globalThreshold
))
44
continue
;
45
et
+=
cand
->et() *
weight
;
46
}
47
48
ret
.sumet =
et
;
49
50
return
ret
;
51
}
52
53
//____________________________________________________________________________||
EgHLTOffHistBins_cfi.et
et
Definition:
EgHLTOffHistBins_cfi.py:8
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition:
runTheMatrix.py:635
reco::Candidate
Definition:
Candidate.h:27
weight
Definition:
weight.py:1
HLT_2023v12_cff.globalThreshold
globalThreshold
Definition:
HLT_2023v12_cff.py:15893
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition:
LorentzVector.h:29
Candidate.h
edm::View
Definition:
CaloClusterFwd.h:14
hltDeepSecondaryVertexTagInfosPFPuppi_cfi.weights
weights
Definition:
hltDeepSecondaryVertexTagInfosPFPuppi_cfi.py:71
CommonMETData
Structure containing data common to all types of MET.
Definition:
CommonMETData.h:12
LorentzVector.h
edm::ValueMap< float >
METAlgo.h
BTaggingMonitor_cfi.met
met
Definition:
BTaggingMonitor_cfi.py:74
HLT_2023v12_cff.candidates
candidates
Definition:
HLT_2023v12_cff.py:38608
cand
Definition:
decayParser.h:32
METAlgo::run
CommonMETData run(const edm::View< reco::Candidate > &candidates, double globalThreshold=0.0, edm::ValueMap< float > const *weights=nullptr)
Definition:
METAlgo.cc:16
mps_merge.weight
weight
Definition:
mps_merge.py:88
Generated for CMSSW Reference Manual by
1.8.14