29 class DetIdComparator {
42 for(
unsigned int i=0;
i<2;++
i) {
49 <<
"GeometricTimingDet and GeomDetEnumerators enumerator values of the subdetectors" << std::endl;
50 for(
unsigned int i=0;
i<subdetgd.size();++
i) {
51 MTDDetId mtdid(subdetgd[
i]->geographicalId());
55 LogTrace(
"BuildingSubDetTypeMap").log( [&](
auto & debugstr) {
56 debugstr <<
"subdet " <<
i 57 <<
" Geometric Det type " << subdetgd[
i]->type()
59 <<
" detid " << std::hex << subdetgd[
i]->geographicalId().rawId() <<
std::dec 61 <<
" number of layers " << subdetgd[
i]->components().size()
65 LogDebug(
"SubDetTypeMapContent").log( [&](
auto & debugstr) {
66 debugstr <<
"Content of theSubDetTypeMap" << std::endl;
67 for(
unsigned int i=1;
i<=2;++
i) {
68 debugstr <<
" detid subdet "<<
i 72 LogDebug(
"NumberOfLayers").log( [&](
auto & debugstr) {
73 debugstr <<
"Content of theNumberOfLayers" << std::endl;
74 for(
unsigned int i=1;
i<=2;++
i) {
75 debugstr <<
" detid subdet "<<
i 79 std::vector<const GeometricTimingDet*> deepcomp;
82 sort(deepcomp.begin(), deepcomp.end(), DetIdComparator());
85 <<
" Total Number of Detectors " << deepcomp.size() << std::endl;
87 <<
"Dump of sensors names and bounds" << std::endl;
88 LogDebug(
"ThicknessAndType").log( [&](
auto & debugstr) {
89 for(
auto det : deepcomp) {
91 debugstr << std::hex << det->geographicalId().rawId() <<
std::dec 92 <<
" " << det->name().fullname() <<
" " 93 << det->bounds()->thickness();
96 LogDebug(
"DetTypeList").log( [&](
auto & debugstr) {
97 debugstr <<
" Content of DetTypetList : size " <<
theDetTypetList.size() << std::endl;
100 <<
" DetId " << std::get<0>(iVal).rawId()
102 <<
" Thickness " << std::get<2>(iVal) << std::endl;
144 switch(
id.mtdSubDetector()){
152 edm::LogError(
"MTDGeometry")<<
"ERROR - I was expecting a MTD Subdetector, I got a "<<
id.mtdSubDetector();
178 return static_cast<const MTDGeomDet *
>(p->second);
188 return static_cast<const MTDGeomDet *
>(p->second);
195 if(subdet>=1 && subdet<=2) {
198 throw cms::Exception(
"WrongTrackerSubDet") <<
"Subdetector " << subdet;
204 if(subdet>=1 && subdet<=2) {
207 throw cms::Exception(
"WrongTrackerSubDet") <<
"Subdetector " << subdet;
213 for(
unsigned int i=1;
i<=2;++
i) {
224 float thickness = gd->
bounds()->thickness();
231 if (std::get<1>(
t) != mtype)
theDetTypetList.emplace_back(detid, mtype, thickness);
233 if ( detid > std::get<0>(
t) ) std::get<0>(
t) = detid;
240 DetId detid_max = std::get<0>(iVal);
242 if (detid.
rawId() <= detid_max.
rawId())
return mtype;
249 DetId detid_max = std::get<0>(iVal);
251 return std::get<2>(iVal);
257 if ( name.find(
"Timing") != std::string::npos ){
258 if ( name.find(
"BModule") != std::string::npos )
return ModuleType::BTL;
259 else if ( name.find(
"EModule") != std::string::npos )
return ModuleType::ETL;
MTDGeometry(GeometricTimingDet const *gd=0)
DetIdContainer theDetUnitIds
DetTypeContainer theDetTypes
const DetContainer & detsETL() const
DetId geographicalId() const
constexpr uint32_t rawId() const
get the raw id
void addType(GeomDetType const *p)
unsigned int theNumberOfLayers[2]
Detector identifier base class for the MIP Timing Layer.
const MTDGeomDet * idToDet(DetId) const override
ConstGeometricTimingDetContainer & components()
ModuleType moduleType(const std::string &name) const
std::unique_ptr< Bounds > bounds() const
ConstGeometricTimingDetContainer deepComponents() const
const std::string fullname() const
mapIdToDetUnit theMapUnit
bool isThere(GeomDetEnumerators::SubDetector subdet) const
unsigned int numberOfLayers(int subdet) const
DetId geographicalId() const
The label of this GeomDet.
const DetContainer & detsBTL() const
const GeomDetEnumerators::SubDetector geomDetSubDetector(int subdet) const
DDName const & name() const
void addDet(GeomDet const *p)
void addDetUnitId(DetId p)
void fillTestMap(const GeometricTimingDet *gd)
GeomDetEnumerators::SubDetector theSubDetTypeMap[2]
std::vector< const GeomDet * > DetContainer
int mtdSubDetector() const
float getDetectorThickness(DetId) const
ModuleType getDetectorType(DetId) const
std::vector< std::tuple< DetId, MTDGeometry::ModuleType, float > > theDetTypetList
std::vector< GeometricTimingDet const * > ConstGeometricTimingDetContainer
void addDetUnit(GeomDet const *p)
const MTDGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.