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 Attributes | Friends
TrackerGeometry Class Reference

#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 __gnu_cxx::hash_map
< unsigned int, GeomDet const * > 
mapIdToDet
 
typedef __gnu_cxx::hash_map
< unsigned int, GeomDetUnit
const * > 
mapIdToDetUnit
 

Public 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)
 
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 GeomDetidToDet (DetId) const
 
virtual const GeomDetUnitidToDetUnit (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
 
 TrackerGeometry (GeometricDet const *gd=0)
 
virtual ~TrackerGeometry ()
 
- Public Member Functions inherited from TrackingGeometry
virtual ~TrackingGeometry ()
 Destructor. More...
 

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

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

Member Typedef Documentation

Definition at line 29 of file TrackerGeometry.h.

Constructor & Destructor Documentation

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

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 (DetContainer::iterator it = theDets.begin(), ed = theDets.end(); it != ed; ++it) delete const_cast<GeomDet*>(*it);
20  for (DetTypeContainer::iterator it = theDetTypes.begin(), ed = theDetTypes.end(); it != ed; ++it) delete const_cast<GeomDetType*>(*it);
21 }
DetContainer theDets
DetTypeContainer theDetTypes

Member Function Documentation

void TrackerGeometry::addDet ( GeomDet const *  p)

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

43  {
44  theDets.push_back(p); // add to vector
45  theMap.insert(std::make_pair(p->geographicalId().rawId(),p));
46  DetId id(p->geographicalId());
47  switch(id.subdetId()){
49  thePXBDets.push_back(p);
50  break;
52  thePXFDets.push_back(p);
53  break;
55  theTIBDets.push_back(p);
56  break;
58  theTIDDets.push_back(p);
59  break;
61  theTOBDets.push_back(p);
62  break;
64  theTECDets.push_back(p);
65  break;
66  default:
67  edm::LogError("TrackerGeometry")<<"ERROR - I was expecting a Tracker Subdetector, I got a "<<id.subdetId();
68  }
69 
70 
71 }
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)

Definition at line 73 of file TrackerGeometry.cc.

References theDetIds.

Referenced by TrackerGeomBuilderFromGeometricDet::buildGeomDet().

73  {
74  theDetIds.push_back(p);
75 }
DetIdContainer theDetIds
void TrackerGeometry::addDetUnit ( GeomDetUnit const *  p)

Definition at line 32 of file TrackerGeometry.cc.

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

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

32  {
33  // set index
34  const_cast<GeomDetUnit *>(p)->setIndex(theDetUnits.size());
35  theDetUnits.push_back(p); // add to vector
36  theMapUnit.insert(std::make_pair(p->geographicalId().rawId(),p));
37 }
DetUnitContainer theDetUnits
mapIdToDetUnit theMapUnit
void TrackerGeometry::addDetUnitId ( DetId  p)

Definition at line 39 of file TrackerGeometry.cc.

References theDetUnitIds.

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

39  {
40  theDetUnitIds.push_back(p);
41 }
DetIdContainer theDetUnitIds
void TrackerGeometry::addType ( GeomDetType const *  p)

Definition at line 28 of file TrackerGeometry.cc.

References theDetTypes.

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

28  {
29  theDetTypes.push_back(p); // add to vector
30 }
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 161 of file TrackerGeometry.cc.

References theDetIds.

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

162 {
163  return theDetIds;
164 }
DetIdContainer theDetIds
const TrackerGeometry::DetContainer & TrackerGeometry::dets ( ) const
virtual

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 84 of file TrackerGeometry.cc.

References theDets.

85 {
86  return theDets;
87 }
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 148 of file TrackerGeometry.cc.

References theDetTypes.

149 {
150  return theDetTypes;
151 }
DetTypeContainer theDetTypes
const TrackerGeometry::DetIdContainer & TrackerGeometry::detUnitIds ( ) const
virtual
const TrackerGeometry::DetUnitContainer & TrackerGeometry::detUnits ( ) const
virtual
unsigned int TrackerGeometry::endsetDU ( SubDetector  sid) const
inline

Definition at line 51 of file TrackerGeometry.h.

References theEndsetDU.

51 { return theEndsetDU[sid];}
unsigned int theEndsetDU[6]
const GeomDet * 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 137 of file TrackerGeometry.cc.

References relativeConstraints::geom, 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(), reco::CentralityProducer::filter(), 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().

