Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef DATAFORMATS_METRECO_HCALHALODATA_H
0002 #define DATAFORMATS_METRECO_HCALHALODATA_H
0003 /*
0004   [class]:  HcalHaloData
0005   [authors]: R. Remington, The University of Florida
0006   [description]: Container class to store beam halo data specific to the Hcal subdetector
0007   [date]: October 15, 2009
0008 */
0009 #include <vector>
0010 #include <cmath>
0011 #include "DataFormats/METReco/interface/PhiWedge.h"
0012 #include "DataFormats/DetId/interface/DetId.h"
0013 #include "DataFormats/CaloTowers/interface/CaloTowerDetId.h"
0014 #include "DataFormats/METReco/interface/HaloClusterCandidateHCAL.h"
0015 
0016 struct HaloTowerStrip {
0017   std::vector<std::pair<uint8_t, CaloTowerDetId> > cellTowerIds;
0018   float hadEt;
0019   float energyRatio;
0020   float emEt;
0021   HaloTowerStrip() {
0022     hadEt = 0.0;
0023     energyRatio = -1.0;
0024     emEt = 0.0;
0025     cellTowerIds.clear();
0026   }
0027   HaloTowerStrip(const HaloTowerStrip& strip) {
0028     cellTowerIds = strip.cellTowerIds;
0029     hadEt = strip.hadEt;
0030     energyRatio = strip.energyRatio;
0031     emEt = strip.emEt;
0032   }
0033   HaloTowerStrip& operator=(const HaloTowerStrip&) = default;
0034 };
0035 
0036 namespace reco {
0037 
0038   class HcalHaloData {
0039   public:
0040     //constructor
0041     HcalHaloData();
0042     //destructor
0043     ~HcalHaloData() {}
0044 
0045     // Return collection of 5-degree Phi Wedges built from Hcal RecHits
0046     const std::vector<PhiWedge>& GetPhiWedges() const { return PhiWedgeCollection; }
0047     std::vector<PhiWedge>& GetPhiWedges() { return PhiWedgeCollection; }
0048 
0049     // Return collection of problematic strips (pairs of # of problematic HCAL cells and CaloTowerDetId)
0050     const std::vector<HaloTowerStrip>& getProblematicStrips() const { return problematicStripCollection; }
0051     std::vector<HaloTowerStrip>& getProblematicStrips() { return problematicStripCollection; }
0052 
0053     const std::vector<HaloClusterCandidateHCAL>& getHaloClusterCandidatesHB() const { return thehaloclustercands_hb; }
0054     std::vector<HaloClusterCandidateHCAL>& getHaloClusterCandidatesHB() { return thehaloclustercands_hb; }
0055 
0056     const std::vector<HaloClusterCandidateHCAL>& getHaloClusterCandidatesHE() const { return thehaloclustercands_he; }
0057     std::vector<HaloClusterCandidateHCAL>& getHaloClusterCandidatesHE() { return thehaloclustercands_he; }
0058 
0059     void setHaloClusterCandidatesHB(const std::vector<HaloClusterCandidateHCAL>& x) { thehaloclustercands_hb = x; };
0060     void setHaloClusterCandidatesHE(const std::vector<HaloClusterCandidateHCAL>& x) { thehaloclustercands_he = x; };
0061 
0062   private:
0063     std::vector<PhiWedge> PhiWedgeCollection;
0064     std::vector<HaloTowerStrip> problematicStripCollection;
0065     std::vector<HaloClusterCandidateHCAL> thehaloclustercands_hb;
0066     std::vector<HaloClusterCandidateHCAL> thehaloclustercands_he;
0067   };
0068 }  // namespace reco
0069 #endif