CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HGCalTowerProcessor Class Reference
Inheritance diagram for HGCalTowerProcessor:
HGCalProcessorBaseT< InputCollection, OutputCollection >

Public Member Functions

void eventSetup (const edm::EventSetup &es) override
 
 HGCalTowerProcessor (const edm::ParameterSet &conf)
 
void run (const std::pair< edm::Handle< l1t::HGCalTowerMapBxCollection >, edm::Handle< l1t::HGCalClusterBxCollection >> &collHandle, l1t::HGCalTowerBxCollection &collTowers, const edm::EventSetup &es) override
 
- Public Member Functions inherited from HGCalProcessorBaseT< InputCollection, OutputCollection >
 HGCalProcessorBaseT (const edm::ParameterSet &conf)
 
const std::string & name () const
 
virtual void run (const InputCollection &inputColl, OutputCollection &outColl, const edm::EventSetup &es)=0
 
void setGeometry (const HGCalTriggerGeometryBase *const geom)
 
virtual ~HGCalProcessorBaseT ()
 

Private Attributes

std::unique_ptr< HGCalTowerMap2DImpltowermap2D_
 
std::unique_ptr< HGCalTowerMap3DImpltowermap3D_
 
edm::ESHandle< HGCalTriggerGeometryBasetriggerGeometry_
 

Additional Inherited Members

- Protected Attributes inherited from HGCalProcessorBaseT< InputCollection, OutputCollection >
const HGCalTriggerGeometryBasegeometry_
 

Detailed Description

Definition at line 12 of file HGCalTowerProcessor.cc.

Constructor & Destructor Documentation

◆ HGCalTowerProcessor()

HGCalTowerProcessor::HGCalTowerProcessor ( const edm::ParameterSet conf)
inline

Definition at line 14 of file HGCalTowerProcessor.cc.

14  : HGCalTowerProcessorBase(conf) {
15  towermap2D_ = std::make_unique<HGCalTowerMap2DImpl>(conf.getParameterSet("towermap_parameters"));
16  towermap3D_ = std::make_unique<HGCalTowerMap3DImpl>();
17  }

References edm::ParameterSet::getParameterSet(), towermap2D_, and towermap3D_.

Member Function Documentation

◆ eventSetup()

void HGCalTowerProcessor::eventSetup ( const edm::EventSetup es)
inlineoverridevirtual

Reimplemented from HGCalProcessorBaseT< InputCollection, OutputCollection >.

Definition at line 19 of file HGCalTowerProcessor.cc.

19 { towermap2D_->eventSetup(es); }

References towermap2D_.

◆ run()

void HGCalTowerProcessor::run ( const std::pair< edm::Handle< l1t::HGCalTowerMapBxCollection >, edm::Handle< l1t::HGCalClusterBxCollection >> &  collHandle,
l1t::HGCalTowerBxCollection collTowers,
const edm::EventSetup es 
)
inlineoverride

Definition at line 21 of file HGCalTowerProcessor.cc.

24  {
26 
27  auto& towerMapCollHandle = collHandle.first;
28  auto& unclTCsCollHandle = collHandle.second;
29 
30  /* create a persistent vector of pointers to the towerMaps */
31  std::vector<edm::Ptr<l1t::HGCalTowerMap>> towerMapsPtrs;
32  for (unsigned i = 0; i < towerMapCollHandle->size(); ++i) {
33  towerMapsPtrs.emplace_back(towerMapCollHandle, i);
34  }
35 
36  /* create additional TowerMaps from the unclustered TCs */
37 
38  // translate our HGCalClusters into HGCalTriggerCells
39  std::vector<edm::Ptr<l1t::HGCalTriggerCell>> trigCellVec;
40  for (unsigned i = 0; i < unclTCsCollHandle->size(); ++i) {
41  edm::Ptr<l1t::HGCalCluster> ptr(unclTCsCollHandle, i);
42  for (const auto& itTC : ptr->constituents()) {
43  trigCellVec.push_back(itTC.second);
44  }
45  }
46 
47  // fill the TowerMaps with the HGCalTriggersCells
48  l1t::HGCalTowerMapBxCollection towerMapsFromUnclTCs;
49  towermap2D_->buildTowerMap2D(trigCellVec, towerMapsFromUnclTCs);
50 
51  /* merge the two sets of TowerMaps */
52  unsigned int towerMapsPtrsSize = towerMapsPtrs.size();
53  for (unsigned int i = 0; i < towerMapsFromUnclTCs.size(); ++i) {
54  towerMapsPtrs.emplace_back(&(towerMapsFromUnclTCs[i]), i + towerMapsPtrsSize);
55  }
56 
57  /* call to towerMap3D clustering */
58  towermap3D_->buildTowerMap3D(towerMapsPtrs, collTowers);
59  }

References l1t::HGCalClusterT< C >::constituents(), edm::EventSetup::get(), get, mps_fire::i, BXVector< T >::size(), towermap2D_, towermap3D_, and triggerGeometry_.

Member Data Documentation

◆ towermap2D_

std::unique_ptr<HGCalTowerMap2DImpl> HGCalTowerProcessor::towermap2D_
private

Definition at line 65 of file HGCalTowerProcessor.cc.

Referenced by eventSetup(), HGCalTowerProcessor(), and run().

◆ towermap3D_

std::unique_ptr<HGCalTowerMap3DImpl> HGCalTowerProcessor::towermap3D_
private

Definition at line 66 of file HGCalTowerProcessor.cc.

Referenced by HGCalTowerProcessor(), and run().

◆ triggerGeometry_

edm::ESHandle<HGCalTriggerGeometryBase> HGCalTowerProcessor::triggerGeometry_
private

Definition at line 62 of file HGCalTowerProcessor.cc.

Referenced by run().

mps_fire.i
i
Definition: mps_fire.py:428
HGCalTowerProcessor::triggerGeometry_
edm::ESHandle< HGCalTriggerGeometryBase > triggerGeometry_
Definition: HGCalTowerProcessor.cc:62
HGCalTowerProcessor::towermap2D_
std::unique_ptr< HGCalTowerMap2DImpl > towermap2D_
Definition: HGCalTowerProcessor.cc:65
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
BXVector
Definition: BXVector.h:15
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
HGCalTowerProcessorBase
HGCalProcessorBaseT< std::pair< edm::Handle< l1t::HGCalTowerMapBxCollection >, edm::Handle< l1t::HGCalClusterBxCollection > >, l1t::HGCalTowerBxCollection > HGCalTowerProcessorBase
Definition: HGCalProcessorBase.h:30
HGCalTowerProcessor::towermap3D_
std::unique_ptr< HGCalTowerMap3DImpl > towermap3D_
Definition: HGCalTowerProcessor.cc:66
get
#define get
edm::Ptr
Definition: AssociationVector.h:31
BXVector::size
unsigned size(int bx) const
edm::ParameterSet::getParameterSet
ParameterSet const & getParameterSet(std::string const &) const
Definition: ParameterSet.cc:2128