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 Attributes
CombinedHitQuadrupletGeneratorForPhotonConversion Class Reference

#include <CombinedHitQuadrupletGeneratorForPhotonConversion.h>

Public Types

typedef LayerHitMapCache LayerCacheType
 

Public Member Functions

void clearLayerCache ()
 
 CombinedHitQuadrupletGeneratorForPhotonConversion (const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
 
 CombinedHitQuadrupletGeneratorForPhotonConversion (const CombinedHitQuadrupletGeneratorForPhotonConversion &cb)=delete
 
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
< HitQuadrupletGeneratorFromLayerPairForPhotonConversion
theGenerator
 
LayerCacheType theLayerCache
 
const unsigned int theMaxElement
 
OrderedHitPairs thePairs
 
edm::EDGetTokenT
< SeedingLayerSetsHits
theSeedingLayerToken
 

Detailed Description

Hides set of HitQuadrupletGeneratorFromLayerPairForPhotonConversion generators.

Definition at line 28 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.

Member Typedef Documentation

Constructor & Destructor Documentation

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

Definition at line 7 of file CombinedHitQuadrupletGeneratorForPhotonConversion.cc.

References theGenerator, theLayerCache, and theMaxElement.

10  theMaxElement(cfg.getParameter<unsigned int>("maxElement")) {
11  theGenerator =
12  std::make_unique<HitQuadrupletGeneratorFromLayerPairForPhotonConversion>(0, 1, &theLayerCache, theMaxElement);
13 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::unique_ptr< HitQuadrupletGeneratorFromLayerPairForPhotonConversion > theGenerator
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
CombinedHitQuadrupletGeneratorForPhotonConversion::CombinedHitQuadrupletGeneratorForPhotonConversion ( const CombinedHitQuadrupletGeneratorForPhotonConversion cb)
delete
CombinedHitQuadrupletGeneratorForPhotonConversion::~CombinedHitQuadrupletGeneratorForPhotonConversion ( )

Definition at line 15 of file CombinedHitQuadrupletGeneratorForPhotonConversion.cc.

15 {}

Member Function Documentation

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

Definition at line 25 of file CombinedHitQuadrupletGeneratorForPhotonConversion.cc.

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

Referenced by run().

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]);
37  }
39 }
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< HitQuadrupletGeneratorFromLayerPairForPhotonConversion > theGenerator
unsigned int size() const override
const OrderedHitPairs & CombinedHitQuadrupletGeneratorForPhotonConversion::run ( const TrackingRegion region,
const edm::Event ev,
const edm::EventSetup es 
)

Definition at line 17 of file CombinedHitQuadrupletGeneratorForPhotonConversion.cc.

References hitPairs(), and thePairs.

19  {
20  thePairs.clear();
21  hitPairs(region, thePairs, ev, es);
22  return thePairs;
23 }
void hitPairs(const TrackingRegion &, OrderedHitPairs &, const edm::Event &, const edm::EventSetup &)

Member Data Documentation

std::unique_ptr<HitQuadrupletGeneratorFromLayerPairForPhotonConversion> CombinedHitQuadrupletGeneratorForPhotonConversion::theGenerator
private
LayerCacheType CombinedHitQuadrupletGeneratorForPhotonConversion::theLayerCache
private
const unsigned int CombinedHitQuadrupletGeneratorForPhotonConversion::theMaxElement
private
OrderedHitPairs CombinedHitQuadrupletGeneratorForPhotonConversion::thePairs
private

Definition at line 52 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.

Referenced by run().

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

Definition at line 46 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.

Referenced by hitPairs().