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 28 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 30 of file TrackerGeometry.h.

30  {
31  UNKNOWN,
32  PXB,
33  PXF,
34  IB1,
35  IB2,
36  OB1,
37  OB2,
38  W1A,
39  W2A,
40  W3A,
41  W1B,
42  W2B,
43  W3B,
44  W4,
45  W5,
46  W6,
47  W7,
48  Ph1PXB,
49  Ph1PXF,
50  Ph2PXB,
51  Ph2PXF,
52  Ph2PSP,
53  Ph2PSS,
54  Ph2SS
55  };
0: Unidentified isolated particle
Definition: ParticleCode.h:19

Constructor & Destructor Documentation

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

Definition at line 47 of file TrackerGeometry.cc.

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

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

Definition at line 95 of file TrackerGeometry.cc.

References edmIntegrityCheck::d, theDets, and theDetTypes.

95  {
96  for (auto d : theDets) delete const_cast<GeomDet*>(d);
97  for (auto d : theDetTypes) delete const_cast<GeomDetType*>(d);
98 }
DetContainer theDets
DetTypeContainer theDetTypes

Member Function Documentation

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

Definition at line 130 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().

130  {
131  // set index
132  const_cast<GeomDet *>(p)->setGdetIndex(theDets.size());
133  theDets.emplace_back(p); // add to vector
134  theMap.insert(std::make_pair(p->geographicalId().rawId(),p));
135  DetId id(p->geographicalId());
136  switch(id.subdetId()){
138  thePXBDets.emplace_back(p);
139  break;
141  thePXFDets.emplace_back(p);
142  break;
144  theTIBDets.emplace_back(p);
145  break;
147  theTIDDets.emplace_back(p);
148  break;
150  theTOBDets.emplace_back(p);
151  break;
153  theTECDets.emplace_back(p);
154  break;
155  default:
156  edm::LogError("TrackerGeometry")<<"ERROR - I was expecting a Tracker Subdetector, I got a "<<id.subdetId();
157  }
158 }
DetContainer theTECDets
DetContainer theDets
DetContainer theTIDDets
Definition: DetId.h:18
DetContainer thePXBDets
DetContainer thePXFDets
DetContainer theTIBDets
DetContainer theTOBDets
void TrackerGeometry::addDetId ( DetId  p)
private

Definition at line 160 of file TrackerGeometry.cc.

References theDetIds.

Referenced by TrackerGeomBuilderFromGeometricDet::buildGeomDet().

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

Definition at line 119 of file TrackerGeometry.cc.

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

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

119  {
120  // set index
121  const_cast<GeomDet *>(p)->setIndex(theDetUnits.size());
122  theDetUnits.emplace_back(p); // add to vector
123  theMapUnit.insert(std::make_pair(p->geographicalId().rawId(),p));
124 }
mapIdToDetUnit theMapUnit
DetContainer theDetUnits
void TrackerGeometry::addDetUnitId ( DetId  p)
private

Definition at line 126 of file TrackerGeometry.cc.

References theDetUnitIds.

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

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

Definition at line 115 of file TrackerGeometry.cc.

References theDetTypes.

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

115  {
116  theDetTypes.emplace_back(p); // add to vector
117 }
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 59 of file TrackerGeometry.h.

References theDetTypes.

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

