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 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::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 ()
 
 HGCalShowerShapeHelper (edm::ConsumesCollector &&sumes)
 
 HGCalShowerShapeHelper (const HGCalShowerShapeHelper &rhs)=delete
 
 HGCalShowerShapeHelper (const HGCalShowerShapeHelper &&rhs)=delete
 
void initPerEvent (const std::vector< reco::PFRecHit > &recHits)
 
void initPerEvent (const edm::EventSetup &iSetup, 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 *>>()) {}
std::shared_ptr< std::unordered_map< uint32_t, const reco::PFRecHit * > > pfRecHitPtrMap_
std::shared_ptr< hgcal::RecHitTools > recHitTools_

◆ HGCalShowerShapeHelper() [2/4]

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

Definition at line 299 of file HGCalShowerShapeHelper.cc.

References setTokens().

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

◆ ~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 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

◆ createCalc() [2/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.

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

148  {
149  return createCalc(sc.hitsAndFractions(), sc.rawEnergy(), minHitE, minHitET, minLayer, maxLayer, subDet);
150  }
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
Definition: CaloCluster.h:209
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:60
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

◆ initPerEvent() [1/2]

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

Definition at line 309 of file HGCalShowerShapeHelper.cc.

References setPFRecHitPtrMap().

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

309  {
310  setPFRecHitPtrMap(pfRecHits);
311 }
void setPFRecHitPtrMap(const std::vector< reco::PFRecHit > &recHits)

◆ initPerEvent() [2/2]

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

Definition at line 313 of file HGCalShowerShapeHelper.cc.

References initPerEvent(), and initPerSetup().

313  {
314  initPerSetup(iSetup);
315  initPerEvent(pfRecHits);
316 }
void initPerSetup(const edm::EventSetup &iSetup)
void initPerEvent(const std::vector< reco::PFRecHit > &recHits)

◆ initPerSetup()

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

Definition at line 305 of file HGCalShowerShapeHelper.cc.

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

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

305  {
306  recHitTools_->setGeometry(iSetup.getData(caloGeometryToken_));
307 }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
std::shared_ptr< hgcal::RecHitTools > recHitTools_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_

◆ 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.

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

Referenced by initPerEvent().

330  {
331  pfRecHitPtrMap_->clear();
332 
333  for (const auto &recHit : recHits) {
334  (*pfRecHitPtrMap_)[recHit.detId()] = &recHit;
335  }
336 }
std::shared_ptr< std::unordered_map< uint32_t, const reco::PFRecHit * > > pfRecHitPtrMap_

◆ setTokens()

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

Definition at line 128 of file HGCalShowerShapeHelper.h.

References caloGeometryToken_, and edm::ConsumesCollector::esConsumes().

Referenced by HGCalShowerShapeHelper(), and SCEnergyCorrectorSemiParm::setTokens().

128  {
129  caloGeometryToken_ = consumesCollector.esConsumes<CaloGeometry, CaloGeometryRecord, tr>();
130  }
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_

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