CMS 3D CMS Logo

MEzCalculator.h
Go to the documentation of this file.
1 #ifndef TopTools_MEzCalculator_h
2 #define TopTools_MEzCalculator_h
3 
15 
16 #include "TLorentzVector.h"
17 
19 public:
21  MEzCalculator();
25  void SetMET(const pat::MET& MET) { MET_ = MET; };
26  void SetMET(const TLorentzVector& MET) {
27  pat::Particle::LorentzVector p(MET.Px(), MET.Py(), MET.Pz(), MET.E());
28  MET_.setP4(p);
29  }
31  void SetLepton(const pat::Particle& lepton, bool isMuon = true) {
32  lepton_ = lepton;
33  isMuon_ = isMuon;
34  };
35  void SetLepton(const TLorentzVector& lepton) {
36  pat::Particle::LorentzVector p(lepton.Px(), lepton.Py(), lepton.Pz(), lepton.E());
37  lepton_.setP4(p);
38  }
49  double Calculate(int type = 1);
51  bool IsComplex() const { return isComplex_; };
53  void Print() {
54  std::cout << " METzCalculator: pxmu = " << lepton_.px() << " pzmu= " << lepton_.pz() << std::endl;
55  std::cout << " METzCalculator: pxnu = " << MET_.px() << " pynu= " << MET_.py() << std::endl;
56  }
57 
58 private:
59  bool isComplex_;
62  bool isMuon_;
63 };
64 
65 #endif
MEzCalculator::SetLepton
void SetLepton(const TLorentzVector &lepton)
Definition: MEzCalculator.h:35
MEzCalculator::SetMET
void SetMET(const TLorentzVector &MET)
Definition: MEzCalculator.h:26
MEzCalculator::Print
void Print()
verbose
Definition: MEzCalculator.h:53
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
gather_cfg.cout
cout
Definition: gather_cfg.py:144
MEzCalculator::isMuon_
bool isMuon_
Definition: MEzCalculator.h:62
MEzCalculator
Definition: MEzCalculator.h:18
MEzCalculator::lepton_
pat::Particle lepton_
Definition: MEzCalculator.h:60
reco::LeafCandidate::py
double py() const final
y coordinate of momentum vector
Definition: LeafCandidate.h:142
MEzCalculator::MEzCalculator
MEzCalculator()
constructor
Definition: MEzCalculator.cc:5
MEzCalculator::SetLepton
void SetLepton(const pat::Particle &lepton, bool isMuon=true)
Set lepton.
Definition: MEzCalculator.h:31
MEzCalculator::IsComplex
bool IsComplex() const
check for complex root
Definition: MEzCalculator.h:51
MEzCalculator::Calculate
double Calculate(int type=1)
member functions
Definition: MEzCalculator.cc:14
pat::MET
Analysis-level MET class.
Definition: MET.h:40
MET.h
MEzCalculator::SetMET
void SetMET(const pat::MET &MET)
Set MET.
Definition: MEzCalculator.h:25
reco::LeafCandidate::setP4
void setP4(const LorentzVector &p4) final
set 4-momentum
Definition: LeafCandidate.h:158
MEzCalculator::MET_
pat::MET MET_
Definition: MEzCalculator.h:61
type
type
Definition: HCALResponse.h:21
MET
MEzCalculator::~MEzCalculator
~MEzCalculator()
destructor
Definition: MEzCalculator.cc:11
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
Particle.h
MEzCalculator::isComplex_
bool isComplex_
Definition: MEzCalculator.h:59
reco::LeafCandidate::px
double px() const final
x coordinate of momentum vector
Definition: LeafCandidate.h:140
reco::LeafCandidate::pz
double pz() const final
z coordinate of momentum vector
Definition: LeafCandidate.h:144
HLTTauDQMOffline_cfi.MET
MET
Definition: HLTTauDQMOffline_cfi.py:70
pat::Particle
Analysis-level particle class.
Definition: Particle.h:30
reco::isMuon
bool isMuon(const Candidate &part)
Definition: pdgIdUtils.h:9