59 {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 72 of file TrackerGeometry.h.

References theEndsetDU.

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

Definition at line 251 of file TrackerGeometry.cc.

References GeometricDet::bounds(), DDName::fullname(), GeometricDet::geographicalId(), moduleType(), dataset::name, GeometricDet::name(), AlCaHLTBitMon_QueryRunRegistry::string, protons_cff::t, groupFilesInBlocks::temp, and theDetTypetList.

Referenced by setEndsetDU(), and TrackerGeometry().

251  {
252 
253  const std::string temp = gd->name().fullname();
254  std::string name = temp.substr(temp.find(":")+1);
255  DetId detid = gd->geographicalId();
256  float thickness = gd->bounds()->thickness();
257  std::string nameTag;
259  if (theDetTypetList.empty()) {
260  theDetTypetList.emplace_back(detid, mtype, thickness);
261  } else {
262  auto & t = (*(theDetTypetList.end()-1));
263  if (std::get<1>(t) != mtype) theDetTypetList.emplace_back(detid, mtype, thickness);
264  else {
265  if ( detid > std::get<0>(t) ) std::get<0>(t) = detid;
266  }
267  }
268 }
DDName const & name() const
Definition: GeometricDet.h:146
const std::string fullname() const
Definition: DDName.h:43
std::unique_ptr< Bounds > bounds() const
ModuleType moduleType(const std::string &name) const
Definition: DetId.h:18
DetId geographicalId() const
Definition: GeometricDet.h:212
std::vector< std::tuple< DetId, TrackerGeometry::ModuleType, float > > theDetTypetList
void TrackerGeometry::finalize ( void  )
private

Definition at line 100 of file TrackerGeometry.cc.

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

100  {
101  theDetTypes.shrink_to_fit(); // owns the DetTypes
102  theDetUnits.shrink_to_fit(); // they're all also into 'theDets', so we assume 'theDets' owns them
103  theDets.shrink_to_fit(); // owns *ONLY* the GeomDet * corresponding to GluedDets.
104  theDetUnitIds.shrink_to_fit();
105  theDetIds.shrink_to_fit();
106 
107  thePXBDets.shrink_to_fit(); // not owned: they're also in 'theDets'
108  thePXFDets.shrink_to_fit(); // not owned: they're also in 'theDets'
109  theTIBDets.shrink_to_fit(); // not owned: they're also in 'theDets'
110  theTIDDets.shrink_to_fit(); // not owned: they're also in 'theDets'
111  theTOBDets.shrink_to_fit(); // not owned: they're also in 'theDets'
112  theTECDets.shrink_to_fit(); // not owned: they're also in 'theDets'
113 }
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 279 of file TrackerGeometry.cc.

References DetId::rawId(), and theDetTypetList.

Referenced by trackerDet().

279  {
280  for (auto iVal : theDetTypetList) {
281  DetId detid_max = std::get<0>(iVal);
282  if (detid.rawId() <= detid_max.rawId())
283  return std::get<2>(iVal);
284  }
285  return -1.0;
286 }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
Definition: DetId.h:18
std::vector< std::tuple< DetId, TrackerGeometry::ModuleType, float > > theDetTypetList
TrackerGeometry::ModuleType TrackerGeometry::getDetectorType ( DetId  detid) const

Definition at line 270 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().

270  {
271  for (auto iVal : theDetTypetList) {
272  DetId detid_max = std::get<0>(iVal);
273  TrackerGeometry::ModuleType mtype = std::get<1>(iVal);
274  if (detid.rawId() <= detid_max.rawId()) return mtype;
275  }
277 }
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
Definition: DetId.h:18
std::vector< std::tuple< DetId, TrackerGeometry::ModuleType, float > > theDetTypetList
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 214 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(), SiStripElectronSeedGenerator::altCheckHitsAndTSOS(), OuterTrackerMonitorTTCluster::analyze(), OuterTrackerMonitorTTStub::analyze(), SiPixelRecHitsValid::analyze(), ElectronSeedAnalyzer::analyze(), SiStripLAProfileBooker::analyze(), SiStripElectronAnalyzer::analyze(), TestHits::analyze(), SiPixelTrackResidualSource::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(), TIBRingBuilder::build(), Phase2EndcapRingBuilder::build(), Phase2OTBarrelRodBuilder::build(), PixelRodBuilder::build(), TECWedgeBuilder::build(), TIDRingBuilder::build(), TOBRodBuilder::build(), PixelBladeBuilder< T >::build(), SeedFromGenericPairOrTriplet::buildSeed(), SeedForPhotonConversion1Leg::buildSeed(), SeedFromConsecutiveHitsCreator::buildSeed(), SeedForPhotonConversionFromQuadruplets::buildSeed(), SeedForPhotonConversionFromQuadruplets::buildSeedBool(), SiStripElectronSeedGenerator::checkHitsAndTSOS(), SiStripFineDelayHit::closestCluster(), SeedFromNuclearInteraction::construct(), detIds(), PixelInactiveAreaFinder::detInfo(), OccupancyPlots::endRun(), LaserAlignment::endRunProduce(), SiStripBadAPVAlgorithmFromClusterOccupancy::extractBadAPVs(), SiStripHotStripAlgorithmFromClusterOccupancy::extractBadStrips(), SiPixelClusterModule::fill(), TkAlCaRecoMonitor::fillHitmaps(), QcdLowPtDQM::fillPixels(), TrackerOfflineValidationSummary::fillTree(), GlobalRecHitsAnalyzer::fillTrk(), GlobalRecHitsProducer::fillTrk(), SiStripElectronAlgo::findElectron(), SiStripElectronSeedGenerator::findSeedsFromCluster(), 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(), 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(), StripClusterSelectorTopBottom::produce(), FastTrackerRecHitMatcher::produce(), ConversionSeedFilterCharge::produce(), ClusterCompatibilityProducer::produce(), FakeTrackProducer< T >::produce(), TrackCandidateProducer::produce(), TrajectorySeedFromMuonProducer::produce(), ConvBremSeedProducer::produce(), FastPrimaryVertexWithWeightsProducer::produce(), TrackerToMuonPropagator::produce(), FastPrimaryVertexProducer::produce(), SiStripRegionConnectivity::produceRegionCabling(), SiStripElectronAlgo::projectPhiBand(), SiStripMonitorTrack::RecHitInfo(), KFBasedPixelFitter::run(), TrackInfoProducerAlgorithm::run(), SeedFromGenericPairOrTriplet::seedFromPair(), SeedFromGenericPairOrTriplet::seedFromTriplet(), SeedGeneratorForCRack::seeds(), SeedGeneratorForCosmics::seeds(), SimpleCosmicBONSeeder::seeds(), SeedFromNuclearInteraction::setMeasurements(), TrackerOfflineValidation::setUpTreeMembers(), PixelTemplateSmearerBase::smearHit(), LaserAlignment::testRoutine(), FastTSGFromPropagation::trackerSeeds(), LaserDQM::trackerStatistics(), TrajectoryAtInvalidHit::TrajectoryAtInvalidHit(), SiStripMonitorTrack::trajectoryStudy(), MeasurementTrackerEventProducer::updatePixels(), ValidateGeometry::validateStripTopology(), and ValidateGeometry::validateTrackerGeometry().

215 {
216  mapIdToDet::const_iterator p=theMap.find(s.rawId());
217  if (p != theMap.end()) {
218  return static_cast<const TrackerGeomDet *>(p->second);
219  } else {
220  throw cms::Exception("WrongTrackerSubDet") << "Invalid DetID: no GeomDetUnit associated with raw ID "
221  << s.rawId() << " of subdet ID " << s.subdetId();
222  }
223 }
const TrackerGeomDet * TrackerGeometry::idToDetUnit ( DetId  ) const
overridevirtual

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

Implements TrackingGeometry.

Definition at line 202 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(), SiStripElectronAlgo::coarseHitSelection(), FineDelayHistosUsingDb::computeDelays(), SiStripRawProcessingAlgorithms::convertHybridDigiToRawDigiVector(), CkfDebugger::det(), SiStripFineDelayHit::detId(), detIds(), TrackingNtuple::fillSimHits(), GlobalHitsProdHist::fillTrk(), GlobalHitsAnalyzer::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(), FastPrimaryVertexProducer::produce(), reco::modules::CosmicTrackSplitter::produce(), SiStripRegionConnectivity::produceRegionCabling(), SiStripElectronAlgo::projectPhiBand(), SiPixelCoordinates::roc(), SiStripRecHitConverterAlgorithm::run(), SiPixelClusterProducer::run(), cms::SiPixelRecHitConverter::run(), ShallowGainCalibration::thickness(), SiStripRecHitConverterAlgorithm::useModule(), ValidateGeometry::validatePixelTopology(), SiPixelCoordinates::xcoord_on_module_(), and SiPixelCoordinates::ycoord_on_module_().

203 {
204  mapIdToDetUnit::const_iterator p=theMapUnit.find(s.rawId());
205  if (p != theMapUnit.end()) {
206  return static_cast<const TrackerGeomDet *>(p->second);
207  } else {
208  throw cms::Exception("WrongTrackerSubDet") << "Invalid DetID: no GeomDetUnit associated with raw ID "
209  << s.rawId() << " of subdet ID " << s.subdetId();
210  }
211 }
mapIdToDetUnit theMapUnit
bool TrackerGeometry::isThere ( GeomDetEnumerators::SubDetector  subdet) const
TrackerGeometry::ModuleType TrackerGeometry::moduleType ( const std::string &  name) const

Definition at line 288 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().

288  {
289  if ( name.find("Pixel") != std::string::npos ){
290  if ( name.find("BarrelActive") != std::string::npos) return ModuleType::Ph1PXB;
291  else if ( name.find("ForwardSensor") != std::string::npos) return ModuleType::Ph1PXF;
292  else if ( name.find("BModule") != std::string::npos && name.find("InnerPixelActive") != std::string::npos ) return ModuleType::Ph2PXB;
293  else if ( name.find("EModule") != std::string::npos && name.find("InnerPixelActive") != std::string::npos ) return ModuleType::Ph2PXF;
294  } else if ( name.find("TIB") != std::string::npos) {
295  if ( name.find("0") != std::string::npos) return ModuleType::IB1;
296  else return ModuleType::IB2;
297  } else if ( name.find("TOB") != std::string::npos) {
298  if ( name.find("0") != std::string::npos) return ModuleType::OB1;
299  else return ModuleType::OB2;
300  } else if ( name.find("TID") != std::string::npos) {
301  if ( name.find("0") != std::string::npos) return ModuleType::W1A;
302  else if ( name.find("1") != std::string::npos) return ModuleType::W2A;
303  else if ( name.find("2") != std::string::npos) return ModuleType::W3A;
304  } else if ( name.find("TEC") != std::string::npos) {
305  if ( name.find("0") != std::string::npos) return ModuleType::W1B;
306  else if ( name.find("1") != std::string::npos) return ModuleType::W2B;
307  else if ( name.find("2") != std::string::npos) return ModuleType::W3B;
308  else if ( name.find("3") != std::string::npos) return ModuleType::W4;
309  else if ( name.find("4") != std::string::npos) return ModuleType::W5;
310  else if ( name.find("5") != std::string::npos) return ModuleType::W6;
311  else if ( name.find("6") != std::string::npos) return ModuleType::W7;
312  }
313  if ( name.find("BModule") != std::string::npos || name.find("EModule") != std::string::npos ) {
314  if (name.find("PSMacroPixel") != std::string::npos) return ModuleType::Ph2PSP;
315  else if (name.find("PSStrip") != std::string::npos) return ModuleType::Ph2PSS;
316  else if (name.find("2S") != std::string::npos) return ModuleType::Ph2SS;
317  }
318  return ModuleType::UNKNOWN;
319 }
unsigned int TrackerGeometry::numberOfLayers ( int  subdet) const

Definition at line 235 of file TrackerGeometry.cc.

References Exception, and theNumberOfLayers.

Referenced by TrackingRecoMaterialAnalyser::bookHistograms(), dqm::TrackAnalyzer::bookHistosForEfficiencyFromHitPatter(), detIds(), TrackerGeometry(), and PixelInactiveAreaFinder::updatePixelDets().

235  {
236  if(subdet>=1 && subdet<=6) {
237  return theNumberOfLayers[subdet-1];
238  } else {
239  throw cms::Exception("WrongTrackerSubDet") << "Subdetector " << subdet;
240  }
241 }
unsigned int theNumberOfLayers[6]
unsigned int TrackerGeometry::offsetDU ( SubDetector  sid) const
inline
void TrackerGeometry::setEndsetDU ( SubDetector  sid)
inline

Definition at line 75 of file TrackerGeometry.h.

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

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

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

References detUnits(), and theOffsetDU.

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

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

Definition at line 18 of file TrackerGeometry.h.

Member Data Documentation

DetIdContainer TrackerGeometry::theDetIds
private

Definition at line 106 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theDets
private

Definition at line 104 of file TrackerGeometry.h.

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

DetTypeContainer TrackerGeometry::theDetTypes
private

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

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

DetContainer TrackerGeometry::theDetUnits
private

Definition at line 101 of file TrackerGeometry.h.

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

unsigned int TrackerGeometry::theEndsetDU[6]
private

Definition at line 103 of file TrackerGeometry.h.

Referenced by endsetDU(), and setEndsetDU().

mapIdToDet TrackerGeometry::theMap
private

Definition at line 108 of file TrackerGeometry.h.

Referenced by addDet(), and idToDet().

mapIdToDetUnit TrackerGeometry::theMapUnit
private

Definition at line 107 of file TrackerGeometry.h.

Referenced by addDetUnit(), and idToDetUnit().

unsigned int TrackerGeometry::theNumberOfLayers[6]
private

Definition at line 118 of file TrackerGeometry.h.

Referenced by numberOfLayers(), and TrackerGeometry().

unsigned int TrackerGeometry::theOffsetDU[6]
private

Definition at line 102 of file TrackerGeometry.h.

Referenced by offsetDU(), and setOffsetDU().

DetContainer TrackerGeometry::thePXBDets
private

Definition at line 110 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::thePXFDets
private

Definition at line 111 of file TrackerGeometry.h.

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

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

Definition at line 117 of file TrackerGeometry.h.

Referenced by geomDetSubDetector(), and TrackerGeometry().

DetContainer TrackerGeometry::theTECDets
private

Definition at line 115 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theTIBDets
private

Definition at line 112 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theTIDDets
private

Definition at line 113 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theTOBDets
private

Definition at line 114 of file TrackerGeometry.h.

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

GeometricDet const* TrackerGeometry::theTrackerDet
private

Definition at line 95 of file TrackerGeometry.h.

Referenced by trackerDet().