CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CombinedHitPairGenerator.cc
Go to the documentation of this file.
6 
8  theSeedingLayerToken(iC.consumes<SeedingLayerSetsHits>(cfg.getParameter<edm::InputTag>("SeedingLayers")))
9 {
10  theMaxElement = cfg.getParameter<unsigned int>("maxElement");
12 }
13 
15  theSeedingLayerToken(cb.theSeedingLayerToken),
16  theGenerator(new HitPairGeneratorFromLayerPair(0, 1, &theLayerCache, 0, cb.theMaxElement))
17 {
19 }
20 
22 
24  assert(0 == "not implemented");
25 }
26 
28  const TrackingRegion& region, OrderedHitPairs & result,
29  const edm::Event& ev, const edm::EventSetup& es)
30 {
32  ev.getByToken(theSeedingLayerToken, hlayers);
33  const SeedingLayerSetsHits& layers = *hlayers;
34  if(layers.numberOfLayersInSet() != 2)
35  throw cms::Exception("Configuration") << "CombinedHitPairGenerator expects SeedingLayerSetsHits::numberOfLayersInSet() to be 2, got " << layers.numberOfLayersInSet();
36 
37  for(SeedingLayerSetsHits::SeedingLayerSet layerSet: layers) {
38  theGenerator->setSeedingLayers(layerSet);
39  theGenerator->hitPairs( region, result, ev, es);
40  }
41 
43 
44  LogDebug("CombinedHitPairGenerator")<<" total number of pairs provided back CHPG : "<<result.size();
45 
46 }
#define LogDebug(id)
T getParameter(std::string const &) const
unsigned short numberOfLayersInSet() const
Get number of layers in each SeedingLayerSets.
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
virtual unsigned int size() const
std::unique_ptr< HitPairGeneratorFromLayerPair > theGenerator
edm::EDGetTokenT< SeedingLayerSetsHits > theSeedingLayerToken
tuple result
Definition: query.py:137
void setSeedingLayers(SeedingLayerSetsHits::SeedingLayerSet layers) override
virtual void hitPairs(const TrackingRegion &reg, OrderedHitPairs &result, const edm::Event &ev, const edm::EventSetup &es)
form base class
CombinedHitPairGenerator(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)