CMS 3D CMS Logo

CombinedHitQuadrupletGeneratorForPhotonConversion.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 {
11  theGenerator = std::make_unique<HitQuadrupletGeneratorFromLayerPairForPhotonConversion>( 0, 1, &theLayerCache, theMaxElement);
12 }
13 
14 
16 
18 {
19  thePairs.clear();
20  hitPairs(region, thePairs, ev, es);
21  return thePairs;
22 }
23 
24 
26  const edm::Event& ev, const edm::EventSetup& es)
27 {
28  size_t maxHitQuadruplets=1000000;
30  ev.getByToken(theSeedingLayerToken, hlayers);
31  const SeedingLayerSetsHits& layers = *hlayers;
32  assert(layers.numberOfLayersInSet() == 2);
33 
34 
35  for(SeedingLayerSetsHits::LayerSetIndex i=0; i<hlayers->size() && result.size() < maxHitQuadruplets; ++i) {
36  theGenerator->hitPairs( region, result, layers[i], ev, es);
37  }
39 }
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:460
unsigned short LayerSetIndex
bool ev
virtual unsigned int size() const
void hitPairs(const TrackingRegion &, OrderedHitPairs &, const edm::Event &, const edm::EventSetup &)
const OrderedHitPairs & run(const TrackingRegion &region, const edm::Event &ev, const edm::EventSetup &es)
std::unique_ptr< HitQuadrupletGeneratorFromLayerPairForPhotonConversion > theGenerator
HLT enums.
unsigned short size() const
Get the number of SeedingLayerSets.
CombinedHitQuadrupletGeneratorForPhotonConversion(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)