CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CombinedHitQuadrupletGeneratorForPhotonConversion.cc
Go to the documentation of this file.
6 
9  : theSeedingLayerToken(iC.consumes<SeedingLayerSetsHits>(cfg.getParameter<edm::InputTag>("SeedingLayers"))),
10  theMaxElement(cfg.getParameter<unsigned int>("maxElement")) {
11  theGenerator =
12  std::make_unique<HitQuadrupletGeneratorFromLayerPairForPhotonConversion>(0, 1, &theLayerCache, theMaxElement);
13 }
14 
16 
18  const edm::Event& ev,
19  const edm::EventSetup& es) {
20  thePairs.clear();
21  hitPairs(region, thePairs, ev, es);
22  return thePairs;
23 }
24 
27  const edm::Event& ev,
28  const edm::EventSetup& es) {
29  size_t maxHitQuadruplets = 1000000;
31  ev.getByToken(theSeedingLayerToken, hlayers);
32  const SeedingLayerSetsHits& layers = *hlayers;
33  assert(layers.numberOfLayersInSet() == 2);
34 
35  for (SeedingLayerSetsHits::LayerSetIndex i = 0; i < hlayers->size() && result.size() < maxHitQuadruplets; ++i) {
36  theGenerator->hitPairs(region, result, layers[i]);
37  }
39 }
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
unsigned short LayerSetIndex
assert(be >=bs)
tuple result
Definition: mps_fire.py:311
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
unsigned int size() const override
CombinedHitQuadrupletGeneratorForPhotonConversion(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)