CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
HGCalShowerShapeHelper Class Reference

#include <HGCalShowerShapeHelper.h>

Classes

class  ShowerShapeCalc
 
struct  ShowerWidths
 

Public Member Functions

HGCalShowerShapeHelper::ShowerShapeCalc createCalc (const reco::SuperCluster &sc, double minHitE=0, double minHitET=0, int minLayer=1, int maxLayer=-1, DetId::Detector subDet=DetId::HGCalEE) const
 
HGCalShowerShapeHelper::ShowerShapeCalc createCalc (const std::vector< std::pair< DetId, float > > &hitsAndFracs, double rawEnergy, double minHitE=0, double minHitET=0, int minLayer=1, int maxLayer=-1, DetId::Detector subDet=DetId::HGCalEE) const
 
 HGCalShowerShapeHelper ()
 
 HGCalShowerShapeHelper (const HGCalShowerShapeHelper &&rhs)=delete
 
 HGCalShowerShapeHelper (const HGCalShowerShapeHelper &rhs)=delete
 
 HGCalShowerShapeHelper (edm::ConsumesCollector &&sumes)
 
void initPerEvent (const edm::EventSetup &iSetup, const std::vector< reco::PFRecHit > &recHits)
 
void initPerEvent (const std::vector< reco::PFRecHit > &recHits)
 
void initPerSetup (const edm::EventSetup &iSetup)
 
HGCalShowerShapeHelperoperator= (const HGCalShowerShapeHelper &&rhs)=delete
 
HGCalShowerShapeHelperoperator= (const HGCalShowerShapeHelper &rhs)=delete
 
template<edm::Transition tr = edm::Transition::Event>
void setTokens (edm::ConsumesCollector consumesCollector)
 
 ~HGCalShowerShapeHelper ()=default
 

Static Public Attributes

static const double kHDWaferCellSize_ = 0.465
 
static const double kLDWaferCellSize_ = 0.698
 

Private Member Functions

void setPFRecHitPtrMap (const std::vector< reco::PFRecHit > &recHits)
 

Private Attributes

edm::ESGetToken< CaloGeometry, CaloGeometryRecordcaloGeometryToken_
 
std::shared_ptr< std::unordered_map< uint32_t, const reco::PFRecHit * > > pfRecHitPtrMap_
 
std::shared_ptr< hgcal::RecHitToolsrecHitTools_
 

Detailed Description

Definition at line 47 of file HGCalShowerShapeHelper.h.

Constructor & Destructor Documentation

◆ HGCalShowerShapeHelper() [1/4]

HGCalShowerShapeHelper::HGCalShowerShapeHelper ( )

Definition at line 289 of file HGCalShowerShapeHelper.cc.

290  : recHitTools_(std::make_shared<hgcal::RecHitTools>()),
291  pfRecHitPtrMap_(std::make_shared<std::unordered_map<uint32_t, const reco::PFRecHit *>>()) {}

◆ HGCalShowerShapeHelper() [2/4]

HGCalShowerShapeHelper::HGCalShowerShapeHelper ( edm::ConsumesCollector &&  sumes)

Definition at line 293 of file HGCalShowerShapeHelper.cc.

294  : recHitTools_(std::make_shared<hgcal::RecHitTools>()),
295  pfRecHitPtrMap_(std::make_shared<std::unordered_map<uint32_t, const reco::PFRecHit *>>()) {
296  setTokens(sumes);
297 }

References setTokens().

◆ ~HGCalShowerShapeHelper()

HGCalShowerShapeHelper::~HGCalShowerShapeHelper ( )
default

◆ HGCalShowerShapeHelper() [3/4]

HGCalShowerShapeHelper::HGCalShowerShapeHelper ( const HGCalShowerShapeHelper rhs)
delete

◆ HGCalShowerShapeHelper() [4/4]

HGCalShowerShapeHelper::HGCalShowerShapeHelper ( const HGCalShowerShapeHelper &&  rhs)
delete

Member Function Documentation

◆ createCalc() [1/2]

HGCalShowerShapeHelper::ShowerShapeCalc HGCalShowerShapeHelper::createCalc ( const reco::SuperCluster sc,
double  minHitE = 0,
double  minHitET = 0,
int  minLayer = 1,
int  maxLayer = -1,
DetId::Detector  subDet = DetId::HGCalEE 
) const
inline

Definition at line 159 of file HGCalShowerShapeHelper.h.

164  {
165  return createCalc(sc.hitsAndFractions(), sc.rawEnergy(), minHitE, minHitET, minLayer, maxLayer, subDet);
166  }

References createCalc(), reco::CaloCluster::hitsAndFractions(), HLT_FULL_cff::minLayer, and reco::SuperCluster::rawEnergy().

◆ createCalc() [2/2]

HGCalShowerShapeHelper::ShowerShapeCalc HGCalShowerShapeHelper::createCalc ( const std::vector< std::pair< DetId, float > > &  hitsAndFracs,
double  rawEnergy,
double  minHitE = 0,
double  minHitET = 0,
int  minLayer = 1,
int  maxLayer = -1,
DetId::Detector  subDet = DetId::HGCalEE 
) const

◆ initPerEvent() [1/2]

void HGCalShowerShapeHelper::initPerEvent ( const edm::EventSetup iSetup,
const std::vector< reco::PFRecHit > &  recHits 
)

