CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private 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)
 
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 Member Functions

 CombinedHitQuadrupletGeneratorForPhotonConversion (const CombinedHitQuadrupletGeneratorForPhotonConversion &cb)=delete
 

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 23 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.

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

Definition at line 15 of file CombinedHitQuadrupletGeneratorForPhotonConversion.cc.

15 {}
CombinedHitQuadrupletGeneratorForPhotonConversion::CombinedHitQuadrupletGeneratorForPhotonConversion ( const CombinedHitQuadrupletGeneratorForPhotonConversion cb)
privatedelete

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 LayerHitMapCache::clear(), edm::Event::getByToken(), mps_fire::i, LayerTriplets::layers(), SeedingLayerSetsHits::numberOfLayersInSet(), OrderedHitPairs::size(), SeedingLayerSetsHits::size(), theGenerator, theLayerCache, and theSeedingLayerToken.

Referenced by run().

27 {
28  size_t maxHitQuadruplets=1000000;
30  ev.getByToken(theSeedingLayerToken, hlayers);
31  const SeedingLayerSetsHits& layers = *hlayers;
32  assert(layers.numberOfLayersInSet() == 2);
33 
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 }
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:519
unsigned short LayerSetIndex
unsigned int size() const override
std::unique_ptr< HitQuadrupletGeneratorFromLayerPairForPhotonConversion > theGenerator
unsigned short size() const
Get the number of SeedingLayerSets.
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.

18 {
19  thePairs.clear();
20  hitPairs(region, thePairs, ev, es);
21  return thePairs;
22 }
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 48 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.

Referenced by run().

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

Definition at line 42 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.

Referenced by hitPairs().