Skip to content

Commit

Permalink
Merge pull request #5789 from davidlange6/add_ModuleGeometry_toTT
Browse files Browse the repository at this point in the history
DataFormats/TrackerCommon -- Add module geometry to tt
  • Loading branch information
nclopezo committed Oct 13, 2014
2 parents 7dc12f1 + 98c6f41 commit f07bbe8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions DataFormats/TrackerCommon/interface/TrackerTopology.h
Expand Up @@ -462,6 +462,8 @@ class TrackerTopology {

std::string print(DetId detid) const;

SiStripDetId::ModuleGeometry moduleGeometry(const DetId &id) const;

private:

PixelBarrelValues pbVals_;
Expand Down
23 changes: 23 additions & 0 deletions DataFormats/TrackerCommon/src/TrackerTopology.cc
Expand Up @@ -163,3 +163,26 @@ std::string TrackerTopology::print(DetId id) const {
return strstr.str();
}


SiStripDetId::ModuleGeometry TrackerTopology::moduleGeometry(const DetId &id) const {
switch(id.subdetId()) {
case StripSubdetector::TIB: return tibLayer(id)<3? SiStripDetId::IB1 : SiStripDetId::IB2;
case StripSubdetector::TOB: return tobLayer(id)<5? SiStripDetId::OB2 : SiStripDetId::OB1;
case StripSubdetector::TID: switch (tidRing(id)) {
case 1: return SiStripDetId::W1A;
case 2: return SiStripDetId::W2A;
case 3: return SiStripDetId::W3A;
}
case StripSubdetector::TEC: switch (tecRing(id)) {
case 1: return SiStripDetId::W1B;
case 2: return SiStripDetId::W2B;
case 3: return SiStripDetId::W3B;
case 4: return SiStripDetId::W4;
case 5: return SiStripDetId::W5;
case 6: return SiStripDetId::W6;
case 7: return SiStripDetId::W7;
}
}
return SiStripDetId::UNKNOWNGEOMETRY;
}

0 comments on commit f07bbe8

Please sign in to comment.