CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 //____________________________________________________________________________||
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 }
48 
49 //____________________________________________________________________________||
tuple 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