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

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

const DetIdContainerdetIds () const
 Returm a vector of all GeomDet DetIds (including those of GeomDetUnits) More...
 
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
 
const DetTypeContainerdetTypes () const
 Return a vector of all det types. More...
 
const DetIdContainerdetUnitIds () const
 Returm a vector of all GeomDetUnit DetIds. More...
 
const DetUnitContainerdetUnits () const
 Returm a vector of all GeomDetUnit. 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
 
const TrackerGeomDetidToDetUnit (DetId) const
 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
 
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
 
std::vector< std::tuple< DetId,
TrackerGeometry::ModuleType,
float > > 
theDetTypetList
 
DetIdContainer theDetUnitIds
 
DetUnitContainer 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 28 of file TrackerGeometry.h.

Member Typedef Documentation

Definition at line 42 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 48 of file TrackerGeometry.cc.

48  {
49  UNKNOWN,
50  PXB,
51  PXF,
52  IB1,
53  IB2,
54  OB1,
55  OB2,
56  W1A,
57  W2A,
58  W3A,
59  W1B,
60  W2B,
61  W3B,
62  W4,
63  W5,
64  W6,
65  W7,
66  Ph1PXB,
67  Ph1PXF,
68  Ph2PXB,
69  Ph2PXF,
70  Ph2PSP,
71  Ph2PSS,
72  Ph2SS
73 };
0: Unidentified isolated particle
Definition: ParticleCode.h:19

Constructor & Destructor Documentation

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

Definition at line 76 of file TrackerGeometry.cc.

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

