Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
{
18
math::XYZTLorentzVector
p4
;
19
for
(
auto
cand = candidates.
begin
(); cand != candidates.
end
(); ++cand)
20
{
21
if
( !(cand->et() >
globalThreshold
) )
continue
;
22
p4 += cand->p4();
23
}
24
math::XYZTLorentzVector
met
= -
p4
;
25
26
27
CommonMETData
ret
;
28
ret.
mex
= met.Px();
29
ret.
mey
= met.Py();
30
31
ret.
mez
= met.Pz();
// included here since it might be useful
32
// for Data Quality Monitering as it should be
33
// symmetrically distributed about the origin
34
35
ret.
met
= met.Pt();
36
37
double
et = 0.0;
38
for
(
auto
cand = candidates.
begin
(); cand != candidates.
end
(); ++cand)
39
{
40
if
( !(cand->et() >
globalThreshold
) )
continue
;
41
et += cand->et();
42
}
43
44
ret.
sumet
= et;
45
46
return
ret
;
47
}
48
49
//____________________________________________________________________________||
objects.IsoTrackAnalyzer.candidates
string candidates
Definition:
IsoTrackAnalyzer.py:296
run_regression.ret
int ret
Definition:
run_regression.py:388
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< reco::Candidate >
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
HLT_25ns14e33_v1_cff.globalThreshold
tuple globalThreshold
Definition:
HLT_25ns14e33_v1_cff.py:18390
edm::View::end
const_iterator end() const
caloMETBenchmarkGeneric_cfi.met
string met
Definition:
caloMETBenchmarkGeneric_cfi.py:3
CommonMETData::mey
double mey
Definition:
CommonMETData.h:16
CommonMETData::mex
double mex
Definition:
CommonMETData.h:15
CommonMETData::mez
double mez
Definition:
CommonMETData.h:17
Generated for CMSSW Reference Manual by
1.8.5