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

#include <CombinedHitTripletGenerator.h>

Inheritance diagram for CombinedHitTripletGenerator:
HitTripletGenerator OrderedHitsGenerator

Public Types

typedef LayerHitMapCache LayerCacheType
 

Public Member Functions

 CombinedHitTripletGenerator (const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
 
virtual void hitTriplets (const TrackingRegion &reg, OrderedHitTriplets &triplets, const edm::Event &ev, const edm::EventSetup &es)
 from base class More...
 
virtual ~CombinedHitTripletGenerator ()
 
- Public Member Functions inherited from HitTripletGenerator
virtual void clear () final
 
 HitTripletGenerator (unsigned int size=500)
 
 HitTripletGenerator (HitTripletGenerator const &other)
 
virtual void hitTriplets (const TrackingRegion &reg, OrderedHitTriplets &prs, const edm::EventSetup &es)
 
virtual const OrderedHitTripletsrun (const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es) final
 
virtual ~HitTripletGenerator ()
 
- Public Member Functions inherited from OrderedHitsGenerator
 OrderedHitsGenerator ()
 
virtual ~OrderedHitsGenerator ()
 

Private Attributes

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

Additional Inherited Members

- Public Attributes inherited from OrderedHitsGenerator
unsigned int theMaxElement
 

Detailed Description

Definition at line 26 of file CombinedHitTripletGenerator.h.

Member Typedef Documentation

Definition at line 28 of file CombinedHitTripletGenerator.h.

Constructor & Destructor Documentation

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

Definition at line 11 of file CombinedHitTripletGenerator.cc.

References SurfaceDeformationFactory::create(), reco::get(), edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, theGenerator, and theLayerCache.

11  :
13 {
14  edm::ParameterSet generatorPSet = cfg.getParameter<edm::ParameterSet>("GeneratorPSet");
15  std::string generatorName = generatorPSet.getParameter<std::string>("ComponentName");
16  theGenerator.reset(HitTripletGeneratorFromPairAndLayersFactory::get()->create(generatorName, generatorPSet, iC));
18 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
std::unique_ptr< HitTripletGeneratorFromPairAndLayers > theGenerator
SurfaceDeformation * create(int type, const std::vector< double > &params)
T get(const Candidate &c)
Definition: component.h:55
CombinedHitTripletGenerator::~CombinedHitTripletGenerator ( )
virtual

Definition at line 20 of file CombinedHitTripletGenerator.cc.

20 {}

Member Function Documentation

void CombinedHitTripletGenerator::hitTriplets ( const TrackingRegion reg,
OrderedHitTriplets triplets,
const edm::Event ev,
const edm::EventSetup es 
)
virtual

from base class

Implements HitTripletGenerator.

Definition at line 22 of file CombinedHitTripletGenerator.cc.

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

25 {
27  ev.getByToken(theSeedingLayerToken, hlayers);
28  const SeedingLayerSetsHits& layers = *hlayers;
29  if(layers.numberOfLayersInSet() != 3)
30  throw cms::Exception("Configuration") << "CombinedHitTripletGenerator expects SeedingLayerSetsHits::numberOfLayersInSet() to be 3, got " << layers.numberOfLayersInSet();
31 
32  std::vector<LayerTriplets::LayerSetAndLayers> trilayers = LayerTriplets::layers(layers);
33  for(const auto& setAndLayers: trilayers) {
34  theGenerator->setSeedingLayers(setAndLayers.first, setAndLayers.second);
35  theGenerator->hitTriplets( region, result, ev, es);
36  }
38 }
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:457
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
tuple result
Definition: query.py:137
std::unique_ptr< HitTripletGeneratorFromPairAndLayers > theGenerator

Member Data Documentation

std::unique_ptr<HitTripletGeneratorFromPairAndLayers> CombinedHitTripletGenerator::theGenerator
private

Definition at line 45 of file CombinedHitTripletGenerator.h.

Referenced by CombinedHitTripletGenerator(), and hitTriplets().

LayerCacheType CombinedHitTripletGenerator::theLayerCache
private

Definition at line 43 of file CombinedHitTripletGenerator.h.

Referenced by CombinedHitTripletGenerator(), and hitTriplets().

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

Definition at line 41 of file CombinedHitTripletGenerator.h.

Referenced by hitTriplets().