CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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,
CaloGeometryRecord
caloGeometryToken_
 
std::shared_ptr
< std::unordered_map< uint32_t,
const reco::PFRecHit * > > 
pfRecHitPtrMap_
 
std::shared_ptr
< hgcal::RecHitTools
recHitTools_
 

Detailed Description

Definition at line 31 of file HGCalShowerShapeHelper.h.

Constructor & Destructor Documentation

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::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 ( )
default
HGCalShowerShapeHelper::HGCalShowerShapeHelper ( const HGCalShowerShapeHelper rhs)
delete
HGCalShowerShapeHelper::HGCalShowerShapeHelper ( const HGCalShowerShapeHelper &&  rhs)
delete

Member Function Documentation

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
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_FULL_cff::minLayer, and reco::SuperCluster::rawEnergy().

148  {
149  return createCalc(sc.hitsAndFractions(), sc.rawEnergy(), minHitE, minHitET, minLayer, maxLayer, subDet);
150  }
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
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
Definition: CaloCluster.h:210
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:58
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)
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)
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 }
bool getData(T &iHolder) const
Definition: EventSetup.h:128
std::shared_ptr< hgcal::RecHitTools > recHitTools_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeometryToken_
HGCalShowerShapeHelper& HGCalShowerShapeHelper::operator= ( const HGCalShowerShapeHelper rhs)
delete
HGCalShowerShapeHelper& HGCalShowerShapeHelper::operator= ( const HGCalShowerShapeHelper &&  rhs)
delete
void HGCalShowerShapeHelper::setPFRecHitPtrMap ( const std::vector< reco::PFRecHit > &  recHits)
private

Definition at line 330 of file HGCalShowerShapeHelper.cc.

References pfRecHitPtrMap_.

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_
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

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

Definition at line 155 of file HGCalShowerShapeHelper.h.

Referenced by initPerSetup(), and setTokens().

const double HGCalShowerShapeHelper::kHDWaferCellSize_ = 0.465
static
const double HGCalShowerShapeHelper::kLDWaferCellSize_ = 0.698
static
std::shared_ptr<std::unordered_map<uint32_t, const reco::PFRecHit *> > HGCalShowerShapeHelper::pfRecHitPtrMap_
private
std::shared_ptr<hgcal::RecHitTools> HGCalShowerShapeHelper::recHitTools_
private