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::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=0)
 

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 
Ph2PSP 
Ph2PSS 
Ph2SS 

Definition at line 29 of file TrackerGeometry.h.

Constructor & Destructor Documentation

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

Definition at line 58 of file TrackerGeometry.cc.

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

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

Definition at line 139 of file TrackerGeometry.cc.

References GeomDet::geographicalId(), triggerObjects_cff::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
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

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 60 of file TrackerGeometry.h.

References theDets.

Referenced by SiStripGainCosmicCalculator::algoBeginJob(), SiStripGainFromData::algoBeginJob(), SiStripGainFromCalibTree::algoBeginJob(), SiPixelRecHitsValid::analyze(), SiPixelHLTSource::analyze(), SiPixelTrackResidualSource::analyze(), PixelLumiDQM::analyze(), SiPixelClusterSource::analyze(), SiPixelErrorEstimation::analyze(), SiPixelTrackingRecHitsValid::analyze(), PrimaryVertexValidation::analyze(), ListIds::analyze(), SiPixelFrameReverter::buildStructure(), SiPixelDigiSource::buildStructure(), SiPixelRecHitSource::buildStructure(), SiPixelClusterSource::buildStructure(), SiStripGainsPCLHarvester::checkBookAPVColls(), SiStripGainsPCLWorker::checkBookAPVColls(), MeasurementTrackerImpl::checkDets(), SiPixelHitEfficiencySource::dqmBeginRun(), SiPixelTrackResidualSource::dqmBeginRun(), SiPixelStatusHarvester::dqmEndRun(), GlobalRecHitsAnalyzer::fillTrk(), GlobalRecHitsProducer::fillTrk(), CheckHitPattern::init(), PFCheckHitPattern::init(), PixelUnpackingRegions::initialize(), PixelHitMatcher::operator()(), TTStubAssociator< T >::produce(), TTClusterAssociator< T >::produce(), TTClusterBuilder< T >::produce(), TTStubBuilder< T >::produce(), SiPixelFedCablingMapBuilder::produce(), and SelectedElectronFEDListProducer< TEle, TCand >::produce().

60 { return theDets; }
DetContainer theDets
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 58 of file TrackerGeometry.h.

References theDetTypes.

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

58 { return theDetTypes; }
DetTypeContainer theDetTypes
const DetIdContainer& TrackerGeometry::detUnitIds ( ) const
inlineoverridevirtual
const DetContainer& TrackerGeometry::detUnits ( ) const
inlineoverridevirtual
unsigned int TrackerGeometry::endsetDU ( SubDetector  sid) const
inline

Definition at line 71 of file TrackerGeometry.h.

References theEndsetDU.

