CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
TrackerGeometry Class Referencefinal

#include <TrackerGeometry.h>

Inheritance diagram for TrackerGeometry:
TrackingGeometry

Public Types

enum  ModuleType {
  ModuleType::UNKNOWN, ModuleType::PXB, ModuleType::PXF, ModuleType::IB1,
  ModuleType::IB2, ModuleType::OB1, ModuleType::OB2, ModuleType::W1A,
  ModuleType::W2A, ModuleType::W3A, ModuleType::W1B, ModuleType::W2B,
  ModuleType::W3B, ModuleType::W4, ModuleType::W5, ModuleType::W6,
  ModuleType::W7, ModuleType::Ph1PXB, ModuleType::Ph1PXF, ModuleType::Ph2PXB,
  ModuleType::Ph2PXF, ModuleType::Ph2PXB3D, ModuleType::Ph2PXF3D, ModuleType::Ph2PSP,
  ModuleType::Ph2PSS, ModuleType::Ph2SS
}
 
typedef
GeomDetEnumerators::SubDetector 
SubDetector
 
- Public Types inherited from TrackingGeometry
using DetContainer = std::vector< const GeomDet * >
 
using DetIdContainer = std::vector< DetId >
 
using DetTypeContainer = std::vector< const GeomDetType * >
 
using mapIdToDet = std::unordered_map< unsigned int, const GeomDet * >
 
using mapIdToDetUnit = std::unordered_map< unsigned int, const GeomDet * >
 

Public Member Functions

const DetIdContainerdetIds () const override
 Returm a vector of all GeomDet DetIds (including those of GeomDetUnits) More...
 
const DetContainerdets () const override
 Returm a vector of all GeomDet (including all GeomDetUnits) More...
 
const DetContainerdetsPXB () const
 
const DetContainerdetsPXF () const
 
const DetContainerdetsTEC () const
 
const DetContainerdetsTIB () const
 
const DetContainerdetsTID () const
 
const DetContainerdetsTOB () const
 
const DetTypeContainerdetTypes () const override
 Return a vector of all det types. More...
 
const DetIdContainerdetUnitIds () const override
 Returm a vector of all GeomDetUnit DetIds. More...
 
const DetContainerdetUnits () const override
 Returm a vector of all GeomDet. More...
 
unsigned int endsetDU (SubDetector sid) const
 
void fillTestMap (const GeometricDet *gd)
 
const
GeomDetEnumerators::SubDetector 
geomDetSubDetector (int subdet) const
 
float getDetectorThickness (DetId) const
 
ModuleType getDetectorType (DetId) const
 
const TrackerGeomDetidToDet (DetId) const override
 
const TrackerGeomDetidToDetUnit (DetId) const override
 Return the pointer to the GeomDetUnit corresponding to a given DetId. More...
 
bool isThere (GeomDetEnumerators::SubDetector subdet) const
 
ModuleType moduleType (const std::string &name) const
 
unsigned int numberOfLayers (int subdet) const
 
unsigned int offsetDU (SubDetector sid) const
 
void setEndsetDU (SubDetector sid)
 
void setOffsetDU (SubDetector sid)
 
GeometricDet const * trackerDet () const
 
 ~TrackerGeometry () override
 
- Public Member Functions inherited from TrackingGeometry
virtual ~TrackingGeometry ()
 Destructor. More...
 

Private Member Functions

void addDet (GeomDet const *p)
 
void addDetId (DetId p)
 
void addDetUnit (GeomDet const *p)
 
void addDetUnitId (DetId p)
 
void addType (GeomDetType const *p)
 
void finalize ()
 
 TrackerGeometry (GeometricDet const *gd=nullptr)
 

Private Attributes

DetIdContainer theDetIds
 
DetContainer theDets
 
DetTypeContainer theDetTypes
 
std::vector< std::tuple< DetId,
TrackerGeometry::ModuleType,
float > > 
theDetTypetList
 
DetIdContainer theDetUnitIds
 
DetContainer theDetUnits
 
unsigned int theEndsetDU [6]
 
mapIdToDet theMap
 
mapIdToDetUnit theMapUnit
 
unsigned int theNumberOfLayers [6]
 
unsigned int theOffsetDU [6]
 
DetContainer thePXBDets
 
DetContainer thePXFDets
 
GeomDetEnumerators::SubDetector theSubDetTypeMap [6]
 
DetContainer theTECDets
 
DetContainer theTIBDets
 
DetContainer theTIDDets
 
DetContainer theTOBDets
 
GeometricDet const * theTrackerDet
 

Friends

class GeometryAligner
 Aligner has access to map. More...
 
class TrackerGeomBuilderFromGeometricDet
 

Detailed Description

A specific Tracker Builder which builds a Tracker from a list of DetUnits. Pattern recognition is used to discover layers, rings etc.

Definition at line 14 of file TrackerGeometry.h.

Member Typedef Documentation

Definition at line 27 of file TrackerGeometry.h.

Member Enumeration Documentation

Enumerator
UNKNOWN 
PXB 
PXF 
IB1 
IB2 
OB1 
OB2 
W1A 
W2A 
W3A 
W1B 
W2B 
W3B 
W4 
W5 
W6 
W7 
Ph1PXB 
Ph1PXF 
Ph2PXB 
Ph2PXF 
Ph2PXB3D 
Ph2PXF3D 
Ph2PSP 
Ph2PSS 
Ph2SS 

