CMS 3D CMS Logo

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

#include <TrackerGeometry.h>

Inheritance diagram for TrackerGeometry:
TrackingGeometry

Public Types

typedef
GeomDetEnumerators::SubDetector 
SubDetector
 
- Public Types inherited from TrackingGeometry
typedef std::vector< GeomDet
const * > 
DetContainer
 
typedef std::vector< DetIdDetIdContainer
 
typedef std::vector
< GeomDetType const * > 
DetTypeContainer
 
typedef std::vector
< GeomDetUnit const * > 
DetUnitContainer
 
typedef std::unordered_map
< unsigned int, GeomDet const * > 
mapIdToDet
 
typedef std::unordered_map
< unsigned int, GeomDetUnit
const * > 
mapIdToDetUnit
 

Public Member Functions

virtual const DetIdContainerdetIds () const
 Returm a vector of all GeomDet DetIds (including those of GeomDetUnits) More...
 
virtual const DetContainerdets () const
 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
 
virtual const DetTypeContainerdetTypes () const
 Return a vector of all det types. More...
 
virtual const DetIdContainerdetUnitIds () const
 Returm a vector of all GeomDetUnit DetIds. More...
 
virtual const DetUnitContainerdetUnits () const
 Returm a vector of all GeomDetUnit. More...
 
unsigned int endsetDU (SubDetector sid) const
 
virtual const TrackerGeomDetidToDet (DetId) const
 
virtual const TrackerGeomDetidToDetUnit (DetId) const
 Return the pointer to the GeomDetUnit corresponding to a given DetId. More...
 
unsigned int offsetDU (SubDetector sid) const
 
void setEndsetDU (SubDetector sid)
 
void setOffsetDU (SubDetector sid)
 
GeometricDet const * trackerDet () const
 
virtual ~TrackerGeometry ()
 
- Public Member Functions inherited from TrackingGeometry
virtual ~TrackingGeometry ()
 Destructor. More...
 

Private Member Functions

void addDet (GeomDet const *p)
 
void addDetId (DetId p)
 
void addDetUnit (GeomDetUnit 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
 
DetIdContainer theDetUnitIds
 
DetUnitContainer theDetUnits
 
unsigned int theEndsetDU [6]
 
mapIdToDet theMap
 
mapIdToDetUnit theMapUnit
 
unsigned int theOffsetDU [6]
 
DetContainer thePXBDets
 
DetContainer thePXFDets
 
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 28 of file TrackerGeometry.h.

Member Typedef Documentation

Definition at line 42 of file TrackerGeometry.h.

Constructor & Destructor Documentation

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

Definition at line 16 of file TrackerGeometry.cc.

16 : theTrackerDet(gd){}
GeometricDet const * theTrackerDet
TrackerGeometry::~TrackerGeometry ( )
virtual

Definition at line 18 of file TrackerGeometry.cc.

References theDets, and theDetTypes.

18  {
19  for (auto d : theDets) delete const_cast<GeomDet*>(d);
20  for (auto d : theDetTypes) delete const_cast<GeomDetType*>(d);
21 }
DetContainer theDets
DetTypeContainer theDetTypes

Member Function Documentation

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

Definition at line 54 of file TrackerGeometry.cc.

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

54  {
55  theDets.push_back(p); // add to vector
56  theMap.insert(std::make_pair(p->geographicalId().rawId(),p));
57  DetId id(p->geographicalId());
58  switch(id.subdetId()){
60  thePXBDets.push_back(p);
61  break;
63  thePXFDets.push_back(p);
64  break;
66  theTIBDets.push_back(p);
67  break;
69  theTIDDets.push_back(p);
70  break;
72  theTOBDets.push_back(p);
73  break;
75  theTECDets.push_back(p);
76  break;
77  default:
78  edm::LogError("TrackerGeometry")<<"ERROR - I was expecting a Tracker Subdetector, I got a "<<id.subdetId();
79  }
80 
81 
82 }
mapIdToDet theMap
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 84 of file TrackerGeometry.cc.

References theDetIds.

Referenced by TrackerGeomBuilderFromGeometricDet::buildGeomDet().

84  {
85  theDetIds.push_back(p);
86 }
DetIdContainer theDetIds
void TrackerGeometry::addDetUnit ( GeomDetUnit const *  p)
private

Definition at line 43 of file TrackerGeometry.cc.

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

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

43  {
44  // set index
45  const_cast<GeomDetUnit *>(p)->setIndex(theDetUnits.size());
46  theDetUnits.push_back(p); // add to vector
47  theMapUnit.insert(std::make_pair(p->geographicalId().rawId(),p));
48 }
DetUnitContainer theDetUnits
mapIdToDetUnit theMapUnit
void TrackerGeometry::addDetUnitId ( DetId  p)
private

Definition at line 50 of file TrackerGeometry.cc.

References theDetUnitIds.

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

50  {
51  theDetUnitIds.push_back(p);
52 }
DetIdContainer theDetUnitIds
void TrackerGeometry::addType ( GeomDetType const *  p)
private

Definition at line 39 of file TrackerGeometry.cc.

References theDetTypes.

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

39  {
40  theDetTypes.push_back(p); // add to vector
41 }
DetTypeContainer theDetTypes
const TrackerGeometry::DetIdContainer & TrackerGeometry::detIds ( ) const
virtual

Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)

