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

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
 
void fillTestMap (const GeometricDet *gd)
 
const
GeomDetEnumerators::SubDetector 
geomDetSubDetector (int subdet) const
 
float getDetectorThickness (DetId) const
 
ModuleType getDetectorType (DetId) const
 
virtual const TrackerGeomDetidToDet (DetId) const
 
virtual 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  theDets.push_back(p); // add to vector
160  theMap.insert(std::make_pair(p->geographicalId().rawId(),p));
161  DetId id(p->geographicalId());
162  switch(id.subdetId()){
164  thePXBDets.push_back(p);
165  break;
167  thePXFDets.push_back(p);
168  break;
170  theTIBDets.push_back(p);
171  break;
173  theTIDDets.push_back(p);
174  break;
176  theTOBDets.push_back(p);
177  break;
179  theTECDets.push_back(p);
180  break;
181  default:
182  edm::LogError("TrackerGeometry")<<"ERROR - I was expecting a Tracker Subdetector, I got a "<<id.subdetId();
183  }
184 
185 
186 }
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 188 of file TrackerGeometry.cc.

References theDetIds.

Referenced by TrackerGeomBuilderFromGeometricDet::buildGeomDet().

188  {
189  theDetIds.push_back(p);
190 }
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 TrackerGeometry::DetIdContainer & TrackerGeometry::detIds ( ) const
virtual

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

Implements TrackingGeometry.

Definition at line 300 of file TrackerGeometry.cc.

References theDetIds.

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

301 {
302  return theDetIds;
303 }
DetIdContainer theDetIds
const TrackerGeometry::DetContainer & TrackerGeometry::dets ( ) const
virtual

Returm a vector of all GeomDet (including all GeomDetUnits)

Implements TrackingGeometry.

Definition at line 199 of file TrackerGeometry.cc.

References theDets.

Referenced by MeasurementTrackerImpl::checkDets().

200 {
201  return theDets;
202 }
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 287 of file TrackerGeometry.cc.

References theDetTypes.

288 {
289  return theDetTypes;
290 }
DetTypeContainer theDetTypes
const TrackerGeometry::DetIdContainer & TrackerGeometry::detUnitIds ( ) const
virtual

Returm a vector of all GeomDetUnit DetIds.

Implements TrackingGeometry.

Definition at line 294 of file TrackerGeometry.cc.

References theDetUnitIds.

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

295 {
296  return theDetUnitIds;
297 }
DetIdContainer theDetUnitIds
const TrackerGeometry::DetUnitContainer & TrackerGeometry::detUnits ( ) const
virtual
unsigned int TrackerGeometry::endsetDU ( SubDetector  sid) const
inline

Definition at line 62 of file TrackerGeometry.h.

References theEndsetDU.

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

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

304  {
305 
306  std::string temp = gd->name();
307  std::string name = temp.substr(temp.find(":")+1);
308  DetId detid = gd->geographicalId();
309  float thickness = gd->bounds()->thickness();
310  std::string nameTag;
312  if (theDetTypetList.size() == 0) {
313  theDetTypetList.push_back({std::make_tuple(detid, mtype, thickness)});
314  } else {
315  auto & t = (*(theDetTypetList.end()-1));
316  if (std::get<1>(t) != mtype) theDetTypetList.push_back({std::make_tuple(detid, mtype, thickness)});
317  else {
318  if ( detid > std::get<0>(t) ) std::get<0>(t) = detid;
319  }
320  }
321 }
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 261 of file TrackerGeometry.cc.

References Exception, and theSubDetTypeMap.

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

261  {
262  if(subdet>=1 && subdet<=6) {
263  return theSubDetTypeMap[subdet-1];
264  } else {
265  throw cms::Exception("WrongTrackerSubDet") << "Subdetector " << subdet;
266  }
267 }
GeomDetEnumerators::SubDetector theSubDetTypeMap[6]
float TrackerGeometry::getDetectorThickness ( DetId  detid) const

Definition at line 331 of file TrackerGeometry.cc.

References DetId::rawId(), and theDetTypetList.

331  {
332  for (auto iVal : theDetTypetList) {
333  DetId detid_max = std::get<0>(iVal);
334  if (detid.rawId() <= detid_max.rawId())
335  return std::get<2>(iVal);
336  }
337  return -1.0;
338 }
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 323 of file TrackerGeometry.cc.

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

323  {
324  for (auto iVal : theDetTypetList) {
325  DetId detid_max = std::get<0>(iVal);
326  TrackerGeometry::ModuleType mtype = std::get<1>(iVal);
327  if (detid.rawId() <= detid_max.rawId()) return mtype;
328  }
330 }
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 251 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().

252 {
253  mapIdToDet::const_iterator p=theMap.find(s.rawId());
254  if (p != theMap.end())
255  return static_cast<const TrackerGeomDet *>(p->second);
256  edm::LogError("TrackerGeometry")<<"Invalid DetID: no GeomDet associated";
257  return nullptr;
258 }
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 241 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(), 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().

242 {
243  mapIdToDetUnit::const_iterator p=theMapUnit.find(s.rawId());
244  if (p != theMapUnit.end())
245  return static_cast<const TrackerGeomDet *>(p->second);
246  edm::LogError("TrackerGeometry")<<"Invalid DetID: no GeomDetUnit associated";
247  return nullptr;
248 }
mapIdToDetUnit theMapUnit
bool TrackerGeometry::isThere ( GeomDetEnumerators::SubDetector  subdet) const