Definition at line 307 of file HGCalShowerShapeHelper.cc.

307  {
308  initPerSetup(iSetup);
309  initPerEvent(pfRecHits);
310 }

References initPerEvent(), and initPerSetup().

◆ initPerEvent() [2/2]

void HGCalShowerShapeHelper::initPerEvent ( const std::vector< reco::PFRecHit > &  recHits)

Definition at line 303 of file HGCalShowerShapeHelper.cc.

303  {
304  setPFRecHitPtrMap(pfRecHits);
305 }

References setPFRecHitPtrMap().

Referenced by initPerEvent(), EgammaHLTHGCalIDVarProducer::produce(), and SCEnergyCorrectorSemiParm::setEvent().

◆ initPerSetup()

void HGCalShowerShapeHelper::initPerSetup ( const edm::EventSetup iSetup)

Definition at line 299 of file HGCalShowerShapeHelper.cc.

299  {
300  recHitTools_->setGeometry(iSetup.getData(caloGeometryToken_));
301 }

References caloGeometryToken_, edm::EventSetup::getData(), and recHitTools_.

Referenced by initPerEvent(), and SCEnergyCorrectorSemiParm::setEventSetup().

◆ operator=() [1/2]

HGCalShowerShapeHelper& HGCalShowerShapeHelper::operator= ( const HGCalShowerShapeHelper &&  rhs)
delete

◆ operator=() [2/2]

HGCalShowerShapeHelper& HGCalShowerShapeHelper::operator= ( const HGCalShowerShapeHelper rhs)
delete

◆ setPFRecHitPtrMap()

void HGCalShowerShapeHelper::setPFRecHitPtrMap ( const std::vector< reco::PFRecHit > &  recHits)
private

Definition at line 324 of file HGCalShowerShapeHelper.cc.

324  {
325  pfRecHitPtrMap_->clear();
326 
327  for (const auto &recHit : recHits) {
328  (*pfRecHitPtrMap_)[recHit.detId()] = &recHit;
329  }
330 }

References pfRecHitPtrMap_, rpcPointValidation_cfi::recHit, and FastTrackerRecHitMaskProducer_cfi::recHits.

Referenced by initPerEvent().

◆ setTokens()

template<edm::Transition tr = edm::Transition::Event>
void HGCalShowerShapeHelper::setTokens ( edm::ConsumesCollector  consumesCollector)
inline

Member Data Documentation

◆ caloGeometryToken_

edm::ESGetToken<CaloGeometry, CaloGeometryRecord> HGCalShowerShapeHelper::caloGeometryToken_
private

Definition at line 171 of file HGCalShowerShapeHelper.h.

Referenced by initPerSetup(), and setTokens().

◆ kHDWaferCellSize_

const double HGCalShowerShapeHelper::kHDWaferCellSize_ = 0.465
static

◆ kLDWaferCellSize_

const double HGCalShowerShapeHelper::kLDWaferCellSize_ = 0.698
static

◆ pfRecHitPtrMap_

std::shared_ptr<std::unordered_map<uint32_t, const reco::PFRecHit *> > HGCalShowerShapeHelper::pfRecHitPtrMap_
private

◆ recHitTools_

std::shared_ptr<hgcal::RecHitTools> HGCalShowerShapeHelper::recHitTools_
private
HGCalShowerShapeHelper::recHitTools_
std::shared_ptr< hgcal::RecHitTools > recHitTools_
Definition: HGCalShowerShapeHelper.h:172
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
HGCalShowerShapeHelper::caloGeometryToken_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
Definition: HGCalShowerShapeHelper.h:171
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
HGCalShowerShapeHelper::setTokens
void setTokens(edm::ConsumesCollector consumesCollector)
Definition: HGCalShowerShapeHelper.h:144
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
HGCalShowerShapeHelper::setPFRecHitPtrMap
void setPFRecHitPtrMap(const std::vector< reco::PFRecHit > &recHits)
Definition: HGCalShowerShapeHelper.cc:324
CaloGeometry
Definition: CaloGeometry.h:21
HGCalShowerShapeHelper::pfRecHitPtrMap_
std::shared_ptr< std::unordered_map< uint32_t, const reco::PFRecHit * > > pfRecHitPtrMap_
Definition: HGCalShowerShapeHelper.h:173
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
HGCalShowerShapeHelper::createCalc
HGCalShowerShapeHelper::ShowerShapeCalc createCalc(const std::vector< std::pair< DetId, float > > &hitsAndFracs, double rawEnergy, double minHitE=0, double minHitET=0, int minLayer=1, int maxLayer=-1, DetId::Detector subDet=DetId::HGCalEE) const
reco::CaloCluster::hitsAndFractions
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
Definition: CaloCluster.h:210
HLT_FULL_cff.minLayer
minLayer
Definition: HLT_FULL_cff.py:52986
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
reco::SuperCluster::rawEnergy
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:58
HGCalShowerShapeHelper::initPerEvent
void initPerEvent(const std::vector< reco::PFRecHit > &recHits)
Definition: HGCalShowerShapeHelper.cc:303
HGCalShowerShapeHelper::initPerSetup
void initPerSetup(const edm::EventSetup &iSetup)
Definition: HGCalShowerShapeHelper.cc:299