CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
23  public:
26  //METzCalculator(const edm::ParameterSEt& iConf);
28  virtual ~METzCalculator();
30  void SetMET(const pat::MET &MET) { MET_ = MET; } ;
31  void SetMET(const TLorentzVector& MET) {
32  pat::Particle::LorentzVector p(MET.Px(),MET.Py(),MET.Pz(),MET.E());
33  MET_.setP4(p);
34  }
36  void SetMuon(const pat::Particle &lepton) { lepton_ = lepton; };
37  void SetMuon(const TLorentzVector& lepton) {
38  pat::Particle::LorentzVector p(lepton.Px(), lepton.Py(), lepton.Pz(), lepton.E() );
39  lepton_.setP4(p);
40  }
52  double Calculate(int type = 0);
54  bool IsComplex() const { return isComplex_; };
55 
56  void Print() {
57  std::cout << " METzCalculator: pxmu = " << lepton_.px() << " pzmu= " << lepton_.pz() << std::endl;
58  std::cout << " METzCalculator: pxnu = " << MET_.px() << " pynu= " << MET_.py() << std::endl;
59  }
60 
61  private:
62 
63  bool isComplex_;
66 
67 };
68 
69 #endif
type
Definition: HCALResponse.h:21
Analysis-level MET class.
Definition: MET.h:43
void SetMET(const TLorentzVector &MET)
pat::Particle lepton_
void SetMET(const pat::MET &MET)
Set MET.
void SetMuon(const pat::Particle &lepton)
Set Muon.
virtual ~METzCalculator()
destructor
virtual double py() const final
y coordinate of momentum vector
virtual double pz() const final
z coordinate of momentum vector
METzCalculator()
constructor
bool IsComplex() const
check for complex root
Analysis-level particle class.
Definition: Particle.h:32
double Calculate(int type=0)
member functions
virtual void setP4(const LorentzVector &p4) final
set 4-momentum
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
void SetMuon(const TLorentzVector &lepton)
virtual double px() const final
x coordinate of momentum vector
tuple cout
Definition: gather_cfg.py:145