Definition at line 29 of file TrackerGeometry.h.

Constructor & Destructor Documentation

TrackerGeometry::TrackerGeometry ( GeometricDet const *  gd = nullptr)
explicitprivate

Definition at line 58 of file TrackerGeometry.cc.

References cms::cuda::assert(), GeometricDet::components(), GeometricDet::deepComponents(), fillTestMap(), geomDetSubDetector(), mps_fire::i, GeomDetEnumerators::invalidDet, LogDebug, LogTrace, numberOfLayers(), theDetTypetList, theNumberOfLayers, and theSubDetTypeMap.

58  : theTrackerDet(gd) {
59  for (unsigned int i = 0; i < 6; ++i) {
61  theNumberOfLayers[i] = 0;
62  }
63  GeometricDet::ConstGeometricDetContainer subdetgd = gd->components();
64 
65  LogDebug("BuildingSubDetTypeMap") << "GeometriDet and GeomDetEnumerators enumerator values of the subdetectors";
66  for (unsigned int i = 0; i < subdetgd.size(); ++i) {
67  assert(subdetgd[i]->geographicalId().subdetId() > 0 && subdetgd[i]->geographicalId().subdetId() < 7);
68  theSubDetTypeMap[subdetgd[i]->geographicalId().subdetId() - 1] = geometricDetToGeomDet(subdetgd[i]->type());
69  theNumberOfLayers[subdetgd[i]->geographicalId().subdetId() - 1] = subdetgd[i]->components().size();
70  LogTrace("BuildingSubDetTypeMap") << "subdet " << i << " Geometric Det type " << subdetgd[i]->type()
71  << " Geom Det type "
72  << theSubDetTypeMap[subdetgd[i]->geographicalId().subdetId() - 1] << " detid "
73  << subdetgd[i]->geographicalId() << " subdetid "
74  << subdetgd[i]->geographicalId().subdetId() << " number of layers "
75  << subdetgd[i]->components().size();
76  }
77  LogDebug("SubDetTypeMapContent") << "Content of theSubDetTypeMap";
78  for (unsigned int i = 1; i < 7; ++i) {
79  LogTrace("SubDetTypeMapContent") << " detid subdet " << i << " Geom Det type " << geomDetSubDetector(i);
80  }
81  LogDebug("NumberOfLayers") << "Content of theNumberOfLayers";
82  for (unsigned int i = 1; i < 7; ++i) {
83  LogTrace("NumberOfLayers") << " detid subdet " << i << " number of layers " << numberOfLayers(i);
84  }
85  std::vector<const GeometricDet*> deepcomp;
86  gd->deepComponents(deepcomp);
87 
88  sort(deepcomp.begin(), deepcomp.end(), DetIdComparator());
89 
90  LogDebug("ThicknessAndType") << " Total Number of Detectors " << deepcomp.size();
91  LogDebug("ThicknessAndType") << "Dump of sensors names and bounds";
92  for (auto det : deepcomp) {
93  fillTestMap(det);
94  LogDebug("ThicknessAndType") << det->geographicalId() << " " << det->name() << " " << det->bounds()->thickness();
95  }
96  LogDebug("DetTypeList") << " Content of DetTypetList : size " << theDetTypetList.size();
97  for (const auto& iVal : theDetTypetList) {
98  LogDebug("DetTypeList") << " DetId " << std::get<0>(iVal) << " Type "
99  << static_cast<std::underlying_type<TrackerGeometry::ModuleType>::type>(std::get<1>(iVal))
100  << " Thickness " << std::get<2>(iVal);
101  }
102 }
const GeomDetEnumerators::SubDetector geomDetSubDetector(int subdet) const
unsigned int theNumberOfLayers[6]
void fillTestMap(const GeometricDet *gd)
assert(be >=bs)
GeomDetEnumerators::SubDetector theSubDetTypeMap[6]
#define LogTrace(id)
unsigned int numberOfLayers(int subdet) const
std::vector< std::tuple< DetId, TrackerGeometry::ModuleType, float > > theDetTypetList
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:34
GeometricDet const * theTrackerDet
#define LogDebug(id)
TrackerGeometry::~TrackerGeometry ( )
override

Definition at line 104 of file TrackerGeometry.cc.

References ztail::d, theDets, and theDetTypes.

104  {
105  for (auto d : theDets)
106  delete const_cast<GeomDet*>(d);
107  for (auto d : theDetTypes)
108  delete const_cast<GeomDetType*>(d);
109 }
DetContainer theDets
tuple d
Definition: ztail.py:151
DetTypeContainer theDetTypes

Member Function Documentation

void TrackerGeometry::addDet ( GeomDet const *  p)
private

Definition at line 139 of file TrackerGeometry.cc.

References GeomDet::geographicalId(), gpuClustering::id, AlCaHLTBitMon_ParallelJobs::p, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, DetId::rawId(), StripSubdetector::TEC, theDets, theMap, thePXBDets, thePXFDets, theTECDets, theTIBDets, theTIDDets, theTOBDets, StripSubdetector::TIB, StripSubdetector::TID, and StripSubdetector::TOB.

Referenced by TrackerGeomBuilderFromGeometricDet::buildGeomDet().

