CMS 3D CMS Logo

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
 
TrackerGeometryoperator= (TrackerGeometry const &)=delete
 
TrackerGeometryoperator= (TrackerGeometry &&)=default
 
void setEndsetDU (SubDetector sid)
 
void setOffsetDU (SubDetector sid)
 
GeometricDet const * trackerDet () const
 
 TrackerGeometry (TrackerGeometry const &)=delete
 
 TrackerGeometry (TrackerGeometry &&)=default
 
 ~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

◆ SubDetector

Definition at line 27 of file TrackerGeometry.h.

Member Enumeration Documentation

◆ ModuleType

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() [1/3]

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(), jetUpdater_cfi::sort, 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 }
unsigned int numberOfLayers(int subdet) const
unsigned int theNumberOfLayers[6]
void fillTestMap(const GeometricDet *gd)
assert(be >=bs)
GeomDetEnumerators::SubDetector theSubDetTypeMap[6]
#define LogTrace(id)
std::vector< std::tuple< DetId, TrackerGeometry::ModuleType, float > > theDetTypetList
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:34
const GeomDetEnumerators::SubDetector geomDetSubDetector(int subdet) const
GeometricDet const * theTrackerDet
#define LogDebug(id)

◆ TrackerGeometry() [2/3]

TrackerGeometry::TrackerGeometry ( TrackerGeometry const &  )
delete

◆ TrackerGeometry() [3/3]

TrackerGeometry::TrackerGeometry ( TrackerGeometry &&  )
default

◆ ~TrackerGeometry()

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
DetTypeContainer theDetTypes
d
Definition: ztail.py:151

Member Function Documentation

◆ addDet()

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

Definition at line 139 of file TrackerGeometry.cc.

References l1ctLayer2EG_cff::id, AlCaHLTBitMon_ParallelJobs::p, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, StripSubdetector::TEC, theDets, theMap, thePXBDets, thePXFDets, theTECDets, theTIBDets, theTIDDets, theTOBDets, StripSubdetector::TIB, StripSubdetector::TID, and StripSubdetector::TOB.

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
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

◆ addDetId()

void TrackerGeometry::addDetId ( DetId  p)
private

Definition at line 169 of file TrackerGeometry.cc.

References AlCaHLTBitMon_ParallelJobs::p, and theDetIds.

169 { theDetIds.emplace_back(p); }
DetIdContainer theDetIds

◆ addDetUnit()

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

Definition at line 130 of file TrackerGeometry.cc.

References AlCaHLTBitMon_ParallelJobs::p, theDetUnits, and theMapUnit.

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

◆ addDetUnitId()

void TrackerGeometry::addDetUnitId ( DetId  p)
private

Definition at line 137 of file TrackerGeometry.cc.

References AlCaHLTBitMon_ParallelJobs::p, and theDetUnitIds.

137 { theDetUnitIds.emplace_back(p); }
DetIdContainer theDetUnitIds

◆ addType()

void TrackerGeometry::addType ( GeomDetType const *  p)
private

Definition at line 126 of file TrackerGeometry.cc.

References AlCaHLTBitMon_ParallelJobs::p, and theDetTypes.

126  {
127  theDetTypes.emplace_back(p); // add to vector
128 }
DetTypeContainer theDetTypes

◆ detIds()

const DetIdContainer& TrackerGeometry::detIds ( ) const
inlineoverridevirtual

◆ dets()

const DetContainer& TrackerGeometry::dets ( ) const
inlineoverridevirtual

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 70 of file TrackerGeometry.h.

References theDets.