Implements TrackingGeometry.

Definition at line 170 of file TrackerGeometry.cc.

References theDetIds.

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

171 {
172  return theDetIds;
173 }
DetIdContainer theDetIds
const TrackerGeometry::DetContainer & TrackerGeometry::dets ( ) const
virtual

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 95 of file TrackerGeometry.cc.

References theDets.

96 {
97  return theDets;
98 }
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 TrackerGeometry::DetTypeContainer & TrackerGeometry::detTypes ( ) const
virtual

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 157 of file TrackerGeometry.cc.

References theDetTypes.

158 {
159  return theDetTypes;
160 }
DetTypeContainer theDetTypes
const TrackerGeometry::DetIdContainer & TrackerGeometry::detUnitIds ( ) const
virtual

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 164 of file TrackerGeometry.cc.

References theDetUnitIds.

Referenced by TrackerGeomBuilderFromGeometricDet::buildGeomDet(), TrackerOfflineValidation::checkBookHists(), SiStripMonitorMuonHLT::createMEs(), and TkAlCaRecoMonitor::fillRawIdMap().

165 {
166  return theDetUnitIds;
167 }
DetIdContainer theDetUnitIds
const TrackerGeometry::DetUnitContainer & TrackerGeometry::detUnits ( ) const
virtual
unsigned int TrackerGeometry::endsetDU ( SubDetector  sid) const
inline

Definition at line 57 of file TrackerGeometry.h.

References theEndsetDU.

57 { return theEndsetDU[sid];}
unsigned int theEndsetDU[6]
void TrackerGeometry::finalize ( void  )
private

Definition at line 23 of file TrackerGeometry.cc.

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

23  {
24  theDetTypes.shrink_to_fit(); // owns the DetTypes
25  theDetUnits.shrink_to_fit(); // they're all also into 'theDets', so we assume 'theDets' owns them
26  theDets.shrink_to_fit(); // owns *ONLY* the GeomDet * corresponding to GluedDets.
27  theDetUnitIds.shrink_to_fit();
28  theDetIds.shrink_to_fit();
29 
30  thePXBDets.shrink_to_fit(); // not owned: they're also in 'theDets'
31  thePXFDets.shrink_to_fit(); // not owned: they're also in 'theDets'
32  theTIBDets.shrink_to_fit(); // not owned: they're also in 'theDets'
33  theTIDDets.shrink_to_fit(); // not owned: they're also in 'theDets'
34  theTOBDets.shrink_to_fit(); // not owned: they're also in 'theDets'
35  theTECDets.shrink_to_fit(); // not owned: they're also in 'theDets'
36 }
DetIdContainer theDetIds
DetIdContainer theDetUnitIds
DetContainer theTECDets
DetContainer theDets
DetUnitContainer theDetUnits
DetTypeContainer theDetTypes
DetContainer theTIDDets
DetContainer thePXBDets
DetContainer thePXFDets
DetContainer theTIBDets
DetContainer theTOBDets
const TrackerGeomDet * TrackerGeometry::idToDet ( DetId  ) const
virtual

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

Implements TrackingGeometry.

Definition at line 147 of file TrackerGeometry.cc.

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

