Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:47

0001 #ifndef DataFormats_BTauReco_PixelClusterTagInfo_h
0002 #define DataFormats_BTauReco_PixelClusterTagInfo_h
0003 
0004 #include "DataFormats/Common/interface/CMS_CLASS_VERSION.h"
0005 
0006 #include "DataFormats/BTauReco/interface/BaseTagInfo.h"
0007 
0008 namespace reco {
0009 
0010   struct PixelClusterProperties {
0011     float x = 0;
0012     float y = 0;
0013     float z = 0;
0014     int charge = 0;
0015     unsigned int layer = 0;
0016   };
0017 
0018   struct PixelClusterData {
0019     std::vector<int8_t> r004;
0020     std::vector<int8_t> r006;
0021     std::vector<int8_t> r008;
0022     std::vector<int8_t> r010;
0023     std::vector<int8_t> r016;
0024     std::vector<int8_t> rvar;
0025     std::vector<unsigned int> rvwt;
0026     PixelClusterData(unsigned int l = 4) {
0027       r004 = std::vector<int8_t>(l, 0);
0028       r006 = std::vector<int8_t>(l, 0);
0029       r008 = std::vector<int8_t>(l, 0);
0030       r010 = std::vector<int8_t>(l, 0);
0031       r016 = std::vector<int8_t>(l, 0);
0032       rvar = std::vector<int8_t>(l, 0);
0033       rvwt = std::vector<unsigned int>(l, 0);
0034     }
0035     CMS_CLASS_VERSION(3)
0036   };
0037 
0038   class PixelClusterTagInfo : public BaseTagInfo {
0039   public:
0040     PixelClusterTagInfo() {}
0041 
0042     PixelClusterTagInfo(const PixelClusterData& data, const edm::RefToBase<Jet>& ref)
0043         : pixelClusters_(data), jetRef_(ref) {}
0044 
0045     ~PixelClusterTagInfo() override {}
0046 
0047     // without overriding clone from base class will be store/retrieved
0048     PixelClusterTagInfo* clone(void) const override { return new PixelClusterTagInfo(*this); }
0049 
0050     // method to set the jet RefToBase
0051     void setJetRef(const edm::RefToBase<Jet>& ref) { jetRef_ = ref; }
0052 
0053     // method to jet the jet RefToBase
0054     edm::RefToBase<Jet> jet() const override { return jetRef_; }
0055 
0056     // method to set the PixelClusterData
0057     void setData(const PixelClusterData& data) { pixelClusters_ = data; }
0058 
0059     // method to get the PixelClusterData struct
0060     const PixelClusterData& data() const { return pixelClusters_; }
0061 
0062     CMS_CLASS_VERSION(3)
0063 
0064   private:
0065     PixelClusterData pixelClusters_;
0066 
0067     edm::RefToBase<Jet> jetRef_;
0068   };
0069 
0070   typedef std::vector<reco::PixelClusterTagInfo> PixelClusterTagInfoCollection;
0071 
0072 }  // namespace reco
0073 
0074 #endif  // DataFormats_BTauReco_PixelClusterTagInfo_h