Referenced by SiStripGainCosmicCalculator::algoBeginJob(), SiPixelRecHitsValid::analyze(), SiPixelHLTSource::analyze(), SiPixelClusterSource::analyze(), SiPixelTrackResidualSource::analyze(), cms::SiPixelCondObjOfflineReader::analyze(), cms::SiPixelCondObjReader::analyze(), cms::SiPixelCondObjAllPayloadsReader::analyze(), cms::SiPixelCondObjForHLTReader::analyze(), PixelLumiDQM::analyze(), SiPixelErrorEstimation::analyze(), tmtt::TMTrackProducer::beginRun(), PrimaryVertexValidation::beginRun(), SiPixelFrameReverter::buildStructure(), SiPixelClusterSource::buildStructure(), SiPixelDigiSource::buildStructure(), SiPixelRecHitSource::buildStructure(), SiStripGainsCalibTreeWorker::checkBookAPVColls(), SiStripApvGainInspector::checkBookAPVColls(), SiStripGainsPCLWorker::checkBookAPVColls(), MeasurementTrackerImpl::checkDets(), SiPixelGainCalibScaler::computeAndStorePalyoads(), SiPixelTrackResidualSource::dqmBeginRun(), SiPixelHitEfficiencySource::dqmBeginRun(), SiPixelStatusHarvester::dqmEndRun(), SiPixelGainCalibrationReadDQMFile::fillDatabase(), SiPixelGainCalibrationRejectNoisyAndDead::fillDatabase(), SiPixelTopoFinder::init(), PFCheckHitPattern::init(), l1tVertexFinder::InputData::InputData(), PixelHitMatcher::operator()(), TTClusterBuilder< T >::produce(), TTClusterAssociator< T >::produce(), TTStubAssociator< T >::produce(), SiPixelFedCablingMapBuilder::produce(), and TTStubBuilder< T >::produce().

70 { return theDets; }
DetContainer theDets

◆ detsPXB()

const TrackerGeometry::DetContainer & TrackerGeometry::detsPXB ( ) const

◆ detsPXF()

const TrackerGeometry::DetContainer & TrackerGeometry::detsPXF ( ) const

◆ detsTEC()

const TrackerGeometry::DetContainer & TrackerGeometry::detsTEC ( ) const

◆ detsTIB()

const TrackerGeometry::DetContainer & TrackerGeometry::detsTIB ( ) const

◆ detsTID()

const TrackerGeometry::DetContainer & TrackerGeometry::detsTID ( ) const

◆ detsTOB()

const TrackerGeometry::DetContainer & TrackerGeometry::detsTOB ( ) const

◆ detTypes()

const DetTypeContainer& TrackerGeometry::detTypes ( ) const
inlineoverridevirtual

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 68 of file TrackerGeometry.h.

References theDetTypes.

Referenced by SiPixelClusterSource::buildStructure(), SiPixelDigiSource::buildStructure(), and SiPixelRecHitSource::buildStructure().

68 { return theDetTypes; }
DetTypeContainer theDetTypes

◆ detUnitIds()

const DetIdContainer& TrackerGeometry::detUnitIds ( ) const
inlineoverridevirtual

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 71 of file TrackerGeometry.h.

References theDetUnitIds.

Referenced by TrackerTreeGenerator::analyze(), and TrackerOfflineValidation::checkBookHists().

71 { return theDetUnitIds; }
DetIdContainer theDetUnitIds

◆ detUnits()

const DetContainer& TrackerGeometry::detUnits ( ) const
inlineoverridevirtual

Returm a vector of all GeomDet.

Implements TrackingGeometry.

Definition at line 69 of file TrackerGeometry.h.

References theDetUnits.

