Main Page
Namespaces
Classes
Package Documentation
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
,
double
globalThreshold
) {
17
math::XYZTLorentzVector
p4
;
18
for
(
auto
cand
= candidates.
begin
();
cand
!= candidates.
end
(); ++
cand
) {
19
if
(!(
cand
->et() >
globalThreshold
))
20
continue
;
21
p4 +=
cand
->p4();
22
}
23
math::XYZTLorentzVector
met
= -
p4
;
24
25
CommonMETData
ret
;
26
ret.
mex
= met.Px();
27
ret.
mey
= met.Py();
28
29
ret.
mez
= met.Pz();
// included here since it might be useful
30
// for Data Quality Monitering as it should be
31
// symmetrically distributed about the origin
32
33
ret.
met
= met.Pt();
34
35
double
et
= 0.0;
36
for
(
auto
cand
= candidates.
begin
();
cand
!= candidates.
end
(); ++
cand
) {
37
if
(!(
cand
->et() >
globalThreshold
))
38
continue
;
39
et +=
cand
->et();
40
}
41
42
ret.
sumet
=
et
;
43
44
return
ret
;
45
}
46
47
//____________________________________________________________________________||
EgHLTOffHistBins_cfi.et
et
Definition:
EgHLTOffHistBins_cfi.py:8
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition:
runTheMatrix.py:347
CommonMETData::sumet
double sumet
Definition:
CommonMETData.h:18
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition:
LorentzVector.h:29
Candidate.h
edm::View
Definition:
CaloClusterFwd.h:14
edm::View::begin
const_iterator begin() const
METAlgo::run
CommonMETData run(const edm::View< reco::Candidate > &candidates, double globalThreshold=0.0)
Definition:
METAlgo.cc:16
p4
double p4[4]
Definition:
TauolaWrapper.h:92
CommonMETData
Structure containing data common to all types of MET.
Definition:
CommonMETData.h:12
LorentzVector.h
CommonMETData::met
double met
Definition:
CommonMETData.h:14
METAlgo.h
BTaggingMonitor_cfi.met
met
Definition:
BTaggingMonitor_cfi.py:84
edm::View::end
const_iterator end() const
cand
Definition:
decayParser.h:34
distPFMET_cfi.globalThreshold
globalThreshold
Definition:
distPFMET_cfi.py:16
CommonMETData::mey
double mey
Definition:
CommonMETData.h:16
HLT_2018_cff.candidates
candidates
Definition:
HLT_2018_cff.py:53403
CommonMETData::mex
double mex
Definition:
CommonMETData.h:15
CommonMETData::mez
double mez
Definition:
CommonMETData.h:17
Generated for CMSSW Reference Manual by
1.8.11