CMS 3D CMS Logo

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

#include <CombinedHitPairGeneratorForPhotonConversion.h>

Public Types

typedef LayerHitMapCache LayerCacheType
 

Public Member Functions

void clearCache ()
 
 CombinedHitPairGeneratorForPhotonConversion (const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
 
const OrderedHitPairsrun (const ConversionRegion &convRegion, const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es)
 

Private Member Functions

void hitPairs (const ConversionRegion &convRegion, const TrackingRegion &reg, OrderedHitPairs &result, const edm::Event &ev, const edm::EventSetup &es)
 

Private Attributes

uint32_t maxHitPairsPerTrackAndGenerator
 
std::unique_ptr< HitPairGeneratorFromLayerPairForPhotonConversiontheGenerator
 
LayerCacheType theLayerCache
 
unsigned int theMaxElement
 
OrderedHitPairs thePairs
 
edm::EDGetTokenT< SeedingLayerSetsHitstheSeedingLayerToken
 

Detailed Description

Hides set of HitPairGeneratorFromLayerPairForPhotonConversion generators.

Definition at line 28 of file CombinedHitPairGeneratorForPhotonConversion.h.

Member Typedef Documentation

◆ LayerCacheType

Constructor & Destructor Documentation

◆ CombinedHitPairGeneratorForPhotonConversion()

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

Definition at line 12 of file CombinedHitPairGeneratorForPhotonConversion.cc.

14  : theSeedingLayerToken(iC.consumes<SeedingLayerSetsHits>(cfg.getParameter<edm::InputTag>("SeedingLayers"))) {
15  theMaxElement = cfg.getParameter<unsigned int>("maxElement");
16  maxHitPairsPerTrackAndGenerator = cfg.getParameter<unsigned int>("maxHitPairsPerTrackAndGenerator");
17  theGenerator.reset(
19 }

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

Member Function Documentation

◆ clearCache()

void CombinedHitPairGeneratorForPhotonConversion::clearCache ( )

Definition at line 47 of file CombinedHitPairGeneratorForPhotonConversion.cc.

47  {
49  localRA.update(thePairs.size());
50  thePairs.clear();
51  thePairs.shrink_to_fit();
52 }

References LayerHitMapCache::clear(), OrderedHitPairs::size(), theLayerCache, and thePairs.

◆ hitPairs()

void CombinedHitPairGeneratorForPhotonConversion::hitPairs ( const ConversionRegion convRegion,
const TrackingRegion reg,
OrderedHitPairs result,
const edm::Event ev,
const edm::EventSetup es 
)
private

Definition at line 32 of file CombinedHitPairGeneratorForPhotonConversion.cc.

36  {
38  ev.getByToken(theSeedingLayerToken, hlayers);
39  const SeedingLayerSetsHits& layers = *hlayers;
40  assert(layers.numberOfLayersInSet() == 2);
41 
42  for (SeedingLayerSetsHits::LayerSetIndex i = 0; i < layers.size(); ++i) {
43  theGenerator->hitPairs(convRegion, region, result, layers[i], ev, es);
44  }
45 }

References cms::cuda::assert(), ev, mps_fire::i, hgcalTopologyTester_cfi::layers, HLT_2018_cff::region, mps_fire::result, theGenerator, and theSeedingLayerToken.

Referenced by run().

◆ run()

const OrderedHitPairs & CombinedHitPairGeneratorForPhotonConversion::run ( const ConversionRegion convRegion,
const TrackingRegion region,
const edm::Event ev,
const edm::EventSetup es 
)

Definition at line 21 of file CombinedHitPairGeneratorForPhotonConversion.cc.

24  {
25  if (thePairs.capacity() == 0)
26  thePairs.reserve(localRA.upper());
27  thePairs.clear();
28  hitPairs(convRegion, region, thePairs, ev, es);
29  return thePairs;
30 }

References ev, hitPairs(), HLT_2018_cff::region, and thePairs.

Member Data Documentation

◆ maxHitPairsPerTrackAndGenerator

uint32_t CombinedHitPairGeneratorForPhotonConversion::maxHitPairsPerTrackAndGenerator
private

◆ theGenerator

std::unique_ptr<HitPairGeneratorFromLayerPairForPhotonConversion> CombinedHitPairGeneratorForPhotonConversion::theGenerator
private

◆ theLayerCache

LayerCacheType CombinedHitPairGeneratorForPhotonConversion::theLayerCache
private

◆ theMaxElement

unsigned int CombinedHitPairGeneratorForPhotonConversion::theMaxElement
private

◆ thePairs

OrderedHitPairs CombinedHitPairGeneratorForPhotonConversion::thePairs
private

Definition at line 59 of file CombinedHitPairGeneratorForPhotonConversion.h.

Referenced by clearCache(), and run().

◆ theSeedingLayerToken

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

Definition at line 51 of file CombinedHitPairGeneratorForPhotonConversion.h.

Referenced by hitPairs().

CombinedHitPairGeneratorForPhotonConversion::hitPairs
void hitPairs(const ConversionRegion &convRegion, const TrackingRegion &reg, OrderedHitPairs &result, const edm::Event &ev, const edm::EventSetup &es)
Definition: CombinedHitPairGeneratorForPhotonConversion.cc:32
CombinedHitPairGeneratorForPhotonConversion::theMaxElement
unsigned int theMaxElement
Definition: CombinedHitPairGeneratorForPhotonConversion.h:61
CombinedHitPairGeneratorForPhotonConversion::theLayerCache
LayerCacheType theLayerCache
Definition: CombinedHitPairGeneratorForPhotonConversion.h:55
mps_fire.i
i
Definition: mps_fire.py:355
CombinedHitPairGeneratorForPhotonConversion::theGenerator
std::unique_ptr< HitPairGeneratorFromLayerPairForPhotonConversion > theGenerator
Definition: CombinedHitPairGeneratorForPhotonConversion.h:57
SeedingLayerSetsHits
Definition: SeedingLayerSetsHits.h:18
cms::cuda::assert
assert(be >=bs)
HitPairGeneratorFromLayerPairForPhotonConversion
Definition: HitPairGeneratorFromLayerPairForPhotonConversion.h:14
edm::Handle
Definition: AssociativeIterator.h:50
SeedingLayerSetsHits::LayerSetIndex
unsigned short LayerSetIndex
Definition: SeedingLayerSetsHits.h:28
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:49
CombinedHitPairGeneratorForPhotonConversion::thePairs
OrderedHitPairs thePairs
Definition: CombinedHitPairGeneratorForPhotonConversion.h:59
looper.cfg
cfg
Definition: looper.py:297
CombinedHitPairGeneratorForPhotonConversion::maxHitPairsPerTrackAndGenerator
uint32_t maxHitPairsPerTrackAndGenerator
Definition: CombinedHitPairGeneratorForPhotonConversion.h:53
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
HLT_2018_cff.region
region
Definition: HLT_2018_cff.py:81479
LayerHitMapCache::clear
void clear()
Definition: LayerHitMapCache.h:69
OrderedHitPairs::size
unsigned int size() const override
Definition: OrderedHitPairs.h:12
mps_fire.result
result
Definition: mps_fire.py:303
CombinedHitPairGeneratorForPhotonConversion::theSeedingLayerToken
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
Definition: CombinedHitPairGeneratorForPhotonConversion.h:51
edm::InputTag
Definition: InputTag.h:15
hgcalTopologyTester_cfi.layers
layers
Definition: hgcalTopologyTester_cfi.py:8