Referenced by StubKiller::addDeadLayerModulesToDeadModuleList(), tmtt::StubKiller::addDeadLayerModulesToDeadModuleList(), cms::Phase2TrackerDigitizer::addOuterTrackerCollection(), cms::Phase2TrackerDigitizer::addPixelCollection(), cms::SiPixelPerformanceSummaryBuilder::analyze(), SiPixelLorentzAngleDBLoader::analyze(), SiPixelLorentzAngleDB::analyze(), SiPixelVCalDB::analyze(), SiPixelDynamicInefficiencyReader::analyze(), SiPixelVCalReader::analyze(), SiPixelGenErrorDBObjectUploader::analyze(), SiPixel2DTemplateDBObjectUploader::analyze(), SiPixelTemplateDBObjectUploader::analyze(), SiPhase2OuterTrackerLorentzAngleWriter::analyze(), TrackerGeometryIntoNtuples::analyze(), SiPixelDetInfoFileWriter::beginRun(), NearbyPixelClustersAnalyzer::beginRun(), Phase2TrackerMonitorDigi::bookHistograms(), Phase2TrackerValidateDigi::bookHistograms(), Phase2ITMonitorCluster::bookHistograms(), Phase2OTMonitorCluster::bookHistograms(), Phase2ITValidateRecHitBase::bookHistograms(), Phase2OTMonitorVectorHits::bookHistograms(), Phase2OTValidateRecHitBase::bookHistograms(), Phase2ITMonitorRecHit::bookHistograms(), Phase2ITValidateCluster::bookHistograms(), Phase2OTMonitorRecHit::bookHistograms(), Phase2OTValidateCluster::bookHistograms(), StubKiller::chooseModulesToKill(), tmtt::StubKiller::chooseModulesToKill(), SiStripMonitorTrack::dqmBeginRun(), PixelCPEClusterRepair::fill2DTemplIDs(), PixelCPEBase::fillDetParams(), Phase2StripCPE::fillParam(), StripCPE::fillParams(), ClusterShapeHitFilter::fillStripData(), cms::SiPixelDigitizer::finalizeEvent(), SiStripDigitizer::finalizeEvent(), cms::SiPixelDigitizer::initializeEvent(), PreMixingSiStripWorker::initializeEvent(), cms::Phase2TrackerDigitizer::initializeEvent(), SiStripDigitizer::initializeEvent(), deDxTools::makeCalibrationMap(), SiPhase2BadStripConfigurableFakeESSource::produce(), PreMixingSiStripWorker::put(), setEndsetDU(), and setOffsetDU().

69 { return theDetUnits; }
DetContainer theDetUnits

◆ endsetDU()

unsigned int TrackerGeometry::endsetDU ( SubDetector  sid) const
inline

Definition at line 81 of file TrackerGeometry.h.

References theEndsetDU.

81 { return theEndsetDU[sid]; }
unsigned int theEndsetDU[6]

◆ fillTestMap()

void TrackerGeometry::fillTestMap ( const GeometricDet gd)

Definition at line 227 of file TrackerGeometry.cc.

References GeometricDet::bounds(), GeometricDet::geographicalId(), moduleType(), DigiTask_cfi::mtype, Skims_PA_cff::name, GeometricDet::name(), AlCaHLTBitMon_QueryRunRegistry::string, submitPVValidationJobs::t, groupFilesInBlocks::temp, theDetTypetList, and Calorimetry_cff::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::vector< std::tuple< DetId, TrackerGeometry::ModuleType, float > > theDetTypetList
const std::string & name() const
Definition: GeometricDet.h:93
Definition: DetId.h:17
const DetId & geographicalId() const
Definition: GeometricDet.h:99
ModuleType moduleType(const std::string &name) const
std::unique_ptr< Bounds > bounds() const

◆ finalize()

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

◆ geomDetSubDetector()

const GeomDetEnumerators::SubDetector TrackerGeometry::geomDetSubDetector ( int  subdet) const

◆ getDetectorThickness()

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 }
std::vector< std::tuple< DetId, TrackerGeometry::ModuleType, float > > theDetTypetList
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57

◆ getDetectorType()

TrackerGeometry::ModuleType TrackerGeometry::getDetectorType ( DetId  detid) const

Definition at line 247 of file TrackerGeometry.cc.

References DetId::rawId(), theDetTypetList, and UNKNOWN.

