HaloTowerStrip

HcalHaloData

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
#ifndef DATAFORMATS_METRECO_HCALHALODATA_H
#define DATAFORMATS_METRECO_HCALHALODATA_H
/*
  [class]:  HcalHaloData
  [authors]: R. Remington, The University of Florida
  [description]: Container class to store beam halo data specific to the Hcal subdetector
  [date]: October 15, 2009
*/
#include <vector>
#include <cmath>
#include "DataFormats/METReco/interface/PhiWedge.h"
#include "DataFormats/DetId/interface/DetId.h"
#include "DataFormats/CaloTowers/interface/CaloTowerDetId.h"
#include "DataFormats/METReco/interface/HaloClusterCandidateHCAL.h"

struct HaloTowerStrip {
  std::vector<std::pair<uint8_t, CaloTowerDetId> > cellTowerIds;
  float hadEt;
  float energyRatio;
  float emEt;
  HaloTowerStrip() {
    hadEt = 0.0;
    energyRatio = -1.0;
    emEt = 0.0;
    cellTowerIds.clear();
  }
  HaloTowerStrip(const HaloTowerStrip& strip) {
    cellTowerIds = strip.cellTowerIds;
    hadEt = strip.hadEt;
    energyRatio = strip.energyRatio;
    emEt = strip.emEt;
  }
  HaloTowerStrip& operator=(const HaloTowerStrip&) = default;
};

namespace reco {

  class HcalHaloData {
  public:
    //constructor
    HcalHaloData();
    //destructor
    ~HcalHaloData() {}

    // Return collection of 5-degree Phi Wedges built from Hcal RecHits
    const std::vector<PhiWedge>& GetPhiWedges() const { return PhiWedgeCollection; }
    std::vector<PhiWedge>& GetPhiWedges() { return PhiWedgeCollection; }

    // Return collection of problematic strips (pairs of # of problematic HCAL cells and CaloTowerDetId)
    const std::vector<HaloTowerStrip>& getProblematicStrips() const { return problematicStripCollection; }
    std::vector<HaloTowerStrip>& getProblematicStrips() { return problematicStripCollection; }

    const std::vector<HaloClusterCandidateHCAL>& getHaloClusterCandidatesHB() const { return thehaloclustercands_hb; }
    std::vector<HaloClusterCandidateHCAL>& getHaloClusterCandidatesHB() { return thehaloclustercands_hb; }

    const std::vector<HaloClusterCandidateHCAL>& getHaloClusterCandidatesHE() const { return thehaloclustercands_he; }
    std::vector<HaloClusterCandidateHCAL>& getHaloClusterCandidatesHE() { return thehaloclustercands_he; }

    void setHaloClusterCandidatesHB(const std::vector<HaloClusterCandidateHCAL>& x) { thehaloclustercands_hb = x; };
    void setHaloClusterCandidatesHE(const std::vector<HaloClusterCandidateHCAL>& x) { thehaloclustercands_he = x; };

  private:
    std::vector<PhiWedge> PhiWedgeCollection;
    std::vector<HaloTowerStrip> problematicStripCollection;
    std::vector<HaloClusterCandidateHCAL> thehaloclustercands_hb;
    std::vector<HaloClusterCandidateHCAL> thehaloclustercands_he;
  };
}  // namespace reco
#endif