CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
< HitPairGeneratorFromLayerPairForPhotonConversion
theGenerator
 
LayerCacheType theLayerCache
 
unsigned int theMaxElement
 
OrderedHitPairs thePairs
 
edm::EDGetTokenT
< SeedingLayerSetsHits
theSeedingLayerToken
 

Detailed Description

Hides set of HitPairGeneratorFromLayerPairForPhotonConversion generators.

Definition at line 28 of file CombinedHitPairGeneratorForPhotonConversion.h.

Member Typedef Documentation

Constructor & Destructor Documentation

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

Definition at line 15 of file CombinedHitPairGeneratorForPhotonConversion.cc.

References edm::ParameterSet::getParameter(), maxHitPairsPerTrackAndGenerator, theGenerator, theLayerCache, and theMaxElement.

18  theMaxElement = cfg.getParameter<unsigned int>("maxElement");
19  maxHitPairsPerTrackAndGenerator = cfg.getParameter<unsigned int>("maxHitPairsPerTrackAndGenerator");
20  theGenerator = std::make_unique<HitPairGeneratorFromLayerPairForPhotonConversion>(
22 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::unique_ptr< HitPairGeneratorFromLayerPairForPhotonConversion > theGenerator

Member Function Documentation

void CombinedHitPairGeneratorForPhotonConversion::clearCache ( )
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.

References cms::cuda::assert(), edm::Event::getByToken(), mps_fire::i, LayerTriplets::layers(), SeedingLayerSetsHits::numberOfLayersInSet(), SeedingLayerSetsHits::size(), theGenerator, and theSeedingLayerToken.

Referenced by run().

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 }
unsigned short numberOfLayersInSet() const
Get number of layers in each SeedingLayerSets.
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
unsigned short LayerSetIndex
assert(be >=bs)
std::unique_ptr< HitPairGeneratorFromLayerPairForPhotonConversion > theGenerator
unsigned short size() const
Get the number of SeedingLayerSets.
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.

References hitPairs(), and thePairs.

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 }
void hitPairs(const ConversionRegion &convRegion, const TrackingRegion &reg, OrderedHitPairs &result, const edm::Event &ev, const edm::EventSetup &es)

Member Data Documentation

uint32_t CombinedHitPairGeneratorForPhotonConversion::maxHitPairsPerTrackAndGenerator
private
std::unique_ptr<HitPairGeneratorFromLayerPairForPhotonConversion> CombinedHitPairGeneratorForPhotonConversion::theGenerator
private
LayerCacheType CombinedHitPairGeneratorForPhotonConversion::theLayerCache
private
unsigned int CombinedHitPairGeneratorForPhotonConversion::theMaxElement
private
OrderedHitPairs CombinedHitPairGeneratorForPhotonConversion::thePairs
private

Definition at line 59 of file CombinedHitPairGeneratorForPhotonConversion.h.

Referenced by clearCache(), and run().

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

Definition at line 51 of file CombinedHitPairGeneratorForPhotonConversion.h.

Referenced by hitPairs().