CMS 3D CMS Logo

METzCalculator.h
Go to the documentation of this file.
1 #ifndef METzCalculator_h
2 #define METzCalculator_h
3 
13 //#include "FWCore/Framework/interface/Event.h"
14 //#include "FWCore/ParameterSet/interface/ParameterSet.h"
15 
18 
19 #include "TLorentzVector.h"
20 
22 public:
25  //METzCalculator(const edm::ParameterSEt& iConf);
27  virtual ~METzCalculator();
29  void SetMET(const pat::MET& MET) { MET_ = MET; };
30  void SetMET(const TLorentzVector& MET) {
31  pat::Particle::LorentzVector p(MET.Px(), MET.Py(), MET.Pz(), MET.E());
32  MET_.setP4(p);
33  }
35  void SetMuon(const pat::Particle& lepton) { lepton_ = lepton; };
36  void SetMuon(const TLorentzVector& lepton) {
37  pat::Particle::LorentzVector p(lepton.Px(), lepton.Py(), lepton.Pz(), lepton.E());
38  lepton_.setP4(p);
39  }
51  double Calculate(int type = 0);
53  bool IsComplex() const { return isComplex_; };
54 
55  void Print() {
56  std::cout << " METzCalculator: pxmu = " << lepton_.px() << " pzmu= " << lepton_.pz() << std::endl;
57  std::cout << " METzCalculator: pxnu = " << MET_.px() << " pynu= " << MET_.py() << std::endl;
58  }
59 
60 private:
61  bool isComplex_;
64 };
65 
66 #endif
type
Definition: HCALResponse.h:21
Analysis-level MET class.
Definition: MET.h:40
double px() const final
x coordinate of momentum vector
void SetMET(const TLorentzVector &MET)
pat::Particle lepton_
void SetMET(const pat::MET &MET)
Set MET.
double pz() const final
z coordinate of momentum vector
void SetMuon(const pat::Particle &lepton)
Set Muon.
virtual ~METzCalculator()
destructor
METzCalculator()
constructor
bool IsComplex() const
check for complex root
Analysis-level particle class.
Definition: Particle.h:30
double Calculate(int type=0)
member functions
double py() const final
y coordinate of momentum vector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
void SetMuon(const TLorentzVector &lepton)
void setP4(const LorentzVector &p4) final
set 4-momentum