CMS 3D CMS Logo

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

#include <CombinedHitQuadrupletGeneratorForPhotonConversion.h>

Public Types

typedef LayerHitMapCache LayerCacheType
 

Public Member Functions

void clearLayerCache ()
 
 CombinedHitQuadrupletGeneratorForPhotonConversion (const CombinedHitQuadrupletGeneratorForPhotonConversion &cb)=delete
 
 CombinedHitQuadrupletGeneratorForPhotonConversion (const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
 
void hitPairs (const TrackingRegion &, OrderedHitPairs &, const edm::Event &, const edm::EventSetup &)
 
const OrderedHitPairsrun (const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es)
 
 ~CombinedHitQuadrupletGeneratorForPhotonConversion ()
 

Private Attributes

std::unique_ptr< HitQuadrupletGeneratorFromLayerPairForPhotonConversiontheGenerator
 
LayerCacheType theLayerCache
 
const unsigned int theMaxElement
 
OrderedHitPairs thePairs
 
edm::EDGetTokenT< SeedingLayerSetsHitstheSeedingLayerToken
 

Detailed Description

Hides set of HitQuadrupletGeneratorFromLayerPairForPhotonConversion generators.

Definition at line 28 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.

Member Typedef Documentation

◆ LayerCacheType

Constructor & Destructor Documentation

◆ CombinedHitQuadrupletGeneratorForPhotonConversion() [1/2]

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

Definition at line 7 of file CombinedHitQuadrupletGeneratorForPhotonConversion.cc.

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

References theGenerator, theLayerCache, and theMaxElement.

◆ CombinedHitQuadrupletGeneratorForPhotonConversion() [2/2]

CombinedHitQuadrupletGeneratorForPhotonConversion::CombinedHitQuadrupletGeneratorForPhotonConversion ( const CombinedHitQuadrupletGeneratorForPhotonConversion cb)
delete

◆ ~CombinedHitQuadrupletGeneratorForPhotonConversion()

CombinedHitQuadrupletGeneratorForPhotonConversion::~CombinedHitQuadrupletGeneratorForPhotonConversion ( )

Definition at line 15 of file CombinedHitQuadrupletGeneratorForPhotonConversion.cc.

15 {}

Member Function Documentation

◆ clearLayerCache()

void CombinedHitQuadrupletGeneratorForPhotonConversion::clearLayerCache ( )
inline

◆ hitPairs()

void CombinedHitQuadrupletGeneratorForPhotonConversion::hitPairs ( const TrackingRegion region,
OrderedHitPairs result,
const edm::Event ev,
const edm::EventSetup es 
)

Definition at line 25 of file CombinedHitQuadrupletGeneratorForPhotonConversion.cc.

28  {
29  size_t maxHitQuadruplets = 1000000;
31  ev.getByToken(theSeedingLayerToken, hlayers);
32  const SeedingLayerSetsHits& layers = *hlayers;
33  assert(layers.numberOfLayersInSet() == 2);
34 
35  for (SeedingLayerSetsHits::LayerSetIndex i = 0; i < hlayers->size() && result.size() < maxHitQuadruplets; ++i) {
36  theGenerator->hitPairs(region, result, layers[i], ev, es);
37  }
39 }

References cms::cuda::assert(), LayerHitMapCache::clear(), ev, mps_fire::i, hgcalTopologyTester_cfi::layers, HLT_FULL_cff::region, mps_fire::result, SeedingLayerSetsHits::size(), theGenerator, theLayerCache, and theSeedingLayerToken.

Referenced by run().

◆ run()

const OrderedHitPairs & CombinedHitQuadrupletGeneratorForPhotonConversion::run ( const TrackingRegion region,
const edm::Event ev,
const edm::EventSetup es 
)

Definition at line 17 of file CombinedHitQuadrupletGeneratorForPhotonConversion.cc.

19  {
20  thePairs.clear();
21  hitPairs(region, thePairs, ev, es);
22  return thePairs;
23 }

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

Member Data Documentation

◆ theGenerator

std::unique_ptr<HitQuadrupletGeneratorFromLayerPairForPhotonConversion> CombinedHitQuadrupletGeneratorForPhotonConversion::theGenerator
private

◆ theLayerCache

LayerCacheType CombinedHitQuadrupletGeneratorForPhotonConversion::theLayerCache
private

◆ theMaxElement

const unsigned int CombinedHitQuadrupletGeneratorForPhotonConversion::theMaxElement
private

◆ thePairs

OrderedHitPairs CombinedHitQuadrupletGeneratorForPhotonConversion::thePairs
private

Definition at line 52 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.

Referenced by run().

◆ theSeedingLayerToken

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

Definition at line 46 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.

Referenced by hitPairs().

CombinedHitQuadrupletGeneratorForPhotonConversion::theGenerator
std::unique_ptr< HitQuadrupletGeneratorFromLayerPairForPhotonConversion > theGenerator
Definition: CombinedHitQuadrupletGeneratorForPhotonConversion.h:50
CombinedHitQuadrupletGeneratorForPhotonConversion::theSeedingLayerToken
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
Definition: CombinedHitQuadrupletGeneratorForPhotonConversion.h:46
mps_fire.i
i
Definition: mps_fire.py:428
CombinedHitQuadrupletGeneratorForPhotonConversion::theLayerCache
LayerCacheType theLayerCache
Definition: CombinedHitQuadrupletGeneratorForPhotonConversion.h:48
CombinedHitQuadrupletGeneratorForPhotonConversion::hitPairs
void hitPairs(const TrackingRegion &, OrderedHitPairs &, const edm::Event &, const edm::EventSetup &)
Definition: CombinedHitQuadrupletGeneratorForPhotonConversion.cc:25
CombinedHitQuadrupletGeneratorForPhotonConversion::thePairs
OrderedHitPairs thePairs
Definition: CombinedHitQuadrupletGeneratorForPhotonConversion.h:52
SeedingLayerSetsHits::size
unsigned short size() const
Get the number of SeedingLayerSets.
Definition: SeedingLayerSetsHits.h:199
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
CombinedHitQuadrupletGeneratorForPhotonConversion::theMaxElement
const unsigned int theMaxElement
Definition: CombinedHitQuadrupletGeneratorForPhotonConversion.h:47
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88286
looper.cfg
cfg
Definition: looper.py:296
ev
bool ev
Definition: Hydjet2Hadronizer.cc:97
LayerHitMapCache::clear
void clear()
Definition: LayerHitMapCache.h:69
mps_fire.result
result
Definition: mps_fire.py:311
edm::InputTag
Definition: InputTag.h:15
hgcalTopologyTester_cfi.layers
layers
Definition: hgcalTopologyTester_cfi.py:8