139  {
140  // set index
141  const_cast<GeomDet*>(p)->setGdetIndex(theDets.size());
142  theDets.emplace_back(p); // add to vector
143  theMap.insert(std::make_pair(p->geographicalId().rawId(), p));
144  DetId id(p->geographicalId());
145  switch (id.subdetId()) {
147  thePXBDets.emplace_back(p);
148  break;
150  thePXFDets.emplace_back(p);
151  break;
153  theTIBDets.emplace_back(p);
154  break;
156  theTIDDets.emplace_back(p);
157  break;
159  theTOBDets.emplace_back(p);
160  break;
162  theTECDets.emplace_back(p);
163  break;
164  default:
165  edm::LogError("TrackerGeometry") << "ERROR - I was expecting a Tracker Subdetector, I got a " << id.subdetId();
166  }
167 }
static constexpr auto TEC
uint16_t *__restrict__ id
Log< level::Error, false > LogError
DetContainer theTECDets
DetContainer theDets
static constexpr auto TOB
DetContainer theTIDDets
Definition: DetId.h:17
static constexpr auto TIB
DetContainer thePXBDets
DetContainer thePXFDets
DetContainer theTIBDets
DetContainer theTOBDets
static constexpr auto TID
void TrackerGeometry::addDetId ( DetId  p)
private

Definition at line 169 of file TrackerGeometry.cc.

References theDetIds.

Referenced by TrackerGeomBuilderFromGeometricDet::buildGeomDet().

169 { theDetIds.emplace_back(p); }
DetIdContainer theDetIds
void TrackerGeometry::addDetUnit ( GeomDet const *  p)
private

Definition at line 130 of file TrackerGeometry.cc.

References GeomDet::geographicalId(), AlCaHLTBitMon_ParallelJobs::p, DetId::rawId(), theDetUnits, and theMapUnit.

Referenced by TrackerGeomBuilderFromGeometricDet::buildPixel(), and TrackerGeomBuilderFromGeometricDet::buildSilicon().

130  {
131  // set index
132  const_cast<GeomDet*>(p)->setIndex(theDetUnits.size());
133  theDetUnits.emplace_back(p); // add to vector
134  theMapUnit.insert(std::make_pair(p->geographicalId().rawId(), p));
135 }
mapIdToDetUnit theMapUnit
DetContainer theDetUnits
void TrackerGeometry::addDetUnitId ( DetId  p)
private

Definition at line 137 of file TrackerGeometry.cc.

References theDetUnitIds.

Referenced by TrackerGeomBuilderFromGeometricDet::buildPixel(), and TrackerGeomBuilderFromGeometricDet::buildSilicon().

137 { theDetUnitIds.emplace_back(p); }
DetIdContainer theDetUnitIds
void TrackerGeometry::addType ( GeomDetType const *  p)
private

Definition at line 126 of file TrackerGeometry.cc.

References theDetTypes.

Referenced by TrackerGeomBuilderFromGeometricDet::buildPixel(), and TrackerGeomBuilderFromGeometricDet::buildSilicon().

126  {
127  theDetTypes.emplace_back(p); // add to vector
128 }
DetTypeContainer theDetTypes
const DetIdContainer& TrackerGeometry::detIds ( ) const
inlineoverridevirtual
const DetContainer& TrackerGeometry::dets ( ) const
inlineoverridevirtual
const TrackerGeometry::DetContainer & TrackerGeometry::detsPXB ( ) const
const TrackerGeometry::DetContainer & TrackerGeometry::detsPXF ( ) const
const TrackerGeometry::DetContainer & TrackerGeometry::detsTEC ( ) const
const TrackerGeometry::DetContainer & TrackerGeometry::detsTIB ( ) const
const TrackerGeometry::DetContainer & TrackerGeometry::detsTID ( ) const
const TrackerGeometry::DetContainer & TrackerGeometry::detsTOB ( ) const
const DetTypeContainer& TrackerGeometry::detTypes ( ) const
inlineoverridevirtual

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 60 of file TrackerGeometry.h.

References theDetTypes.

60 { return theDetTypes; }
DetTypeContainer theDetTypes
const DetIdContainer& TrackerGeometry::detUnitIds ( ) const
inlineoverridevirtual

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 63 of file TrackerGeometry.h.

References theDetUnitIds.

Referenced by TrackerTreeGenerator::analyze(), TrackerGeomBuilderFromGeometricDet::buildGeomDet(), TrackerOfflineValidation::checkBookHists(), and TkAlCaRecoMonitor::fillRawIdMap().

63 { return theDetUnitIds; }
DetIdContainer theDetUnitIds
const DetContainer& TrackerGeometry::detUnits ( ) const
inlineoverridevirtual

Returm a vector of all GeomDet.

Implements TrackingGeometry.

Definition at line 61 of file TrackerGeometry.h.

References theDetUnits.