Definition at line 279 of file TrackerGeometry.cc.

References geomDetSubDetector(), and i.

279  {
280  for(unsigned int i=1;i<7;++i) {
281  if(subdet == geomDetSubDetector(i)) return true;
282  }
283  return false;
284 }
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 340 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().

340  {
341  if ( name.find("PixelBarrel") != std::string::npos) return ModuleType::Ph1PXB;
342  else if (name.find("PixelForward") != std::string::npos) return ModuleType::Ph1PXF;
343  else if ( name.find("TIB") != std::string::npos) {
344  if ( name.find("0") != std::string::npos) return ModuleType::IB1;
345  else return ModuleType::IB2;
346  } else if ( name.find("TOB") != std::string::npos) {
347  if ( name.find("0") != std::string::npos) return ModuleType::OB1;
348  else return ModuleType::OB2;
349  } else if ( name.find("TID") != std::string::npos) {
350  if ( name.find("0") != std::string::npos) return ModuleType::W1A;
351  else if ( name.find("1") != std::string::npos) return ModuleType::W2A;
352  else if ( name.find("2") != std::string::npos) return ModuleType::W3A;
353  } else if ( name.find("TEC") != std::string::npos) {
354  if ( name.find("0") != std::string::npos) return ModuleType::W1B;
355  else if ( name.find("1") != std::string::npos) return ModuleType::W2B;
356  else if ( name.find("2") != std::string::npos) return ModuleType::W3B;
357  else if ( name.find("3") != std::string::npos) return ModuleType::W4;
358  else if ( name.find("4") != std::string::npos) return ModuleType::W5;
359  else if ( name.find("5") != std::string::npos) return ModuleType::W6;
360  else if ( name.find("6") != std::string::npos) return ModuleType::W7;
361  } else if ( name.find("BModule") != std::string::npos || name.find("EModule") != std::string::npos ) {
362  if (name.find("PSMacroPixel") != std::string::npos) return ModuleType::Ph2PSP;
363  else if (name.find("PSStrip") != std::string::npos) return ModuleType::Ph2PSS;
364  else if (name.find("2S") != std::string::npos) return ModuleType::Ph2SS;
365  }
366  return ModuleType::UNKNOWN;
367 }
unsigned int TrackerGeometry::numberOfLayers ( int  subdet) const

Definition at line 270 of file TrackerGeometry.cc.

References Exception, and theNumberOfLayers.

Referenced by TrackerGeometry().

270  {
271  if(subdet>=1 && subdet<=6) {
272  return theNumberOfLayers[subdet-1];
273  } else {
274  throw cms::Exception("WrongTrackerSubDet") << "Subdetector " << subdet;
275  }
276 }
unsigned int theNumberOfLayers[6]
unsigned int TrackerGeometry::offsetDU ( SubDetector  sid) const
inline

Definition at line 61 of file TrackerGeometry.h.

References theOffsetDU.

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

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

Definition at line 65 of file TrackerGeometry.h.

References detUnits(), and theEndsetDU.

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

65 { 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 64 of file TrackerGeometry.h.

References detUnits(), and theOffsetDU.

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

64 { 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 70 of file TrackerGeometry.h.

References theTrackerDet.

70 {return theTrackerDet;}
GeometricDet const * theTrackerDet

Friends And Related Function Documentation

friend class GeometryAligner
friend

Aligner has access to map.

Definition at line 88 of file TrackerGeometry.h.

Definition at line 32 of file TrackerGeometry.h.

Member Data Documentation

DetIdContainer TrackerGeometry::theDetIds
private

Definition at line 96 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theDets
private

Definition at line 94 of file TrackerGeometry.h.

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

DetTypeContainer TrackerGeometry::theDetTypes
private

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

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

DetUnitContainer TrackerGeometry::theDetUnits
private

Definition at line 91 of file TrackerGeometry.h.

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

unsigned int TrackerGeometry::theEndsetDU[6]
private

Definition at line 93 of file TrackerGeometry.h.

Referenced by endsetDU(), and setEndsetDU().

mapIdToDet TrackerGeometry::theMap
private

Definition at line 98 of file TrackerGeometry.h.

Referenced by addDet(), and idToDet().

mapIdToDetUnit TrackerGeometry::theMapUnit
private

Definition at line 97 of file TrackerGeometry.h.

Referenced by addDetUnit(), and idToDetUnit().

unsigned int TrackerGeometry::theNumberOfLayers[6]
private

Definition at line 108 of file TrackerGeometry.h.

Referenced by numberOfLayers(), and TrackerGeometry().

unsigned int TrackerGeometry::theOffsetDU[6]
private

Definition at line 92 of file TrackerGeometry.h.

Referenced by offsetDU(), and setOffsetDU().

DetContainer TrackerGeometry::thePXBDets
private

Definition at line 100 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::thePXFDets
private

Definition at line 101 of file TrackerGeometry.h.

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

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

Definition at line 107 of file TrackerGeometry.h.

Referenced by geomDetSubDetector(), and TrackerGeometry().

DetContainer TrackerGeometry::theTECDets
private

Definition at line 105 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theTIBDets
private

Definition at line 102 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theTIDDets
private

Definition at line 103 of file TrackerGeometry.h.

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

DetContainer TrackerGeometry::theTOBDets
private

Definition at line 104 of file TrackerGeometry.h.

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

GeometricDet const* TrackerGeometry::theTrackerDet
private

Definition at line 85 of file TrackerGeometry.h.

Referenced by trackerDet().