Referenced by FWRecoGeometryESProducer::addTECGeometry(), FWRecoGeometryESProducer::addTIBGeometry(), FWRecoGeometryESProducer::addTIDGeometry(), FWRecoGeometryESProducer::addTOBGeometry(), SiPixelRecHitsValid::analyze(), SiStripLAProfileBooker::analyze(), SiPixelTrackResidualSource::analyze(), SiPixelTrackingRecHitsValid::analyze(), SiPixelMuonHLT::analyze(), analyzer::SiPixelLorentzAngle::analyze(), SiStripMonitorMuonHLT::analyze(), SiStripRecHitsValid::analyze(), SiStripTrackingRecHitsValid::analyze(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::AnalyzeOccupancy(), SiStripMonitorMuonHLT::analyzeOnTrackClusters(), SiStripLAProfileBooker::beginRun(), SiPixelErrorsDigisToCalibDigis::bookDQMHistoPlaquetteSummary2D(), SiPixelOfflineCalibAnalysisBase::bookDQMHistoPlaquetteSummary2D(), PixelBladeBuilder::build(), PixelRodBuilder::build(), TECWedgeBuilder::build(), TIBRingBuilder::build(), TIDRingBuilder::build(), TOBRodBuilder::build(), SeedFromGenericPairOrTriplet::buildSeed(), SiStripFineDelayHit::closestCluster(), SeedFromNuclearInteraction::construct(), LaserAlignment::endRunProduce(), SiStripBadAPVAlgorithmFromClusterOccupancy::extractBadAPVs(), SiStripHotStripAlgorithmFromClusterOccupancy::extractBadStrips(), SiPixelClusterModule::fill(), TkAlCaRecoMonitor::fillHitmaps(), QcdLowPtDQM::fillPixels(), TrackerOfflineValidationSummary::fillTree(), TrackerOfflineValidation::fillTree(), GlobalRecHitsAnalyzer::fillTrk(), GlobalRecHitsProducer::fillTrk(), SiStripElectronAlgo::findElectron(), SiStripFineDelayTLA::findtrackangle(), SiStripMonitorMuonHLT::GeometryFromTrackGeom(), SiPixelQuality::getBadRocPositions(), NuclearTester::HitPositions(), HLTPixelClusterShapeFilter::hltFilter(), TrackerRecHit::init(), SiTrackerGaussianSmearingRecHitConverter::matchHits(), SiStripMonitorMuonHLT::Normalizer(), TrackMerger::MomentumSort::operator()(), CompareDetY_plus::operator()(), CompareHitY::operator()(), CompareHitY_plus::operator()(), CompareDetY_minus::operator()(), SeedFromNuclearInteraction::outerHitPosition(), HIPixelClusterVtxProducer::produce(), PixelClusterSelectorTopBottom::produce(), StripClusterSelectorTopBottom::produce(), TrackCandidateProducer::produce(), TrajectorySeedProducer::produce(), ConvBremSeedProducer::produce(), SiStripElectronAlgo::projectPhiBand(), TrackInfoProducerAlgorithm::run(), SeedFromGenericPairOrTriplet::seedFromPair(), SeedFromGenericPairOrTriplet::seedFromTriplet(), SeedFromNuclearInteraction::setMeasurements(), SiTrackerGaussianSmearingRecHitConverter::smearHits(), LaserAlignment::testRoutine(), FastTSGFromPropagation::trackerSeeds(), LaserDQM::trackerStatistics(), and TrajectoryAtInvalidHit::TrajectoryAtInvalidHit().

148 {
149  mapIdToDet::const_iterator p=theMap.find(s.rawId());
150  if (p != theMap.end())
151  return static_cast<const TrackerGeomDet *>(p->second);
152  edm::LogError("TrackerGeometry")<<"Invalid DetID: no GeomDet associated";
153  return nullptr;
154 }
mapIdToDet theMap
const TrackerGeomDet * TrackerGeometry::idToDetUnit ( DetId  ) const
virtual

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

Implements TrackingGeometry.

Definition at line 137 of file TrackerGeometry.cc.

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

Referenced by FWRecoGeometryESProducer::addPixelBarrelGeometry(), FWRecoGeometryESProducer::addPixelForwardGeometry(), SiStripCalibLorentzAngle::algoBeginJob(), SiPixelHitEfficiencySource::analyze(), SiStripRecHitsValid::analyze(), SiStripTrackingRecHitsValid::analyze(), SiStripElectronAlgo::coarseHitSelection(), FineDelayHistosUsingDb::computeDelays(), CkfDebugger::det(), SiStripFineDelayHit::detId(), GlobalHitsAnalyzer::fillTrk(), GlobalHitsProdHist::fillTrk(), GlobalHitsProducer::fillTrk(), SiTrackerGaussianSmearingRecHitConverter::gaussianSmearing(), SiStripMonitorMuonHLT::GeometryFromTrackGeom(), DeDxTools::makeCalibrationMap(), CkfDebugger::nextCorrectHits(), SiStripMonitorMuonHLT::Normalizer(), CkfDebugger::position(), CkfDebugger::printSimHits(), SiClusterTranslator::produce(), SiStripElectronAlgo::projectPhiBand(), SiTrackerGaussianSmearingRecHitConverter::smearHits(), and ShallowGainCalibration::thickness().

138 {
139  mapIdToDetUnit::const_iterator p=theMapUnit.find(s.rawId());
140  if (p != theMapUnit.end())
141  return static_cast<const TrackerGeomDet *>(p->second);
142  edm::LogError("TrackerGeometry")<<"Invalid DetID: no GeomDetUnit associated";
143  return nullptr;
144 }
mapIdToDetUnit theMapUnit
unsigned int TrackerGeometry::offsetDU ( SubDetector  sid) const
inline

Definition at line 56 of file TrackerGeometry.h.

References theOffsetDU.

Referenced by PixelCPEBase::fillDetParams(), and StripCPE::fillParams().

56 { return theOffsetDU[sid];}
unsigned int theOffsetDU[6]
void TrackerGeometry::setEndsetDU ( SubDetector  sid)
inline

Definition at line 60 of file TrackerGeometry.h.

References detUnits(), and theEndsetDU.

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

60 { theEndsetDU[sid]=detUnits().size();}
virtual const DetUnitContainer & detUnits() const
Returm a vector of all GeomDetUnit.
unsigned int theEndsetDU[6]
void TrackerGeometry::setOffsetDU ( SubDetector  sid)
inline

Definition at line 59 of file TrackerGeometry.h.

References detUnits(), and theOffsetDU.

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

59 { theOffsetDU[sid]=detUnits().size();}
unsigned int theOffsetDU[6]
virtual const DetUnitContainer & detUnits() const
Returm a vector of all GeomDetUnit.
GeometricDet const* TrackerGeometry::trackerDet ( ) const
inline

Definition at line 62 of file TrackerGeometry.h.

References theTrackerDet.

62 {return theTrackerDet;}
GeometricDet const * theTrackerDet

Friends And Related Function Documentation

friend class GeometryAligner
friend

Aligner has access to map.

Definition at line 76 of file TrackerGeometry.h.

Definition at line 32 of file TrackerGeometry.h.

Member Data Documentation

DetIdContainer TrackerGeometry::theDetIds
private

Definition at line 84 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theDets
private

Definition at line 82 of file TrackerGeometry.h.

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

DetTypeContainer TrackerGeometry::theDetTypes
private

Definition at line 78 of file TrackerGeometry.h.

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

DetIdContainer TrackerGeometry::theDetUnitIds
private

Definition at line 83 of file TrackerGeometry.h.

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

DetUnitContainer TrackerGeometry::theDetUnits
private

Definition at line 79 of file TrackerGeometry.h.

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

unsigned int TrackerGeometry::theEndsetDU[6]
private

Definition at line 81 of file TrackerGeometry.h.

Referenced by endsetDU(), and setEndsetDU().

mapIdToDet TrackerGeometry::theMap
private

Definition at line 86 of file TrackerGeometry.h.

Referenced by addDet(), and idToDet().

mapIdToDetUnit TrackerGeometry::theMapUnit
private

Definition at line 85 of file TrackerGeometry.h.

Referenced by addDetUnit(), and idToDetUnit().

unsigned int TrackerGeometry::theOffsetDU[6]
private

Definition at line 80 of file TrackerGeometry.h.

Referenced by offsetDU(), and setOffsetDU().

DetContainer TrackerGeometry::thePXBDets
private

Definition at line 88 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::thePXFDets
private

Definition at line 89 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theTECDets
private

Definition at line 93 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theTIBDets
private

Definition at line 90 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theTIDDets
private

Definition at line 91 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theTOBDets
private

Definition at line 92 of file TrackerGeometry.h.

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

GeometricDet const* TrackerGeometry::theTrackerDet
private

Definition at line 73 of file TrackerGeometry.h.

Referenced by trackerDet().