CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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>(iC, 0, 1, &theLayerCache, theMaxElement);
11 }
12 
14 
17  const edm::Event& ev,
18  const edm::EventSetup& es) {
20  ev.getByToken(theSeedingLayerToken, hlayers);
21  const SeedingLayerSetsHits& layers = *hlayers;
22  if (layers.numberOfLayersInSet() != 2)
23  throw cms::Exception("Configuration")
24  << "CombinedHitPairGenerator expects SeedingLayerSetsHits::numberOfLayersInSet() to be 2, got "
25  << layers.numberOfLayersInSet();
26 
27  for (SeedingLayerSetsHits::SeedingLayerSet layerSet : layers) {
28  theGenerator->hitPairs(region, result, ev, es, layerSet);
29  }
30 
32 
33  LogDebug("CombinedHitPairGenerator") << " total number of pairs provided back CHPG : " << result.size();
34 }
unsigned short numberOfLayersInSet() const
Get number of layers in each SeedingLayerSets.
tuple cfg
Definition: looper.py:296
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
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
tuple result
Definition: mps_fire.py:311
unsigned int size() const override
CombinedHitPairGenerator(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
#define LogDebug(id)