Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:54:10

0001 #ifndef MuonReco_MuonMETCorrectionData_h
0002 #define MuonReco_MuonMETCorrectionData_h
0003 
0004 #include <cmath>
0005 
0006 namespace reco {
0007   class MuonMETCorrectionData {
0008   public:
0009     enum Type {
0010       NotUsed = 0,
0011       CombinedTrackUsed = 1,
0012       GlobalTrackUsed = 1,
0013       InnerTrackUsed = 2,
0014       TrackUsed = 2,
0015       OuterTrackUsed = 3,
0016       StandAloneTrackUsed = 3,
0017       TreatedAsPion = 4,
0018       MuonP4V4QUsed = 5,
0019       MuonCandidateValuesUsed = 5
0020     };
0021 
0022     MuonMETCorrectionData() : type_(0), corrX_(0), corrY_(0) {}
0023     MuonMETCorrectionData(Type type, float corrX, float corrY) : type_(type), corrX_(corrX), corrY_(corrY) {}
0024 
0025     Type type() { return Type(type_); }
0026     float corrX() { return corrX_; }
0027     float corrY() { return corrY_; }
0028     float x() { return corrX_; }
0029     float y() { return corrY_; }
0030     float pt() { return sqrt(x() * x() + y() * y()); }
0031 
0032   protected:
0033     int type_;
0034     float corrX_;
0035     float corrY_;
0036   };
0037 
0038 }  // namespace reco
0039 
0040 #endif  //MuonReco_MuonMETCorrectionData_h