CMS 3D CMS Logo

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.

References objects.IsoTrackAnalyzer::candidates, met_cff::globalThreshold, and run().

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(), stringResolutionProvider_cfi::et, met_cff::globalThreshold, CommonMETData::met, RazorAnalyzer::met, CommonMETData::mex, CommonMETData::mey, CommonMETData::mez, p4, and CommonMETData::sumet.

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

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 
27  CommonMETData ret;
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 }
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
globalThreshold
Definition: met_cff.py:12
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
met
===> hadronic RAZOR
et
define resolution functions of each parameter
const_iterator end() const