CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HitPairGenerator.h
Go to the documentation of this file.
1 #ifndef HitPairGenerator_H
2 #define HitPairGenerator_H
3 
4 #include <vector>
5 
15 
16 class TrackingRegion;
17 namespace edm { class Event; class EventSetup; }
18 
20 public:
21 
22  explicit HitPairGenerator(unsigned int size=7500);
23 
24  virtual ~HitPairGenerator() { }
25 
27 
28  virtual const OrderedHitPairs & run(
29  const TrackingRegion& region, const edm::Event & ev, const edm::EventSetup& es);
30 
31  // temporary interface for backward compatibility only
32  virtual void hitPairs(
33  const TrackingRegion& reg, OrderedHitPairs & prs, const edm::EventSetup& es) {}
34 
35  // new interface with no temphits copy
36  virtual HitDoublets doublets( const TrackingRegion& reg,
37  const edm::Event & ev, const edm::EventSetup& es) {
38  assert(0=="not implemented");
39  }
40 
41 
42  virtual void hitPairs( const TrackingRegion& reg, OrderedHitPairs & prs,
43  const edm::Event & ev, const edm::EventSetup& es) = 0;
44 
45  virtual HitPairGenerator* clone() const = 0;
46 
47  virtual void clear() {
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  }
54 
55 private:
57  unsigned int m_capacity;
58 
59 };
60 
61 #endif
virtual HitPairGenerator * clone() const =0
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
HitPairGenerator(unsigned int size=7500)
bool ev
unsigned int m_capacity
virtual void hitPairs(const TrackingRegion &reg, OrderedHitPairs &prs, const edm::EventSetup &es)
virtual void clear()
virtual HitDoublets doublets(const TrackingRegion &reg, const edm::Event &ev, const edm::EventSetup &es)
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
OrderedHitPairs thePairs
virtual const OrderedHitPairs & run(const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es)
tuple size
Write out results.
virtual void setSeedingLayers(SeedingLayerSetsHits::SeedingLayerSet layers)=0
virtual ~HitPairGenerator()