CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/Alignment/LaserAlignment/interface/LaserHitPairGenerator.h

Go to the documentation of this file.
00001 #ifndef LaserAlignment_LaserHitPairGenerator_h
00002 #define LaserAlignment_LaserHitPairGenerator_h
00003 
00013 #include "RecoTracker/TkHitPairs/interface/LayerHitMapCache.h"
00014 
00015 
00016 #include "Alignment/LaserAlignment/interface/OrderedLaserHitPairs.h"
00017 
00018 #include <vector>
00019 
00020 class SeedLayerPairs;
00021 class LayerWithHits;
00022 class DetLayer;
00023 class TrackingRegion;
00024 class LaserHitPairGeneratorFromLayerPair;
00025 
00026 
00027 class LaserHitPairGenerator
00028 {
00029   typedef std::vector<LaserHitPairGeneratorFromLayerPair *> Container;
00030   typedef LayerHitMapCache LayerCacheType;
00031 
00032  public:
00034    LaserHitPairGenerator(unsigned int size=30000) {thePairs.reserve(size); }
00035 
00037   LaserHitPairGenerator(SeedLayerPairs & layers, const edm::EventSetup & iSetup);
00039   LaserHitPairGenerator(SeedLayerPairs & layers);
00040 
00042   virtual ~LaserHitPairGenerator();
00043 
00045   void add(const LayerWithHits * inner, const LayerWithHits * outer, const edm::EventSetup & iSetup);
00046 
00047   virtual void hitPairs(const TrackingRegion & reg, OrderedLaserHitPairs & prs, const edm::EventSetup & iSetup);
00048   virtual void hitPairs(const TrackingRegion & reg, OrderedLaserHitPairs & prs, const edm::Event & ev, const edm::EventSetup & iSetup) {}
00049   
00050   virtual const OrderedLaserHitPairs & run(const TrackingRegion& region, const edm::Event & iEvent, const edm::EventSetup& iSetup);
00051   
00052   virtual LaserHitPairGenerator * clone() const { return new LaserHitPairGenerator(*this); }
00053 
00054  private:
00055   OrderedLaserHitPairs thePairs;
00056   LayerCacheType theLayerCache;
00057   Container theGenerators;
00058 
00059 };
00060 
00061 #endif