CMS 3D CMS Logo

METAlgo.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: METAlgorithms
4 // Class: METAlgo
5 //
6 // Original Authors: Michael Schmitt, Richard Cavanaugh The University of Florida
7 // Created: May 31, 2005
8 //
9 
10 //____________________________________________________________________________||
14 
15 //____________________________________________________________________________||
18  for (auto cand = candidates.begin(); cand != candidates.end(); ++cand) {
19  if (!(cand->et() > globalThreshold))
20  continue;
21  p4 += cand->p4();
22  }
24 
26  ret.mex = met.Px();
27  ret.mey = met.Py();
28 
29  ret.mez = met.Pz(); // included here since it might be useful
30  // for Data Quality Monitering as it should be
31  // symmetrically distributed about the origin
32 
33  ret.met = met.Pt();
34 
35  double et = 0.0;
36  for (auto cand = candidates.begin(); cand != candidates.end(); ++cand) {
37  if (!(cand->et() > globalThreshold))
38  continue;
39  et += cand->et();
40  }
41 
42  ret.sumet = et;
43 
44  return ret;
45 }
46 
47 //____________________________________________________________________________||
ret
prodAgent to be discontinued
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
const_iterator begin() const
CommonMETData run(const edm::View< reco::Candidate > &candidates, double globalThreshold=0.0)
Definition: METAlgo.cc:16
double p4[4]
Definition: TauolaWrapper.h:92
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
const_iterator end() const