Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:50:40

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 };
0034 
0035 namespace reco {
0036 
0037   class HcalHaloData {
0038   public:
0039     //constructor
0040     HcalHaloData();
0041     //destructor
0042     ~HcalHaloData() {}
0043 
0044     // Return collection of 5-degree Phi Wedges built from Hcal RecHits
0045     const std::vector<PhiWedge>& GetPhiWedges() const { return PhiWedgeCollection; }
0046     std::vector<PhiWedge>& GetPhiWedges() { return PhiWedgeCollection; }
0047 
0048     // Return collection of problematic strips (pairs of # of problematic HCAL cells and CaloTowerDetId)
0049     const std::vector<HaloTowerStrip>& getProblematicStrips() const { return problematicStripCollection; }
0050     std::vector<HaloTowerStrip>& getProblematicStrips() { return problematicStripCollection; }
0051 
0052     const std::vector<HaloClusterCandidateHCAL>& getHaloClusterCandidatesHB() const { return thehaloclustercands_hb; }
0053     std::vector<HaloClusterCandidateHCAL>& getHaloClusterCandidatesHB() { return thehaloclustercands_hb; }
0054 
0055     const std::vector<HaloClusterCandidateHCAL>& getHaloClusterCandidatesHE() const { return thehaloclustercands_he; }
0056     std::vector<HaloClusterCandidateHCAL>& getHaloClusterCandidatesHE() { return thehaloclustercands_he; }
0057 
0058     void setHaloClusterCandidatesHB(const std::vector<HaloClusterCandidateHCAL>& x) { thehaloclustercands_hb = x; };
0059     void setHaloClusterCandidatesHE(const std::vector<HaloClusterCandidateHCAL>& x) { thehaloclustercands_he = x; };
0060 
0061   private:
0062     std::vector<PhiWedge> PhiWedgeCollection;
0063     std::vector<HaloTowerStrip> problematicStripCollection;
0064     std::vector<HaloClusterCandidateHCAL> thehaloclustercands_hb;
0065     std::vector<HaloClusterCandidateHCAL> thehaloclustercands_he;
0066   };
0067 }  // namespace reco
0068 #endif