Main Page
Namespaces
Classes
Package Documentation
src
TopQuarkAnalysis
TopTools
interface
MEzCalculator.h
Go to the documentation of this file.
1
#ifndef TopTools_MEzCalculator_h
2
#define TopTools_MEzCalculator_h
3
13
#include "
DataFormats/PatCandidates/interface/Particle.h
"
14
#include "
DataFormats/PatCandidates/interface/MET.h
"
15
16
#include "TLorentzVector.h"
17
18
class
MEzCalculator
{
19
20
public
:
22
MEzCalculator
();
24
~MEzCalculator
();
26
void
SetMET
(
const
pat::MET
&
MET
) {
MET_
=
MET
; } ;
27
void
SetMET
(
const
TLorentzVector&
MET
) {
28
pat::Particle::LorentzVector
p
(MET.Px(),MET.Py(),MET.Pz(),MET.E());
29
MET_
.
setP4
(
p
);
30
}
32
void
SetLepton
(
const
pat::Particle
& lepton,
bool
isMuon
=
true
) {
33
lepton_
= lepton;
34
isMuon_
=
isMuon
;
35
};
36
void
SetLepton
(
const
TLorentzVector& lepton) {
37
pat::Particle::LorentzVector
p
(lepton.Px(), lepton.Py(), lepton.Pz(), lepton.E() );
38
lepton_
.
setP4
(
p
);
39
}
50
double
Calculate
(
int
type
= 1);
52
bool
IsComplex
()
const
{
return
isComplex_
; };
54
void
Print
() {
55
std::cout
<<
" METzCalculator: pxmu = "
<<
lepton_
.
px
() <<
" pzmu= "
<<
lepton_
.
pz
() << std::endl;
56
std::cout
<<
" METzCalculator: pxnu = "
<<
MET_
.
px
() <<
" pynu= "
<<
MET_
.
py
() << std::endl;
57
}
58
59
private
:
60
61
bool
isComplex_
;
62
pat::Particle
lepton_
;
63
pat::MET
MET_
;
64
bool
isMuon_
;
65
};
66
67
#endif
type
type
Definition:
HCALResponse.h:21
pat::MET
Analysis-level MET class.
Definition:
MET.h:40
MEzCalculator::SetLepton
void SetLepton(const pat::Particle &lepton, bool isMuon=true)
Set lepton.
Definition:
MEzCalculator.h:32
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
reco::isMuon
bool isMuon(const Candidate &part)
Definition:
pdgIdUtils.h:11
reco::LeafCandidate::px
double px() const final
x coordinate of momentum vector
Definition:
LeafCandidate.h:125
MEzCalculator::~MEzCalculator
~MEzCalculator()
destructor
Definition:
MEzCalculator.cc:12
MEzCalculator::isComplex_
bool isComplex_
Definition:
MEzCalculator.h:61
MEzCalculator::SetMET
void SetMET(const pat::MET &MET)
Set MET.
Definition:
MEzCalculator.h:26
MEzCalculator::Calculate
double Calculate(int type=1)
member functions
Definition:
MEzCalculator.cc:18
MEzCalculator::Print
void Print()
verbose
Definition:
MEzCalculator.h:54
reco::LeafCandidate::pz
double pz() const final
z coordinate of momentum vector
Definition:
LeafCandidate.h:129
MET.h
MEzCalculator::MEzCalculator
MEzCalculator()
constructor
Definition:
MEzCalculator.cc:5
nanoDQM_cfi.MET
MET
Definition:
nanoDQM_cfi.py:468
MEzCalculator::lepton_
pat::Particle lepton_
Definition:
MEzCalculator.h:62
MET
MEzCalculator::SetMET
void SetMET(const TLorentzVector &MET)
Definition:
MEzCalculator.h:27
pat::Particle
Analysis-level particle class.
Definition:
Particle.h:32
MEzCalculator::SetLepton
void SetLepton(const TLorentzVector &lepton)
Definition:
MEzCalculator.h:36
reco::LeafCandidate::py
double py() const final
y coordinate of momentum vector
Definition:
LeafCandidate.h:127
MEzCalculator::isMuon_
bool isMuon_
Definition:
MEzCalculator.h:64
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition:
Candidate.h:37
MEzCalculator
Definition:
MEzCalculator.h:18
MEzCalculator::IsComplex
bool IsComplex() const
check for complex root
Definition:
MEzCalculator.h:52
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
reco::LeafCandidate::setP4
void setP4(const LorentzVector &p4) final
set 4-momentum
Definition:
LeafCandidate.h:143
Particle.h
MEzCalculator::MET_
pat::MET MET_
Definition:
MEzCalculator.h:63
Generated for CMSSW Reference Manual by
1.8.11