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 Types | Private 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)
 
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 ()
 
 HitTripletGenerator (unsigned int size=500)
 
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)
 
virtual ~HitTripletGenerator ()
 
- Public Member Functions inherited from OrderedHitsGenerator
 OrderedHitsGenerator ()
 
virtual ~OrderedHitsGenerator ()
 

Private Types

typedef std::vector
< HitTripletGeneratorFromPairAndLayers * > 
GeneratorContainer
 

Private Member Functions

void init (const edm::ParameterSet &cfg, const edm::EventSetup &es)
 

Private Attributes

bool initialised
 
edm::ParameterSet theConfig
 
GeneratorContainer theGenerators
 
LayerCacheType theLayerCache
 

Additional Inherited Members

- Public Attributes inherited from OrderedHitsGenerator
unsigned int theMaxElement
 

Detailed Description

Definition at line 21 of file CombinedHitTripletGenerator.h.

Member Typedef Documentation

Definition at line 43 of file CombinedHitTripletGenerator.h.

Definition at line 23 of file CombinedHitTripletGenerator.h.

Constructor & Destructor Documentation

CombinedHitTripletGenerator::CombinedHitTripletGenerator ( const edm::ParameterSet cfg)

Definition at line 17 of file CombinedHitTripletGenerator.cc.

CombinedHitTripletGenerator::~CombinedHitTripletGenerator ( )
virtual

Definition at line 57 of file CombinedHitTripletGenerator.cc.

References theGenerators.

58 {
59  GeneratorContainer::const_iterator it;
60  for (it = theGenerators.begin(); it!= theGenerators.end(); it++) {
61  delete (*it);
62  }
63 }

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 66 of file CombinedHitTripletGenerator.cc.

References LayerHitMapCache::clear(), i, init(), initialised, theConfig, theGenerators, and theLayerCache.

69 {
70  if (!initialised) init(theConfig,es);
71 
72  GeneratorContainer::const_iterator i;
73  for (i=theGenerators.begin(); i!=theGenerators.end(); i++) {
74  (**i).hitTriplets( region, result, ev, es);
75  }
77 }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: query.py:137
void init(const edm::ParameterSet &cfg, const edm::EventSetup &es)
void CombinedHitTripletGenerator::init ( const edm::ParameterSet cfg,
const edm::EventSetup es 
)
private

Definition at line 21 of file CombinedHitTripletGenerator.cc.

References first, edm::EventSetup::get(), reco::get(), edm::ParameterSet::getParameter(), initialised, LayerTriplets::layers(), edm::second(), AlCaHLTBitMon_QueryRunRegistry::string, theConfig, theGenerators, and theLayerCache.

Referenced by hitTriplets().

22 {
23 // edm::ParameterSet leyerPSet = cfg.getParameter<edm::ParameterSet>("LayerPSet");
24 // SeedingLayerSets layerSets = SeedingLayerSetsBuilder(leyerPSet).layers(es);
25 
26  std::string layerBuilderName = cfg.getParameter<std::string>("SeedingLayers");
28  es.get<TrackerDigiGeometryRecord>().get(layerBuilderName, layerBuilder);
29 
30  SeedingLayerSets layerSets = layerBuilder->layers(es);
31 
32 
33  vector<LayerTriplets::LayerPairAndLayers>::const_iterator it;
34  vector<LayerTriplets::LayerPairAndLayers> trilayers=LayerTriplets(layerSets).layers();
35 
36  for (it = trilayers.begin(); it != trilayers.end(); it++) {
37  SeedingLayer first = (*it).first.first;
38  SeedingLayer second = (*it).first.second;
39  vector<SeedingLayer> thirds = (*it).second;
40 
41  edm::ParameterSet generatorPSet = theConfig.getParameter<edm::ParameterSet>("GeneratorPSet");
42  std::string generatorName = generatorPSet.getParameter<std::string>("ComponentName");
43 
45  HitTripletGeneratorFromPairAndLayersFactory::get()->create(generatorName,generatorPSet);
46 
47  aGen->init( HitPairGeneratorFromLayerPair( first, second, &theLayerCache),
48  thirds, &theLayerCache);
49 
50  theGenerators.push_back( aGen);
51  }
52 
53  initialised = true;
54 
55 }
T getParameter(std::string const &) const
U second(std::pair< T, U > const &p)
std::vector< LayerPairAndLayers > layers() const
Definition: LayerTriplets.cc:4
bool first
Definition: L1TdeRCT.cc:94
const T & get() const
Definition: EventSetup.h:55
T get(const Candidate &c)
Definition: component.h:56
std::vector< std::vector< SeedingLayer > > SeedingLayerSets

Member Data Documentation

bool CombinedHitTripletGenerator::initialised
mutableprivate

Definition at line 38 of file CombinedHitTripletGenerator.h.

Referenced by hitTriplets(), and init().

edm::ParameterSet CombinedHitTripletGenerator::theConfig
private

Definition at line 40 of file CombinedHitTripletGenerator.h.

Referenced by hitTriplets(), and init().

GeneratorContainer CombinedHitTripletGenerator::theGenerators
private

Definition at line 44 of file CombinedHitTripletGenerator.h.

Referenced by hitTriplets(), init(), and ~CombinedHitTripletGenerator().

LayerCacheType CombinedHitTripletGenerator::theLayerCache
private

Definition at line 41 of file CombinedHitTripletGenerator.h.

Referenced by hitTriplets(), and init().