CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
HitPairGenerator Class Referenceabstract

#include <HitPairGenerator.h>

Inheritance diagram for HitPairGenerator:
OrderedHitsGenerator CombinedHitPairGenerator CombinedHitPairGeneratorForPhotonConversion CombinedHitQuadrupletGeneratorForPhotonConversion CosmicHitPairGenerator CosmicHitPairGeneratorFromLayerPair HitPairGeneratorFromLayerPair HitPairGeneratorFromLayerPairForPhotonConversion HitQuadrupletGeneratorFromLayerPairForPhotonConversion

Public Member Functions

virtual void clear ()
 
virtual HitPairGeneratorclone () const =0
 
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 void hitPairs (const TrackingRegion &reg, OrderedHitPairs &prs, const edm::Event &ev, const edm::EventSetup &es)=0
 
virtual const OrderedHitPairsrun (const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es)
 
virtual void setSeedingLayers (SeedingLayerSetsHits::SeedingLayerSet layers)=0
 
virtual ~HitPairGenerator ()
 
- Public Member Functions inherited from OrderedHitsGenerator
 OrderedHitsGenerator ()
 
virtual ~OrderedHitsGenerator ()
 

Private Attributes

unsigned int m_capacity
 
OrderedHitPairs thePairs
 

Additional Inherited Members

- Public Attributes inherited from OrderedHitsGenerator
unsigned int theMaxElement
 

Detailed Description

Definition at line 19 of file HitPairGenerator.h.

Constructor & Destructor Documentation

HitPairGenerator::HitPairGenerator ( unsigned int  size = 7500)
explicit

Definition at line 3 of file HitPairGenerator.cc.

References thePairs.

3  : m_capacity(nSize)
4 {
5  thePairs.reserve(nSize);
6 }
unsigned int m_capacity
OrderedHitPairs thePairs
virtual HitPairGenerator::~HitPairGenerator ( )
inlinevirtual

Definition at line 24 of file HitPairGenerator.h.

24 { }

Member Function Documentation

virtual void HitPairGenerator::clear ( void  )
inlinevirtual

Reimplemented from OrderedHitsGenerator.

Definition at line 47 of file HitPairGenerator.h.

References m_capacity, thePairs, and tmp.

47  {
48  // back to initial allocation if too large
49  if (thePairs.capacity()> 4*m_capacity) {
50  OrderedHitPairs tmp; tmp.reserve(m_capacity); tmp.swap(thePairs);
51  }
52  thePairs.clear();
53  }
unsigned int m_capacity
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
OrderedHitPairs thePairs
virtual HitPairGenerator* HitPairGenerator::clone ( ) const
pure virtual
virtual HitDoublets HitPairGenerator::doublets ( const TrackingRegion reg,
const edm::Event ev,
const edm::EventSetup es 
)
inlinevirtual

Reimplemented in HitPairGeneratorFromLayerPair.

Definition at line 36 of file HitPairGenerator.h.

Referenced by PixelTripletLargeTipGenerator::hitTriplets(), and PixelTripletHLTGenerator::hitTriplets().

37  {
38  assert(0=="not implemented");
39  }
virtual void HitPairGenerator::hitPairs ( const TrackingRegion reg,
OrderedHitPairs prs,
const edm::EventSetup es 
)
inlinevirtual
virtual void HitPairGenerator::hitPairs ( const TrackingRegion reg,
OrderedHitPairs prs,
const edm::Event ev,
const edm::EventSetup es 
)
pure virtual
const OrderedHitPairs & HitPairGenerator::run ( const TrackingRegion region,
const edm::Event ev,
const edm::EventSetup es 
)
virtual

Implements OrderedHitsGenerator.

Reimplemented in CombinedHitQuadrupletGeneratorForPhotonConversion.

Definition at line 8 of file HitPairGenerator.cc.

References hitPairs(), and thePairs.

10 {
11  thePairs.clear();
12  hitPairs(region, thePairs, ev, es);
13  return thePairs;
14 }
virtual void hitPairs(const TrackingRegion &reg, OrderedHitPairs &prs, const edm::EventSetup &es)
OrderedHitPairs thePairs
virtual void HitPairGenerator::setSeedingLayers ( SeedingLayerSetsHits::SeedingLayerSet  layers)
pure virtual

Member Data Documentation

unsigned int HitPairGenerator::m_capacity
private

Definition at line 57 of file HitPairGenerator.h.

Referenced by clear().

OrderedHitPairs HitPairGenerator::thePairs
private

Definition at line 56 of file HitPairGenerator.h.

Referenced by clear(), HitPairGenerator(), and run().