Referenced by Phase2OTMonitorCluster::analyze(), Phase2OTMonitorVectorHits::analyze(), Phase2OTMonitorRecHit::analyze(), Phase2OTMonitorVectorHits::bookHistograms(), Phase2OTMonitorVectorHits::bookLayerHistos(), Phase2OTValidateRecHitBase::bookLayerHistos(), Phase2OTMonitorRecHit::bookLayerHistos(), Phase2OTMonitorCluster::bookLayerHistos(), Phase2OTValidateCluster::bookLayerHistos(), Phase2OTValidateRecHit::fillOTHistos(), Phase2OTValidateTrackingRecHit::fillOTHistos(), Phase2OTValidateCluster::fillOTHistos(), Phase2OTValidateRecHitBase::fillOTRecHitHistos(), cms::Phase2TrackerDigitizer::getAlgoType(), SiPhase2OuterTrackerLorentzAngle::getLorentzAnglesByModuleType(), VectorHitBuilderAlgorithmBase::printCluster(), TTClusterBuilder< T >::produce(), SiPhase2BadStripConfigurableFakeESSource::produce(), TTStubBuilder< T >::produce(), tt::Setup::psModule(), tt::SensorModule::SensorModule(), l1tVertexFinder::Stub::setModuleInfo(), and tmtt::TrackerModule::TrackerModule().

247  {
248  for (const auto& iVal : theDetTypetList) {
249  DetId detid_max = std::get<0>(iVal);
250  if (detid.rawId() <= detid_max.rawId())
251  return std::get<1>(iVal);
252  }
254 }
std::vector< std::tuple< DetId, TrackerGeometry::ModuleType, float > > theDetTypetList
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57

◆ idToDet()

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, alignCSCRings::s, and theMap.

