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 25 of file CombinedHitPairGeneratorForPhotonConversion.h.

Member Typedef Documentation

Constructor & Destructor Documentation

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

Definition at line 13 of file CombinedHitPairGeneratorForPhotonConversion.cc.

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

13  :
15 {
16  theMaxElement = cfg.getParameter<unsigned int>("maxElement");
17  maxHitPairsPerTrackAndGenerator = cfg.getParameter<unsigned int>("maxHitPairsPerTrackAndGenerator");
18  theGenerator.reset(new HitPairGeneratorFromLayerPairForPhotonConversion(0, 1, &theLayerCache, 0, maxHitPairsPerTrackAndGenerator));
19 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
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 34 of file CombinedHitPairGeneratorForPhotonConversion.cc.

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

Referenced by run().

38 {
40  ev.getByToken(theSeedingLayerToken, hlayers);
41  const SeedingLayerSetsHits& layers = *hlayers;
42  assert(layers.numberOfLayersInSet() == 2);
43 
44  for(SeedingLayerSetsHits::LayerSetIndex i=0; i<layers.size(); ++i) {
45  theGenerator->hitPairs( convRegion, region, result, layers[i], ev, es);
46  }
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:579
unsigned short LayerSetIndex
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 23 of file CombinedHitPairGeneratorForPhotonConversion.cc.

References hitPairs(), and thePairs.

26 {
27  if (thePairs.capacity()==0) thePairs.reserve(localRA.upper());
28  thePairs.clear();
29  hitPairs(convRegion, region, thePairs, ev, es);
30  return thePairs;
31 }
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 54 of file CombinedHitPairGeneratorForPhotonConversion.h.

Referenced by clearCache(), and run().

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

Definition at line 46 of file CombinedHitPairGeneratorForPhotonConversion.h.

Referenced by hitPairs().