138 {
139  mapIdToDet::const_iterator p=theMap.find(s.rawId());
140  if (p != theMap.end())
141  return (p)->second;
142  edm::LogError("TrackerGeometry")<<"Invalid DetID: no GeomDet associated";
143  GeomDet* geom = 0;
144  return geom;
145 }
mapIdToDet theMap
const GeomDetUnit * TrackerGeometry::idToDetUnit ( DetId  ) const
virtual

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

Implements TrackingGeometry.

Definition at line 126 of file TrackerGeometry.cc.

References relativeConstraints::geom, 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(), DeDxDiscriminatorLearner::Learn(), CkfDebugger::nextCorrectHits(), SiStripMonitorMuonHLT::Normalizer(), CkfDebugger::position(), CkfDebugger::printSimHits(), SiClusterTranslator::produce(), SiStripElectronAlgo::projectPhiBand(), SiTrackerGaussianSmearingRecHitConverter::smearHits(), and ShallowGainCalibration::thickness().

127 {
128  mapIdToDetUnit::const_iterator p=theMapUnit.find(s.rawId());
129  if (p != theMapUnit.end())
130  return (p)->second;
131  edm::LogError("TrackerGeometry")<<"Invalid DetID: no GeomDetUnit associated";
132  GeomDetUnit* geom = 0;
133  return geom;
134 }
mapIdToDetUnit theMapUnit
unsigned int TrackerGeometry::offsetDU ( SubDetector  sid) const
inline

Definition at line 50 of file TrackerGeometry.h.

References theOffsetDU.

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

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

Definition at line 54 of file TrackerGeometry.h.

References detUnits(), and theEndsetDU.

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

54 { 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 53 of file TrackerGeometry.h.

References detUnits(), and theOffsetDU.

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

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

Definition at line 23 of file TrackerGeometry.cc.

References theTrackerDet.

23  {
24  return theTrackerDet;
25 }
GeometricDet const * theTrackerDet

Friends And Related Function Documentation

friend class GeometryAligner
friend

Aligner has access to map.

Definition at line 70 of file TrackerGeometry.h.

Member Data Documentation

DetIdContainer TrackerGeometry::theDetIds
private

Definition at line 78 of file TrackerGeometry.h.

Referenced by addDetId(), and detIds().

DetContainer TrackerGeometry::theDets
private

Definition at line 76 of file TrackerGeometry.h.

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

DetTypeContainer TrackerGeometry::theDetTypes
private

Definition at line 72 of file TrackerGeometry.h.

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

DetIdContainer TrackerGeometry::theDetUnitIds
private

Definition at line 77 of file TrackerGeometry.h.

Referenced by addDetUnitId(), and detUnitIds().

DetUnitContainer TrackerGeometry::theDetUnits
private

Definition at line 73 of file TrackerGeometry.h.

Referenced by addDetUnit(), and detUnits().

unsigned int TrackerGeometry::theEndsetDU[6]
private

Definition at line 75 of file TrackerGeometry.h.

Referenced by endsetDU(), and setEndsetDU().

mapIdToDet TrackerGeometry::theMap
private

Definition at line 80 of file TrackerGeometry.h.

Referenced by addDet(), and idToDet().

mapIdToDetUnit TrackerGeometry::theMapUnit
private

Definition at line 79 of file TrackerGeometry.h.

Referenced by addDetUnit(), and idToDetUnit().

unsigned int TrackerGeometry::theOffsetDU[6]
private

Definition at line 74 of file TrackerGeometry.h.

Referenced by offsetDU(), and setOffsetDU().

DetContainer TrackerGeometry::thePXBDets
private

Definition at line 82 of file TrackerGeometry.h.

Referenced by addDet(), and detsPXB().

DetContainer TrackerGeometry::thePXFDets
private

Definition at line 83 of file TrackerGeometry.h.

Referenced by addDet(), and detsPXF().

DetContainer TrackerGeometry::theTECDets
private

Definition at line 87 of file TrackerGeometry.h.

Referenced by addDet(), and detsTEC().

DetContainer TrackerGeometry::theTIBDets
private

Definition at line 84 of file TrackerGeometry.h.

Referenced by addDet(), and detsTIB().

DetContainer TrackerGeometry::theTIDDets
private

Definition at line 85 of file TrackerGeometry.h.

Referenced by addDet(), and detsTID().

DetContainer TrackerGeometry::theTOBDets
private

Definition at line 86 of file TrackerGeometry.h.

Referenced by addDet(), and detsTOB().

GeometricDet const* TrackerGeometry::theTrackerDet
private

Definition at line 67 of file TrackerGeometry.h.

Referenced by trackerDet().