Referenced by CosmicTrajectoryBuilder::AddHit(), CRackTrajectoryBuilder::AddHit(), FWRecoGeometryESProducer::addTECGeometry(), FWRecoGeometryESProducer::addTIBGeometry(), FWRecoGeometryESProducer::addTIDGeometry(), FWRecoGeometryESProducer::addTOBGeometry(), SiPixelRecHitsValid::analyze(), Phase2ITMonitorCluster::analyze(), SiStripLAProfileBooker::analyze(), SiPixelTrackResidualSource::analyze(), OuterTrackerMonitorTTCluster::analyze(), OuterTrackerMonitorTTStub::analyze(), TestHits::analyze(), TestSmoothHits::analyze(), TestOutliers::analyze(), PixelLumiDQM::analyze(), TrackerTreeGenerator::analyze(), TrackerDpgAnalysis::analyze(), GeneralPurposeTrackAnalyzer::analyze(), DMRChecker::analyze(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::AnalyzeOccupancy(), PixelInactiveAreaFinder::badAdjecentDetsEndcap(), SiStripLAProfileBooker::beginRun(), TrackerDpgAnalysis::beginRun(), SiPixelErrorsDigisToCalibDigis::bookDQMHistoPlaquetteSummary2D(), SiPixelOfflineCalibAnalysisBase::bookDQMHistoPlaquetteSummary2D(), Phase2EndcapRingBuilder::build(), Phase2EndcapSingleRingBuilder::build(), Phase2OTBarrelRodBuilder::build(), TIDRingBuilder::build(), PixelRodBuilder::build(), TECWedgeBuilder::build(), TIBRingBuilder::build(), TOBRodBuilder::build(), PixelBladeBuilder< T >::build(), SeedFromConsecutiveHitsCreator::buildSeed(), SeedFromGenericPairOrTriplet::buildSeed(), SeedFromNuclearInteraction::construct(), PixelInactiveAreaFinder::detInfo(), LaserAlignment::endRunProduce(), SiStripBadAPVAlgorithmFromClusterOccupancy::extractBadAPVs(), SiStripHotStripAlgorithmFromClusterOccupancy::extractBadStrips(), SiPixelPhase1Analyzer::FillBins(), Phase2TrackerMonitorDigi::fillITPixelDigiHistos(), Phase2TrackerMonitorDigi::fillOTDigiHistos(), QcdLowPtDQM::fillPixels(), Phase2TrackerValidateDigi::fillSimHitInfo(), TrackerOfflineValidationSummary::fillTree(), MuonCkfTrajectoryBuilder::findCompatibleMeasurements(), BaseCkfTrajectoryBuilder::findStateAndLayers(), SiStripFineDelayTLA::findtrackangle(), SiPixelQuality::getBadRocPositions(), StubPtConsistency::getConsistency(), PixelTripletLowPtGenerator::getGlobalPosition(), ClusterShapeTrackFilter::getGlobalPoss(), PixelInactiveAreaFinder::getPhiSpanBarrel(), PixelInactiveAreaFinder::getRSpan(), ConversionSeedFilter::getTSOS(), PixelInactiveAreaFinder::getZSpan(), NuclearTester::HitPositions(), SiStripMonitorTrack::hitStudy(), HLTPixelClusterShapeFilter::hltFilter(), SiStripCorrelateBadStripAndNoise::iterateOnBadStrips(), SiStripRecHitConverterAlgorithm::match(), SeedMatcher::matchRecHitCombinations(), NuclearTrackCorrector::newTrajNeeded(), TrackerDpgAnalysis::onTrackAngles(), CompareDetY_plus::operator()(), CompareHitY::operator()(), TrackMerger::MomentumSort::operator()(), CompareHitY_plus::operator()(), CompareDetY_minus::operator()(), SeedFromNuclearInteraction::outerHitPosition(), CtfSpecialSeedGenerator::postCheck(), DeDxHitInfoProducer::processHit(), DeDxEstimatorProducer::processHit(), PixelVertexProducerClusters::produce(), HIPixelClusterVtxProducer::produce(), ShallowTrackClustersProducer::produce(), PixelClusterSelectorTopBottom::produce(), StripClusterSelectorTopBottom::produce(), ConversionSeedFilterCharge::produce(), ClusterCompatibilityProducer::produce(), FakeTrackProducer< T >::produce(), MuonHLTSeedMVAClassifier::produce(), TrajectorySeedFromMuonProducer::produce(), reco::CentralityProducer::produce(), FastPrimaryVertexWithWeightsProducer::produce(), ConvBremSeedProducer::produce(), TrackerToMuonPropagator::produce(), PixelClusterTagInfoProducer::produce(), FastPrimaryVertexProducer::produce(), SiStripMonitorTrack::RecHitInfo(), pTFrom2Stubs::rInvFrom2(), VectorHitBuilderAlgorithm::run(), KFBasedPixelFitter::run(), CRackTrajectoryBuilder::run(), SeedFromGenericPairOrTriplet::seedFromPair(), SeedFromGenericPairOrTriplet::seedFromTriplet(), BaseCkfTrajectoryBuilder::seedMeasurements(), SeedGeneratorForCRack::seeds(), SeedGeneratorForCosmics::seeds(), SimpleCosmicBONSeeder::seeds(), SeedFromNuclearInteraction::setMeasurements(), TrackerOfflineValidation::setUpTreeMembers(), PixelTemplateSmearerBase::smearHit(), CRackTrajectoryBuilder::SortHits(), l1tVertexFinder::Stub::Stub(), StripSubClusterShapeFilterBase::testLastHit(), LaserAlignment::testRoutine(), FastTSGFromPropagation::trackerSeeds(), LaserDQM::trackerStatistics(), OutInConversionTrackFinder::tracks(), SiStripMonitorTrack::trajectoryStudy(), MeasurementTrackerEventProducer::updatePixels(), ValidateGeometry::validateStripTopology(), and ValidateGeometry::validateTrackerGeometry().

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 }

◆ idToDetUnit()

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, alignCSCRings::s, and theMapUnit.

