CMS 3D CMS Logo

MET.cc

Go to the documentation of this file.
00001 // File: MET.cc
00002 // Description: see MET.h
00003 // Author: Michael Schmitt, R. Cavanaugh University of Florida
00004 // Creation Date:  MHS MAY 30, 2005 initial version
00005 
00006 #include "DataFormats/METReco/interface/MET.h"
00007 
00008 using namespace std;
00009 using namespace reco;
00010 
00011 //---------------------------------------------------------------------------
00012 // Default Constructor;
00013 //-----------------------------------
00014 MET::MET()
00015 {
00016   sumet = 0.0;
00017   elongit = 0.0;
00018 }
00019 //---------------------------------------------------------------------------
00020 
00021 //---------------------------------------------------------------------------
00022 // Constructer for the case when only p4_ =  (mEx, mEy, 0, mEt) is known.
00023 // The vertex information is currently not used (but may be in the future)
00024 // and is required by the RecoCandidate constructer.
00025 //-----------------------------------
00026 MET::MET( const LorentzVector& p4_, const Point& vtx_ ) : 
00027   RecoCandidate( 0, p4_, vtx_ )
00028 {
00029   sumet = 0.0;
00030   elongit = 0.0;
00031 }
00032 //---------------------------------------------------------------------------
00033 
00034 //---------------------------------------------------------------------------
00035 // Constructer for the case when the SumET is known in addition to 
00036 // p4_ = (mEx, mEy, 0, mEt).  The vertex information is currently not used
00037 // (but see above).
00038 //-----------------------------------
00039 MET::MET( double sumet_, const LorentzVector& p4_, const Point& vtx_ ) : 
00040   RecoCandidate( 0, p4_, vtx_ ) 
00041 {
00042   sumet = sumet_;
00043   elongit = 0.0;
00044 }
00045 //---------------------------------------------------------------------------
00046 
00047 //---------------------------------------------------------------------------
00048 // Constructor for the case when the SumET, the corrections which
00049 // were applied to the MET, as well the MET itself p4_ = (mEx, mEy, 0, mEt)
00050 // are all known.  See above concerning the vertex information. 
00051 //-----------------------------------
00052 MET::MET( double sumet_, std::vector<CorrMETData> corr_, 
00053           const LorentzVector& p4_, const Point& vtx_ ) : 
00054   RecoCandidate( 0, p4_, vtx_ ) 
00055 {
00056   sumet = sumet_;
00057   elongit = 0.0;
00058   //-----------------------------------
00059   // Fill the vector containing the corrections (corr) with vector of 
00060   // known corrections (corr_) passed in via the constructor.
00061   std::vector<CorrMETData>::const_iterator i;
00062   for( i = corr_.begin(); i != corr_.end();  i++ ) 
00063     {
00064       corr.push_back( *i );
00065     }
00066 }
00067 //---------------------------------------------------------------------------
00068 
00069 //---------------------------------------------------------------------------
00070 // Returns the vector of all corrections applied to the x component of the
00071 // missing transverse momentum, mEx
00072 //-----------------------------------
00073 std::vector<double> MET::dmEx()
00074 {
00075   std::vector<double> deltas;
00076   std::vector<CorrMETData>::const_iterator i;
00077   for( i = corr.begin(); i != corr.end(); i++ )
00078     {
00079       deltas.push_back( i->mex );
00080     }
00081   return deltas;
00082 }
00083 //---------------------------------------------------------------------------
00084 
00085 //---------------------------------------------------------------------------
00086 // Returns the vector of all corrections applied to the y component of the
00087 // missing transverse momentum, mEy
00088 //-----------------------------------
00089 std::vector<double> MET::dmEy()
00090 {
00091   std::vector<double> deltas;
00092   std::vector<CorrMETData>::const_iterator i;
00093   for( i = corr.begin(); i != corr.end(); i++ )
00094     {
00095       deltas.push_back( i->mey );
00096     }
00097   return deltas;
00098 }
00099 //---------------------------------------------------------------------------
00100 
00101 //---------------------------------------------------------------------------
00102 // Returns the vector of all corrections applied to the scalar sum of the 
00103 // transverse energy (over all objects)
00104 //-----------------------------------
00105 std::vector<double> MET::dsumEt()
00106 {
00107   std::vector<double> deltas;
00108   std::vector<CorrMETData>::const_iterator i;
00109   for( i = corr.begin(); i != corr.end(); i++ )
00110     {
00111       deltas.push_back( i->sumet );
00112     }
00113   return deltas;
00114 }
00115 //---------------------------------------------------------------------------
00116 
00117 //---------------------------------------------------------------------------
00118 // Required RecoCandidate polymorphism
00119 //-----------------------------------
00120 bool MET::overlap( const Candidate & ) const 
00121 {
00122   return false;
00123 }
00124 //---------------------------------------------------------------------------

Generated on Tue Jun 9 17:31:15 2009 for CMSSW by  doxygen 1.5.4