Referenced by tmtt::StubKiller::addDeadLayerModulesToDeadModuleList(), cms::Phase2TrackerDigitizer::addOuterTrackerCollection(), cms::Phase2TrackerDigitizer::addPixelCollection(), cms::SiPixelPerformanceSummaryBuilder::analyze(), SiPixelLorentzAngleDB::analyze(), SiPixelVCalDB::analyze(), SiPixelDynamicInefficiencyReader::analyze(), SiPixelVCalReader::analyze(), TrackerGeometryIntoNtuples::analyze(), NearbyPixelClustersAnalyzer::beginRun(), Phase2TrackerMonitorDigi::bookHistograms(), Phase2TrackerValidateDigi::bookHistograms(), Phase2ITMonitorCluster::bookHistograms(), Phase2ITValidateRecHitBase::bookHistograms(), Phase2OTMonitorCluster::bookHistograms(), Phase2OTValidateRecHitBase::bookHistograms(), Phase2ITMonitorRecHit::bookHistograms(), Phase2ITValidateCluster::bookHistograms(), Phase2OTMonitorRecHit::bookHistograms(), Phase2OTValidateCluster::bookHistograms(), TrackerGeomBuilderFromGeometricDet::buildGeomDet(), tmtt::StubKiller::chooseModulesToKill(), SiStripMonitorTrack::dqmBeginRun(), PixelCPEClusterRepair::fill2DTemplIDs(), PixelCPEBase::fillDetParams(), Phase2StripCPE::fillParam(), StripCPE::fillParams(), ClusterShapeHitFilter::fillStripData(), cms::SiPixelDigitizer::finalizeEvent(), SiStripDigitizer::finalizeEvent(), SiPixelDigitizerAlgorithm::PixelEfficiencies::init_from_db(), cms::SiPixelDigitizer::initializeEvent(), PreMixingSiStripWorker::initializeEvent(), cms::Phase2TrackerDigitizer::initializeEvent(), SiStripDigitizer::initializeEvent(), DeDxTools::makeCalibrationMap(), PreMixingSiStripWorker::put(), setEndsetDU(), setOffsetDU(), and SiPixelGainCalibrationForHLTGPU::SiPixelGainCalibrationForHLTGPU().

61 { return theDetUnits; }
DetContainer theDetUnits
unsigned int TrackerGeometry::endsetDU ( SubDetector  sid) const
inline

Definition at line 73 of file TrackerGeometry.h.

References theEndsetDU.

73 { return theEndsetDU[sid]; }
unsigned int theEndsetDU[6]
void TrackerGeometry::fillTestMap ( const GeometricDet gd)

Definition at line 227 of file TrackerGeometry.cc.

References GeometricDet::bounds(), GeometricDet::geographicalId(), moduleType(), mergeVDriftHistosByStation::name, GeometricDet::name(), AlCaHLTBitMon_QueryRunRegistry::string, submitPVValidationJobs::t, groupFilesInBlocks::temp, theDetTypetList, and TrackerMaterial_cfi::thickness.

Referenced by TrackerGeometry().

227  {
228  const std::string& temp = gd->name();
229  std::string name = temp.substr(temp.find(':') + 1);
230  DetId detid = gd->geographicalId();
231  float thickness = gd->bounds()->thickness();
232  std::string nameTag;
234  if (theDetTypetList.empty()) {
235  theDetTypetList.emplace_back(detid, mtype, thickness);
236  } else {
237  auto& t = (*(theDetTypetList.end() - 1));
238  if (std::get<1>(t) != mtype)
239  theDetTypetList.emplace_back(detid, mtype, thickness);
240  else {
241  if (detid > std::get<0>(t))
242  std::get<0>(t) = detid;
243  }
244  }
245 }
std::unique_ptr< Bounds > bounds() const
std::vector< std::tuple< DetId, TrackerGeometry::ModuleType, float > > theDetTypetList
ModuleType moduleType(const std::string &name) const
const DetId & geographicalId() const
Definition: GeometricDet.h:96
Definition: DetId.h:17
const std::string & name() const
Definition: GeometricDet.h:90
void TrackerGeometry::finalize ( void  )
private

Definition at line 111 of file TrackerGeometry.cc.

References theDetIds, theDets, theDetTypes, theDetUnitIds, theDetUnits, thePXBDets, thePXFDets, theTECDets, theTIBDets, theTIDDets, and theTOBDets.

111  {
112  theDetTypes.shrink_to_fit(); // owns the DetTypes
113  theDetUnits.shrink_to_fit(); // they're all also into 'theDets', so we assume 'theDets' owns them
114  theDets.shrink_to_fit(); // owns *ONLY* the GeomDet * corresponding to GluedDets.
115  theDetUnitIds.shrink_to_fit();
116  theDetIds.shrink_to_fit();
117 
118  thePXBDets.shrink_to_fit(); // not owned: they're also in 'theDets'
119  thePXFDets.shrink_to_fit(); // not owned: they're also in 'theDets'
120  theTIBDets.shrink_to_fit(); // not owned: they're also in 'theDets'
121  theTIDDets.shrink_to_fit(); // not owned: they're also in 'theDets'
122  theTOBDets.shrink_to_fit(); // not owned: they're also in 'theDets'
123  theTECDets.shrink_to_fit(); // not owned: they're also in 'theDets'
124 }
DetIdContainer theDetIds
DetIdContainer theDetUnitIds
DetContainer theTECDets
DetContainer theDets
DetTypeContainer theDetTypes
DetContainer theTIDDets
DetContainer thePXBDets
DetContainer thePXFDets
DetContainer theTIBDets
DetContainer theTOBDets
DetContainer theDetUnits
const GeomDetEnumerators::SubDetector TrackerGeometry::geomDetSubDetector ( int  subdet) const

Definition at line 203 of file TrackerGeometry.cc.

References Exception, and theSubDetTypeMap.

Referenced by SiPixelGenErrorDBObjectUploader::analyze(), SiPixel2DTemplateDBObjectUploader::analyze(), SiPixelTemplateDBObjectUploader::analyze(), MeasurementTrackerImpl::initialize(), isThere(), SeedClusterRemover::process(), HLTTrackClusterRemoverNew::process(), HITrackClusterRemover::process(), and TrackerGeometry().

