Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef METSIG_SIGINPUTOBJ_H
0002 #define METSIG_SIGINPUTOBJ_H
0003 // -*- C++ -*-
0004 //
0005 // Package:    METAlgorithms
0006 // Class:      SigInputObj
0007 //
0008 /**\class METSignificance SigInputObj.h DataFormats/METReco/include/SigInputObj.h
0009 
0010  Description: <one line class summary>
0011 
0012  Implementation:
0013      <Notes on implementation>
0014 */
0015 //
0016 // Original Author:  Kyle Story, Freya Blekman (Cornell University)
0017 //         Created:  Fri Apr 18 11:58:33 CEST 2008
0018 //
0019 //
0020 
0021 #include <vector>
0022 #include <string>
0023 #include <iostream>
0024 #include <sstream>
0025 
0026 //=== Class SigInputObj ==============================//
0027 namespace metsig {
0028 
0029   class SigInputObj {
0030   public:
0031     SigInputObj() : type(""), energy(0.), phi(0.), sigma_e(0.), sigma_tan(0.) { ; }  // default constructor
0032 
0033     SigInputObj(const std::string& m_type, double m_energy, double m_phi, double m_sigm_e, double m_sigma_phi);
0034     ~SigInputObj() { ; }
0035 
0036     std::string get_type() const { return (type); };
0037     double get_energy() const { return (energy); };
0038     double get_phi() const { return (phi); };
0039     double get_sigma_e() const { return (sigma_e); };
0040     double get_sigma_tan() const { return (sigma_tan); };
0041 
0042     void set(const std::string& m_type,
0043              const double& m_energy,
0044              const double& m_phi,
0045              const double& m_sigma_e,
0046              const double& m_sigma_tan) {
0047       type.clear();
0048       type.append(m_type);
0049       energy = m_energy;
0050       phi = m_phi;
0051       sigma_e = m_sigma_e;
0052       sigma_tan = m_sigma_tan;
0053     }
0054 
0055   private:
0056     std::string type;  //type of physics object
0057     /*** note: type = "jet", "uc" (un-clustered energy),
0058      "electron", "muon", "hot-cell", "vertex" ***/
0059     double energy;     //magnitude of the energy
0060     double phi;        //azimuthal angle
0061     double sigma_e;    //gaus width in radial direction
0062     double sigma_tan;  //gaus width in phi-hat direction (not in rad)
0063 
0064     void set_type(const std::string& m_type) {
0065       type.clear();
0066       type.append(m_type);
0067     };
0068     void set_energy(const double& m_energy) { energy = m_energy; };
0069     void set_phi(const double& m_phi) { phi = m_phi; };
0070     void set_sigma_e(const double& m_sigma_e) { sigma_e = m_sigma_e; };
0071     void set_sigma_tan(const double& m_sigma_tan) { sigma_tan = m_sigma_tan; };
0072   };
0073 }  // namespace metsig
0074 
0075 #endif