CMS 3D CMS Logo

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

CombinedHitQuadrupletGeneratorForPhotonConversion Class Reference

#include <CombinedHitQuadrupletGeneratorForPhotonConversion.h>

Inheritance diagram for CombinedHitQuadrupletGeneratorForPhotonConversion:
HitPairGenerator OrderedHitsGenerator

List of all members.

Public Types

typedef LayerHitMapCache LayerCacheType

Public Member Functions

void add (const ctfseeding::SeedingLayer &inner, const ctfseeding::SeedingLayer &outer)
void clearLayerCache ()
virtual
CombinedHitQuadrupletGeneratorForPhotonConversion
clone () const
 from base class
 CombinedHitQuadrupletGeneratorForPhotonConversion (const edm::ParameterSet &cfg)
virtual void hitPairs (const TrackingRegion &, OrderedHitPairs &, const edm::Event &, const edm::EventSetup &)
 form base class
const OrderedHitPairsrun (const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es)
virtual ~CombinedHitQuadrupletGeneratorForPhotonConversion ()

Private Types

typedef std::vector
< HitQuadrupletGeneratorFromLayerPairForPhotonConversion * > 
Container

Private Member Functions

void cleanup ()
 CombinedHitQuadrupletGeneratorForPhotonConversion (const CombinedHitQuadrupletGeneratorForPhotonConversion &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
OrderedHitPairs thePairs

Detailed Description

Hides set of HitQuadrupletGeneratorFromLayerPairForPhotonConversion generators.

Definition at line 26 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.


Member Typedef Documentation


Constructor & Destructor Documentation

CombinedHitQuadrupletGeneratorForPhotonConversion::CombinedHitQuadrupletGeneratorForPhotonConversion ( const edm::ParameterSet cfg)

Definition at line 14 of file CombinedHitQuadrupletGeneratorForPhotonConversion.cc.

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

Referenced by clone().

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

Definition at line 52 of file CombinedHitQuadrupletGeneratorForPhotonConversion.cc.

References cleanup().

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

Member Function Documentation

void CombinedHitQuadrupletGeneratorForPhotonConversion::add ( const ctfseeding::SeedingLayer inner,
const ctfseeding::SeedingLayer outer 
)
void CombinedHitQuadrupletGeneratorForPhotonConversion::cleanup ( void  ) [private]

Definition at line 43 of file CombinedHitQuadrupletGeneratorForPhotonConversion.cc.

References theGenerators.

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

{
  Container::const_iterator it;
  for (it = theGenerators.begin(); it!= theGenerators.end(); it++) {
    delete (*it);
  }
  theGenerators.clear();
}
void CombinedHitQuadrupletGeneratorForPhotonConversion::clearLayerCache ( ) [inline]
virtual CombinedHitQuadrupletGeneratorForPhotonConversion* CombinedHitQuadrupletGeneratorForPhotonConversion::clone ( void  ) const [inline, virtual]
void CombinedHitQuadrupletGeneratorForPhotonConversion::hitPairs ( const TrackingRegion region,
OrderedHitPairs result,
const edm::Event ev,
const edm::EventSetup es 
) [virtual]

form base class

Implements HitPairGenerator.

Definition at line 67 of file CombinedHitQuadrupletGeneratorForPhotonConversion.cc.

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

Referenced by run().

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

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

Definition at line 20 of file CombinedHitQuadrupletGeneratorForPhotonConversion.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 CombinedHitQuadrupletGeneratorForPhotonConversion::init ( const ctfseeding::SeedingLayerSets layerSets) [private]

Definition at line 32 of file CombinedHitQuadrupletGeneratorForPhotonConversion.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] );
  }
}
const OrderedHitPairs & CombinedHitQuadrupletGeneratorForPhotonConversion::run ( const TrackingRegion region,
const edm::Event ev,
const edm::EventSetup es 
) [virtual]

Reimplemented from HitPairGenerator.

Definition at line 59 of file CombinedHitQuadrupletGeneratorForPhotonConversion.cc.

References hitPairs(), and thePairs.

Referenced by PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::inspect().

{
  thePairs.clear();
  hitPairs(region, thePairs, ev, es);
  return thePairs;
}

Member Data Documentation

Definition at line 57 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.

Referenced by hitPairs(), and init().

Definition at line 58 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.

Referenced by clone(), and hitPairs().

Definition at line 62 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.

Referenced by hitPairs().

Definition at line 65 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.

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

Reimplemented from HitPairGenerator.

Definition at line 67 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.

Referenced by run().