CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
CombinedHitTripletGenerator Class Reference

#include <CombinedHitTripletGenerator.h>

Inheritance diagram for CombinedHitTripletGenerator:
HitTripletGenerator OrderedHitsGenerator

Public Types

typedef LayerHitMapCache LayerCacheType
 

Public Member Functions

 CombinedHitTripletGenerator (const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
 
void hitTriplets (const TrackingRegion &reg, OrderedHitTriplets &triplets, const edm::Event &ev, const edm::EventSetup &es) override
 from base class More...
 
 ~CombinedHitTripletGenerator () override
 
- Public Member Functions inherited from HitTripletGenerator
void clear () final
 
 HitTripletGenerator (unsigned int size=500)
 
 HitTripletGenerator (HitTripletGenerator const &other)
 
virtual void hitTriplets (const TrackingRegion &reg, OrderedHitTriplets &prs, const edm::EventSetup &es)
 
const OrderedHitTripletsrun (const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es) final
 
 ~HitTripletGenerator () override
 
- Public Member Functions inherited from OrderedHitsGenerator
 OrderedHitsGenerator ()
 
virtual ~OrderedHitsGenerator ()
 

Private Attributes

std::unique_ptr< HitTripletGeneratorFromPairAndLayerstheGenerator
 
LayerCacheType theLayerCache
 
edm::EDGetTokenT< SeedingLayerSetsHitstheSeedingLayerToken
 

Additional Inherited Members

- Public Attributes inherited from OrderedHitsGenerator
unsigned int theMaxElement
 

Detailed Description

Definition at line 30 of file CombinedHitTripletGenerator.h.

Member Typedef Documentation

◆ LayerCacheType

Definition at line 32 of file CombinedHitTripletGenerator.h.

Constructor & Destructor Documentation

◆ CombinedHitTripletGenerator()

CombinedHitTripletGenerator::CombinedHitTripletGenerator ( const edm::ParameterSet cfg,
edm::ConsumesCollector iC 
)

Definition at line 11 of file CombinedHitTripletGenerator.cc.

References looper::cfg, get, edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, theGenerator, and theLayerCache.

12  : theSeedingLayerToken(iC.consumes<SeedingLayerSetsHits>(cfg.getParameter<edm::InputTag>("SeedingLayers"))) {
13  edm::ParameterSet generatorPSet = cfg.getParameter<edm::ParameterSet>("GeneratorPSet");
14  std::string generatorName = generatorPSet.getParameter<std::string>("ComponentName");
15  theGenerator = HitTripletGeneratorFromPairAndLayersFactory::get()->create(generatorName, generatorPSet, iC);
16  theGenerator->init(std::make_unique<HitPairGeneratorFromLayerPair>(iC, 0, 1, &theLayerCache), &theLayerCache);
17 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
std::unique_ptr< HitTripletGeneratorFromPairAndLayers > theGenerator
#define get

◆ ~CombinedHitTripletGenerator()

CombinedHitTripletGenerator::~CombinedHitTripletGenerator ( )
override

Definition at line 19 of file CombinedHitTripletGenerator.cc.

19 {}

Member Function Documentation

◆ hitTriplets()

void CombinedHitTripletGenerator::hitTriplets ( const TrackingRegion reg,
OrderedHitTriplets triplets,
const edm::Event ev,
const edm::EventSetup es 
)
overridevirtual

from base class

Implements HitTripletGenerator.

Definition at line 21 of file CombinedHitTripletGenerator.cc.

References LayerHitMapCache::clear(), makeMEIFBenchmarkPlots::ev, hgcalTopologyTester_cfi::layers, LayerTriplets::layers(), HLT_2022v15_cff::region, mps_fire::result, theGenerator, theLayerCache, and theSeedingLayerToken.

24  {
26  ev.getByToken(theSeedingLayerToken, hlayers);
27  const SeedingLayerSetsHits& layers = *hlayers;
28  if (layers.numberOfLayersInSet() != 3)
29  throw cms::Exception("Configuration")
30  << "CombinedHitTripletGenerator expects SeedingLayerSetsHits::numberOfLayersInSet() to be 3, got "
31  << layers.numberOfLayersInSet();
32 
33  std::vector<LayerTriplets::LayerSetAndLayers> trilayers = LayerTriplets::layers(layers);
34  for (const auto& setAndLayers : trilayers) {
35  theGenerator->hitTriplets(region, result, ev, es, setAndLayers.first, setAndLayers.second);
36  }
38 }
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
std::unique_ptr< HitTripletGeneratorFromPairAndLayers > theGenerator

Member Data Documentation

◆ theGenerator

std::unique_ptr<HitTripletGeneratorFromPairAndLayers> CombinedHitTripletGenerator::theGenerator
private

Definition at line 50 of file CombinedHitTripletGenerator.h.

Referenced by CombinedHitTripletGenerator(), and hitTriplets().

◆ theLayerCache

LayerCacheType CombinedHitTripletGenerator::theLayerCache
private

Definition at line 48 of file CombinedHitTripletGenerator.h.

Referenced by CombinedHitTripletGenerator(), and hitTriplets().

◆ theSeedingLayerToken

edm::EDGetTokenT<SeedingLayerSetsHits> CombinedHitTripletGenerator::theSeedingLayerToken
private

Definition at line 46 of file CombinedHitTripletGenerator.h.

Referenced by hitTriplets().