203  {
204  if (subdet >= 1 && subdet <= 6) {
205  return theSubDetTypeMap[subdet - 1];
206  } else {
207  throw cms::Exception("WrongTrackerSubDet") << "Subdetector " << subdet;
208  }
209 }
GeomDetEnumerators::SubDetector theSubDetTypeMap[6]
float TrackerGeometry::getDetectorThickness ( DetId  detid) const

Definition at line 256 of file TrackerGeometry.cc.

References DetId::rawId(), and theDetTypetList.

256  {
257  for (const auto& iVal : theDetTypetList) {
258  DetId detid_max = std::get<0>(iVal);
259  if (detid.rawId() <= detid_max.rawId())
260  return std::get<2>(iVal);
261  }
262  return -1.0;
263 }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::vector< std::tuple< DetId, TrackerGeometry::ModuleType, float > > theDetTypetList
Definition: DetId.h:17
TrackerGeometry::ModuleType TrackerGeometry::getDetectorType ( DetId  detid) const
const TrackerGeomDet * TrackerGeometry::idToDet ( DetId  ) const
overridevirtual

Return the pointer to the GeomDet corresponding to a given DetId (valid also for GeomDetUnits)

Implements TrackingGeometry.

Definition at line 193 of file TrackerGeometry.cc.

References Exception, AlCaHLTBitMon_ParallelJobs::p, DetId::rawId(), DetId::subdetId(), and theMap.