76  : theTrackerDet(gd)
77 {
78  for(unsigned int i=0;i<6;++i) {
80  theNumberOfLayers[i] = 0;
81  }
82  GeometricDet::ConstGeometricDetContainer subdetgd = gd->components();
83 
84  LogDebug("BuildingSubDetTypeMap") << "GeometriDet and GeomDetEnumerators enumerator values of the subdetectors";
85  for(unsigned int i=0;i<subdetgd.size();++i) {
86  assert(subdetgd[i]->geographicalId().subdetId()>0 && subdetgd[i]->geographicalId().subdetId()<7);
87  theSubDetTypeMap[subdetgd[i]->geographicalId().subdetId()-1]= geometricDetToGeomDet(subdetgd[i]->type());
88  theNumberOfLayers[subdetgd[i]->geographicalId().subdetId()-1]= subdetgd[i]->components().size();
89  LogTrace("BuildingSubDetTypeMap") << "subdet " << i
90  << " Geometric Det type " << subdetgd[i]->type()
91  << " Geom Det type " << theSubDetTypeMap[subdetgd[i]->geographicalId().subdetId()-1]
92  << " detid " << subdetgd[i]->geographicalId()
93  << " subdetid " << subdetgd[i]->geographicalId().subdetId()
94  << " number of layers " << subdetgd[i]->components().size();
95  }
96  LogDebug("SubDetTypeMapContent") << "Content of theSubDetTypeMap";
97  for(unsigned int i=1;i<7;++i) {
98  LogTrace("SubDetTypeMapContent") << " detid subdet "<< i << " Geom Det type " << geomDetSubDetector(i);
99  }
100  LogDebug("NumberOfLayers") << "Content of theNumberOfLayers";
101  for(unsigned int i=1;i<7;++i) {
102  LogTrace("NumberOfLayers") << " detid subdet "<< i << " number of layers " << numberOfLayers(i);
103  }
104  std::vector<const GeometricDet*> deepcomp;
105  gd->deepComponents(deepcomp);
106 
107  sort(deepcomp.begin(), deepcomp.end(), DetIdComparator());
108 
109  LogDebug("ThicknessAndType") << " Total Number of Detectors " << deepcomp.size() ;
110  LogDebug("ThicknessAndType") << "Dump of sensors names and bounds";
111  for(auto det : deepcomp) {
112  fillTestMap(det);
113  LogDebug("ThicknessAndType") << det->geographicalId() << " " << det->name().fullname() << " " << det->bounds()->thickness();
114  }
115  LogDebug("DetTypeList") << " Content of DetTypetList : size " << theDetTypetList.size();
116  for (auto iVal : theDetTypetList) {
117  LogDebug("DetTypeList") << " DetId " << std::get<0>(iVal) << " Type " << std::get<1>(iVal)<< " Thickness " << std::get<2>(iVal);
118  }
119 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
const GeomDetEnumerators::SubDetector geomDetSubDetector(int subdet) const
assert(m_qm.get())
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 ( )
virtual

Definition at line 122 of file TrackerGeometry.cc.

References ztail::d, theDets, and theDetTypes.

122  {
123  for (auto d : theDets) delete const_cast<GeomDet*>(d);
124  for (auto d : theDetTypes) delete const_cast<GeomDetType*>(d);
125 }
DetContainer theDets
tuple d
Definition: ztail.py:151
DetTypeContainer theDetTypes

Member Function Documentation

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

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

158  {
159  // set index
160  const_cast<GeomDet *>(p)->setGdetIndex(theDets.size());
161  theDets.push_back(p); // add to vector
162  theMap.insert(std::make_pair(p->geographicalId().rawId(),p));
163  DetId id(p->geographicalId());
164  switch(id.subdetId()){
166  thePXBDets.push_back(p);
167  break;
169  thePXFDets.push_back(p);
170  break;
172  theTIBDets.push_back(p);
173  break;
175  theTIDDets.push_back(p);
176  break;
178  theTOBDets.push_back(p);
179  break;
181  theTECDets.push_back(p);
182  break;
183  default:
184  edm::LogError("TrackerGeometry")<<"ERROR - I was expecting a Tracker Subdetector, I got a "<<id.subdetId();
185  }
186 
187 
188 }
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 190 of file TrackerGeometry.cc.

References theDetIds.

Referenced by TrackerGeomBuilderFromGeometricDet::buildGeomDet().

190  {
191  theDetIds.push_back(p);
192 }
DetIdContainer theDetIds
void TrackerGeometry::addDetUnit ( GeomDetUnit const *  p)
private

Definition at line 147 of file TrackerGeometry.cc.

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

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

147  {
148  // set index
149  const_cast<GeomDetUnit *>(p)->setIndex(theDetUnits.size());
150  theDetUnits.push_back(p); // add to vector
151  theMapUnit.insert(std::make_pair(p->geographicalId().rawId(),p));
152 }
DetUnitContainer theDetUnits
mapIdToDetUnit theMapUnit
void TrackerGeometry::addDetUnitId ( DetId  p)
private

Definition at line 154 of file TrackerGeometry.cc.

References theDetUnitIds.

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

154  {
155  theDetUnitIds.push_back(p);
156 }
DetIdContainer theDetUnitIds
void TrackerGeometry::addType ( GeomDetType const *  p)
private

Definition at line 143 of file TrackerGeometry.cc.

References theDetTypes.

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

143  {
144  theDetTypes.push_back(p); // add to vector
145 }
DetTypeContainer theDetTypes
const DetIdContainer& TrackerGeometry::detIds ( ) const
inlinevirtual

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

Implements TrackingGeometry.

Definition at line 52 of file TrackerGeometry.h.

References theDetIds.

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

52 { return theDetIds;}
DetIdContainer theDetIds
const DetContainer& TrackerGeometry::dets ( ) const
inlinevirtual

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 50 of file TrackerGeometry.h.

References theDets.

Referenced by MeasurementTrackerImpl::checkDets().

50 {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
inlinevirtual

Return a vector of all det types.

Implements TrackingGeometry.

Definition at line 48 of file TrackerGeometry.h.

References theDetTypes.

48 {return theDetTypes;}
DetTypeContainer theDetTypes
const DetIdContainer& TrackerGeometry::detUnitIds ( ) const
inlinevirtual

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 51 of file TrackerGeometry.h.

References theDetUnitIds.

Referenced by TrackerTreeGenerator::analyze(), TrackerGeomBuilderFromGeometricDet::buildGeomDet(), TrackerOfflineValidation::checkBookHists(), and TkAlCaRecoMonitor::fillRawIdMap().

51 {return theDetUnitIds;}
DetIdContainer theDetUnitIds
const DetUnitContainer& TrackerGeometry::detUnits ( ) const
inlinevirtual
unsigned int TrackerGeometry::endsetDU ( SubDetector  sid) const
inline

Definition at line 61 of file TrackerGeometry.h.

References theEndsetDU.

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

Definition at line 277 of file TrackerGeometry.cc.

References GeometricDet::bounds(), GeometricDet::geographicalId(), moduleType(), mergeVDriftHistosByStation::name, GeometricDet::name(), AlCaHLTBitMon_QueryRunRegistry::string, lumiQTWidget::t, groupFilesInBlocks::temp, and theDetTypetList.

Referenced by TrackerGeometry().

277  {
278 
279  std::string temp = gd->name();
280  std::string name = temp.substr(temp.find(":")+1);
281  DetId detid = gd->geographicalId();
282  float thickness = gd->bounds()->thickness();
283  std::string nameTag;
285  if (theDetTypetList.size() == 0) {
286  theDetTypetList.push_back({std::make_tuple(detid, mtype, thickness)});
287  } else {
288  auto & t = (*(theDetTypetList.end()-1));
289  if (std::get<1>(t) != mtype) theDetTypetList.push_back({std::make_tuple(detid, mtype, thickness)});
290  else {
291  if ( detid > std::get<0>(t) ) std::get<0>(t) = detid;
292  }
293  }
294 }
DDName const & name() const
Definition: GeometricDet.h:144
std::unique_ptr< Bounds > bounds() const
ModuleType moduleType(const std::string &name) const
Definition: DetId.h:18
DetId geographicalId() const
Definition: GeometricDet.h:210
std::vector< std::tuple< DetId, TrackerGeometry::ModuleType, float > > theDetTypetList
void TrackerGeometry::finalize ( void  )
private

Definition at line 127 of file TrackerGeometry.cc.

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

127  {
128  theDetTypes.shrink_to_fit(); // owns the DetTypes
129  theDetUnits.shrink_to_fit(); // they're all also into 'theDets', so we assume 'theDets' owns them
130  theDets.shrink_to_fit(); // owns *ONLY* the GeomDet * corresponding to GluedDets.
131  theDetUnitIds.shrink_to_fit();
132  theDetIds.shrink_to_fit();
133 
134  thePXBDets.shrink_to_fit(); // not owned: they're also in 'theDets'
135  thePXFDets.shrink_to_fit(); // not owned: they're also in 'theDets'
136  theTIBDets.shrink_to_fit(); // not owned: they're also in 'theDets'
137  theTIDDets.shrink_to_fit(); // not owned: they're also in 'theDets'
138  theTOBDets.shrink_to_fit(); // not owned: they're also in 'theDets'
139  theTECDets.shrink_to_fit(); // not owned: they're also in 'theDets'
140 }
DetIdContainer theDetIds
DetIdContainer theDetUnitIds
DetContainer theTECDets
DetContainer theDets
DetUnitContainer theDetUnits
DetTypeContainer theDetTypes
DetContainer theTIDDets
DetContainer thePXBDets
DetContainer thePXFDets
DetContainer theTIBDets
DetContainer theTOBDets
const GeomDetEnumerators::SubDetector TrackerGeometry::geomDetSubDetector ( int  subdet) const

Definition at line 252 of file TrackerGeometry.cc.

References Exception, and theSubDetTypeMap.

Referenced by MeasurementTrackerImpl::initialize(), isThere(), SeedClusterRemover::process(), HLTTrackClusterRemoverNew::process(), HITrackClusterRemover::process(), and TrackerGeometry().

252  {
253  if(subdet>=1 && subdet<=6) {
254  return theSubDetTypeMap[subdet-1];
255  } else {
256  throw cms::Exception("WrongTrackerSubDet") << "Subdetector " << subdet;
257  }
258 }
GeomDetEnumerators::SubDetector theSubDetTypeMap[6]
float TrackerGeometry::getDetectorThickness ( DetId  detid) const

Definition at line 304 of file TrackerGeometry.cc.

References DetId::rawId(), and theDetTypetList.

304  {
305  for (auto iVal : theDetTypetList) {
306  DetId detid_max = std::get<0>(iVal);
307  if (detid.rawId() <= detid_max.rawId())
308  return std::get<2>(iVal);
309  }
310  return -1.0;
311 }
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
Definition: DetId.h:18
std::vector< std::tuple< DetId, TrackerGeometry::ModuleType, float > > theDetTypetList
TrackerGeometry::ModuleType TrackerGeometry::getDetectorType ( DetId  detid) const

Definition at line 296 of file TrackerGeometry.cc.

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

296  {
297  for (auto iVal : theDetTypetList) {
298  DetId detid_max = std::get<0>(iVal);
299  TrackerGeometry::ModuleType mtype = std::get<1>(iVal);
300  if (detid.rawId() <= detid_max.rawId()) return mtype;
301  }
303 }
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
Definition: DetId.h:18
std::vector< std::tuple< DetId, TrackerGeometry::ModuleType, float > > theDetTypetList
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 242 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(), TrackerTreeGenerator::analyze(), analyzer::SiPixelLorentzAngle::analyze(), SiStripRecHitsValid::analyze(), SiStripTrackingRecHitsValid::analyze(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::AnalyzeOccupancy(), SiStripLAProfileBooker::beginRun(), SiPixelErrorsDigisToCalibDigis::bookDQMHistoPlaquetteSummary2D(), SiPixelOfflineCalibAnalysisBase::bookDQMHistoPlaquetteSummary2D(), TOBRodBuilder::build(), Phase2OTBarrelRodBuilder::build(), Phase2OTEndcapRingBuilder::build(), PixelRodBuilder::build(), TECWedgeBuilder::build(), TIBRingBuilder::build(), TIDRingBuilder::build(), PixelBladeBuilder< T >::build(), SeedFromGenericPairOrTriplet::buildSeed(), SiStripFineDelayHit::closestCluster(), SeedFromNuclearInteraction::construct(), LaserAlignment::endRunProduce(), SiStripBadAPVAlgorithmFromClusterOccupancy::extractBadAPVs(), SiStripHotStripAlgorithmFromClusterOccupancy::extractBadStrips(), SiPixelClusterModule::fill(), TkAlCaRecoMonitor::fillHitmaps(), QcdLowPtDQM::fillPixels(), TrackerOfflineValidationSummary::fillTree(), GlobalRecHitsAnalyzer::fillTrk(), GlobalRecHitsProducer::fillTrk(), SiStripElectronAlgo::findElectron(), SiStripFineDelayTLA::findtrackangle(), SiPixelQuality::getBadRocPositions(), NuclearTester::HitPositions(), HLTPixelClusterShapeFilter::hltFilter(), SeedMatcher::matchRecHitCombinations(), TrackMerger::MomentumSort::operator()(), CompareDetY_plus::operator()(), CompareHitY::operator()(), CompareHitY_plus::operator()(), CompareDetY_minus::operator()(), SeedFromNuclearInteraction::outerHitPosition(), PixelVertexProducerClusters::produce(), HIPixelClusterVtxProducer::produce(), PixelClusterSelectorTopBottom::produce(), StripClusterSelectorTopBottom::produce(), ClusterCompatibilityProducer::produce(), ConvBremSeedProducer::produce(), SiTrackerGaussianSmearingRecHitConverter::produce(), SiStripElectronAlgo::projectPhiBand(), TrackInfoProducerAlgorithm::run(), SeedFromGenericPairOrTriplet::seedFromPair(), SeedFromGenericPairOrTriplet::seedFromTriplet(), SeedFromNuclearInteraction::setMeasurements(), TrackerOfflineValidation::setUpTreeMembers(), LaserAlignment::testRoutine(), FastTSGFromPropagation::trackerSeeds(), LaserDQM::trackerStatistics(), and TrajectoryAtInvalidHit::TrajectoryAtInvalidHit().

243 {
244  mapIdToDet::const_iterator p=theMap.find(s.rawId());
245  if (p != theMap.end())
246  return static_cast<const TrackerGeomDet *>(p->second);
247  edm::LogError("TrackerGeometry")<<"Invalid DetID: no GeomDet associated";
248  return nullptr;
249 }
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 232 of file TrackerGeometry.cc.

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

Referenced by FWRecoGeometryESProducer::addPixelBarrelGeometry(), FWRecoGeometryESProducer::addPixelForwardGeometry(), SiStripHitEffFromCalibTree::algoAnalyze(), SiStripCalibLorentzAngle::algoBeginJob(), SiPixelHitEfficiencySource::analyze(), SiStripRecHitsValid::analyze(), SiStripTrackingRecHitsValid::analyze(), SiStripElectronAlgo::coarseHitSelection(), FineDelayHistosUsingDb::computeDelays(), CkfDebugger::det(), SiStripFineDelayHit::detId(), GlobalHitsProdHist::fillTrk(), GlobalHitsAnalyzer::fillTrk(), GlobalHitsProducer::fillTrk(), DeDxTools::makeCalibrationMap(), CkfDebugger::nextCorrectHits(), CkfDebugger::position(), CkfDebugger::printSimHits(), StandaloneTrackMonitor::processClusters(), StandaloneTrackMonitor::processHit(), PixelVertexProducerClusters::produce(), Phase2TrackerClusterizer::produce(), Phase2TrackerRecHits::produce(), SiTrackerGaussianSmearingRecHitConverter::produce(), SiStripElectronAlgo::projectPhiBand(), SiTrackerGaussianSmearingRecHitConverter::smear(), and ShallowGainCalibration::thickness().

233 {
234  mapIdToDetUnit::const_iterator p=theMapUnit.find(s.rawId());
235  if (p != theMapUnit.end())
236  return static_cast<const TrackerGeomDet *>(p->second);
237  edm::LogError("TrackerGeometry")<<"Invalid DetID: no GeomDetUnit associated";
238  return nullptr;
239 }
mapIdToDetUnit theMapUnit
bool TrackerGeometry::isThere ( GeomDetEnumerators::SubDetector  subdet) const

Definition at line 270 of file TrackerGeometry.cc.

References geomDetSubDetector(), and i.

270  {
271  for(unsigned int i=1;i<7;++i) {
272  if(subdet == geomDetSubDetector(i)) return true;
273  }
274  return false;
275 }
int i
Definition: DBlmapReader.cc:9
const GeomDetEnumerators::SubDetector geomDetSubDetector(int subdet) const
TrackerGeometry::ModuleType TrackerGeometry::moduleType ( const std::string &  name) const

Definition at line 313 of file TrackerGeometry.cc.

References IB1, IB2, OB1, OB2, Ph1PXB, Ph1PXF, Ph2PSP, Ph2PSS, Ph2SS, UNKNOWN, W1A, W1B, W2A, W2B, W3A, W3B, W4, W5, W6, and W7.

Referenced by fillTestMap().

313  {
314  if ( name.find("PixelBarrel") != std::string::npos) return ModuleType::Ph1PXB;
315  else if (name.find("PixelForward") != std::string::npos) return ModuleType::Ph1PXF;
316  else if ( name.find("TIB") != std::string::npos) {
317  if ( name.find("0") != std::string::npos) return ModuleType::IB1;
318  else return ModuleType::IB2;
319  } else if ( name.find("TOB") != std::string::npos) {
320  if ( name.find("0") != std::string::npos) return ModuleType::OB1;
321  else return ModuleType::OB2;
322  } else if ( name.find("TID") != std::string::npos) {
323  if ( name.find("0") != std::string::npos) return ModuleType::W1A;
324  else if ( name.find("1") != std::string::npos) return ModuleType::W2A;
325  else if ( name.find("2") != std::string::npos) return ModuleType::W3A;
326  } else if ( name.find("TEC") != std::string::npos) {
327  if ( name.find("0") != std::string::npos) return ModuleType::W1B;
328  else if ( name.find("1") != std::string::npos) return ModuleType::W2B;
329  else if ( name.find("2") != std::string::npos) return ModuleType::W3B;
330  else if ( name.find("3") != std::string::npos) return ModuleType::W4;
331  else if ( name.find("4") != std::string::npos) return ModuleType::W5;
332  else if ( name.find("5") != std::string::npos) return ModuleType::W6;
333  else if ( name.find("6") != std::string::npos) return ModuleType::W7;
334  } else if ( name.find("BModule") != std::string::npos || name.find("EModule") != std::string::npos ) {
335  if (name.find("PSMacroPixel") != std::string::npos) return ModuleType::Ph2PSP;
336  else if (name.find("PSStrip") != std::string::npos) return ModuleType::Ph2PSS;
337  else if (name.find("2S") != std::string::npos) return ModuleType::Ph2SS;
338  }
339  return ModuleType::UNKNOWN;
340 }
unsigned int TrackerGeometry::numberOfLayers ( int  subdet) const

Definition at line 261 of file TrackerGeometry.cc.

References Exception, and theNumberOfLayers.

Referenced by TrackerGeometry().

261  {
262  if(subdet>=1 && subdet<=6) {
263  return theNumberOfLayers[subdet-1];
264  } else {
265  throw cms::Exception("WrongTrackerSubDet") << "Subdetector " << subdet;
266  }
267 }
unsigned int theNumberOfLayers[6]
unsigned int TrackerGeometry::offsetDU ( SubDetector  sid) const
inline

Definition at line 60 of file TrackerGeometry.h.

References theOffsetDU.

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

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

Definition at line 64 of file TrackerGeometry.h.

References detUnits(), and theEndsetDU.

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

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

Definition at line 63 of file TrackerGeometry.h.

References detUnits(), and theOffsetDU.

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

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

Definition at line 69 of file TrackerGeometry.h.

References theTrackerDet.

69 {return theTrackerDet;}
GeometricDet const * theTrackerDet

Friends And Related Function Documentation

friend class GeometryAligner
friend

Aligner has access to map.

Definition at line 87 of file TrackerGeometry.h.

Definition at line 32 of file TrackerGeometry.h.

Member Data Documentation

DetIdContainer TrackerGeometry::theDetIds
private

Definition at line 95 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theDets
private

Definition at line 93 of file TrackerGeometry.h.

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

DetTypeContainer TrackerGeometry::theDetTypes
private

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

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

DetUnitContainer TrackerGeometry::theDetUnits
private

Definition at line 90 of file TrackerGeometry.h.

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

unsigned int TrackerGeometry::theEndsetDU[6]
private

Definition at line 92 of file TrackerGeometry.h.

Referenced by endsetDU(), and setEndsetDU().

mapIdToDet TrackerGeometry::theMap
private

Definition at line 97 of file TrackerGeometry.h.

Referenced by addDet(), and idToDet().

mapIdToDetUnit TrackerGeometry::theMapUnit
private

Definition at line 96 of file TrackerGeometry.h.

Referenced by addDetUnit(), and idToDetUnit().

unsigned int TrackerGeometry::theNumberOfLayers[6]
private

Definition at line 107 of file TrackerGeometry.h.

Referenced by numberOfLayers(), and TrackerGeometry().

unsigned int TrackerGeometry::theOffsetDU[6]
private

Definition at line 91 of file TrackerGeometry.h.

Referenced by offsetDU(), and setOffsetDU().

DetContainer TrackerGeometry::thePXBDets
private

Definition at line 99 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::thePXFDets
private

Definition at line 100 of file TrackerGeometry.h.

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

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

Definition at line 106 of file TrackerGeometry.h.

Referenced by geomDetSubDetector(), and TrackerGeometry().

DetContainer TrackerGeometry::theTECDets
private

Definition at line 104 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theTIBDets
private

Definition at line 101 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theTIDDets
private

Definition at line 102 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theTOBDets
private

Definition at line 103 of file TrackerGeometry.h.

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

GeometricDet const* TrackerGeometry::theTrackerDet
private

Definition at line 84 of file TrackerGeometry.h.

Referenced by trackerDet().