CMS 3D CMS Logo

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 runEdmFileComparison::found, diffTreeTool::index, checklumidiff::l, SeedingLayerSetsHits::numberOfLayersInSet(), and mps_fire::result.

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer(), DTnoiseDBValidation::bookHisto(), DTNoiseTask::bookHistos(), MuonSeedBuilder::build(), MagGeoBuilderFromDDD::build(), GEMCSCSegmentBuilder::build(), TrackEfficiencyMonitor::compatibleLayers(), CosmicHitPairGenerator::CosmicHitPairGenerator(), AlignableMuon::CSCLayers(), HitDoublets::detLayer(), DTClusterer::differentLayers(), HitPairGeneratorFromLayerPair::doublets(), AlignableMuon::DTLayers(), CAHitTripletGenerator::fillDescriptionsLabel(), CAHitQuadrupletGenerator::fillDescriptionsLabel(), SiStripFakeAPVParameters::fillSubDetParameter(), HcalDDDRecConstants::getDepth(), HcalDDDRecConstants::getEtaBins(), HcalDDDRecConstants::getEtaLimit(), hgcal::RecHitTools::getEventSetup(), hgcal::RecHitTools::getLayer(), HcalLayerDepthMap::getSubdet(), GroupedCkfTrajectoryBuilder::groupedIntermediaryClean(), HitDoublets::hit(), CombinedHitQuadrupletGeneratorForPhotonConversion::hitPairs(), CombinedHitPairGenerator::hitPairs(), CombinedHitPairGeneratorForPhotonConversion::hitPairs(), CombinedHitQuadrupletGenerator::hitQuadruplets(), CombinedMultiHitGenerator::hitSets(), CombinedHitTripletGenerator::hitTriplets(), MSLayersKeeperX0Averaged::init(), MSLayersKeeperX0AtEta::init(), CAHitTripletGenerator::initEvent(), CAHitQuadrupletGenerator::initEvent(), HitDoublets::innerLayer(), muon::isSoftMuon(), LaserHitPairGenerator::LaserHitPairGenerator(), MSLayersKeeper::layer(), HGCalGeomParameters::loadGeometryHexagon(), MSLayersAtAngle::MSLayersAtAngle(), GEMDigiMatcher::nLayersWithDigisInSuperChamber(), GEMDigiMatcher::nLayersWithPadsInSuperChamber(), GEMRecHitMatcher::nLayersWithRecHitsInSuperChamber(), HitDoublets::outerLayer(), HitDoublets::phi(), SeedingLayerSetsHits::print(), MultiHitFromChi2EDProducer::produce(), HitPairEDProducer::produce(), MuonSimHitProducer::produce(), hitTripletEDProducerT::Impl< T_HitTripletGenerator, T_SeedingHitSets, T_IntermediateHitTriplets >::produce(), GenericTripletGenerator::run(), BeamHaloPairGenerator::run(), GenericPairGenerator::run(), HitDoublets::rv(), MuonSeedCreator::setBField(), AlignmentParameterSelector::setSpecials(), SiPixelDetSummary::SiPixelDetSummary(), SiStripDetSummary::SiStripDetSummary(), SimpleCosmicBONSeeder::triplets(), SimG4HGCalValidation::update(), ValidateGeometry::validateCSCLayerGeometry(), ValidateGeometry::validateDTLayerGeometry(), HitDoublets::x(), HitDoublets::y(), HitDoublets::z(), HitQuadrupletGeneratorFromLayerPairForPhotonConversion::~HitQuadrupletGeneratorFromLayerPairForPhotonConversion(), SiStripApvGainBuilderFromTag::~SiStripApvGainBuilderFromTag(), and SiStripNoiseNormalizedWithApvGainBuilder::~SiStripNoiseNormalizedWithApvGainBuilder().

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  // 3rd layer can already be there if we are dealing with quadruplet layer sets
17  auto found = std::find_if(thirds.begin(), thirds.end(), [&](const Layer& l) { return l.index() == set[2].index(); });
18  if(found == thirds.end())
19  thirds.push_back( set[2] );
20  added = true;
21  break;
22  }
23  }
24  if (!added) {
25  LayerSetAndLayers lpl = std::make_pair(set, std::vector<Layer>(1, set[2]) );
26  result.push_back(lpl);
27  }
28  }
29  return result;
30 }
unsigned short numberOfLayersInSet() const
Get number of layers in each SeedingLayerSets.
SeedingLayerSetsHits::SeedingLayerSet LayerSet
Definition: LayerTriplets.h:15
SeedingLayerSetsHits::SeedingLayer Layer
Definition: LayerTriplets.h:14
std::pair< LayerSet, std::vector< Layer > > LayerSetAndLayers
Definition: LayerTriplets.h:16