Referenced by CosmicTrajectoryBuilder::AddHit(), CRackTrajectoryBuilder::AddHit(), FWRecoGeometryESProducer::addTECGeometry(), FWRecoGeometryESProducer::addTIBGeometry(), FWRecoGeometryESProducer::addTIDGeometry(), FWRecoGeometryESProducer::addTOBGeometry(), SiPixelRecHitsValid::analyze(), Phase2ITMonitorCluster::analyze(), SiStripLAProfileBooker::analyze(), SiPixelBadModuleReader::analyze(), OuterTrackerMonitorTTCluster::analyze(), SiPixelTrackResidualSource::analyze(), OuterTrackerMonitorTTStub::analyze(), PixelLumiDQM::analyze(), SiPixelTrackingRecHitsValid::analyze(), TrackerTreeGenerator::analyze(), analyzer::SiPixelLorentzAngle::analyze(), L1TrackObjectNtupleMaker::analyze(), SiPixelLorentzAnglePCLWorker::analyze(), SiStripRecHitsValid::analyze(), TrackerDpgAnalysis::analyze(), SiStripTrackingRecHitsValid::analyze(), GeneralPurposeTrackAnalyzer::analyze(), DMRChecker::analyze(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::AnalyzeOccupancy(), PixelInactiveAreaFinder::badAdjecentDetsEndcap(), TrackerDpgAnalysis::beginRun(), SiPixelErrorsDigisToCalibDigis::bookDQMHistoPlaquetteSummary2D(), SiPixelOfflineCalibAnalysisBase::bookDQMHistoPlaquetteSummary2D(), Phase2EndcapRingBuilder::build(), Phase2OTBarrelRodBuilder::build(), PixelRodBuilder::build(), TIBRingBuilder::build(), TOBRodBuilder::build(), TECWedgeBuilder::build(), TIDRingBuilder::build(), PixelBladeBuilder< T >::build(), SeedFromConsecutiveHitsCreator::buildSeed(), SeedFromGenericPairOrTriplet::buildSeed(), SiStripFineDelayHit::closestCluster(), SeedFromNuclearInteraction::construct(), PixelInactiveAreaFinder::detInfo(), LaserAlignment::endRunProduce(), SiStripBadAPVAlgorithmFromClusterOccupancy::extractBadAPVs(), SiStripHotStripAlgorithmFromClusterOccupancy::extractBadStrips(), SiPixelClusterModule::fill(), SiPixelPhase1Analyzer::FillBins(), TkAlCaRecoMonitor::fillHitmaps(), Phase2TrackerMonitorDigi::fillITPixelDigiHistos(), Phase2TrackerMonitorDigi::fillOTDigiHistos(), QcdLowPtDQM::fillPixels(), Phase2TrackerValidateDigi::fillSimHitInfo(), TrackerOfflineValidationSummary::fillTree(), GlobalRecHitsAnalyzer::fillTrk(), GlobalRecHitsProducer::fillTrk(), MuonCkfTrajectoryBuilder::findCompatibleMeasurements(), BaseCkfTrajectoryBuilder::findStateAndLayers(), SiStripFineDelayTLA::findtrackangle(), for(), SiPixelQuality::getBadRocPositions(), StubPtConsistency::getConsistency(), PixelTripletLowPtGenerator::getGlobalPosition(), ClusterShapeTrackFilter::getGlobalPoss(), PixelInactiveAreaFinder::getPhiSpanBarrel(), PixelInactiveAreaFinder::getRSpan(), PixelInactiveAreaFinder::getZSpan(), NuclearTester::HitPositions(), SiStripMonitorTrack::hitStudy(), HLTPixelClusterShapeFilter::hltFilter(), SeedFromProtoTrack::init(), SiPixelDigitizerAlgorithm::PixelEfficiencies::init_from_db(), SiStripCorrelateBadStripAndNoise::iterateOnBadStrips(), SiStripRecHitConverterAlgorithm::match(), SeedMatcher::matchRecHitCombinations(), TrackerDpgAnalysis::onTrackAngles(), CompareDetY_plus::operator()(), CompareHitY::operator()(), TrackMerger::MomentumSort::operator()(), CompareHitY_plus::operator()(), CompareDetY_minus::operator()(), SeedFromNuclearInteraction::outerHitPosition(), DeDxEstimatorProducer::processHit(), PixelVertexProducerClusters::produce(), HIPixelClusterVtxProducer::produce(), PixelClusterSelectorTopBottom::produce(), StripClusterSelectorTopBottom::produce(), ClusterCompatibilityProducer::produce(), MuonHLTSeedMVAClassifier::produce(), ConvBremSeedProducer::produce(), TrackerToMuonPropagator::produce(), PixelClusterTagInfoProducer::produce(), SiStripMonitorTrack::RecHitInfo(), pTFrom2Stubs::rInvFrom2(), VectorHitBuilderAlgorithm::run(), KFBasedPixelFitter::run(), TrackInfoProducerAlgorithm::run(), CRackTrajectoryBuilder::run(), SeedFromGenericPairOrTriplet::seedFromPair(), SeedFromGenericPairOrTriplet::seedFromTriplet(), BaseCkfTrajectoryBuilder::seedMeasurements(), SimpleCosmicBONSeeder::seeds(), SeedFromNuclearInteraction::setMeasurements(), TrackerOfflineValidation::setUpTreeMembers(), PixelTemplateSmearerBase::smearHit(), CRackTrajectoryBuilder::SortHits(), l1tVertexFinder::Stub::Stub(), LaserAlignment::testRoutine(), FastTSGFromPropagation::trackerSeeds(), LaserDQM::trackerStatistics(), OutInConversionTrackFinder::tracks(), TrajectoryAtInvalidHit::TrajectoryAtInvalidHit(), SiStripMonitorTrack::trajectoryStudy(), and MeasurementTrackerEventProducer::updatePixels().

193  {
194  mapIdToDet::const_iterator p = theMap.find(s.rawId());
195  if (p != theMap.end()) {
196  return static_cast<const TrackerGeomDet*>(p->second);
197  } else {
198  throw cms::Exception("WrongTrackerSubDet")
199  << "Invalid DetID: no GeomDetUnit associated with raw ID " << s.rawId() << " of subdet ID " << s.subdetId();
200  }
201 }
const TrackerGeomDet * TrackerGeometry::idToDetUnit ( DetId  ) const
overridevirtual

Return the pointer to the GeomDetUnit corresponding to a given DetId.

Implements TrackingGeometry.

Definition at line 183 of file TrackerGeometry.cc.

References Exception, AlCaHLTBitMon_ParallelJobs::p, DetId::rawId(), DetId::subdetId(), and theMapUnit.

Referenced by FWRecoGeometryESProducer::addPixelBarrelGeometry(), FWRecoGeometryESProducer::addPixelForwardGeometry(), SiStripCalibLorentzAngle::algoBeginJob(), Phase2ITMonitorCluster::analyze(), Phase2OTMonitorCluster::analyze(), SiPixelBadModuleReader::analyze(), cms::SiPixelCondObjOfflineReader::analyze(), cms::SiPixelCondObjReader::analyze(), cms::SiPixelCondObjForHLTReader::analyze(), cms::SiPixelCondObjAllPayloadsReader::analyze(), SiPixelHitEfficiencySource::analyze(), Phase2OTMonitorRecHit::analyze(), L1TrackObjectNtupleMaker::analyze(), SiStripRecHitsValid::analyze(), TrackerDpgAnalysis::analyze(), SiStripTrackingRecHitsValid::analyze(), SiPixelCoordinates::channel(), SiStripMonitorTrack::clusterInfos(), FineDelayHistosUsingDb::computeDelays(), CkfDebugger::det(), SiStripFineDelayHit::detId(), Phase2ITMonitorRecHit::fillITHistos(), Phase2ITValidateTrackingRecHit::fillITHistos(), Phase2ITValidateCluster::fillITHistos(), Phase2TrackerMonitorDigi::fillITPixelDigiHistos(), Phase2TrackerMonitorDigi::fillOTDigiHistos(), Phase2OTValidateCluster::fillOTHistos(), Phase2OTValidateRecHitBase::fillOTRecHitHistos(), Phase2ITValidateRecHitBase::fillRechitHistos(), Phase2TrackerValidateDigi::fillSimHitInfo(), TrackingNtuple::fillSimHits(), GlobalHitsProdHist::fillTrk(), GlobalHitsAnalyzer::fillTrk(), GlobalHitsProducer::fillTrk(), NearbyPixelClustersProducer::findAllNearbyClusters(), NearbyPixelClustersAnalyzer::findClosestCluster(), StubPtConsistency::getConsistency(), tmtt::StubKiller::killStub(), GeometryInterface::loadFromTopology(), DeDxTools::makeCalibrationMap(), SiStripGainCosmicCalculator::moduleThickness(), SiStripGainCosmicCalculator::moduleWidth(), CkfDebugger::nextCorrectHits(), CkfDebugger::position(), VectorHitBuilderAlgorithmBase::printClusters(), CkfDebugger::printSimHits(), TrackingRecHitNoSmearingPlugin::process(), TrackingRecHitStripGSPlugin::process(), PixelTemplateSmearerBase::process(), StandaloneTrackMonitor::processClusters(), StandaloneTrackMonitor::processHit(), PixelVertexProducerClusters::produce(), Phase2TrackerRecHits::produce(), Phase2TrackerClusterizer::produce(), SiPixelRecHitFromCUDA::produce(), SiPixelRecHitSoAFromLegacy::produce(), L1FPGATrackProducer::produce(), pTFrom2Stubs::rInvFrom2(), SiPixelCoordinates::roc(), SiStripRecHitConverterAlgorithm::run(), cms::SiPixelRecHitConverter::run(), trackerDTC::SensorModule::SensorModule(), l1tVertexFinder::Stub::setModuleInfo(), SiPixelROCsStatusAndMappingWrapper::SiPixelROCsStatusAndMappingWrapper(), trackerDTC::Setup::stubPos(), ShallowGainCalibration::thickness(), tmtt::TrackerModule::TrackerModule(), SiStripRecHitConverterAlgorithm::useModule(), SiPixelCoordinates::xcoord_on_module_(), and SiPixelCoordinates::ycoord_on_module_().

183  {
184  mapIdToDetUnit::const_iterator p = theMapUnit.find(s.rawId());
185  if (p != theMapUnit.end()) {
186  return static_cast<const TrackerGeomDet*>(p->second);
187  } else {
188  throw cms::Exception("WrongTrackerSubDet")
189  << "Invalid DetID: no GeomDetUnit associated with raw ID " << s.rawId() << " of subdet ID " << s.subdetId();
190  }
191 }
mapIdToDetUnit theMapUnit
bool TrackerGeometry::isThere ( GeomDetEnumerators::SubDetector  subdet) const
TrackerGeometry::ModuleType TrackerGeometry::moduleType ( const std::string &  name) const

Definition at line 265 of file TrackerGeometry.cc.

References IB1, IB2, OB1, OB2, Ph1PXB, Ph1PXF, Ph2PSP, Ph2PSS, Ph2PXB, Ph2PXB3D, Ph2PXF, Ph2PXF3D, Ph2SS, UNKNOWN, W1A, W1B, W2A, W2B, W3A, W3B, W4, W5, W6, and W7.

Referenced by fillTestMap().

265  {
266  // IT
267  if (name.find("Pixel") != std::string::npos) {
268  // Phase 1
269  if (name.find("BarrelActive") != std::string::npos)
270  return ModuleType::Ph1PXB;
271  else if (name.find("ForwardSensor") != std::string::npos)
272  return ModuleType::Ph1PXF;
273 
274  // Phase 2
275  // barrel
276  else if (name.find("BModule") != std::string::npos) {
277  if (name.find("InnerPixelActive") != std::string::npos) {
278  return ModuleType::Ph2PXB;
279  } else if (name.find("InnerPixel3DActive") != std::string::npos) {
280  return ModuleType::Ph2PXB3D;
281  }
282  }
283  // forward
284  else if (name.find("EModule") != std::string::npos) {
285  if (name.find("InnerPixelActive") != std::string::npos) {
286  return ModuleType::Ph2PXF;
287  } else if (name.find("InnerPixel3DActive") != std::string::npos) {
288  return ModuleType::Ph2PXF3D;
289  }
290  }
291  }
292 
293  // TIB
294  else if (name.find("TIB") != std::string::npos) {
295  if (name.find('0') != std::string::npos)
296  return ModuleType::IB1;
297  else
298  return ModuleType::IB2;
299  }
300 
301  // TOB
302  else if (name.find("TOB") != std::string::npos) {
303  if (name.find('0') != std::string::npos)
304  return ModuleType::OB1;
305  else
306  return ModuleType::OB2;
307  }
308 
309  // TID
310  else if (name.find("TID") != std::string::npos) {
311  if (name.find('0') != std::string::npos)
312  return ModuleType::W1A;
313  else if (name.find('1') != std::string::npos)
314  return ModuleType::W2A;
315  else if (name.find('2') != std::string::npos)
316  return ModuleType::W3A;
317  }
318 
319  // TEC
320  else if (name.find("TEC") != std::string::npos) {
321  if (name.find('0') != std::string::npos)
322  return ModuleType::W1B;
323  else if (name.find('1') != std::string::npos)
324  return ModuleType::W2B;
325  else if (name.find('2') != std::string::npos)
326  return ModuleType::W3B;
327  else if (name.find('3') != std::string::npos)
328  return ModuleType::W4;
329  else if (name.find('4') != std::string::npos)
330  return ModuleType::W5;
331  else if (name.find('5') != std::string::npos)
332  return ModuleType::W6;
333  else if (name.find('6') != std::string::npos)
334  return ModuleType::W7;
335  }
336 
337  // Phase 2 OT
338  if (name.find("BModule") != std::string::npos || name.find("EModule") != std::string::npos) {
339  if (name.find("PSMacroPixel") != std::string::npos)
340  return ModuleType::Ph2PSP;
341  else if (name.find("PSStrip") != std::string::npos)
342  return ModuleType::Ph2PSS;
343  else if (name.find("2S") != std::string::npos)
344  return ModuleType::Ph2SS;
345  }
346 
347  return ModuleType::UNKNOWN;
348 }
unsigned int TrackerGeometry::numberOfLayers ( int  subdet) const

Definition at line 211 of file TrackerGeometry.cc.

References Exception, and theNumberOfLayers.

Referenced by SiPixelLorentzAnglePCLHarvester::beginRun(), tadqm::TrackAnalyzer::bookHistosForEfficiencyFromHitPatter(), PixelTopologyMap::buildTopologyMaps(), SiPixelLorentzAnglePCLWorker::dqmBeginRun(), MkFitGeometry::MkFitGeometry(), TrackerGeometry(), and PixelInactiveAreaFinder::updatePixelDets().

211  {
212  if (subdet >= 1 && subdet <= 6) {
213  return theNumberOfLayers[subdet - 1];
214  } else {
215  throw cms::Exception("WrongTrackerSubDet") << "Subdetector " << subdet;
216  }
217 }
unsigned int theNumberOfLayers[6]
unsigned int TrackerGeometry::offsetDU ( SubDetector  sid) const
inline
void TrackerGeometry::setEndsetDU ( SubDetector  sid)
inline

Definition at line 76 of file TrackerGeometry.h.

References detUnits(), and theEndsetDU.

Referenced by TrackerGeomBuilderFromGeometricDet::buildPixel(), and TrackerGeomBuilderFromGeometricDet::buildSilicon().

76 { theEndsetDU[sid] = detUnits().size(); }
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
unsigned int theEndsetDU[6]
void TrackerGeometry::setOffsetDU ( SubDetector  sid)
inline

Definition at line 75 of file TrackerGeometry.h.

References detUnits(), and theOffsetDU.

Referenced by TrackerGeomBuilderFromGeometricDet::buildPixel(), and TrackerGeomBuilderFromGeometricDet::buildSilicon().

75 { theOffsetDU[sid] = detUnits().size(); }
unsigned int theOffsetDU[6]
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
GeometricDet const* TrackerGeometry::trackerDet ( ) const
inline

Definition at line 81 of file TrackerGeometry.h.

References theTrackerDet.

Referenced by TrackerRecoGeometryESProducer::produce(), and TrackerMTDRecoGeometryESProducer::produce().

81 { return theTrackerDet; }
GeometricDet const * theTrackerDet

Friends And Related Function Documentation

friend class GeometryAligner
friend

Aligner has access to map.

Definition at line 97 of file TrackerGeometry.h.

Definition at line 17 of file TrackerGeometry.h.

Member Data Documentation

DetIdContainer TrackerGeometry::theDetIds
private

Definition at line 105 of file TrackerGeometry.h.

Referenced by addDetId(), detIds(), and finalize().

DetContainer TrackerGeometry::theDets
private

Definition at line 103 of file TrackerGeometry.h.

Referenced by addDet(), dets(), finalize(), and ~TrackerGeometry().

DetTypeContainer TrackerGeometry::theDetTypes
private

Definition at line 99 of file TrackerGeometry.h.

Referenced by addType(), detTypes(), finalize(), and ~TrackerGeometry().

std::vector<std::tuple<DetId, TrackerGeometry::ModuleType, float> > TrackerGeometry::theDetTypetList
private
DetIdContainer TrackerGeometry::theDetUnitIds
private

Definition at line 104 of file TrackerGeometry.h.

Referenced by addDetUnitId(), detUnitIds(), and finalize().

DetContainer TrackerGeometry::theDetUnits
private

Definition at line 100 of file TrackerGeometry.h.

Referenced by addDetUnit(), detUnits(), and finalize().

unsigned int TrackerGeometry::theEndsetDU[6]
private

Definition at line 102 of file TrackerGeometry.h.

Referenced by endsetDU(), and setEndsetDU().

mapIdToDet TrackerGeometry::theMap
private

Definition at line 107 of file TrackerGeometry.h.

Referenced by addDet(), and idToDet().

mapIdToDetUnit TrackerGeometry::theMapUnit
private

Definition at line 106 of file TrackerGeometry.h.

Referenced by addDetUnit(), and idToDetUnit().

unsigned int TrackerGeometry::theNumberOfLayers[6]
private

Definition at line 117 of file TrackerGeometry.h.

Referenced by numberOfLayers(), and TrackerGeometry().

unsigned int TrackerGeometry::theOffsetDU[6]
private

Definition at line 101 of file TrackerGeometry.h.

Referenced by offsetDU(), and setOffsetDU().

DetContainer TrackerGeometry::thePXBDets
private

Definition at line 109 of file TrackerGeometry.h.

Referenced by addDet(), detsPXB(), and finalize().

DetContainer TrackerGeometry::thePXFDets
private

Definition at line 110 of file TrackerGeometry.h.

Referenced by addDet(), detsPXF(), and finalize().

GeomDetEnumerators::SubDetector TrackerGeometry::theSubDetTypeMap[6]
private

Definition at line 116 of file TrackerGeometry.h.

Referenced by geomDetSubDetector(), and TrackerGeometry().

DetContainer TrackerGeometry::theTECDets
private

Definition at line 114 of file TrackerGeometry.h.

Referenced by addDet(), detsTEC(), and finalize().

DetContainer TrackerGeometry::theTIBDets
private

Definition at line 111 of file TrackerGeometry.h.

Referenced by addDet(), detsTIB(), and finalize().

DetContainer TrackerGeometry::theTIDDets
private

Definition at line 112 of file TrackerGeometry.h.

Referenced by addDet(), detsTID(), and finalize().

DetContainer TrackerGeometry::theTOBDets
private

Definition at line 113 of file TrackerGeometry.h.

Referenced by addDet(), detsTOB(), and finalize().

GeometricDet const* TrackerGeometry::theTrackerDet
private

Definition at line 94 of file TrackerGeometry.h.

Referenced by trackerDet().