CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
METAlgo Class Reference

#include <RecoMET/METAlgorithms/interface/METAlgo.h>

Public Member Functions

 METAlgo ()
 
CommonMETData run (const edm::View< reco::Candidate > &candidates, double globalThreshold=0.0)
 
virtual ~METAlgo ()
 

Detailed Description

Description: Calculates MET for given input

Implementation: [Notes on implementation]

Definition at line 28 of file METAlgo.h.

Constructor & Destructor Documentation

METAlgo::METAlgo ( )
inline

Definition at line 31 of file METAlgo.h.

31 {}
virtual METAlgo::~METAlgo ( )
inlinevirtual

Definition at line 32 of file METAlgo.h.

32 {}

Member Function Documentation

CommonMETData METAlgo::run ( const edm::View< reco::Candidate > &  candidates,
double  globalThreshold = 0.0 
)

Definition at line 16 of file METAlgo.cc.

References edm::View< T >::begin(), edm::View< T >::end(), HLT_25ns10e33_v2_cff::globalThreshold, CommonMETData::met, objects.METAnalyzer::met, CommonMETData::mex, CommonMETData::mey, CommonMETData::mez, p4, runTheMatrix::ret, and CommonMETData::sumet.

Referenced by cms::ElseMETProducer::produce(), cms::PFClusterMETProducer::produce(), cms::CaloMETProducer::produce(), reco::PFMETProducerMVA::produce(), and cms::PFMETProducer::produce().

17 {
19  for(auto cand = candidates.begin(); cand != candidates.end(); ++cand)
20  {
21  if( !(cand->et() > globalThreshold) ) continue;
22  p4 += cand->p4();
23  }
25 
26 
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 }
tuple ret
prodAgent to be discontinued
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
const_iterator begin() const
double p4[4]
Definition: TauolaWrapper.h:92
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
const_iterator end() const