Referenced by SiPixelPhase2DigiToClusterCUDA::acquire(), ALPAKA_ACCELERATOR_NAMESPACE::SiPixelPhase2DigiToCluster::acquire(), FWRecoGeometryESProducer::addPixelBarrelGeometry(), FWRecoGeometryESProducer::addPixelForwardGeometry(), SiStripCalibLorentzAngle::algoBeginJob(), Phase2ITMonitorCluster::analyze(), Phase2OTMonitorCluster::analyze(), cms::SiPixelCondObjReader::analyze(), SiPixelHitEfficiencySource::analyze(), cms::SiPixelCondObjOfflineReader::analyze(), cms::SiPixelCondObjAllPayloadsReader::analyze(), cms::SiPixelCondObjForHLTReader::analyze(), Phase2OTMonitorRecHit::analyze(), HitEff::analyze(), HitResol::analyze(), TrackerDpgAnalysis::analyze(), SiPixelClusterSource::buildStructure(), SiPixelDigiSource::buildStructure(), SiPixelCoordinates::channel(), SiStripMonitorTrack::clusterInfos(), FineDelayHistosUsingDb::computeDelays(), CkfDebugger::det(), SiStripHitEfficiencyWorker::fillForTraj(), Phase2ITMonitorRecHit::fillITHistos(), Phase2ITValidateTrackingRecHit::fillITHistos(), Phase2ITValidateCluster::fillITHistos(), Phase2TrackerMonitorDigi::fillITPixelDigiHistos(), Phase2TrackerMonitorDigi::fillOTDigiHistos(), Phase2OTValidateCluster::fillOTHistos(), Phase2OTValidateRecHitBase::fillOTRecHitHistos(), Phase2ITValidateRecHitBase::fillRechitHistos(), Phase2TrackerValidateDigi::fillSimHitInfo(), GlobalHitsProdHist::fillTrk(), GlobalHitsAnalyzer::fillTrk(), GlobalHitsProducer::fillTrk(), NearbyPixelClustersProducer::findAllNearbyClusters(), SiPixelCalSingleMuonAnalyzer::findClosestCluster(), NearbyPixelClustersAnalyzer::findClosestCluster(), StubPtConsistency::getConsistency(), SiPixelClusterSource::getrococcupancye(), ShallowGainCalibration::isFarFromBorder(), StubKiller::killStub(), 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(), Phase2TrackerClusterizer::produce(), Phase2TrackerRecHits::produce(), SiPixelRecHitSoAFromLegacyT< TrackerTraits >::produce(), FastPrimaryVertexWithWeightsProducer::produce(), FastPrimaryVertexProducer::produce(), reco::modules::CosmicTrackSplitter::produce(), L1FPGATrackProducer::produce(), pTFrom2Stubs::rInvFrom2(), SiPixelCoordinates::roc(), SiStripRecHitConverterAlgorithm::run(), tt::SensorModule::SensorModule(), l1tVertexFinder::Stub::setModuleInfo(), SiPixelROCsStatusAndMappingWrapper::SiPixelROCsStatusAndMappingWrapper(), tt::Setup::stubPos(), SiStripGainCalibTableProducer::thickness(), ShallowGainCalibration::thickness(), tmtt::TrackerModule::TrackerModule(), SiStripRecHitConverterAlgorithm::useModule(), ValidateGeometry::validatePixelTopology(), 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

◆ isThere()

bool TrackerGeometry::isThere ( GeomDetEnumerators::SubDetector  subdet) const

◆ moduleType()

TrackerGeometry::ModuleType TrackerGeometry::moduleType ( const std::string &  name) const

Definition at line 265 of file TrackerGeometry.cc.

