Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-22 02:39:55

0001 //#include "RecoTracker/TkHitPairs/interface/LayerWithHits.h"
0002 #include "RecoTracker/TkHitPairs/interface/CosmicHitPairGenerator.h"
0003 #include "RecoTracker/TkHitPairs/interface/SeedLayerPairs.h"
0004 #include "RecoTracker/TkHitPairs/interface/CosmicHitPairGeneratorFromLayerPair.h"
0005 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0006 
0007 using namespace std;
0008 
0009 CosmicHitPairGenerator::CosmicHitPairGenerator(SeedLayerPairs& layers, const TrackerGeometry& trackGeom) {
0010   vector<SeedLayerPairs::LayerPair> layerPairs = layers();
0011   vector<SeedLayerPairs::LayerPair>::const_iterator it;
0012   for (it = layerPairs.begin(); it != layerPairs.end(); it++) {
0013     add((*it).first, (*it).second, trackGeom);
0014   }
0015 }
0016 
0017 CosmicHitPairGenerator::~CosmicHitPairGenerator() {}
0018 
0019 void CosmicHitPairGenerator::add(const LayerWithHits* inner,
0020                                  const LayerWithHits* outer,
0021                                  const TrackerGeometry& trackGeom) {
0022   theGenerators.push_back(std::make_unique<CosmicHitPairGeneratorFromLayerPair>(inner, outer, trackGeom));
0023 }
0024 
0025 void CosmicHitPairGenerator::hitPairs(const TrackingRegion& region, OrderedHitPairs& pairs) {
0026   Container::const_iterator i;
0027   for (i = theGenerators.begin(); i != theGenerators.end(); i++) {
0028     (**i).hitPairs(region, pairs);
0029   }
0030 }