CMS 3D CMS Logo

Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes

CombinedHitPairGenerator Class Reference

#include <CombinedHitPairGenerator.h>

Inheritance diagram for CombinedHitPairGenerator:
HitPairGenerator OrderedHitsGenerator

List of all members.

Public Types

typedef LayerHitMapCache LayerCacheType

Public Member Functions

void add (const ctfseeding::SeedingLayer &inner, const ctfseeding::SeedingLayer &outer)
virtual CombinedHitPairGeneratorclone () const
 from base class
 CombinedHitPairGenerator (const edm::ParameterSet &cfg)
virtual void hitPairs (const TrackingRegion &reg, OrderedHitPairs &result, const edm::Event &ev, const edm::EventSetup &es)
 form base class
virtual ~CombinedHitPairGenerator ()

Private Types

typedef std::vector
< HitPairGeneratorFromLayerPair * > 
Container

Private Member Functions

void cleanup ()
 CombinedHitPairGenerator (const CombinedHitPairGenerator &cb)
void init (const edm::ParameterSet &cfg, const edm::EventSetup &es)
void init (const ctfseeding::SeedingLayerSets &layerSets)

Private Attributes

bool initialised
edm::ParameterSet theConfig
edm::ESWatcher
< TrackerDigiGeometryRecord
theESWatcher
Container theGenerators
LayerCacheType theLayerCache

Detailed Description

Hides set of HitPairGeneratorFromLayerPair generators.

Definition at line 24 of file CombinedHitPairGenerator.h.


Member Typedef Documentation

Definition at line 57 of file CombinedHitPairGenerator.h.

Definition at line 26 of file CombinedHitPairGenerator.h.


Constructor & Destructor Documentation

CombinedHitPairGenerator::CombinedHitPairGenerator ( const edm::ParameterSet cfg)

Definition at line 14 of file CombinedHitPairGenerator.cc.

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

Referenced by clone().

  : initialised(false), theConfig(cfg)
{
  theMaxElement = cfg.getParameter<unsigned int>("maxElement");
}
CombinedHitPairGenerator::~CombinedHitPairGenerator ( ) [virtual]

Definition at line 52 of file CombinedHitPairGenerator.cc.

References cleanup().

{ cleanup(); }
CombinedHitPairGenerator::CombinedHitPairGenerator ( const CombinedHitPairGenerator cb) [private]

Member Function Documentation

void CombinedHitPairGenerator::add ( const ctfseeding::SeedingLayer inner,
const ctfseeding::SeedingLayer outer 
)

Definition at line 54 of file CombinedHitPairGenerator.cc.

References theGenerators, theLayerCache, and OrderedHitsGenerator::theMaxElement.

Referenced by init().

{ 
  theGenerators.push_back( new HitPairGeneratorFromLayerPair( inner, outer, &theLayerCache, 0, theMaxElement));
}
void CombinedHitPairGenerator::cleanup ( void  ) [private]

Definition at line 43 of file CombinedHitPairGenerator.cc.

References theGenerators.

Referenced by hitPairs(), and ~CombinedHitPairGenerator().

{
  Container::const_iterator it;
  for (it = theGenerators.begin(); it!= theGenerators.end(); it++) {
    delete (*it);
  }
  theGenerators.clear();
}
virtual CombinedHitPairGenerator* CombinedHitPairGenerator::clone ( void  ) const [inline, virtual]

from base class

Implements HitPairGenerator.

Definition at line 40 of file CombinedHitPairGenerator.h.

References CombinedHitPairGenerator(), and theConfig.

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 59 of file CombinedHitPairGenerator.cc.

References edm::ESWatcher< T >::check(), cleanup(), LayerHitMapCache::clear(), i, init(), initialised, theConfig, theESWatcher, theGenerators, and theLayerCache.

{
  if (theESWatcher.check(es) || !initialised ) {
    cleanup();
    init(theConfig,es);
  }

  Container::const_iterator i;
  for (i=theGenerators.begin(); i!=theGenerators.end(); i++) {
    (**i).hitPairs( region, result, ev, es); 
  }
  theLayerCache.clear();
}
void CombinedHitPairGenerator::init ( const edm::ParameterSet cfg,
const edm::EventSetup es 
) [private]

Definition at line 20 of file CombinedHitPairGenerator.cc.

References edm::EventSetup::get(), edm::ParameterSet::getParameter(), init(), and OrderedHitsGenerator::theMaxElement.

{
  theMaxElement = cfg.getParameter<unsigned int>("maxElement");

  std::string layerBuilderName = cfg.getParameter<std::string>("SeedingLayers");
  edm::ESHandle<SeedingLayerSetsBuilder> layerBuilder;
  es.get<TrackerDigiGeometryRecord>().get(layerBuilderName, layerBuilder);

  SeedingLayerSets layerSets  =  layerBuilder->layers(es); 
  init(layerSets);
}
void CombinedHitPairGenerator::init ( const ctfseeding::SeedingLayerSets layerSets) [private]

Definition at line 32 of file CombinedHitPairGenerator.cc.

References add(), initialised, and findQualityFiles::size.

Referenced by hitPairs(), and init().

{
  initialised = true;
  typedef SeedingLayerSets::const_iterator IL;
  for (IL il=layerSets.begin(), ilEnd=layerSets.end(); il != ilEnd; ++il) {
    const SeedingLayers & set = *il;
    if (set.size() != 2) continue;
    add( set[0], set[1] );
  }
}

Member Data Documentation

bool CombinedHitPairGenerator::initialised [mutable, private]

Definition at line 50 of file CombinedHitPairGenerator.h.

Referenced by hitPairs(), and init().

Definition at line 51 of file CombinedHitPairGenerator.h.

Referenced by clone(), and hitPairs().

Definition at line 55 of file CombinedHitPairGenerator.h.

Referenced by hitPairs().

Definition at line 58 of file CombinedHitPairGenerator.h.

Referenced by add(), cleanup(), and hitPairs().

Definition at line 53 of file CombinedHitPairGenerator.h.

Referenced by add(), and hitPairs().