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
CombinedHitQuadrupletGeneratorForPhotonConversion Class Reference

#include <CombinedHitQuadrupletGeneratorForPhotonConversion.h>

Inheritance diagram for CombinedHitQuadrupletGeneratorForPhotonConversion:
HitPairGenerator OrderedHitsGenerator

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 More...
 
 CombinedHitQuadrupletGeneratorForPhotonConversion (const edm::ParameterSet &cfg)
 
virtual void hitPairs (const TrackingRegion &, OrderedHitPairs &, const edm::Event &, const edm::EventSetup &)
 form base class More...
 
const OrderedHitPairsrun (const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es)
 
virtual ~CombinedHitQuadrupletGeneratorForPhotonConversion ()
 
- Public Member Functions inherited from HitPairGenerator
virtual void clear ()
 
virtual HitDoublets doublets (const TrackingRegion &reg, const edm::Event &ev, const edm::EventSetup &es)
 
 HitPairGenerator (unsigned int size=7500)
 
virtual void hitPairs (const TrackingRegion &reg, OrderedHitPairs &prs, const edm::EventSetup &es)
 
virtual ~HitPairGenerator ()
 
- Public Member Functions inherited from OrderedHitsGenerator
 OrderedHitsGenerator ()
 
virtual ~OrderedHitsGenerator ()
 

Private Types

typedef std::vector
< HitQuadrupletGeneratorFromLayerPairForPhotonConversion * > 
Container
 

Private Member Functions

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

Private Attributes

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

Additional Inherited Members

- Public Attributes inherited from OrderedHitsGenerator
unsigned int theMaxElement
 

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)
CombinedHitQuadrupletGeneratorForPhotonConversion::~CombinedHitQuadrupletGeneratorForPhotonConversion ( )
virtual
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().

44 {
45  Container::const_iterator it;
46  for (it = theGenerators.begin(); it!= theGenerators.end(); it++) {
47  delete (*it);
48  }
49  theGenerators.clear();
50 }
void CombinedHitQuadrupletGeneratorForPhotonConversion::clearLayerCache ( )
inline
virtual CombinedHitQuadrupletGeneratorForPhotonConversion* CombinedHitQuadrupletGeneratorForPhotonConversion::clone ( void  ) const
inlinevirtual
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().

69 {
70  if (theESWatcher.check(es) || !initialised ) {
71  cleanup();
72  init(theConfig,es);
73  }
74 
75  size_t maxHitQuadruplets=1000000;
76  Container::const_iterator i;
77  for (i=theGenerators.begin(); i!=theGenerators.end() && result.size() < maxHitQuadruplets; i++) {
78  (**i).hitPairs(region, result, ev, es);
79  }
81 }
int i
Definition: DBlmapReader.cc:9
virtual unsigned int size() const
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:59
void CombinedHitQuadrupletGeneratorForPhotonConversion::init ( const ctfseeding::SeedingLayerSets layerSets)
private

Definition at line 32 of file CombinedHitQuadrupletGeneratorForPhotonConversion.cc.

References add(), and initialised.

Referenced by hitPairs(), and init().

33 {
34  initialised = true;
35  typedef SeedingLayerSets::const_iterator IL;
36  for (IL il=layerSets.begin(), ilEnd=layerSets.end(); il != ilEnd; ++il) {
37  const SeedingLayers & set = *il;
38  if (set.size() != 2) continue;
39  add( set[0], set[1] );
40  }
41 }
void add(const ctfseeding::SeedingLayer &inner, const ctfseeding::SeedingLayer &outer)
std::vector< SeedingLayer > SeedingLayers
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(), AlCaHLTBitMon_QueryRunRegistry::string, and OrderedHitsGenerator::theMaxElement.

21 {
22  theMaxElement = cfg.getParameter<unsigned int>("maxElement");
23 
24  std::string layerBuilderName = cfg.getParameter<std::string>("SeedingLayers");
26  es.get<TrackerDigiGeometryRecord>().get(layerBuilderName, layerBuilder);
27 
28  SeedingLayerSets layerSets = layerBuilder->layers(es);
29  init(layerSets);
30 }
T getParameter(std::string const &) const
const T & get() const
Definition: EventSetup.h:55
std::vector< std::vector< SeedingLayer > > SeedingLayerSets
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().

60 {
61  thePairs.clear();
62  hitPairs(region, thePairs, ev, es);
63  return thePairs;
64 }
virtual void hitPairs(const TrackingRegion &, OrderedHitPairs &, const edm::Event &, const edm::EventSetup &)
form base class

Member Data Documentation

bool CombinedHitQuadrupletGeneratorForPhotonConversion::initialised
mutableprivate

Definition at line 57 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.

Referenced by hitPairs(), and init().

edm::ParameterSet CombinedHitQuadrupletGeneratorForPhotonConversion::theConfig
private

Definition at line 58 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.

Referenced by clone(), and hitPairs().

edm::ESWatcher<TrackerDigiGeometryRecord> CombinedHitQuadrupletGeneratorForPhotonConversion::theESWatcher
private

Definition at line 62 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.

Referenced by hitPairs().

Container CombinedHitQuadrupletGeneratorForPhotonConversion::theGenerators
private

Definition at line 65 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.

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

LayerCacheType CombinedHitQuadrupletGeneratorForPhotonConversion::theLayerCache
private
OrderedHitPairs CombinedHitQuadrupletGeneratorForPhotonConversion::thePairs
private

Definition at line 67 of file CombinedHitQuadrupletGeneratorForPhotonConversion.h.

Referenced by run().