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 31 of file HGCalShowerShapeHelper.h.

Constructor & Destructor Documentation

◆ HGCalShowerShapeHelper() [1/4]

HGCalShowerShapeHelper::HGCalShowerShapeHelper ( )

Definition at line 295 of file HGCalShowerShapeHelper.cc.

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

◆ HGCalShowerShapeHelper() [2/4]

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

Definition at line 299 of file HGCalShowerShapeHelper.cc.

300  : recHitTools_(std::make_shared<hgcal::RecHitTools>()),
301  pfRecHitPtrMap_(std::make_shared<std::unordered_map<uint32_t, const reco::PFRecHit *>>()) {
302  setTokens(sumes);
303 }

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 143 of file HGCalShowerShapeHelper.h.

148  {
149  return createCalc(sc.hitsAndFractions(), sc.rawEnergy(), minHitE, minHitET, minLayer, maxLayer, subDet);
150  }

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 313 of file HGCalShowerShapeHelper.cc.

313  {
314  initPerSetup(iSetup);
315  initPerEvent(pfRecHits);
316 }

References initPerEvent(), and initPerSetup().

◆ initPerEvent() [2/2]

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

Definition at line 309 of file HGCalShowerShapeHelper.cc.

309  {
310  setPFRecHitPtrMap(pfRecHits);
311 }

References setPFRecHitPtrMap().

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

◆ initPerSetup()

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

Definition at line 305 of file HGCalShowerShapeHelper.cc.

305  {
306  recHitTools_->setGeometry(iSetup.getData(caloGeometryToken_));
307 }

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 330 of file HGCalShowerShapeHelper.cc.

330  {
331  pfRecHitPtrMap_->clear();
332 
333  for (const auto &recHit : recHits) {
334  (*pfRecHitPtrMap_)[recHit.detId()] = &recHit;
335  }
336 }

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 155 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:156
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
HGCalShowerShapeHelper::caloGeometryToken_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
Definition: HGCalShowerShapeHelper.h:155
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
HGCalShowerShapeHelper::setTokens
void setTokens(edm::ConsumesCollector consumesCollector)
Definition: HGCalShowerShapeHelper.h:128
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
HGCalShowerShapeHelper::setPFRecHitPtrMap
void setPFRecHitPtrMap(const std::vector< reco::PFRecHit > &recHits)
Definition: HGCalShowerShapeHelper.cc:330
CaloGeometry
Definition: CaloGeometry.h:21
HGCalShowerShapeHelper::pfRecHitPtrMap_
std::shared_ptr< std::unordered_map< uint32_t, const reco::PFRecHit * > > pfRecHitPtrMap_
Definition: HGCalShowerShapeHelper.h:157
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:53000
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:309
HGCalShowerShapeHelper::initPerSetup
void initPerSetup(const edm::EventSetup &iSetup)
Definition: HGCalShowerShapeHelper.cc:305