References IB1, IB2, Skims_PA_cff::name, 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  } else if (name.find("InnerPixel3DOneActive") != std::string::npos) {
282  return ModuleType::Ph2PXB3D;
283  } else if (name.find("InnerPixel3DTwoActive") != std::string::npos) {
284  return ModuleType::Ph2PXB3D;
285  }
286  }
287  // forward
288  else if (name.find("EModule") != std::string::npos) {
289  if (name.find("InnerPixelActive") != std::string::npos) {
290  return ModuleType::Ph2PXF;
291  } else if (name.find("InnerPixel3DActive") != std::string::npos) {
292  return ModuleType::Ph2PXF3D;
293  } else if (name.find("InnerPixel3DOneActive") != std::string::npos) {
294  return ModuleType::Ph2PXB3D;
295  } else if (name.find("InnerPixel3DTwoActive") != std::string::npos) {
296  return ModuleType::Ph2PXB3D;
297  }
298  }
299  }
300 
301  // TIB
302  else if (name.find("TIB") != std::string::npos) {
303  if (name.find('0') != std::string::npos)
304  return ModuleType::IB1;
305  else
306  return ModuleType::IB2;
307  }
308 
309  // TOB
310  else if (name.find("TOB") != std::string::npos) {
311  if (name.find('0') != std::string::npos)
312  return ModuleType::OB1;
313  else
314  return ModuleType::OB2;
315  }
316 
317  // TID
318  else if (name.find("TID") != std::string::npos) {
319  if (name.find('0') != std::string::npos)
320  return ModuleType::W1A;
321  else if (name.find('1') != std::string::npos)
322  return ModuleType::W2A;
323  else if (name.find('2') != std::string::npos)
324  return ModuleType::W3A;
325  }
326 
327  // TEC
328  else if (name.find("TEC") != std::string::npos) {
329  if (name.find('0') != std::string::npos)
330  return ModuleType::W1B;
331  else if (name.find('1') != std::string::npos)
332  return ModuleType::W2B;
333  else if (name.find('2') != std::string::npos)
334  return ModuleType::W3B;
335  else if (name.find('3') != std::string::npos)
336  return ModuleType::W4;
337  else if (name.find('4') != std::string::npos)
338  return ModuleType::W5;
339  else if (name.find('5') != std::string::npos)
340  return ModuleType::W6;
341  else if (name.find('6') != std::string::npos)
342  return ModuleType::W7;
343  }
344 
345  // Phase 2 OT
346  if (name.find("BModule") != std::string::npos || name.find("EModule") != std::string::npos) {
347  if (name.find("PSMacroPixel") != std::string::npos)
348  return ModuleType::Ph2PSP;
349  else if (name.find("PSStrip") != std::string::npos)
350  return ModuleType::Ph2PSS;
351  else if (name.find("2S") != std::string::npos)
352  return ModuleType::Ph2SS;
353  }
354 
355  return ModuleType::UNKNOWN;
356 }

◆ numberOfLayers()

unsigned int TrackerGeometry::numberOfLayers ( int  subdet) const

Definition at line 211 of file TrackerGeometry.cc.

References Exception, and theNumberOfLayers.

Referenced by TrackingRecoMaterialAnalyser::bookHistograms(), tadqm::TrackAnalyzer::bookHistosForEfficiencyFromHitPatter(), PixelTopologyMap::buildTopologyMaps(), 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]

◆ offsetDU()

unsigned int TrackerGeometry::offsetDU ( SubDetector  sid) const
inline

◆ operator=() [1/2]

TrackerGeometry& TrackerGeometry::operator= ( TrackerGeometry const &  )
delete

◆ operator=() [2/2]

TrackerGeometry& TrackerGeometry::operator= ( TrackerGeometry &&  )
default

◆ setEndsetDU()

void TrackerGeometry::setEndsetDU ( SubDetector  sid)
inline

Definition at line 84 of file TrackerGeometry.h.

References detUnits(), and theEndsetDU.

84 { theEndsetDU[sid] = detUnits().size(); }
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
unsigned int theEndsetDU[6]

