** Warning **

Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle dbname=lxr at /lxr/lib/LXR/Common.pm line 1113.

Last-Modified: Fri, 5 Dec 2024 02:48:16 GMT Content-Type: text/html; charset=utf-8 /CMSSW_15_0_X_2024-12-04-2300/DataFormats/METReco/interface/CorrMETData.h
Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:44

0001 // -*- C++ -*-
0002 #ifndef METRECO_CORR_MET_DATA_H
0003 #define METRECO_CORR_MET_DATA_H
0004 
0005 /// \class CorrMETData
0006 ///
0007 /// \short a MET correction term
0008 ///
0009 /// CorrMETData represents a MET correction term.
0010 ///
0011 /// \author Michael Schmitt, Richard Cavanaugh The University of Florida; Tai Sakuma, Texas A&M University
0012 
0013 //____________________________________________________________________________||
0014 struct CorrMETData {
0015   double mex;
0016   double mey;
0017 
0018   double sumet;  // to be deleted
0019 
0020   CorrMETData() : mex(0.0), mey(0.0), sumet(0.0) {}
0021 
0022   CorrMETData(const CorrMETData& corr) : mex(corr.mex), mey(corr.mey), sumet(corr.sumet) {}
0023 
0024   CorrMETData& operator=(const CorrMETData&) = default;
0025 
0026   CorrMETData& operator+=(const CorrMETData& rhs) {
0027     mex += rhs.mex;
0028     mey += rhs.mey;
0029     sumet += rhs.sumet;
0030     return *this;
0031   }
0032 
0033   CorrMETData& operator*=(const double& rhs) {
0034     mex *= rhs;
0035     mey *= rhs;
0036     sumet *= rhs;
0037     return *this;
0038   }
0039 
0040   friend CorrMETData operator+(const CorrMETData& lhs, const CorrMETData& rhs) { return CorrMETData(lhs) += rhs; }
0041 
0042   friend CorrMETData operator*(const double& lhs, const CorrMETData& rhs) { return CorrMETData(rhs) *= lhs; }
0043 
0044   friend CorrMETData operator*(const CorrMETData& lhs, const double& rhs) { return CorrMETData(lhs) *= rhs; }
0045 };
0046 
0047 //____________________________________________________________________________||
0048 #endif  // METRECO_CORR_MET_DATA_H