CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 }
int i
Definition: DBlmapReader.cc:9
unsigned short numberOfLayersInSet() const
Get number of layers in each SeedingLayerSets.
tuple cfg
Definition: looper.py:259
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
unsigned short LayerSetIndex
assert(m_qm.get())
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)
tuple result
Definition: query.py:137
std::unique_ptr< HitQuadrupletGeneratorFromLayerPairForPhotonConversion > theGenerator
CombinedHitQuadrupletGeneratorForPhotonConversion(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)