◆ setOffsetDU()

void TrackerGeometry::setOffsetDU ( SubDetector  sid)
inline

Definition at line 83 of file TrackerGeometry.h.

References detUnits(), and theOffsetDU.

83 { theOffsetDU[sid] = detUnits().size(); }
unsigned int theOffsetDU[6]
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.

◆ trackerDet()

GeometricDet const* TrackerGeometry::trackerDet ( ) const
inline

Definition at line 89 of file TrackerGeometry.h.

References theTrackerDet.

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

89 { return theTrackerDet; }
GeometricDet const * theTrackerDet

Friends And Related Function Documentation

◆ GeometryAligner

friend class GeometryAligner
friend

Aligner has access to map.

Definition at line 105 of file TrackerGeometry.h.

◆ TrackerGeomBuilderFromGeometricDet

Definition at line 17 of file TrackerGeometry.h.

Member Data Documentation

◆ theDetIds

DetIdContainer TrackerGeometry::theDetIds
private

Definition at line 113 of file TrackerGeometry.h.

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

◆ theDets

DetContainer TrackerGeometry::theDets
private

Definition at line 111 of file TrackerGeometry.h.

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

◆ theDetTypes

DetTypeContainer TrackerGeometry::theDetTypes
private

Definition at line 107 of file TrackerGeometry.h.

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

◆ theDetTypetList

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

◆ theDetUnitIds

DetIdContainer TrackerGeometry::theDetUnitIds
private

Definition at line 112 of file TrackerGeometry.h.

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

◆ theDetUnits

DetContainer TrackerGeometry::theDetUnits
private

Definition at line 108 of file TrackerGeometry.h.

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

◆ theEndsetDU

unsigned int TrackerGeometry::theEndsetDU[6]
private

Definition at line 110 of file TrackerGeometry.h.

Referenced by endsetDU(), and setEndsetDU().

◆ theMap

mapIdToDet TrackerGeometry::theMap
private

Definition at line 115 of file TrackerGeometry.h.

Referenced by addDet(), and idToDet().

◆ theMapUnit

mapIdToDetUnit TrackerGeometry::theMapUnit
private

Definition at line 114 of file TrackerGeometry.h.

Referenced by addDetUnit(), and idToDetUnit().

◆ theNumberOfLayers

unsigned int TrackerGeometry::theNumberOfLayers[6]
private

Definition at line 125 of file TrackerGeometry.h.

Referenced by numberOfLayers(), and TrackerGeometry().

◆ theOffsetDU

unsigned int TrackerGeometry::theOffsetDU[6]
private

Definition at line 109 of file TrackerGeometry.h.

Referenced by offsetDU(), and setOffsetDU().

◆ thePXBDets

DetContainer TrackerGeometry::thePXBDets
private

Definition at line 117 of file TrackerGeometry.h.

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

◆ thePXFDets

DetContainer TrackerGeometry::thePXFDets
private

Definition at line 118 of file TrackerGeometry.h.

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

◆ theSubDetTypeMap

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

Definition at line 124 of file TrackerGeometry.h.

Referenced by geomDetSubDetector(), and TrackerGeometry().

◆ theTECDets

DetContainer TrackerGeometry::theTECDets
private

Definition at line 122 of file TrackerGeometry.h.

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

◆ theTIBDets

DetContainer TrackerGeometry::theTIBDets
private

Definition at line 119 of file TrackerGeometry.h.

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

◆ theTIDDets

DetContainer TrackerGeometry::theTIDDets
private

Definition at line 120 of file TrackerGeometry.h.

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

◆ theTOBDets

DetContainer TrackerGeometry::theTOBDets
private

Definition at line 121 of file TrackerGeometry.h.

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

◆ theTrackerDet

GeometricDet const* TrackerGeometry::theTrackerDet
private

Definition at line 102 of file TrackerGeometry.h.

Referenced by trackerDet().