71 { 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(), Skims_PA_cff::name, GeometricDet::name(), AlCaHLTBitMon_QueryRunRegistry::string, OrderedSet::t, groupFilesInBlocks::temp, theDetTypetList, and Calorimetry_cff::thickness.

Referenced by setEndsetDU(), and 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::string const & name() const
Definition: GeometricDet.h:126
std::unique_ptr< Bounds > bounds() const
std::vector< std::tuple< DetId, TrackerGeometry::ModuleType, float > > theDetTypetList
ModuleType moduleType(const std::string &name) const
Definition: DetId.h:17
DetId geographicalId() const
Definition: GeometricDet.h:154
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
float TrackerGeometry::getDetectorThickness ( DetId  detid) const

Definition at line 256 of file TrackerGeometry.cc.

References DetId::rawId(), and theDetTypetList.

Referenced by trackerDet().

256  {
257  for (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

Definition at line 247 of file TrackerGeometry.cc.

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

Referenced by cms::Phase2TrackerDigitizer::getAlgoType(), L1TMuon::TTGeometryTranslator::isPSModule(), TTClusterBuilder< T >::produce(), TTStubBuilder< T >::produce(), and trackerDet().

247  {
248  for (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 }
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
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 FWRecoGeometryESProducer::addTECGeometry(), FWRecoGeometryESProducer::addTIBGeometry(), FWRecoGeometryESProducer::addTIDGeometry(), FWRecoGeometryESProducer::addTOBGeometry(), OuterTrackerMonitorTTCluster::analyze(), OuterTrackerMonitorTTStub::analyze(), SiPixelRecHitsValid::analyze(), ElectronSeedAnalyzer::analyze(), SiStripLAProfileBooker::analyze(), SiStripElectronAnalyzer::analyze(), SiPixelTrackResidualSource::analyze(), TestHits::analyze(), TestSmoothHits::analyze(), PixelLumiDQM::analyze(), TestOutliers::analyze(), SiPixelErrorEstimation::analyze(), TrackerTreeGenerator::analyze(), SiPixelTrackingRecHitsValid::analyze(), analyzer::SiPixelLorentzAngle::analyze(), SiStripRecHitsValid::analyze(), TrackerDpgAnalysis::analyze(), SiStripTrackingRecHitsValid::analyze(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::AnalyzeOccupancy(), PixelInactiveAreaFinder::badAdjecentDetsEndcap(), SiStripLAProfileBooker::beginRun(), TrackerDpgAnalysis::beginRun(), SiPixelErrorsDigisToCalibDigis::bookDQMHistoPlaquetteSummary2D(), SiPixelOfflineCalibAnalysisBase::bookDQMHistoPlaquetteSummary2D(), Phase2EndcapRingBuilder::build(), Phase2OTBarrelRodBuilder::build(), PixelRodBuilder::build(), TECWedgeBuilder::build(), TIBRingBuilder::build(), TOBRodBuilder::build(), TIDRingBuilder::build(), PixelBladeBuilder< T >::build(), SeedFromConsecutiveHitsCreator::buildSeed(), SeedForPhotonConversion1Leg::buildSeed(), SeedFromGenericPairOrTriplet::buildSeed(), SeedForPhotonConversionFromQuadruplets::buildSeed(), SeedForPhotonConversionFromQuadruplets::buildSeedBool(), SiStripFineDelayHit::closestCluster(), SeedFromNuclearInteraction::construct(), detIds(), PixelInactiveAreaFinder::detInfo(), OccupancyPlots::endRun(), LaserAlignment::endRunProduce(), SiStripBadAPVAlgorithmFromClusterOccupancy::extractBadAPVs(), SiStripHotStripAlgorithmFromClusterOccupancy::extractBadStrips(), SiPixelClusterModule::fill(), TkAlCaRecoMonitor::fillHitmaps(), Phase2TrackerMonitorDigi::fillITPixelDigiHistos(), Phase2TrackerMonitorDigi::fillOTDigiHistos(), QcdLowPtDQM::fillPixels(), Phase2TrackerValidateDigi::fillSimHitInfo(), TrackerOfflineValidationSummary::fillTree(), GlobalRecHitsAnalyzer::fillTrk(), GlobalRecHitsProducer::fillTrk(), SiStripFineDelayTLA::findtrackangle(), SiPixelQuality::getBadRocPositions(), StubPtConsistency::getConsistency(), PixelTripletLowPtGenerator::getGlobalPosition(), ClusterShapeTrackFilter::getGlobalPoss(), PixelInactiveAreaFinder::getPhiSpanBarrel(), PixelInactiveAreaFinder::getRSpan(), ConversionSeedFilter::getTSOS(), PixelInactiveAreaFinder::getZSpan(), NuclearTester::HitPositions(), SiStripMonitorTrack::hitStudy(), HLTPixelClusterShapeFilter::hltFilter(), SeedFromProtoTrack::init(), SiPixelDigitizerAlgorithm::PixelEfficiencies::init_from_db(), SiStripCorrelateBadStripAndNoise::iterateOnBadStrips(), SiStripRecHitConverterAlgorithm::match(), SeedMatcher::matchRecHitCombinations(), NuclearTrackCorrector::newTrajNeeded(), TrackerDpgAnalysis::onTrackAngles(), CompareHitPairsY::operator()(), CompareDetY_plus::operator()(), CompareHitY::operator()(), CompareHitY_plus::operator()(), CompareDetY_minus::operator()(), SeedFromNuclearInteraction::outerHitPosition(), CtfSpecialSeedGenerator::postCheck(), DeDxHitInfoProducer::processHit(), PixelVertexProducerClusters::produce(), ShallowTrackClustersProducer::produce(), HIPixelClusterVtxProducer::produce(), PixelClusterSelectorTopBottom::produce(), FastTrackerRecHitMatcher::produce(), StripClusterSelectorTopBottom::produce(), ClusterCompatibilityProducer::produce(), ConversionSeedFilterCharge::produce(), FakeTrackProducer< T >::produce(), TrackCandidateProducer::produce(), TrajectorySeedFromMuonProducer::produce(), ConvBremSeedProducer::produce(), FastPrimaryVertexWithWeightsProducer::produce(), TrackerToMuonPropagator::produce(), PixelClusterTagInfoProducer::produce(), FastPrimaryVertexProducer::produce(), SiStripMonitorTrack::RecHitInfo(), TrackInfoProducerAlgorithm::run(), KFBasedPixelFitter::run(), SeedFromGenericPairOrTriplet::seedFromPair(), SeedFromGenericPairOrTriplet::seedFromTriplet(), SeedGeneratorForCRack::seeds(), SeedGeneratorForCosmics::seeds(), SimpleCosmicBONSeeder::seeds(), SeedFromNuclearInteraction::setMeasurements(), TrackerOfflineValidation::setUpTreeMembers(), PixelTemplateSmearerBase::smearHit(), StripSubClusterShapeFilterBase::testLastHit(), LaserAlignment::testRoutine(), FastTSGFromPropagation::trackerSeeds(), LaserDQM::trackerStatistics(), TrajectoryAtInvalidHit::TrajectoryAtInvalidHit(), 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 }
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(), SiStripHitEffFromCalibTree::algoAnalyze(), DeDxDiscriminatorLearner::algoAnalyzeTheTree(), SiStripCalibLorentzAngle::algoBeginJob(), TrackerHitAnalyzer::analyze(), SiPixelPhase1HitsV::analyze(), SiPixelHitEfficiencySource::analyze(), HitEff::analyze(), SiPixelErrorEstimation::analyze(), SiStripRecHitsValid::analyze(), TrackerDpgAnalysis::analyze(), SiStripTrackingRecHitsValid::analyze(), SiPixelDigiSource::buildStructure(), SiPixelClusterSource::buildStructure(), SiPixelCoordinates::channel(), SiStripMonitorTrack::clusterInfos(), FineDelayHistosUsingDb::computeDelays(), SiStripRawProcessingAlgorithms::convertHybridDigiToRawDigiVector(), CkfDebugger::det(), SiStripFineDelayHit::detId(), detIds(), Phase2TrackerMonitorDigi::fillITPixelDigiHistos(), Phase2TrackerMonitorDigi::fillOTDigiHistos(), Phase2TrackerValidateDigi::fillSimHitInfo(), TrackingNtuple::fillSimHits(), GlobalHitsAnalyzer::fillTrk(), GlobalHitsProdHist::fillTrk(), GlobalHitsProducer::fillTrk(), StubPtConsistency::getConsistency(), TkLasBeamFitter::getLasHits(), SiPixelClusterSource::getrococcupancye(), L1TMuon::TTGeometryTranslator::getTTSpecificPoint(), ShallowGainCalibration::IsFarFromBorder(), SiStripGainFromData::IsFarFromBorder(), GeometryInterface::loadFromTopology(), DeDxTools::makeCalibrationMap(), SiStripGainCosmicCalculator::moduleThickness(), SiStripGainCosmicCalculator::moduleWidth(), CkfDebugger::nextCorrectHits(), CkfDebugger::position(), CkfDebugger::printSimHits(), TrackingRecHitNoSmearingPlugin::process(), TrackingRecHitStripGSPlugin::process(), PixelTemplateSmearerBase::process(), StandaloneTrackMonitor::processClusters(), StandaloneTrackMonitor::processHit(), PixelVertexProducerClusters::produce(), SiPixelClusterShapeCacheProducer::produce(), Phase2TrackerRecHits::produce(), Phase2TrackerClusterizer::produce(), FastPrimaryVertexWithWeightsProducer::produce(), cms::SiPixelRecHitConverter::produce(), FastPrimaryVertexProducer::produce(), reco::modules::CosmicTrackSplitter::produce(), SiPixelCoordinates::roc(), SiStripRecHitConverterAlgorithm::run(), SiPixelClusterProducer::run(), ShallowGainCalibration::thickness(), 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
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, Ph2PXF, Ph2SS, UNKNOWN, W1A, W1B, W2A, W2B, W3A, W3B, W4, W5, W6, and W7.

Referenced by fillTestMap(), and setEndsetDU().

265  {
266  if (name.find("Pixel") != std::string::npos) {
267  if (name.find("BarrelActive") != std::string::npos)
268  return ModuleType::Ph1PXB;
269  else if (name.find("ForwardSensor") != std::string::npos)
270  return ModuleType::Ph1PXF;
271  else if (name.find("BModule") != std::string::npos && name.find("InnerPixelActive") != std::string::npos)
272  return ModuleType::Ph2PXB;
273  else if (name.find("EModule") != std::string::npos && name.find("InnerPixelActive") != std::string::npos)
274  return ModuleType::Ph2PXF;
275  } else if (name.find("TIB") != std::string::npos) {
276  if (name.find("0") != std::string::npos)
277  return ModuleType::IB1;
278  else
279  return ModuleType::IB2;
280  } else if (name.find("TOB") != std::string::npos) {
281  if (name.find("0") != std::string::npos)
282  return ModuleType::OB1;
283  else
284  return ModuleType::OB2;
285  } else if (name.find("TID") != std::string::npos) {
286  if (name.find("0") != std::string::npos)
287  return ModuleType::W1A;
288  else if (name.find("1") != std::string::npos)
289  return ModuleType::W2A;
290  else if (name.find("2") != std::string::npos)
291  return ModuleType::W3A;
292  } else if (name.find("TEC") != std::string::npos) {
293  if (name.find("0") != std::string::npos)
294  return ModuleType::W1B;
295  else if (name.find("1") != std::string::npos)
296  return ModuleType::W2B;
297  else if (name.find("2") != std::string::npos)
298  return ModuleType::W3B;
299  else if (name.find("3") != std::string::npos)
300  return ModuleType::W4;
301  else if (name.find("4") != std::string::npos)
302  return ModuleType::W5;
303  else if (name.find("5") != std::string::npos)
304  return ModuleType::W6;
305  else if (name.find("6") != std::string::npos)
306  return ModuleType::W7;
307  }
308  if (name.find("BModule") != std::string::npos || name.find("EModule") != std::string::npos) {
309  if (name.find("PSMacroPixel") != std::string::npos)
310  return ModuleType::Ph2PSP;
311  else if (name.find("PSStrip") != std::string::npos)
312  return ModuleType::Ph2PSS;
313  else if (name.find("2S") != std::string::npos)
314  return ModuleType::Ph2SS;
315  }
316  return ModuleType::UNKNOWN;
317 }
unsigned int TrackerGeometry::numberOfLayers ( int  subdet) const

Definition at line 211 of file TrackerGeometry.cc.

References Exception, and theNumberOfLayers.

Referenced by TrackingRecoMaterialAnalyser::bookHistograms(), TrackAnalyzer::bookHistosForEfficiencyFromHitPatter(), detIds(), 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 74 of file TrackerGeometry.h.

References detUnits(), fillTestMap(), moduleType(), Skims_PA_cff::name, AlCaHLTBitMon_QueryRunRegistry::string, and theEndsetDU.

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

74 { 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 73 of file TrackerGeometry.h.

References detUnits(), and theOffsetDU.

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

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

Friends And Related Function Documentation

friend class GeometryAligner
friend

Aligner has access to map.

Definition at line 95 of file TrackerGeometry.h.

Definition at line 17 of file TrackerGeometry.h.

Member Data Documentation

DetIdContainer TrackerGeometry::theDetIds
private

Definition at line 103 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theDets
private

Definition at line 101 of file TrackerGeometry.h.

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

DetTypeContainer TrackerGeometry::theDetTypes
private

Definition at line 97 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 102 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theDetUnits
private

Definition at line 98 of file TrackerGeometry.h.

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

unsigned int TrackerGeometry::theEndsetDU[6]
private

Definition at line 100 of file TrackerGeometry.h.

Referenced by endsetDU(), and setEndsetDU().

mapIdToDet TrackerGeometry::theMap
private

Definition at line 105 of file TrackerGeometry.h.

Referenced by addDet(), and idToDet().

mapIdToDetUnit TrackerGeometry::theMapUnit
private

Definition at line 104 of file TrackerGeometry.h.

Referenced by addDetUnit(), and idToDetUnit().

unsigned int TrackerGeometry::theNumberOfLayers[6]
private

Definition at line 115 of file TrackerGeometry.h.

Referenced by numberOfLayers(), and TrackerGeometry().

unsigned int TrackerGeometry::theOffsetDU[6]
private

Definition at line 99 of file TrackerGeometry.h.

Referenced by offsetDU(), and setOffsetDU().

DetContainer TrackerGeometry::thePXBDets
private

Definition at line 107 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::thePXFDets
private

Definition at line 108 of file TrackerGeometry.h.

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

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

Definition at line 114 of file TrackerGeometry.h.

Referenced by geomDetSubDetector(), and TrackerGeometry().

DetContainer TrackerGeometry::theTECDets
private

Definition at line 112 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theTIBDets
private

Definition at line 109 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theTIDDets
private

Definition at line 110 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theTOBDets
private

Definition at line 111 of file TrackerGeometry.h.

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

GeometricDet const* TrackerGeometry::theTrackerDet
private

Definition at line 92 of file TrackerGeometry.h.

Referenced by trackerDet().