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 15 of file CombinedHitPairGeneratorForPhotonConversion.cc.

17  : theSeedingLayerToken(iC.consumes<SeedingLayerSetsHits>(cfg.getParameter<edm::InputTag>("SeedingLayers"))) {
18  theMaxElement = cfg.getParameter<unsigned int>("maxElement");
19  maxHitPairsPerTrackAndGenerator = cfg.getParameter<unsigned int>("maxHitPairsPerTrackAndGenerator");
20  theGenerator = std::make_unique<HitPairGeneratorFromLayerPairForPhotonConversion>(
22 }

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

Member Function Documentation

◆ clearCache()

void CombinedHitPairGeneratorForPhotonConversion::clearCache ( )

Definition at line 50 of file CombinedHitPairGeneratorForPhotonConversion.cc.

50  {
52  localRA.update(thePairs.size());
53  thePairs.clear();
54  thePairs.shrink_to_fit();
55 }

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 35 of file CombinedHitPairGeneratorForPhotonConversion.cc.

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

References cms::cuda::assert(), ev, mps_fire::i, hgcalTopologyTester_cfi::layers, HLT_FULL_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 24 of file CombinedHitPairGeneratorForPhotonConversion.cc.

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

References ev, hitPairs(), HLT_FULL_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:35
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:428
CombinedHitPairGeneratorForPhotonConversion::theGenerator
std::unique_ptr< HitPairGeneratorFromLayerPairForPhotonConversion > theGenerator
Definition: CombinedHitPairGeneratorForPhotonConversion.h:57
SeedingLayerSetsHits
Definition: SeedingLayerSetsHits.h:18
cms::cuda::assert
assert(be >=bs)
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:55
CombinedHitPairGeneratorForPhotonConversion::thePairs
OrderedHitPairs thePairs
Definition: CombinedHitPairGeneratorForPhotonConversion.h:59
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88338
looper.cfg
cfg
Definition: looper.py:297
CombinedHitPairGeneratorForPhotonConversion::maxHitPairsPerTrackAndGenerator
uint32_t maxHitPairsPerTrackAndGenerator
Definition: CombinedHitPairGeneratorForPhotonConversion.h:53
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
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:311
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