CMS 3D CMS Logo

SiStripDetInfo.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: CalibFormats/SiStripObjects
4 // Class : SiStripDetInfo
5 //
6 // Implementation:
7 // [Notes on implementation]
8 //
9 // Original Author: Christopher Jones
10 // Created: Fri, 28 May 2021 20:10:25 GMT
11 //
12 
13 // system include files
14 
15 // user include files
18 
19 const std::pair<unsigned short, double> SiStripDetInfo::getNumberOfApvsAndStripLength(uint32_t detId) const {
20  std::map<uint32_t, DetInfo>::const_iterator it = detData_.find(detId);
21 
22  if (it != detData_.end()) {
23  return std::pair<unsigned short, double>(it->second.nApvs, it->second.stripLength);
24 
25  } else {
26  std::pair<unsigned short, double> defaultValue(0, 0.);
28  "SiStripDetInfoFileReader::getNumberOfApvsAndStripLength - Unable to find requested detid. Returning invalid "
29  "data ")
30  << std::endl;
31  return defaultValue;
32  }
33 }
34 
35 const float& SiStripDetInfo::getThickness(uint32_t detId) const {
36  std::map<uint32_t, DetInfo>::const_iterator it = detData_.find(detId);
37 
38  if (it != detData_.end()) {
39  return it->second.thickness;
40 
41  } else {
42  static const float defaultValue = 0;
43  edm::LogWarning("SiStripDetInfo::getThickness - Unable to find requested detid. Returning invalid data ")
44  << std::endl;
45  return defaultValue;
46  }
47 }
std::map< uint32_t, DetInfo > detData_
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
Log< level::Warning, false > LogWarning
const float & getThickness(uint32_t detId) const