CMS 3D CMS Logo

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

#include <CombinedHitPairGenerator.h>

Inheritance diagram for CombinedHitPairGenerator:
HitPairGenerator OrderedHitsGenerator

Public Types

typedef LayerHitMapCache LayerCacheType
 

Public Member Functions

 CombinedHitPairGenerator (const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
 
void hitPairs (const TrackingRegion &reg, OrderedHitPairs &result, const edm::Event &ev, const edm::EventSetup &es) override
 form base class More...
 
 ~CombinedHitPairGenerator () override
 
- Public Member Functions inherited from HitPairGenerator
void clear () final
 
 HitPairGenerator (HitPairGenerator const &other)
 
 HitPairGenerator (unsigned int size=4000)
 
const OrderedHitPairsrun (const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es) override
 
 ~HitPairGenerator () override
 
- Public Member Functions inherited from OrderedHitsGenerator
 OrderedHitsGenerator ()
 
virtual ~OrderedHitsGenerator ()
 

Private Member Functions

 CombinedHitPairGenerator (const CombinedHitPairGenerator &cb)
 

Private Attributes

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

Additional Inherited Members

- Public Attributes inherited from OrderedHitsGenerator
unsigned int theMaxElement
 

Detailed Description

Hides set of HitPairGeneratorFromLayerPair generators.

Definition at line 25 of file CombinedHitPairGenerator.h.

Member Typedef Documentation

◆ LayerCacheType

Definition at line 27 of file CombinedHitPairGenerator.h.

Constructor & Destructor Documentation

◆ CombinedHitPairGenerator() [1/2]

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

Definition at line 7 of file CombinedHitPairGenerator.cc.

8  : theSeedingLayerToken(iC.consumes<SeedingLayerSetsHits>(cfg.getParameter<edm::InputTag>("SeedingLayers"))) {
9  theMaxElement = cfg.getParameter<unsigned int>("maxElement");
10  theGenerator = std::make_unique<HitPairGeneratorFromLayerPair>(0, 1, &theLayerCache, theMaxElement);
11 }

References looper::cfg, theGenerator, theLayerCache, and OrderedHitsGenerator::theMaxElement.

◆ ~CombinedHitPairGenerator()

CombinedHitPairGenerator::~CombinedHitPairGenerator ( )
override

Definition at line 20 of file CombinedHitPairGenerator.cc.

20 {}

◆ CombinedHitPairGenerator() [2/2]

CombinedHitPairGenerator::CombinedHitPairGenerator ( const CombinedHitPairGenerator cb)
private

Definition at line 13 of file CombinedHitPairGenerator.cc.

14  : HitPairGenerator(cb),
16  theGenerator(std::make_unique<HitPairGeneratorFromLayerPair>(0, 1, &theLayerCache, cb.theMaxElement)) {
18 }

References OrderedHitsGenerator::theMaxElement.

Member Function Documentation

◆ hitPairs()

void CombinedHitPairGenerator::hitPairs ( const TrackingRegion reg,
OrderedHitPairs result,
const edm::Event ev,
const edm::EventSetup es 
)
overridevirtual

form base class

Implements HitPairGenerator.

Definition at line 22 of file CombinedHitPairGenerator.cc.

25  {
27  ev.getByToken(theSeedingLayerToken, hlayers);
28  const SeedingLayerSetsHits& layers = *hlayers;
29  if (layers.numberOfLayersInSet() != 2)
30  throw cms::Exception("Configuration")
31  << "CombinedHitPairGenerator expects SeedingLayerSetsHits::numberOfLayersInSet() to be 2, got "
32  << layers.numberOfLayersInSet();
33 
35  theGenerator->hitPairs(region, result, ev, es, layerSet);
36  }
37 
39 
40  LogDebug("CombinedHitPairGenerator") << " total number of pairs provided back CHPG : " << result.size();
41 }

References LayerHitMapCache::clear(), ev, hgcalTopologyTester_cfi::layers, LogDebug, HLT_2018_cff::region, mps_fire::result, theGenerator, theLayerCache, and theSeedingLayerToken.

Member Data Documentation

◆ theGenerator

std::unique_ptr<HitPairGeneratorFromLayerPair> CombinedHitPairGenerator::theGenerator
private

Definition at line 46 of file CombinedHitPairGenerator.h.

Referenced by CombinedHitPairGenerator(), and hitPairs().

◆ theLayerCache

LayerCacheType CombinedHitPairGenerator::theLayerCache
private

Definition at line 44 of file CombinedHitPairGenerator.h.

Referenced by CombinedHitPairGenerator(), and hitPairs().

◆ theSeedingLayerToken

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

Definition at line 42 of file CombinedHitPairGenerator.h.

Referenced by hitPairs().

OrderedHitsGenerator::theMaxElement
unsigned int theMaxElement
Definition: OrderedHitsGenerator.h:23
SeedingLayerSetsHits
Definition: SeedingLayerSetsHits.h:18
edm::Handle
Definition: AssociativeIterator.h:50
HitPairGenerator::HitPairGenerator
HitPairGenerator(unsigned int size=4000)
Definition: HitPairGenerator.cc:3
CombinedHitPairGenerator::theLayerCache
LayerCacheType theLayerCache
Definition: CombinedHitPairGenerator.h:44
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:49
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
CombinedHitPairGenerator::theGenerator
std::unique_ptr< HitPairGeneratorFromLayerPair > theGenerator
Definition: CombinedHitPairGenerator.h:46
looper.cfg
cfg
Definition: looper.py:297
CombinedHitPairGenerator::theSeedingLayerToken
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
Definition: CombinedHitPairGenerator.h:42
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
SeedingLayerSetsHits::SeedingLayerSet
Definition: SeedingLayerSetsHits.h:65
HLT_2018_cff.region
region
Definition: HLT_2018_cff.py:81479
LayerHitMapCache::clear
void clear()
Definition: LayerHitMapCache.h:69
mps_fire.result
result
Definition: mps_fire.py:303
cms::Exception
Definition: Exception.h:70
edm::InputTag
Definition: InputTag.h:15
hgcalTopologyTester_cfi.layers
layers
Definition: hgcalTopologyTester_cfi.py:8