CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 newFWLiteAna::found, cmsLHEtoEOSManager::l, SeedingLayerSetsHits::numberOfLayersInSet(), and mps_fire::result.

Referenced by algorithm(), DTResidualCalibration::beginRun(), SimG4HGCalValidation::beginRun(), HGVHistoProducerAlgo::bookClusterHistos_CellLevel(), HGVHistoProducerAlgo::bookClusterHistos_ClusterLevel(), HGVHistoProducerAlgo::bookClusterHistos_LCtoCP_association(), DTnoiseDBValidation::bookHisto(), DTNoiseTask::bookHistos(), HGVHistoProducerAlgo::bookSimClusterAssociationHistos(), HGVHistoProducerAlgo::bookSimClusterHistos(), HGVHistoProducerAlgo::bookTracksterHistos(), magneticfield::MagGeoBuilder::build(), MuonSeedBuilder::build(), MagGeoBuilderFromDDD::build(), GEMCSCSegmentBuilder::build(), ME0GeometryBuilder::buildGeometry(), HGCalClusteringImpl::clusterizeNN(), TrackEfficiencyMonitor::compatibleLayers(), hgcal::EGammaPCAHelper::computePCA(), HGCalShowerShape::coreShowerLength(), CosmicHitPairGenerator::CosmicHitPairGenerator(), AlignableMuon::CSCLayers(), DTClusterer::differentLayers(), AlignableMuon::DTLayers(), hgcal::EGammaPCAHelper::energyPerLayer(), HGVHistoProducerAlgo::fill_info_histos(), SiStripFakeAPVParameters::fillSubDetParameter(), mkfit::Track::foundLayers(), HcalDDDRecConstants::getDepth(), HcalDDDRecConstants::getEtaBins(), hgcal::RecHitTools::getLayer(), DDHCalEndcapAlgo::getLayers(), GroupedCkfTrajectoryBuilder::groupedIntermediaryClean(), HCalEndcapAlgo::HCalEndcapAlgo(), CombinedHitPairGenerator::hitPairs(), CombinedHitQuadrupletGeneratorForPhotonConversion::hitPairs(), CombinedHitPairGeneratorForPhotonConversion::hitPairs(), CombinedMultiHitGenerator::hitSets(), CombinedHitTripletGenerator::hitTriplets(), DTSimHitMatcher::hitWiresInDTSuperLayerId(), muon::isSoftMuon(), HGCalGeomParameters::loadGeometryHexagon(), HGCalGeomParameters::loadGeometryHexagon8(), HGCalGeomParameters::loadGeometryHexagonModule(), mkfit::StdSeq::loadHitsAndBeamSpot(), fastsim::LayerNavigator::moveParticleToNextLayer(), MSLayersKeeperX0AtEta::MSLayersKeeperX0AtEta(), MSLayersKeeperX0Averaged::MSLayersKeeperX0Averaged(), GEMDigiMatcher::nLayersWithClustersInSuperChamber(), GEMDigiMatcher::nLayersWithDigisInSuperChamber(), GEMDigiMatcher::nLayersWithPadsInSuperChamber(), GEMRecHitMatcher::nLayersWithRecHitsInSuperChamber(), SeedFinderSelector::pass(), HGCalShowerShape::percentileLayer(), SeedingLayerSetsHits::print(), MultiHitFromChi2EDProducer::produce(), TSGForOIDNN::produce(), MuonSimHitProducer::produce(), hitTripletEDProducerT::Impl< T_HitTripletGenerator, T_SeedingHitSets, T_IntermediateHitTriplets >::produce(), trklet::TrackDerTable::readPatternFile(), GenericTripletGenerator::run(), GenericPairGenerator::run(), BeamHaloPairGenerator::run(), hgcal::RecHitTools::setGeometry(), AlignmentParameterSelector::setSpecials(), SiPixelDetSummary::SiPixelDetSummary(), SiStripDetSummary::SiStripDetSummary(), trklet::FitTrack::trackFitChisq(), SimpleCosmicBONSeeder::triplets(), TrackExtenderWithMTDT< TrackCollection >::tryBTLLayers(), TrackExtenderWithMTDT< TrackCollection >::tryETLLayers(), ValidateGeometry::validateCSCLayerGeometry(), ValidateGeometry::validateDTLayerGeometry(), and trklet::DTCLinkMemory::writeStubs().

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 =
18  std::find_if(thirds.begin(), thirds.end(), [&](const Layer& l) { return l.index() == set[2].index(); });
19  if (found == thirds.end())
20  thirds.push_back(set[2]);
21  added = true;
22  break;
23  }
24  }
25  if (!added) {
26  LayerSetAndLayers lpl = std::make_pair(set, std::vector<Layer>(1, set[2]));
27  result.push_back(lpl);
28  }
29  }
30  return result;
31  }
unsigned short numberOfLayersInSet() const
Get number of layers in each SeedingLayerSets.
SeedingLayerSetsHits::SeedingLayerSet LayerSet
Definition: LayerTriplets.h:15
tuple result
Definition: mps_fire.py:311
SeedingLayerSetsHits::SeedingLayer Layer
Definition: LayerTriplets.h:14
std::pair< LayerSet, std::vector< Layer > > LayerSetAndLayers
Definition: LayerTriplets.h:16