CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Typedefs | Functions
LayerTriplets Namespace Reference

Typedefs

using Layer = SeedingLayerSetsHits::SeedingLayer
 
using LayerSet = SeedingLayerSetsHits::SeedingLayerSet
 
using LayerSetAndLayers = std::pair< LayerSet, std::vector< Layer > >
 

Functions

std::vector< LayerSetAndLayerslayers (const SeedingLayerSetsHits &sets)
 

Detailed Description

A class grouping pixel layers in pairs and associating a vector of layers to each layer pair. The layer pair is used to generate hit pairs and the associated vector of layers to generate a third hit confirming layer pair

Typedef Documentation

Definition at line 14 of file LayerTriplets.h.

Definition at line 15 of file LayerTriplets.h.

using LayerTriplets::LayerSetAndLayers = typedef std::pair<LayerSet, std::vector<Layer> >

Definition at line 16 of file LayerTriplets.h.

Function Documentation

std::vector< LayerSetAndLayers > LayerTriplets::layers ( const SeedingLayerSetsHits sets)

Definition at line 4 of file LayerTriplets.cc.

References cmsHarvester::index, SeedingLayerSetsHits::numberOfLayersInSet(), and mps_fire::result.

Referenced by DTnoiseDBValidation::bookHisto(), DTNoiseTask::bookHistos(), MuonSeedBuilder::build(), MagGeoBuilderFromDDD::build(), GEMCSCSegmentBuilder::build(), MagGeoBuilderFromDDD::eSector::buildMagESector(), TrackEfficiencyMonitor::compatibleLayers(), CosmicHitPairGenerator::CosmicHitPairGenerator(), AlignableMuon::CSCLayers(), DTClusterer::differentLayers(), AlignableMuon::DTLayers(), SiStripNoisesGenerator::fillSubDetParameter(), SiStripNoiseNormalizedWithApvGainBuilder::fillSubDetParameter(), SiStripApvGainBuilderFromTag::fillSubDetParameter(), GroupedCkfTrajectoryBuilder::groupedIntermediaryClean(), CombinedHitQuadrupletGeneratorForPhotonConversion::hitPairs(), CombinedHitPairGenerator::hitPairs(), CombinedHitPairGeneratorForPhotonConversion::hitPairs(), CombinedMultiHitGenerator::hitSets(), CombinedHitTripletGenerator::hitTriplets(), MSLayersKeeperX0Averaged::init(), MSLayersKeeperX0AtEta::init(), muon::isSoftMuon(), HGCalGeomParameters::loadGeometryHexagon(), GEMDigiMatcher::nLayersWithDigisInSuperChamber(), GEMDigiMatcher::nLayersWithPadsInSuperChamber(), GEMRecHitMatcher::nLayersWithRecHitsInSuperChamber(), SeedingLayerSetsHits::print(), MuonSimHitProducer::produce(), GenericTripletGenerator::run(), BeamHaloPairGenerator::run(), GenericPairGenerator::run(), AlignmentParameterSelector::setSpecials(), SiPixelDetSummary::SiPixelDetSummary(), SiStripDetSummary::SiStripDetSummary(), SimpleCosmicBONSeeder::triplets(), ValidateGeometry::validateCSCLayerGeometry(), and ValidateGeometry::validateDTLayerGeometry().

4  {
5  std::vector<LayerSetAndLayers> result;
6  if(sets.numberOfLayersInSet() != 3)
7  return result;
8 
9  for(LayerSet set: sets) {
10  bool added = false;
11 
12  for(auto ir = result.begin(); ir < result.end(); ++ir) {
13  const LayerSet & resSet = ir->first;
14  if (resSet[0].index() == set[0].index() && resSet[1].index() == set[1].index()) {
15  std::vector<Layer>& thirds = ir->second;
16  thirds.push_back( set[2] );
17  added = true;
18  break;
19  }
20  }
21  if (!added) {
22  LayerSetAndLayers lpl = std::make_pair(set, std::vector<Layer>(1, set[2]) );
23  result.push_back(lpl);
24  }
25  }
26  return result;
27 }
unsigned short numberOfLayersInSet() const
Get number of layers in each SeedingLayerSets.
SeedingLayerSetsHits::SeedingLayerSet LayerSet
Definition: LayerTriplets.h:15
tuple result
Definition: mps_fire.py:84
std::pair< LayerSet, std::vector< Layer > > LayerSetAndLayers
Definition: LayerTriplets.h:16