CMS 3D CMS Logo

CombinedHitPairGenerator.cc
Go to the documentation of this file.
6 
8  : theSeedingLayerToken(iC.consumes<SeedingLayerSetsHits>(cfg.getParameter<edm::InputTag>("SeedingLayers"))) {
9  theMaxElement = cfg.getParameter<unsigned int>("maxElement");
10  theGenerator = std::make_unique<HitPairGeneratorFromLayerPair>(0, 1, &theLayerCache, theMaxElement);
11 }
12 
14  : HitPairGenerator(cb),
18 }
19 
21 
24  const edm::Event& ev,
25  const edm::EventSetup& es) {
27  ev.getByToken(theSeedingLayerToken, hlayers);
28  const SeedingLayerSetsHits& layers = *hlayers;
29  if (layers.numberOfLayersInSet() != 2)
30  throw cms::Exception("Configuration")
31  << "CombinedHitPairGenerator expects SeedingLayerSetsHits::numberOfLayersInSet() to be 2, got "
32  << layers.numberOfLayersInSet();
33 
34  for (SeedingLayerSetsHits::SeedingLayerSet layerSet : layers) {
35  theGenerator->hitPairs(region, result, ev, es, layerSet);
36  }
37 
39 
40  LogDebug("CombinedHitPairGenerator") << " total number of pairs provided back CHPG : " << result.size();
41 }
#define LogDebug(id)
T getParameter(std::string const &) const
unsigned short numberOfLayersInSet() const
Get number of layers in each SeedingLayerSets.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
bool ev
void hitPairs(const TrackingRegion &reg, OrderedHitPairs &result, const edm::Event &ev, const edm::EventSetup &es) override
form base class
std::unique_ptr< HitPairGeneratorFromLayerPair > theGenerator
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
unsigned int size() const override
CombinedHitPairGenerator(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
HLT enums.