CMS 3D CMS Logo

CombinedHitTripletGenerator Class Reference

#include <RecoPixelVertexing/PixelTriplets/interface/CombinedHitTripletGenerator.h>

Inheritance diagram for CombinedHitTripletGenerator:

HitTripletGenerator OrderedHitsGenerator

List of all members.

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
virtual ~CombinedHitTripletGenerator ()

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


Detailed Description

Definition at line 21 of file CombinedHitTripletGenerator.h.


Member Typedef Documentation

typedef std::vector<HitTripletGeneratorFromPairAndLayers* > CombinedHitTripletGenerator::GeneratorContainer [private]

Definition at line 43 of file CombinedHitTripletGenerator.h.

typedef LayerHitMapCache CombinedHitTripletGenerator::LayerCacheType

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.

00018   : initialised(false), theConfig(cfg)
00019 { }

CombinedHitTripletGenerator::~CombinedHitTripletGenerator (  )  [virtual]

Definition at line 57 of file CombinedHitTripletGenerator.cc.

References it, and theGenerators.

00058 {
00059   GeneratorContainer::const_iterator it;
00060   for (it = theGenerators.begin(); it!= theGenerators.end(); it++) {
00061     delete (*it);
00062   }
00063 }


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.

00069 {
00070   if (!initialised) init(theConfig,es);
00071 
00072   GeneratorContainer::const_iterator i;
00073   for (i=theGenerators.begin(); i!=theGenerators.end(); i++) {
00074     (**i).hitTriplets( region, result, ev, es);
00075   }
00076   theLayerCache.clear();
00077 }

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(), DBSPlugin::get(), edm::ParameterSet::getParameter(), initialised, it, edm::second(), theConfig, theGenerators, and theLayerCache.

Referenced by hitTriplets().

00022 {
00023 //  edm::ParameterSet leyerPSet = cfg.getParameter<edm::ParameterSet>("LayerPSet");
00024 //  SeedingLayerSets layerSets  = SeedingLayerSetsBuilder(leyerPSet).layers(es);
00025 
00026   std::string layerBuilderName = cfg.getParameter<std::string>("SeedingLayers");
00027   edm::ESHandle<SeedingLayerSetsBuilder> layerBuilder;
00028   es.get<TrackerDigiGeometryRecord>().get(layerBuilderName, layerBuilder);
00029 
00030   SeedingLayerSets layerSets  =  layerBuilder->layers(es);
00031 
00032 
00033   vector<LayerTriplets::LayerPairAndLayers>::const_iterator it;
00034   vector<LayerTriplets::LayerPairAndLayers> trilayers=LayerTriplets(layerSets).layers();
00035 
00036   for (it = trilayers.begin(); it != trilayers.end(); it++) {
00037     SeedingLayer first = (*it).first.first;
00038     SeedingLayer second = (*it).first.second;
00039     vector<SeedingLayer> thirds = (*it).second;
00040 
00041     edm::ParameterSet generatorPSet = theConfig.getParameter<edm::ParameterSet>("GeneratorPSet");
00042     std::string       generatorName = generatorPSet.getParameter<std::string>("ComponentName");
00043 
00044     HitTripletGeneratorFromPairAndLayers * aGen =
00045         HitTripletGeneratorFromPairAndLayersFactory::get()->create(generatorName,generatorPSet);
00046 
00047     aGen->init( HitPairGeneratorFromLayerPair( first, second, &theLayerCache),
00048                 thirds, &theLayerCache);
00049 
00050     theGenerators.push_back( aGen);
00051   }
00052 
00053   initialised = true;
00054 
00055 }


Member Data Documentation

bool CombinedHitTripletGenerator::initialised [mutable, private]

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().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:16:31 2009 for CMSSW by  doxygen 1.5.4