CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
CombinedHitPairGenerator Class Reference

#include <CombinedHitPairGenerator.h>

Inheritance diagram for CombinedHitPairGenerator:
HitPairGenerator OrderedHitsGenerator

Public Types

typedef LayerHitMapCache LayerCacheType
 

Public Member Functions

virtual CombinedHitPairGeneratorclone () const
 from base class More...
 
 CombinedHitPairGenerator (const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
 
virtual void hitPairs (const TrackingRegion &reg, OrderedHitPairs &result, const edm::Event &ev, const edm::EventSetup &es)
 form base class More...
 
void setSeedingLayers (SeedingLayerSetsHits::SeedingLayerSet layers) override
 
virtual ~CombinedHitPairGenerator ()
 
- Public Member Functions inherited from HitPairGenerator
virtual void clear () final
 
virtual HitDoublets doublets (const TrackingRegion &reg, const edm::Event &ev, const edm::EventSetup &es)
 
 HitPairGenerator (unsigned int size=4000)
 
 HitPairGenerator (HitPairGenerator const &other)
 
virtual void hitPairs (const TrackingRegion &reg, OrderedHitPairs &prs, const edm::EventSetup &es)
 
virtual const OrderedHitPairsrun (const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es)
 
virtual ~HitPairGenerator ()
 
- Public Member Functions inherited from OrderedHitsGenerator
 OrderedHitsGenerator ()
 
virtual ~OrderedHitsGenerator ()
 

Private Member Functions

 CombinedHitPairGenerator (const CombinedHitPairGenerator &cb)
 

Private Attributes

std::unique_ptr
< HitPairGeneratorFromLayerPair
theGenerator
 
LayerCacheType theLayerCache
 
edm::EDGetTokenT
< SeedingLayerSetsHits
theSeedingLayerToken
 

Additional Inherited Members

- Public Attributes inherited from OrderedHitsGenerator
unsigned int theMaxElement
 

Detailed Description

Hides set of HitPairGeneratorFromLayerPair generators.

Definition at line 23 of file CombinedHitPairGenerator.h.

Member Typedef Documentation

Definition at line 25 of file CombinedHitPairGenerator.h.

Constructor & Destructor Documentation

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

Definition at line 7 of file CombinedHitPairGenerator.cc.

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

Referenced by clone().

7  :
9 {
10  theMaxElement = cfg.getParameter<unsigned int>("maxElement");
12 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
std::unique_ptr< HitPairGeneratorFromLayerPair > theGenerator
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
CombinedHitPairGenerator::~CombinedHitPairGenerator ( )
virtual

Definition at line 21 of file CombinedHitPairGenerator.cc.

21 {}
CombinedHitPairGenerator::CombinedHitPairGenerator ( const CombinedHitPairGenerator cb)
private

Definition at line 14 of file CombinedHitPairGenerator.cc.

References OrderedHitsGenerator::theMaxElement.

14  :
17 {
19 }
std::unique_ptr< HitPairGeneratorFromLayerPair > theGenerator
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken

Member Function Documentation

virtual CombinedHitPairGenerator* CombinedHitPairGenerator::clone ( void  ) const
inlinevirtual

from base class

Implements HitPairGenerator.

Definition at line 38 of file CombinedHitPairGenerator.h.

References CombinedHitPairGenerator().

39  { return new CombinedHitPairGenerator(*this); }
CombinedHitPairGenerator(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
void CombinedHitPairGenerator::hitPairs ( const TrackingRegion reg,
OrderedHitPairs result,
const edm::Event ev,
const edm::EventSetup es 
)
virtual

form base class

Implements HitPairGenerator.

Definition at line 27 of file CombinedHitPairGenerator.cc.

References LayerHitMapCache::clear(), edm::Event::getByToken(), LayerTriplets::layers(), LogDebug, SeedingLayerSetsHits::numberOfLayersInSet(), OrderedHitPairs::size(), theGenerator, theLayerCache, and theSeedingLayerToken.

30 {
32  ev.getByToken(theSeedingLayerToken, hlayers);
33  const SeedingLayerSetsHits& layers = *hlayers;
34  if(layers.numberOfLayersInSet() != 2)
35  throw cms::Exception("Configuration") << "CombinedHitPairGenerator expects SeedingLayerSetsHits::numberOfLayersInSet() to be 2, got " << layers.numberOfLayersInSet();
36 
37  for(SeedingLayerSetsHits::SeedingLayerSet layerSet: layers) {
38  theGenerator->setSeedingLayers(layerSet);
39  theGenerator->hitPairs( region, result, ev, es);
40  }
41 
43 
44  LogDebug("CombinedHitPairGenerator")<<" total number of pairs provided back CHPG : "<<result.size();
45 
46 }
#define LogDebug(id)
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:449
virtual unsigned int size() const
std::unique_ptr< HitPairGeneratorFromLayerPair > theGenerator
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
void CombinedHitPairGenerator::setSeedingLayers ( SeedingLayerSetsHits::SeedingLayerSet  layers)
overridevirtual

Implements HitPairGenerator.

Definition at line 23 of file CombinedHitPairGenerator.cc.

References assert().

23  {
24  assert(0 == "not implemented");
25 }
assert(m_qm.get())

Member Data Documentation

std::unique_ptr<HitPairGeneratorFromLayerPair> CombinedHitPairGenerator::theGenerator
private

Definition at line 48 of file CombinedHitPairGenerator.h.

Referenced by CombinedHitPairGenerator(), and hitPairs().

LayerCacheType CombinedHitPairGenerator::theLayerCache
private

Definition at line 46 of file CombinedHitPairGenerator.h.

Referenced by CombinedHitPairGenerator(), and hitPairs().

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

Definition at line 44 of file CombinedHitPairGenerator.h.

Referenced by hitPairs().