diff --git a/Geometry/MTDCommonData/data/etl/v5/etl.xml b/Geometry/MTDCommonData/data/etl/v5/etl.xml
index d4a5d623bd35a..20289c645572d 100644
--- a/Geometry/MTDCommonData/data/etl/v5/etl.xml
+++ b/Geometry/MTDCommonData/data/etl/v5/etl.xml
@@ -64,43 +64,6 @@
-
-
- 1, 7, 18, 33, 50, 69, 90, 112, 136, 161, 186, 207, 227, 247, 266,
- 285, 305, 325, 349, 374, 398, 421, 443, 463, 481, 497, 510, 517
-
-
-
- 1, 8, 21, 37, 55, 75, 97, 120, 144, 169, 193, 213, 233, 252, 271,
- 291, 311, 332, 357, 382, 406, 428, 449, 468, 485, 500, 511, 517
-
-
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 8, 8, 7, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-
-
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6, 7, 8, 8, 7, 6, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-
-
-
- 1, 10, 23, 39, 57, 77, 99, 122, 146, 171, 194, 214, 234, 254, 273,
- 293, 313, 335, 360, 384, 407, 430, 451, 470, 487, 501, 511, 514
-
-
-
- 1, 4, 14, 28, 45, 64, 85, 107, 130, 154, 179, 201, 221, 241, 260,
- 280, 300, 320, 343, 368, 392, 415, 437, 457, 475, 491, 504, 513
-
-
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 6, 7, 7, 8, 7, 6, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-
-
-
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 6, 7, 8, 7, 7, 6, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-
-
@@ -108,16 +71,16 @@
-
+
-
+
-
+
@@ -137,6 +100,49 @@
+
+ 1, 7, 18, 33, 50, 69, 90, 112, 136, 161, 186, 207, 227, 247, 266,
+ 285, 305, 325, 349, 374, 398, 421, 443, 463, 481, 497, 510
+
+
+
+ 1, 8, 21, 37, 55, 75, 97, 120, 144, 169, 193, 213, 233, 252, 271,
+ 291, 311, 332, 357, 382, 406, 428, 449, 468, 485, 500, 511
+
+
+
+ [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset],
+ [x_offset]+5*([SensorModule_X]+[DeltaX]), [x_offset]+6*([SensorModule_X]+[DeltaX]), [x_offset]+7*([SensorModule_X]+[DeltaX]), [x_offset]+8*([SensorModule_X]+[DeltaX]), [x_offset]+8*([SensorModule_X]+[DeltaX]), [x_offset]+7*([SensorModule_X]+[DeltaX]), [x_offset]+6*([SensorModule_X]+[DeltaX]), [x_offset]+2*([SensorModule_X]+[DeltaX]),
+ [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset]
+
+
+
+ [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset],
+ [x_offset]+2*([SensorModule_X]+[DeltaX]), [x_offset]+6*([SensorModule_X]+[DeltaX]), [x_offset]+7*([SensorModule_X]+[DeltaX]), [x_offset]+8*([SensorModule_X]+[DeltaX]), [x_offset]+8*([SensorModule_X]+[DeltaX]), [x_offset]+7*([SensorModule_X]+[DeltaX]), [x_offset]+6*([SensorModule_X]+[DeltaX]), [x_offset]+5*([SensorModule_X]+[DeltaX]),
+ [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset]
+
+
+
+ 1, 10, 23, 39, 57, 77, 99, 122, 146, 171, 194, 214, 234, 254, 273,
+ 293, 313, 335, 360, 384, 407, 430, 451, 470, 487, 501, 511
+
+
+
+ 1, 4, 14, 28, 45, 64, 85, 107, 130, 154, 179, 201, 221, 241, 260,
+ 280, 300, 320, 343, 368, 392, 415, 437, 457, 475, 491, 504
+
+
+
+ [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset]+3*([SensorModule_X]+[DeltaX]),
+ [x_offset]+6*([SensorModule_X]+[DeltaX]), [x_offset]+7*([SensorModule_X]+[DeltaX]), [x_offset]+7*([SensorModule_X]+[DeltaX]), [x_offset]+8*([SensorModule_X]+[DeltaX]), [x_offset]+7*([SensorModule_X]+[DeltaX]), [x_offset]+6*([SensorModule_X]+[DeltaX]), [x_offset]+4*([SensorModule_X]+[DeltaX]), [x_offset],[x_offset], [x_offset], [x_offset], [x_offset], [x_offset],
+ [x_offset], [x_offset], [x_offset], [x_offset]
+
+
+
+ [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset]+4*([SensorModule_X]+[DeltaX]), [x_offset]+6*([SensorModule_X]+[DeltaX]), [x_offset]+7*([SensorModule_X]+[DeltaX]), [x_offset]+8*([SensorModule_X]+[DeltaX]), [x_offset]+7*([SensorModule_X]+[DeltaX]), [x_offset]+7*([SensorModule_X]+[DeltaX]), [x_offset]+6*([SensorModule_X]+[DeltaX]), [x_offset]+3*([SensorModule_X]+[DeltaX]), [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset], [x_offset]
+
+
+
diff --git a/Geometry/MTDCommonData/data/mtdParameters/v2/mtdParameters.xml b/Geometry/MTDCommonData/data/mtdParameters/v2/mtdParameters.xml
index 588d35ce11df0..11a3101f66de7 100644
--- a/Geometry/MTDCommonData/data/mtdParameters/v2/mtdParameters.xml
+++ b/Geometry/MTDCommonData/data/mtdParameters/v2/mtdParameters.xml
@@ -5,13 +5,11 @@
4, 4, 4, 24
-
-
- 0, 0, 0, 0, 3733, 1867, 112, 60, 1, 16, 3, 1
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 16, 3, 1
- 0, 0, 0, 0, 50, 50, 50, 50, 16, 16, 2, 1
+ 50, 50, 50, 50, 0, 0, 0, 0, 16, 16, 2, 1
diff --git a/Geometry/MTDCommonData/test/testMTDinDD4hep.py b/Geometry/MTDCommonData/test/testMTDinDD4hep.py
index e82b232f69a39..3569a04c314a0 100644
--- a/Geometry/MTDCommonData/test/testMTDinDD4hep.py
+++ b/Geometry/MTDCommonData/test/testMTDinDD4hep.py
@@ -7,44 +7,58 @@
input = cms.untracked.int32(1)
)
-process.load("FWCore.MessageLogger.MessageLogger_cfi")
-process.MessageLogger.cerr.threshold = cms.untracked.string('INFO')
-process.MessageLogger.cerr.INFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
-)
-process.MessageLogger.cerr.DD4hep_TestMTDIdealGeometry = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
-)
-process.MessageLogger.cerr.DD4hep_TestMTDNumbering = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
-)
-process.MessageLogger.cerr.DD4hep_TestMTDPath = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
-)
-process.MessageLogger.cerr.DD4hep_TestMTDPosition = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
-)
-process.MessageLogger.files.mtdCommonDataDD4hep = cms.untracked.PSet(
- DEBUG = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
+process.MessageLogger = cms.Service("MessageLogger",
+ cerr = cms.untracked.PSet(
+ enable = cms.untracked.bool(False)
),
- ERROR = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
+ cout = cms.untracked.PSet(
+ DD4hep_TestMTDIdealGeometry = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ DD4hep_TestMTDNumbering = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ DD4hep_TestMTDPath = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ DD4hep_TestMTDPosition = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ FWKINFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ INFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ enable = cms.untracked.bool(True),
+ enableStatistics = cms.untracked.bool(True),
+ noLineBreaks = cms.untracked.bool(True),
+ threshold = cms.untracked.string('INFO')
),
- FWKINFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- INFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- MTDUnitTest = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
- ),
- WARNING = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- noLineBreaks = cms.untracked.bool(True),
- threshold = cms.untracked.string('INFO')
+ files = cms.untracked.PSet(
+ mtdCommonDataDD4hep = cms.untracked.PSet(
+ DEBUG = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ ERROR = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ FWKINFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ INFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ MTDUnitTest = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ WARNING = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ noLineBreaks = cms.untracked.bool(True),
+ threshold = cms.untracked.string('INFO')
+ )
+ )
)
process.DDDetectorESProducer = cms.ESSource("DDDetectorESProducer",
diff --git a/Geometry/MTDCommonData/test/testMTDinDDD.py b/Geometry/MTDCommonData/test/testMTDinDDD.py
index ff281408bcfac..ba1b9147ce895 100644
--- a/Geometry/MTDCommonData/test/testMTDinDDD.py
+++ b/Geometry/MTDCommonData/test/testMTDinDDD.py
@@ -7,44 +7,58 @@
input = cms.untracked.int32(1)
)
-process.load("FWCore.MessageLogger.MessageLogger_cfi")
-process.MessageLogger.cerr.threshold = cms.untracked.string('INFO')
-process.MessageLogger.cerr.INFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
-)
-process.MessageLogger.cerr.TestMTDIdealGeometry = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
-)
-process.MessageLogger.cerr.TestMTDNumbering = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
-)
-process.MessageLogger.cerr.TestMTDPath = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
-)
-process.MessageLogger.cerr.TestMTDPosition = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
-)
-process.MessageLogger.files.mtdCommonDataDDD = cms.untracked.PSet(
- DEBUG = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
+process.MessageLogger = cms.Service("MessageLogger",
+ cerr = cms.untracked.PSet(
+ enable = cms.untracked.bool(False)
),
- ERROR = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
+ cout = cms.untracked.PSet(
+ FWKINFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ INFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ TestMTDIdealGeometry = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ TestMTDNumbering = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ TestMTDPath = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ TestMTDPosition = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ enable = cms.untracked.bool(True),
+ enableStatistics = cms.untracked.bool(True),
+ noLineBreaks = cms.untracked.bool(True),
+ threshold = cms.untracked.string('INFO')
),
- FWKINFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- INFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- MTDUnitTest = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
- ),
- WARNING = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- noLineBreaks = cms.untracked.bool(True),
- threshold = cms.untracked.string('INFO')
+ files = cms.untracked.PSet(
+ mtdCommonDataDDD = cms.untracked.PSet(
+ DEBUG = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ ERROR = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ FWKINFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ INFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ MTDUnitTest = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ WARNING = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ noLineBreaks = cms.untracked.bool(True),
+ threshold = cms.untracked.string('INFO')
+ )
+ )
)
process.load('Configuration.Geometry.GeometryExtended2026D76_cff')
diff --git a/Geometry/MTDGeometryBuilder/interface/MTDPixelTopologyBuilder.h b/Geometry/MTDGeometryBuilder/interface/MTDTopologyBuilder.h
similarity index 79%
rename from Geometry/MTDGeometryBuilder/interface/MTDPixelTopologyBuilder.h
rename to Geometry/MTDGeometryBuilder/interface/MTDTopologyBuilder.h
index 98e569e15238e..e8959c23ea644 100644
--- a/Geometry/MTDGeometryBuilder/interface/MTDPixelTopologyBuilder.h
+++ b/Geometry/MTDGeometryBuilder/interface/MTDTopologyBuilder.h
@@ -1,5 +1,5 @@
-#ifndef Geometry_MTDGeometryBuilder_MTDPixelTopologyBuilder_H
-#define Geometry_MTDGeometryBuilder_MTDPixelTopologyBuilder_H
+#ifndef Geometry_MTDGeometryBuilder_MTDTopologyBuilder_H
+#define Geometry_MTDGeometryBuilder_MTDTopologyBuilder_H
#include
class PixelTopology;
@@ -9,9 +9,9 @@ class Bounds;
* Called by GeomTopologyBuilder, chooses the right topology for Pixels.
*/
-class MTDPixelTopologyBuilder {
+class MTDTopologyBuilder {
public:
- MTDPixelTopologyBuilder();
+ MTDTopologyBuilder();
PixelTopology* build(const Bounds* bounds,
int ROWS_PER_ROC, // Num of Rows per ROC
diff --git a/Geometry/MTDGeometryBuilder/interface/RectangularMTDTopology.h b/Geometry/MTDGeometryBuilder/interface/RectangularMTDTopology.h
index dbba18a8e6aaf..2474d3e2c4846 100644
--- a/Geometry/MTDGeometryBuilder/interface/RectangularMTDTopology.h
+++ b/Geometry/MTDGeometryBuilder/interface/RectangularMTDTopology.h
@@ -84,9 +84,6 @@ class RectangularMTDTopology final : public PixelTopology {
// PixelTopology interface.
std::pair pixel(const LocalPoint& p) const override;
- //check whether LocalPoint is inside the pixel active area
- bool isInPixel(const LocalPoint& p) const;
-
// Errors
// Error in local (cm) from the masurement errors
LocalError localError(const MeasurementPoint&, const MeasurementError&) const override;
diff --git a/Geometry/MTDGeometryBuilder/src/MTDGeomBuilderFromGeometricTimingDet.cc b/Geometry/MTDGeometryBuilder/src/MTDGeomBuilderFromGeometricTimingDet.cc
index 78263e7e226d7..72fbbf82f6d1f 100644
--- a/Geometry/MTDGeometryBuilder/src/MTDGeomBuilderFromGeometricTimingDet.cc
+++ b/Geometry/MTDGeometryBuilder/src/MTDGeomBuilderFromGeometricTimingDet.cc
@@ -3,7 +3,7 @@
#include "Geometry/CommonDetUnit/interface/GeomDet.h"
#include "Geometry/MTDGeometryBuilder/interface/MTDGeomDetType.h"
#include "Geometry/MTDGeometryBuilder/interface/MTDGeomDetUnit.h"
-#include "Geometry/MTDGeometryBuilder/interface/MTDPixelTopologyBuilder.h"
+#include "Geometry/MTDGeometryBuilder/interface/MTDTopologyBuilder.h"
#include "DataFormats/DetId/interface/DetId.h"
#include "CondFormats/GeometryObjects/interface/PMTDParameters.h"
#include "Geometry/MTDNumberingBuilder/interface/MTDTopology.h"
@@ -106,20 +106,20 @@ void MTDGeomBuilderFromGeometricTimingDet::buildPixel(
int GAPxInterpad(0), GAPxBorder(0), GAPyInterpad(0), GAPyBorder(0);
switch (det) {
case GeomDetType::SubDetector::TimingBarrel:
- GAPxInterpad = ptp.vitems_[0].vpars_[4]; // Value given in microns
- GAPxBorder = ptp.vitems_[0].vpars_[5]; // Value given in microns
- GAPyInterpad = ptp.vitems_[0].vpars_[6]; // Value given in microns
- GAPyBorder = ptp.vitems_[0].vpars_[7]; // Value given in microns
+ GAPxInterpad = ptp.vitems_[0].vpars_[0]; // Value given in microns
+ GAPxBorder = ptp.vitems_[0].vpars_[1]; // Value given in microns
+ GAPyInterpad = ptp.vitems_[0].vpars_[2]; // Value given in microns
+ GAPyBorder = ptp.vitems_[0].vpars_[3]; // Value given in microns
ROCrows = ptp.vitems_[0].vpars_[8];
ROCcols = ptp.vitems_[0].vpars_[9];
ROCSx = ptp.vitems_[0].vpars_[10];
ROCSy = ptp.vitems_[0].vpars_[11];
break;
case GeomDetType::SubDetector::TimingEndcap:
- GAPxInterpad = ptp.vitems_[1].vpars_[4];
- GAPxBorder = ptp.vitems_[1].vpars_[5];
- GAPyInterpad = ptp.vitems_[1].vpars_[6];
- GAPyBorder = ptp.vitems_[1].vpars_[7];
+ GAPxInterpad = ptp.vitems_[1].vpars_[0];
+ GAPxBorder = ptp.vitems_[1].vpars_[1];
+ GAPyInterpad = ptp.vitems_[1].vpars_[2];
+ GAPyBorder = ptp.vitems_[1].vpars_[3];
ROCrows = ptp.vitems_[1].vpars_[8];
ROCcols = ptp.vitems_[1].vpars_[9];
ROCSx = ptp.vitems_[1].vpars_[10];
@@ -146,7 +146,7 @@ void MTDGeomBuilderFromGeometricTimingDet::buildPixel(
if (theMTDDetTypeMap.find(detName) == theMTDDetTypeMap.end()) {
std::unique_ptr bounds(i->bounds());
- PixelTopology* t = MTDPixelTopologyBuilder().build(
+ PixelTopology* t = MTDTopologyBuilder().build(
&*bounds, ROCrows, ROCcols, ROCSx, ROCSy, GAPxInterpad, GAPxBorder, GAPyInterpad, GAPyBorder);
theMTDDetTypeMap[detName] = new MTDGeomDetType(t, detName, det);
diff --git a/Geometry/MTDGeometryBuilder/src/MTDParametersFromDD.cc b/Geometry/MTDGeometryBuilder/src/MTDParametersFromDD.cc
index 09b112b61ea3a..cefcd6eda4a17 100644
--- a/Geometry/MTDGeometryBuilder/src/MTDParametersFromDD.cc
+++ b/Geometry/MTDGeometryBuilder/src/MTDParametersFromDD.cc
@@ -1,5 +1,3 @@
-//#define EDM_ML_DEBUG
-
#include "Geometry/MTDGeometryBuilder/interface/MTDParametersFromDD.h"
#include "Geometry/MTDCommonData/interface/MTDTopologyMode.h"
#include "CondFormats/GeometryObjects/interface/PMTDParameters.h"
@@ -36,11 +34,9 @@ bool MTDParametersFromDD::build(const DDCompactView* cvp, PMTDParameters& ptp) {
for (const auto& name : mtdSubdet) {
auto const& v = cvp->vector(name);
if (!v.empty()) {
- subdet++;
+ subdet += 1;
std::vector subdetPars = dbl_to_int(v);
putOne(subdet, subdetPars, ptp);
- } else {
- throw cms::Exception("MTDParametersFromDD") << "Not found " << name << " but needed.";
}
}
@@ -50,39 +46,14 @@ bool MTDParametersFromDD::build(const DDCompactView* cvp, PMTDParameters& ptp) {
DDSpecificsHasNamedValueFilter filter1{attribute};
DDFilteredView fv1(*cvp, filter1);
bool ok = fv1.firstChild();
- int topoMode(-1);
if (ok) {
DDsvalues_type sv(fv1.mergedSpecifics());
- topoMode = getMTDTopologyMode("TopologyMode", sv);
+ int topoMode = getMTDTopologyMode("TopologyMode", sv);
ptp.topologyMode_ = topoMode;
} else {
throw cms::Exception("MTDParametersFromDD") << "Not found " << attribute.c_str() << " but needed.";
}
- if (topoMode >= static_cast(MTDTopologyMode::Mode::btlv1etlv5)) {
- std::array etlLayout{{
- "StartCopyNo_Front_Left",
- "StartCopyNo_Front_Right",
- "StartCopyNo_Back_Left",
- "StartCopyNo_Back_Right",
- "Offset_Front_Left",
- "Offset_Front_Right",
- "Offset_Back_Left",
- "Offset_Back_Right",
- }};
- int sector(10);
- for (const auto& name : etlLayout) {
- auto const& v = cvp->vector(name);
- if (!v.empty()) {
- sector++;
- std::vector ipos = dbl_to_int(v);
- putOne(sector, ipos, ptp);
- } else {
- throw cms::Exception("MTDParametersFromDD") << "Not found " << name << " but needed.";
- }
- }
- }
-
return true;
}
@@ -92,21 +63,15 @@ bool MTDParametersFromDD::build(const cms::DDCompactView* cvp, PMTDParameters& p
std::array mtdSubdet{{"BTL", "ETL"}};
int subdet(0);
for (const auto& name : mtdSubdet) {
- bool found(false);
+ subdet += 1;
for (auto const& it : vmap) {
if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), name)) {
- subdet++;
std::vector subdetPars;
for (const auto& i : it.second)
subdetPars.emplace_back(std::round(i));
putOne(subdet, subdetPars, ptp);
- found = true;
- break;
}
}
- if (!found) {
- throw cms::Exception("MTDParametersFromDD") << "Not found " << name << " but needed.";
- }
}
auto it = vmap.find("vPars");
@@ -123,8 +88,8 @@ bool MTDParametersFromDD::build(const cms::DDCompactView* cvp, PMTDParameters& p
mypar.filter(ref, attribute, "MTD");
std::string topoModeS(mypar.specPar("mtdNumbering")->strValue("TopologyMode"));
- int topoMode(-1);
if (!topoModeS.empty()) {
+ int topoMode(-1);
MTDTopologyMode::Mode eparser = MTDTopologyMode::MTDStringToEnumParser(topoModeS);
topoMode = static_cast(eparser);
ptp.topologyMode_ = topoMode;
@@ -132,37 +97,6 @@ bool MTDParametersFromDD::build(const cms::DDCompactView* cvp, PMTDParameters& p
throw cms::Exception("MTDParametersFromDD") << "Not found " << attribute.c_str() << " but needed.";
}
- if (topoMode >= static_cast(MTDTopologyMode::Mode::btlv1etlv5)) {
- std::array etlLayout{{
- "StartCopyNo_Front_Left",
- "StartCopyNo_Front_Right",
- "StartCopyNo_Back_Left",
- "StartCopyNo_Back_Right",
- "Offset_Front_Left",
- "Offset_Front_Right",
- "Offset_Back_Left",
- "Offset_Back_Right",
- }};
- int sector(10); // add vector index with offset, to distinguish from subdet
- for (const auto& name : etlLayout) {
- bool found(false);
- for (auto const& it : vmap) {
- if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first), name)) {
- sector++;
- std::vector ipos;
- for (const auto& i : it.second)
- ipos.emplace_back(std::round(i));
- putOne(sector, ipos, ptp);
- found = true;
- break;
- }
- }
- if (!found) {
- throw cms::Exception("MTDParametersFromDD") << "Not found " << name << " but needed.";
- }
- }
- }
-
return true;
}
@@ -171,15 +105,4 @@ void MTDParametersFromDD::putOne(int subdet, std::vector& vpars, PMTDParame
item.id_ = subdet;
item.vpars_ = vpars;
ptp.vitems_.emplace_back(item);
-#ifdef EDM_ML_DEBUG
- auto print_item = [&]() {
- std::stringstream ss;
- ss << item.id_ << " with " << item.vpars_.size() << " elements:";
- for (const auto& thePar : item.vpars_) {
- ss << " " << thePar;
- }
- return ss.str();
- };
- edm::LogInfo("MTDParametersFromDD") << "Adding PMTDParameters item: " << print_item();
-#endif
}
diff --git a/Geometry/MTDGeometryBuilder/src/MTDPixelTopologyBuilder.cc b/Geometry/MTDGeometryBuilder/src/MTDPixelTopologyBuilder.cc
deleted file mode 100644
index 922569d0214b9..0000000000000
--- a/Geometry/MTDGeometryBuilder/src/MTDPixelTopologyBuilder.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-//#define EDM_ML_DEBUG
-
-// Make the change for "big" pixels. 3/06 d.k.
-#include "Geometry/MTDGeometryBuilder/interface/MTDPixelTopologyBuilder.h"
-#include "Geometry/MTDGeometryBuilder/interface/RectangularMTDTopology.h"
-#include "DataFormats/GeometrySurface/interface/Bounds.h"
-
-#include "FWCore/MessageLogger/interface/MessageLogger.h"
-
-MTDPixelTopologyBuilder::MTDPixelTopologyBuilder(void) {}
-
-PixelTopology* MTDPixelTopologyBuilder::build(const Bounds* bs,
- int pixelROCRows, // Num of Rows per ROC
- int pixelROCCols, // Num of Cols per ROC
- int pixelROCsInX,
- int pixelROCsInY,
- int GAPxInterpad,
- int GAPxBorder,
- int GAPyInterpad,
- int GAPyBorder) {
- float width = bs->width(); // module width = Xsize
- float length = bs->length(); // module length = Ysize
-
- // Number of pixel rows (x) and columns (y) per module
- int nrows = pixelROCRows * pixelROCsInX;
- int ncols = pixelROCCols * pixelROCsInY;
-
- float pitchX = width / nrows;
- float pitchY = length / ncols;
-
- float micronsTocm = 1e-4;
- float gapxinterpad = float(GAPxInterpad) * micronsTocm; //Convert to cm
- float gapyinterpad = float(GAPyInterpad) * micronsTocm; //Convert to cm
- float gapxborder = float(GAPxBorder) * micronsTocm; //Convert to cm
- float gapyborder = float(GAPyBorder) * micronsTocm; //Convert to cm
-
-#ifdef EDM_ML_DEBUG
- edm::LogInfo("MTDPixelTopologyBuilder")
- << std::fixed << "Building topology for module of width(X) = " << std::setw(10) << width
- << " length(Y) = " << std::setw(10) << length << "\n Rows per ROC = " << std::setw(10) << pixelROCRows
- << " Cols per ROC = " << std::setw(10) << pixelROCCols << "\n ROCs in X = " << std::setw(10)
- << pixelROCsInX << " ROCs in Y = " << std::setw(10) << pixelROCsInY
- << "\n # pixel rows X = " << std::setw(10) << nrows << " # pixel cols Y = " << std::setw(10) << ncols
- << "\n pitch in X = " << std::setw(10) << pitchX << " # pitch in Y = " << std::setw(10) << pitchY
- << "\n Interpad gap in X = " << std::setw(10) << gapxinterpad << " # Interpad gap in Y = " << std::setw(10)
- << gapyinterpad << "\n Border gap in X = " << std::setw(10) << gapxborder
- << " # Border gap in Y = " << std::setw(10) << gapyborder;
-#endif
-
- return (new RectangularMTDTopology(nrows,
- ncols,
- pitchX,
- pitchY,
- pixelROCRows, // (int)rocRow
- pixelROCCols, // (int)rocCol
- pixelROCsInX,
- pixelROCsInY,
- gapxinterpad,
- gapxborder,
- gapyinterpad,
- gapyborder));
-}
diff --git a/Geometry/MTDGeometryBuilder/src/MTDTopologyBuilder.cc b/Geometry/MTDGeometryBuilder/src/MTDTopologyBuilder.cc
new file mode 100644
index 0000000000000..045803798e9ee
--- /dev/null
+++ b/Geometry/MTDGeometryBuilder/src/MTDTopologyBuilder.cc
@@ -0,0 +1,66 @@
+//#define EDM_ML_DEBUG
+
+// Make the change for "big" pixels. 3/06 d.k.
+#include "Geometry/MTDGeometryBuilder/interface/MTDTopologyBuilder.h"
+#include "Geometry/MTDGeometryBuilder/interface/RectangularMTDTopology.h"
+#include "DataFormats/GeometrySurface/interface/Bounds.h"
+
+#include "FWCore/MessageLogger/interface/MessageLogger.h"
+
+MTDTopologyBuilder::MTDTopologyBuilder(void) {}
+
+PixelTopology* MTDTopologyBuilder::build(const Bounds* bs,
+ int pixelROCRows, // Num of Rows per ROC
+ int pixelROCCols, // Num of Cols per ROC
+ int pixelROCsInX,
+ int pixelROCsInY,
+ int GAPxInterpad,
+ int GAPxBorder,
+ int GAPyInterpad,
+ int GAPyBorder) {
+ float width = bs->width(); // module width = Xsize
+ float length = bs->length(); // module length = Ysize
+
+ // Number of pixel rows (x) and columns (y) per module
+ int nrows = pixelROCRows * pixelROCsInX;
+ int ncols = pixelROCCols * pixelROCsInY;
+
+ float pitchX = width / nrows;
+ float pitchY = length / ncols;
+
+ float micronsTocm = 1e-4;
+ float gapxinterpad = float(GAPxInterpad) * micronsTocm; //Convert to cm
+ float gapyinterpad = float(GAPyInterpad) * micronsTocm; //Convert to cm
+ float gapxborder = float(GAPxBorder) * micronsTocm; //Convert to cm
+ float gapyborder = float(GAPyBorder) * micronsTocm; //Convert to cm
+
+#ifdef EDM_ML_DEBUG
+ edm::LogInfo("MTDTopologyBuilder") << std::fixed << "Building topology for module of width(X) = " << std::setw(10)
+ << width << " length(Y) = " << std::setw(10) << length
+ << "\n Rows per ROC = " << std::setw(10) << pixelROCRows
+ << " Cols per ROC = " << std::setw(10) << pixelROCCols
+ << "\n ROCs in X = " << std::setw(10) << pixelROCsInX
+ << " ROCs in Y = " << std::setw(10) << pixelROCsInY
+ << "\n # pixel rows X = " << std::setw(10) << nrows
+ << " # pixel cols Y = " << std::setw(10) << ncols
+ << "\n pitch in X = " << std::setw(10) << pitchX
+ << " # pitch in Y = " << std::setw(10) << pitchY
+ << "\n Interpad gap in X = " << std::setw(10) << gapxinterpad
+ << " # Interpad gap in Y = " << std::setw(10) << gapyinterpad
+ << "\n Border gap in X = " << std::setw(10) << gapxborder
+ << " # Border gap in Y = " << std::setw(10) << gapyborder;
+#endif
+
+ return (new RectangularMTDTopology(nrows,
+ ncols,
+ pitchX,
+ pitchY,
+ pixelROCRows, // (int)rocRow
+ pixelROCCols, // (int)rocCol
+ pixelROCsInX,
+ pixelROCsInY,
+ gapxinterpad,
+ gapxborder,
+ gapyinterpad,
+ gapyborder));
+}
diff --git a/Geometry/MTDGeometryBuilder/src/RectangularMTDTopology.cc b/Geometry/MTDGeometryBuilder/src/RectangularMTDTopology.cc
index 1daca844880d9..931d71e080143 100644
--- a/Geometry/MTDGeometryBuilder/src/RectangularMTDTopology.cc
+++ b/Geometry/MTDGeometryBuilder/src/RectangularMTDTopology.cc
@@ -16,25 +16,6 @@ std::pair RectangularMTDTopology::pixel(const LocalPoint& p) const
return std::pair(newxbin, newybin);
}
-//The following lines check whether the point is actually out of the active pixel area.
-bool RectangularMTDTopology::isInPixel(const LocalPoint& p) const {
- bool isInside = true;
- const auto& thepixel = pixel(p);
- const int ixbin = static_cast(thepixel.first);
- const int iybin = static_cast(thepixel.second);
- const float fractionX = thepixel.first - ixbin;
- const float fractionY = thepixel.second - iybin;
- if ((fractionX > 1.0 - m_GAPxInterpadFrac || fractionX < m_GAPxInterpadFrac) ||
- (ixbin == 0 && fractionX < m_GAPxBorderFrac) || (ixbin == m_nrows - 1 && fractionX > 1.0 - m_GAPxBorderFrac)) {
- isInside = false;
- }
- if ((fractionY > 1.0 - m_GAPyInterpadFrac || fractionY < m_GAPyInterpadFrac) ||
- (iybin == 0 && fractionY < m_GAPyBorderFrac) || (iybin == m_ncols - 1 && fractionY > 1.0 - m_GAPyBorderFrac)) {
- isInside = false;
- }
- return isInside;
-}
-
//----------------------------------------------------------------------
// Topology interface, go from Measurement to Local corrdinates
// pixel coordinates (mp) -> cm (LocalPoint)
diff --git a/Geometry/MTDGeometryBuilder/test/dd4hep_mtd_cfg.py b/Geometry/MTDGeometryBuilder/test/dd4hep_mtd_cfg.py
index 9475eabb5f39a..abc28919dc8ed 100644
--- a/Geometry/MTDGeometryBuilder/test/dd4hep_mtd_cfg.py
+++ b/Geometry/MTDGeometryBuilder/test/dd4hep_mtd_cfg.py
@@ -14,38 +14,52 @@
input = cms.untracked.int32(1)
)
-process.load("FWCore.MessageLogger.MessageLogger_cfi")
-process.MessageLogger.cerr.threshold = cms.untracked.string('INFO')
-process.MessageLogger.cerr.INFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
-)
-process.MessageLogger.cerr.MTDDigiGeometryAnalyzer = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
-)
-process.MessageLogger.cerr.DD4hep_TestBTLPixelTopology = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
-)
-process.MessageLogger.files.mtdGeometryDD4hep = cms.untracked.PSet(
- DEBUG = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- ERROR = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- FWKINFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- INFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- MTDUnitTest = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
+process.MessageLogger = cms.Service("MessageLogger",
+ cerr = cms.untracked.PSet(
+ enable = cms.untracked.bool(False)
),
- WARNING = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
+ cout = cms.untracked.PSet(
+ FWKINFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ INFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ MTDDigiGeometryAnalyzer = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ DD4hep_TestBTLPixelTopology = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ enable = cms.untracked.bool(True),
+ enableStatistics = cms.untracked.bool(True),
+ noLineBreaks = cms.untracked.bool(True),
+ threshold = cms.untracked.string('INFO')
),
- noLineBreaks = cms.untracked.bool(True),
- threshold = cms.untracked.string('INFO')
+ files = cms.untracked.PSet(
+ mtdGeometryDD4hep = cms.untracked.PSet(
+ DEBUG = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ ERROR = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ FWKINFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ INFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ MTDUnitTest = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ WARNING = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ noLineBreaks = cms.untracked.bool(True),
+ threshold = cms.untracked.string('INFO')
+ )
+ )
)
process.DDDetectorESProducer = cms.ESSource("DDDetectorESProducer",
diff --git a/Geometry/MTDGeometryBuilder/test/mtd_cfg.py b/Geometry/MTDGeometryBuilder/test/mtd_cfg.py
index a7c3d31a5da9b..3124914954e9d 100644
--- a/Geometry/MTDGeometryBuilder/test/mtd_cfg.py
+++ b/Geometry/MTDGeometryBuilder/test/mtd_cfg.py
@@ -13,35 +13,49 @@
input = cms.untracked.int32(1)
)
-process.load("FWCore.MessageLogger.MessageLogger_cfi")
-process.MessageLogger.cerr.threshold = cms.untracked.string('INFO')
-process.MessageLogger.cerr.INFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
-)
-process.MessageLogger.cerr.MTDDigiGeometryAnalyzer = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
-)
-process.MessageLogger.files.mtdGeometryDDD = cms.untracked.PSet(
- DEBUG = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- ERROR = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- FWKINFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- INFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- MTDUnitTest = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
+process.MessageLogger = cms.Service("MessageLogger",
+ cerr = cms.untracked.PSet(
+ enable = cms.untracked.bool(False)
),
- WARNING = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
+ cout = cms.untracked.PSet(
+ FWKINFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ INFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ MTDDigiGeometryAnalyzer = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ enable = cms.untracked.bool(True),
+ enableStatistics = cms.untracked.bool(True),
+ noLineBreaks = cms.untracked.bool(True),
+ threshold = cms.untracked.string('INFO')
),
- noLineBreaks = cms.untracked.bool(True),
- threshold = cms.untracked.string('INFO')
+ files = cms.untracked.PSet(
+ mtdGeometryDDD = cms.untracked.PSet(
+ DEBUG = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ ERROR = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ FWKINFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ INFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ MTDUnitTest = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ WARNING = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ noLineBreaks = cms.untracked.bool(True),
+ threshold = cms.untracked.string('INFO')
+ )
+ )
)
process.load("Configuration.Geometry.GeometryExtended2026D76_cff")
diff --git a/Geometry/MTDNumberingBuilder/interface/MTDTopology.h b/Geometry/MTDNumberingBuilder/interface/MTDTopology.h
index d8a572e6acf14..363230df0ba37 100644
--- a/Geometry/MTDNumberingBuilder/interface/MTDTopology.h
+++ b/Geometry/MTDNumberingBuilder/interface/MTDTopology.h
@@ -4,45 +4,18 @@
#include "DataFormats/DetId/interface/DetId.h"
#include "DataFormats/ForwardDetId/interface/ForwardSubdetector.h"
#include "DataFormats/ForwardDetId/interface/MTDDetId.h"
-#include "DataFormats/ForwardDetId/interface/ETLDetId.h"
-#include
#include
#include
class MTDTopology {
public:
- struct ETLfaceLayout {
- uint32_t idDiscSide_; // disc face identifier
- uint32_t idDetType1_; // module type id identifier for first row
-
- std::array, 2> start_copy_; // start copy per row, first of type idDetType1_
- std::array, 2> offset_; // offset per row, first of type idDetType1_
- };
-
- using ETLValues = std::vector;
-
- MTDTopology(const int& topologyMode, const ETLValues& etl);
+ MTDTopology(const int &topologyMode);
int getMTDTopologyMode() const { return mtdTopologyMode_; }
- // ETL topology navigation is based on a predefined order of dets in sector
-
- static bool orderETLSector(const GeomDet*& gd1, const GeomDet*& gd2);
-
- // navigation methods in ETL topology, provide the index of the det next to DetId for
- // horizontal and vertical shifts in both directions, assuming the predefined order in a sector
-
- size_t hshiftETL(const uint32_t detid, const int horizontalShift) const;
- size_t vshiftETL(const uint32_t detid, const int verticalShift, size_t& closest) const;
-
private:
const int mtdTopologyMode_;
-
- const ETLValues etlVals_;
-
- static constexpr size_t failIndex_ =
- std::numeric_limits::max(); // return out-of-range value for any failure
};
#endif
diff --git a/Geometry/MTDNumberingBuilder/plugins/MTDTopologyEP.cc b/Geometry/MTDNumberingBuilder/plugins/MTDTopologyEP.cc
index e09488a7dfaac..977b21b15c006 100644
--- a/Geometry/MTDNumberingBuilder/plugins/MTDTopologyEP.cc
+++ b/Geometry/MTDNumberingBuilder/plugins/MTDTopologyEP.cc
@@ -1,5 +1,3 @@
-//#define EDM_ML_DEBUG
-
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
@@ -7,12 +5,12 @@
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/ESProducer.h"
#include "Geometry/MTDNumberingBuilder/interface/MTDTopology.h"
-#include "Geometry/MTDCommonData/interface/MTDTopologyMode.h"
#include "Geometry/Records/interface/MTDTopologyRcd.h"
#include "CondFormats/GeometryObjects/interface/PMTDParameters.h"
#include "Geometry/Records/interface/PMTDParametersRcd.h"
#include
+//#define EDM_ML_DEBUG
class MTDTopologyEP : public edm::ESProducer {
public:
@@ -25,7 +23,7 @@ class MTDTopologyEP : public edm::ESProducer {
ReturnType produce(const MTDTopologyRcd&);
private:
- void fillParameters(const PMTDParameters&, int& mtdTopologyMode, MTDTopology::ETLValues&);
+ void fillParameters(const PMTDParameters&, int& mtdTopologyMode);
const edm::ESGetToken token_;
};
@@ -40,74 +38,18 @@ void MTDTopologyEP::fillDescriptions(edm::ConfigurationDescriptions& description
MTDTopologyEP::ReturnType MTDTopologyEP::produce(const MTDTopologyRcd& iRecord) {
int mtdTopologyMode;
- MTDTopology::ETLValues etlVals;
- fillParameters(iRecord.get(token_), mtdTopologyMode, etlVals);
+ fillParameters(iRecord.get(token_), mtdTopologyMode);
- return std::make_unique(mtdTopologyMode, etlVals);
+ return std::make_unique(mtdTopologyMode);
}
-void MTDTopologyEP::fillParameters(const PMTDParameters& ptp, int& mtdTopologyMode, MTDTopology::ETLValues& etlVals) {
+void MTDTopologyEP::fillParameters(const PMTDParameters& ptp, int& mtdTopologyMode) {
mtdTopologyMode = ptp.topologyMode_;
- // for legacy geometry scenarios no topology informastion is stored, only for newer ETL 2-discs layout
-
- if (mtdTopologyMode <= static_cast(MTDTopologyMode::Mode::barphiflat)) {
- return;
- }
-
- // Check on the internal consistency of thr ETL layout information provided by parameters
-
- for (size_t it = 3; it <= 9; it++) {
- if (ptp.vitems_[it].vpars_.size() != ptp.vitems_[2].vpars_.size()) {
- throw cms::Exception("MTDTopologyEP") << "Inconsistent size of ETL structure arrays";
- }
- }
-
- MTDTopology::ETLfaceLayout tmpFace;
-
- // Front Face (0), starting with type Right (2)
-
- tmpFace.idDiscSide_ = 0; // ETL front side
- tmpFace.idDetType1_ = 2; // ETL module type right
-
- tmpFace.start_copy_[0] = ptp.vitems_[3].vpars_; // start_copy_FR
- tmpFace.start_copy_[1] = ptp.vitems_[2].vpars_; // start_copy_FL
- tmpFace.offset_[0] = ptp.vitems_[7].vpars_; // offset_FR
- tmpFace.offset_[1] = ptp.vitems_[6].vpars_; // offset_FL
-
- etlVals.emplace_back(tmpFace);
-
- // Back Face (1), starting with type Left (1)
-
- tmpFace.idDiscSide_ = 1; // ETL back side
- tmpFace.idDetType1_ = 1; // ETL module type left
-
- tmpFace.start_copy_[0] = ptp.vitems_[4].vpars_; // start_copy_BL
- tmpFace.start_copy_[1] = ptp.vitems_[5].vpars_; // start_copy_BR
- tmpFace.offset_[0] = ptp.vitems_[8].vpars_; // offset_BL
- tmpFace.offset_[1] = ptp.vitems_[9].vpars_; // offset_BR
-
- etlVals.emplace_back(tmpFace);
-
#ifdef EDM_ML_DEBUG
- edm::LogVerbatim("MTDTopologyEP") << " Topology mode = " << mtdTopologyMode << "\n";
- auto print_array = [&](std::vector vector) {
- std::stringstream ss;
- for (auto const& elem : vector) {
- ss << " " << elem;
- }
- ss << "\n";
- return ss.str();
- };
-
- for (auto const& ilay : etlVals) {
- edm::LogVerbatim("MTDTopologyEP") << " disc face = " << ilay.idDiscSide_ << " start det type = " << ilay.idDetType1_
- << "\n start_copy[0]= " << print_array(ilay.start_copy_[0])
- << "\n start_copy[1]= " << print_array(ilay.start_copy_[1])
- << "\n offset[0]= " << print_array(ilay.offset_[0])
- << "\n offset[1]= " << print_array(ilay.offset_[1]);
- }
+
+ edm::LogInfo("MTDTopologyEP") << "Topology mode = " << mtdTopologyMode;
#endif
}
diff --git a/Geometry/MTDNumberingBuilder/src/MTDTopology.cc b/Geometry/MTDNumberingBuilder/src/MTDTopology.cc
index f766a23df5913..29cbf811a3412 100644
--- a/Geometry/MTDNumberingBuilder/src/MTDTopology.cc
+++ b/Geometry/MTDNumberingBuilder/src/MTDTopology.cc
@@ -1,131 +1,3 @@
#include "Geometry/MTDNumberingBuilder/interface/MTDTopology.h"
-#include "FWCore/MessageLogger/interface/MessageLogger.h"
-MTDTopology::MTDTopology(const int& topologyMode, const ETLValues& etl)
- : mtdTopologyMode_(topologyMode), etlVals_(etl) {}
-
-bool MTDTopology::orderETLSector(const GeomDet*& gd1, const GeomDet*& gd2) {
- ETLDetId det1(gd1->geographicalId().rawId());
- ETLDetId det2(gd2->geographicalId().rawId());
-
- if (det1.mtdRR() != det2.mtdRR()) {
- return det1.mtdRR() < det2.mtdRR();
- } else if (det1.modType() != det2.modType()) {
- return det1.modType() < det2.modType();
- } else {
- return det1.module() < det2.module();
- }
-}
-
-size_t MTDTopology::hshiftETL(const uint32_t detid, const int horizontalShift) const {
- ETLDetId start_mod(detid);
-
- if (horizontalShift == 0) {
- edm::LogWarning("MTDTopology") << "asking of a null horizotalShift in ETL";
- return failIndex_;
- }
- int hsh = horizontalShift > 0 ? 1 : -1;
-
- int module = start_mod.module();
- uint32_t modtyp = start_mod.modType();
- uint32_t discside = start_mod.discSide();
-
- // ilayout number coincides at present with disc face, use this
-
- size_t iHome = (modtyp == etlVals_[discside].idDetType1_) ? 0 : 1;
- size_t iLeft = (etlVals_[discside].idDetType1_ == 1) ? 0 : 1;
-
- // for left type modules the position according to the default order is module - 1, for the rigth type modules the total number of left modules must be added
-
- size_t nmodOffset = (modtyp == 1) ? 0 : etlVals_[discside].start_copy_[iLeft].back() - 1;
-
- for (size_t iloop = 0; iloop < etlVals_[discside].start_copy_[iHome].size() - 1; iloop++) {
- if (module >= etlVals_[discside].start_copy_[iHome][iloop] &&
- module < etlVals_[discside].start_copy_[iHome][iloop + 1]) {
- if (module + hsh >= etlVals_[discside].start_copy_[iHome][iloop] &&
- module + hsh < etlVals_[discside].start_copy_[iHome][iloop + 1]) {
- return module + hsh - 1 + nmodOffset;
- }
- break;
- }
- }
-
- return failIndex_;
-}
-
-size_t MTDTopology::vshiftETL(const uint32_t detid, const int verticalShift, size_t& closest) const {
- closest = failIndex_;
-
- ETLDetId start_mod(detid);
-
- if (verticalShift == 0) {
- edm::LogWarning("MTDTopology") << "asking of a null verticalShift in ETL";
- return failIndex_;
- }
- int vsh = verticalShift > 0 ? 1 : -1;
-
- int module = start_mod.module();
- uint32_t modtyp = start_mod.modType();
- uint32_t discside = start_mod.discSide();
-
- // ilayout number coincides at present with disc face, use this
-
- size_t iHome = (modtyp == etlVals_[discside].idDetType1_) ? 0 : 1;
- size_t iOther = (iHome == 0) ? 1 : 0;
- size_t iLeft = (etlVals_[discside].idDetType1_ == 1) ? 0 : 1;
-
- // for right type modules the offset of the total number of left modules needs to be added,
- // what matters here is the other type, i.e. if the starting module is left the vertical shift moves towards a right type, and viceversa
-
- size_t nmodOffset = (modtyp == 1) ? etlVals_[discside].start_copy_[iLeft].back() - 1 : 0;
-
- size_t iBin(etlVals_[discside].start_copy_[iHome].size()); // never allowed
- for (size_t iloop = 0; iloop < etlVals_[discside].start_copy_[iHome].size() - 1; iloop++) {
- if (module >= etlVals_[discside].start_copy_[iHome][iloop] &&
- module < etlVals_[discside].start_copy_[iHome][iloop + 1]) {
- iBin = iloop;
- break;
- }
- }
-
- if (iBin == etlVals_[discside].start_copy_[iHome].size()) {
- edm::LogWarning("MTDTopology") << "Module number not compatible with layout, abort";
- return failIndex_;
- }
-
- // define the interval of interest for the other type according to the vertical shift sign
-
- int iBinOther(iBin);
- if (iHome == 0 && vsh < 0) {
- iBinOther = iBin - 1;
- }
- if (iHome == 1 && vsh > 0) {
- iBinOther = iBin + 1;
- }
- if (iBinOther < 0 || iBinOther >= static_cast(etlVals_[discside].start_copy_[iOther].size()) - 1) {
- return failIndex_;
- }
-
- // determine the position of the other type corresponding to the same column of the home type
-
- int vpos = etlVals_[discside].offset_[iHome][iBin] + module - etlVals_[discside].start_copy_[iHome][iBin] + 1;
- if (vpos <= etlVals_[discside].offset_[iOther][iBinOther]) {
- closest = etlVals_[discside].start_copy_[iOther][iBinOther];
- } else if (vpos > etlVals_[discside].offset_[iOther][iBinOther] +
- etlVals_[discside].start_copy_[iOther][iBinOther + 1] -
- etlVals_[discside].start_copy_[iOther][iBinOther] ||
- (vpos == etlVals_[discside].offset_[iOther][iBinOther] +
- etlVals_[discside].start_copy_[iOther][iBinOther + 1] -
- etlVals_[discside].start_copy_[iOther][iBinOther] &&
- iBinOther + 1 == static_cast(etlVals_[discside].start_copy_[iOther].size()))) {
- closest = etlVals_[discside].start_copy_[iOther][iBinOther + 1] - 1;
- }
- if (closest < failIndex_) {
- closest = closest + nmodOffset - 1;
- return failIndex_;
- } else {
- // number of module shifted by 1 wrt the position in the array (i.e. module 1 has index 0)
- return etlVals_[discside].start_copy_[iOther][iBinOther] + vpos - 1 -
- etlVals_[discside].offset_[iOther][iBinOther] + nmodOffset - 1;
- }
-}
+MTDTopology::MTDTopology(const int &topologyMode) : mtdTopologyMode_(topologyMode) {}
diff --git a/Geometry/MTDNumberingBuilder/test/dd4hep_mtd_cfg.py b/Geometry/MTDNumberingBuilder/test/dd4hep_mtd_cfg.py
index 7a06599034808..0c584413b0025 100644
--- a/Geometry/MTDNumberingBuilder/test/dd4hep_mtd_cfg.py
+++ b/Geometry/MTDNumberingBuilder/test/dd4hep_mtd_cfg.py
@@ -14,35 +14,46 @@
input = cms.untracked.int32(1)
)
-process.load("FWCore.MessageLogger.MessageLogger_cfi")
-process.MessageLogger.cerr.threshold = cms.untracked.string('INFO')
-process.MessageLogger.cerr.INFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
-)
-process.MessageLogger.cerr.GeometricTimingDetAnalyzer = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
-)
-process.MessageLogger.files.mtdNumberingDD4hep = cms.untracked.PSet(
- DEBUG = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- ERROR = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- FWKINFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- INFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- MTDUnitTest = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
+process.MessageLogger = cms.Service("MessageLogger",
+ cerr = cms.untracked.PSet(
+ enable = cms.untracked.bool(False)
),
- WARNING = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
+ cout = cms.untracked.PSet(
+ GeometricTimingDetAnalyzer = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ INFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ enable = cms.untracked.bool(True),
+ enableStatistics = cms.untracked.bool(True),
+ noLineBreaks = cms.untracked.bool(True),
+ threshold = cms.untracked.string('INFO')
),
- noLineBreaks = cms.untracked.bool(True),
- threshold = cms.untracked.string('INFO')
+ files = cms.untracked.PSet(
+ mtdNumberingDD4hep = cms.untracked.PSet(
+ DEBUG = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ ERROR = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ FWKINFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ INFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ MTDUnitTest = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ WARNING = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ noLineBreaks = cms.untracked.bool(True),
+ threshold = cms.untracked.string('INFO')
+ )
+ )
)
process.DDDetectorESProducer = cms.ESSource("DDDetectorESProducer",
diff --git a/Geometry/MTDNumberingBuilder/test/mtd_cfg.py b/Geometry/MTDNumberingBuilder/test/mtd_cfg.py
index b0a83125af51b..86a0aa63c58fc 100644
--- a/Geometry/MTDNumberingBuilder/test/mtd_cfg.py
+++ b/Geometry/MTDNumberingBuilder/test/mtd_cfg.py
@@ -13,35 +13,49 @@
input = cms.untracked.int32(1)
)
-process.load("FWCore.MessageLogger.MessageLogger_cfi")
-process.MessageLogger.cerr.threshold = cms.untracked.string('INFO')
-process.MessageLogger.cerr.INFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
-)
-process.MessageLogger.cerr.GeometricTimingDetAnalyzer = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
-)
-process.MessageLogger.files.mtdNumberingDDD = cms.untracked.PSet(
- DEBUG = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- ERROR = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- FWKINFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- INFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- MTDUnitTest = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
+process.MessageLogger = cms.Service("MessageLogger",
+ cerr = cms.untracked.PSet(
+ enable = cms.untracked.bool(False)
),
- WARNING = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
+ cout = cms.untracked.PSet(
+ FWKINFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ GeometricTimingDetAnalyzer = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ INFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ enable = cms.untracked.bool(True),
+ enableStatistics = cms.untracked.bool(True),
+ noLineBreaks = cms.untracked.bool(True),
+ threshold = cms.untracked.string('INFO')
),
- noLineBreaks = cms.untracked.bool(True),
- threshold = cms.untracked.string('INFO')
+ files = cms.untracked.PSet(
+ mtdNumberingDDD = cms.untracked.PSet(
+ DEBUG = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ ERROR = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ FWKINFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ INFO = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ MTDUnitTest = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
+ ),
+ WARNING = cms.untracked.PSet(
+ limit = cms.untracked.int32(0)
+ ),
+ noLineBreaks = cms.untracked.bool(True),
+ threshold = cms.untracked.string('INFO')
+ )
+ )
)
process.load("Configuration.Geometry.GeometryExtended2026D76_cff")
diff --git a/RecoMTD/DetLayers/BuildFile.xml b/RecoMTD/DetLayers/BuildFile.xml
index 0338ac1e8a771..5ed71cd29ee88 100644
--- a/RecoMTD/DetLayers/BuildFile.xml
+++ b/RecoMTD/DetLayers/BuildFile.xml
@@ -4,7 +4,6 @@
-
diff --git a/RecoMTD/DetLayers/interface/ETLDetLayerGeometryBuilder.h b/RecoMTD/DetLayers/interface/ETLDetLayerGeometryBuilder.h
index 1fa4a29844170..d218ded5ed597 100644
--- a/RecoMTD/DetLayers/interface/ETLDetLayerGeometryBuilder.h
+++ b/RecoMTD/DetLayers/interface/ETLDetLayerGeometryBuilder.h
@@ -9,7 +9,6 @@
*/
#include
-#include
#include
class DetLayer;
@@ -23,7 +22,7 @@ class ETLDetLayerGeometryBuilder {
/// return.first=forward (+Z), return.second=backward (-Z)
/// both vectors are sorted inside-out
static std::pair, std::vector > buildLayers(const MTDGeometry& geo,
- const MTDTopology& topo);
+ const int mtdTopologyMode);
private:
// Disable constructor - only static access is allowed.
@@ -34,11 +33,14 @@ class ETLDetLayerGeometryBuilder {
std::vector& rings,
const MTDGeometry& geo);
- static MTDSectorForwardDoubleLayer* buildLayerNew(
- int endcap, int layer, std::vector& sectors, const MTDGeometry& geo, const MTDTopology& topo);
+ static MTDSectorForwardDoubleLayer* buildLayerNew(int endcap,
+ int layer,
+ std::vector& sectors,
+ const MTDGeometry& geo);
static MTDDetRing* makeDetRing(std::vector& geomDets);
static bool isFront(int layer, int ring, int module);
- static MTDDetSector* makeDetSector(std::vector& geomDets, const MTDTopology& topo);
+ static MTDDetSector* makeDetSector(std::vector& geomDets);
+ static bool orderGeomDets(const GeomDet*&, const GeomDet*&);
};
#endif
diff --git a/RecoMTD/DetLayers/interface/MTDDetSector.h b/RecoMTD/DetLayers/interface/MTDDetSector.h
index fd05de8176efd..7dac4a2e2dc96 100644
--- a/RecoMTD/DetLayers/interface/MTDDetSector.h
+++ b/RecoMTD/DetLayers/interface/MTDDetSector.h
@@ -3,7 +3,6 @@
#include "TrackingTools/DetLayers/interface/GeometricSearchDet.h"
#include "DataFormats/GeometrySurface/interface/BoundDiskSector.h"
-#include "Geometry/MTDNumberingBuilder/interface/MTDTopology.h"
#include
@@ -14,12 +13,10 @@ class MTDDetSector : public GeometricSearchDet {
using GeometricSearchDet::GeometricSearchDet;
/// Construct from iterators on GeomDet*
- MTDDetSector(std::vector::const_iterator first,
- std::vector::const_iterator last,
- const MTDTopology& topo);
+ MTDDetSector(std::vector::const_iterator first, std::vector::const_iterator last);
/// Construct from a vector of GeomDet*
- MTDDetSector(const std::vector& dets, const MTDTopology& topo);
+ MTDDetSector(const std::vector& dets);
~MTDDetSector() override{};
@@ -52,15 +49,6 @@ class MTDDetSector : public GeometricSearchDet {
const BoundDiskSector& specificSurface() const { return *theDiskS; }
- void compatibleDetsLine(const size_t idetMin,
- std::vector& result,
- const TrajectoryStateOnSurface& tsos,
- const Propagator& prop,
- const MeasurementEstimator& est) const;
-
- size_t hshift(const uint32_t detid, const int horizontalShift) const;
- size_t vshift(const uint32_t detid, const int verticalShift, size_t& closest) const;
-
protected:
void setDisk(BoundDiskSector* diskS) { theDiskS = diskS; }
@@ -74,7 +62,12 @@ class MTDDetSector : public GeometricSearchDet {
ReferenceCountingPointer theDiskS;
std::vector theDets;
- const MTDTopology* topo_;
+ // Window of detid ordered modules around that closest to the track extrapolation on the sector surface
+ // needed to limit the size of the vector of distances to sort
+ // value 50 based on the possible mismatch of module number between adjacent
+ // modules, due to left-right type imparity
+
+ static constexpr size_t detsRange = 50;
void init();
};
diff --git a/RecoMTD/DetLayers/src/ETLDetLayerGeometryBuilder.cc b/RecoMTD/DetLayers/src/ETLDetLayerGeometryBuilder.cc
index 66ccf3d51804d..83af5cda4e386 100644
--- a/RecoMTD/DetLayers/src/ETLDetLayerGeometryBuilder.cc
+++ b/RecoMTD/DetLayers/src/ETLDetLayerGeometryBuilder.cc
@@ -19,10 +19,9 @@
using namespace std;
pair, vector > ETLDetLayerGeometryBuilder::buildLayers(const MTDGeometry& geo,
- const MTDTopology& topo) {
+ const int mtdTopologyMode) {
vector result[2]; // one for each endcap
- const int mtdTopologyMode = topo.getMTDTopologyMode();
if (mtdTopologyMode <= static_cast(MTDTopologyMode::Mode::barphiflat)) {
for (unsigned endcap = 0; endcap < 2; ++endcap) {
// there is only one layer for ETL right now, maybe more later
@@ -61,15 +60,12 @@ pair, vector > ETLDetLayerGeometryBuilder::buildLay
for (unsigned sector = 1; sector <= nSector; ++sector) {
sectors.push_back(sector);
}
- MTDSectorForwardDoubleLayer* thelayer = buildLayerNew(endcap, layer, sectors, geo, topo);
+ MTDSectorForwardDoubleLayer* thelayer = buildLayerNew(endcap, layer, sectors, geo);
if (thelayer)
result[endcap].push_back(thelayer);
}
}
}
- //
- // the first entry is Z+ ( MTD side 1), the second is Z- (MTD side 0)
- //
pair, vector > res_pair(result[1], result[0]);
return res_pair;
}
@@ -137,8 +133,10 @@ MTDDetRing* ETLDetLayerGeometryBuilder::makeDetRing(vector& geom
return result;
}
-MTDSectorForwardDoubleLayer* ETLDetLayerGeometryBuilder::buildLayerNew(
- int endcap, int layer, vector& sectors, const MTDGeometry& geo, const MTDTopology& topo) {
+MTDSectorForwardDoubleLayer* ETLDetLayerGeometryBuilder::buildLayerNew(int endcap,
+ int layer,
+ vector& sectors,
+ const MTDGeometry& geo) {
MTDSectorForwardDoubleLayer* result = nullptr;
std::vector frontSectors, backSectors;
@@ -178,15 +176,15 @@ MTDSectorForwardDoubleLayer* ETLDetLayerGeometryBuilder::buildLayerNew(
}
if (!backGeomDets.empty()) {
- std::sort(backGeomDets.begin(), backGeomDets.end(), topo.orderETLSector);
+ std::sort(backGeomDets.begin(), backGeomDets.end(), orderGeomDets);
LogDebug("MTDDetLayers") << "backGeomDets size = " << backGeomDets.size();
- backSectors.emplace_back(makeDetSector(backGeomDets, topo));
+ backSectors.emplace_back(makeDetSector(backGeomDets));
}
if (!frontGeomDets.empty()) {
- std::sort(frontGeomDets.begin(), frontGeomDets.end(), topo.orderETLSector);
+ std::sort(frontGeomDets.begin(), frontGeomDets.end(), orderGeomDets);
LogDebug("MTDDetLayers") << "frontGeomDets size = " << frontGeomDets.size();
- frontSectors.emplace_back(makeDetSector(frontGeomDets, topo));
+ frontSectors.emplace_back(makeDetSector(frontGeomDets));
assert(!backGeomDets.empty());
float frontz = frontSectors.back()->position().z();
float backz = backSectors.back()->position().z();
@@ -204,11 +202,15 @@ MTDSectorForwardDoubleLayer* ETLDetLayerGeometryBuilder::buildLayerNew(
return result;
}
-MTDDetSector* ETLDetLayerGeometryBuilder::makeDetSector(vector& geomDets, const MTDTopology& topo) {
- MTDDetSector* result = new MTDDetSector(geomDets, topo);
+MTDDetSector* ETLDetLayerGeometryBuilder::makeDetSector(vector& geomDets) {
+ MTDDetSector* result = new MTDDetSector(geomDets);
LogTrace("MTDDetLayers") << "ETLDetLayerGeometryBuilder::makeDetSector new MTDDetSector with " << std::fixed
<< std::setw(14) << geomDets.size() << " modules \n"
<< (*result);
return result;
}
+
+bool ETLDetLayerGeometryBuilder::orderGeomDets(const GeomDet*& gd1, const GeomDet*& gd2) {
+ return gd1->geographicalId().rawId() < gd2->geographicalId().rawId();
+}
diff --git a/RecoMTD/DetLayers/src/MTDDetLayerGeometry.cc b/RecoMTD/DetLayers/src/MTDDetLayerGeometry.cc
index 63308e55b10f2..61e92406557e8 100644
--- a/RecoMTD/DetLayers/src/MTDDetLayerGeometry.cc
+++ b/RecoMTD/DetLayers/src/MTDDetLayerGeometry.cc
@@ -33,7 +33,7 @@ void MTDDetLayerGeometry::buildLayers(const MTDGeometry* geo, const MTDTopology*
this->addBTLLayers(BTLDetLayerGeometryBuilder::buildLayers(*geo));
// Build ETL layers, depends on the scenario
if (mtopo) {
- this->addETLLayers(ETLDetLayerGeometryBuilder::buildLayers(*geo, *mtopo));
+ this->addETLLayers(ETLDetLayerGeometryBuilder::buildLayers(*geo, mtopo->getMTDTopologyMode()));
} else {
LogWarning("MTDDetLayers") << "No MTD topology is available.";
}
diff --git a/RecoMTD/DetLayers/src/MTDDetSector.cc b/RecoMTD/DetLayers/src/MTDDetSector.cc
index d47b98f948a36..286844aee4ab3 100644
--- a/RecoMTD/DetLayers/src/MTDDetSector.cc
+++ b/RecoMTD/DetLayers/src/MTDDetSector.cc
@@ -1,7 +1,6 @@
//#define EDM_ML_DEBUG
#include "RecoMTD/DetLayers/interface/MTDDetSector.h"
-#include "DataFormats/ForwardDetId/interface/ETLDetId.h"
#include "Geometry/CommonDetUnit/interface/GeomDet.h"
#include "TrackingTools/GeomPropagators/interface/Propagator.h"
#include "TrackingTools/DetLayers/interface/MeasurementEstimator.h"
@@ -15,17 +14,12 @@
using namespace std;
-MTDDetSector::MTDDetSector(vector::const_iterator first,
- vector::const_iterator last,
- const MTDTopology& topo)
- : GeometricSearchDet(false), theDets(first, last), topo_(&topo) {
+MTDDetSector::MTDDetSector(vector::const_iterator first, vector::const_iterator last)
+ : GeometricSearchDet(false), theDets(first, last) {
init();
}
-MTDDetSector::MTDDetSector(const vector& vdets, const MTDTopology& topo)
- : GeometricSearchDet(false), theDets(vdets), topo_(&topo) {
- init();
-}
+MTDDetSector::MTDDetSector(const vector& vdets) : GeometricSearchDet(false), theDets(vdets) { init(); }
void MTDDetSector::init() {
// Add here the sector build based on a collection of GeomDets, mimic what done in ForwardDetRingOneZ
@@ -85,8 +79,7 @@ vector MTDDetSector::compatibleDets(const Traj
TrajectoryStateOnSurface& tsos = compat.second;
GlobalPoint startPos = tsos.globalPosition();
- LogTrace("MTDDetLayers") << "Starting position: " << startPos << " starting p/pT: " << tsos.globalMomentum().mag()
- << " / " << tsos.globalMomentum().perp();
+ LogTrace("MTDDetLayers") << "Starting position: " << startPos;
// determine distance of det center from extrapolation on the surface, sort dets accordingly
@@ -102,35 +95,30 @@ vector MTDDetSector::compatibleDets(const Traj
dist2Min = dist2;
idetMin = idet;
}
+ LogTrace("MTDDetLayers") << "MTDDetSector::compatibleDets " << std::fixed << std::setw(8) << idet << " "
+ << theDets[idet]->geographicalId().rawId() << " dist = " << std::setw(10)
+ << std::sqrt(dist2) << " Min idet/dist = " << std::setw(8) << idetMin << " "
+ << std::setw(10) << std::sqrt(dist2Min) << " " << theDets[idet]->position();
}
- //look for the compatibledets considering each line of the sector
-
- if (add(idetMin, result, tsos, prop, est)) {
- compatibleDetsLine(idetMin, result, tsos, prop, est);
-
- for (int iside = -1; iside <= 1; iside += 2) {
- bool isCompatible(true);
- size_t idetNew(idetMin);
- size_t closest = theDets.size();
-
- while (isCompatible) {
- idetNew = vshift(theDets[idetNew]->geographicalId().rawId(), iside, closest);
- if (idetNew >= theDets.size()) {
- if (closest < theDets.size()) {
- idetNew = closest;
- } else {
- break;
- }
- }
- isCompatible = add(idetNew, result, tsos, prop, est);
- if (isCompatible) {
- compatibleDetsLine(idetNew, result, tsos, prop, est);
- }
- }
+ // loop on an interval od ordered detIds around the minimum
+ // set a range of GeomDets around the minimum compatible with the geometry of ETL
+
+ size_t iniPos(idetMin > detsRange ? idetMin - detsRange : static_cast(0));
+ size_t endPos(std::min(idetMin + detsRange, basicComponents().size() - 1));
+ tmpDets.erase(tmpDets.begin() + endPos, tmpDets.end());
+ tmpDets.erase(tmpDets.begin(), tmpDets.begin() + iniPos);
+ std::sort(tmpDets.begin(), tmpDets.end());
+
+ for (const auto& thisDet : tmpDets) {
+ if (add(thisDet.second, result, tsos, prop, est)) {
+ LogTrace("MTDDetLayers") << "MTDDetSector::compatibleDets found compatible det " << thisDet.second
+ << " detId = " << theDets[thisDet.second]->geographicalId().rawId() << " at "
+ << theDets[thisDet.second]->position() << " dist = " << std::sqrt(thisDet.first);
+ } else {
+ break;
}
}
-
#ifdef EDM_ML_DEBUG
if (result.empty()) {
LogTrace("MTDDetLayers") << "MTDDetSector::compatibleDets, closest not compatible!";
@@ -168,10 +156,6 @@ bool MTDDetSector::add(size_t idet,
if (compat.first) {
result.push_back(DetWithState(theDets[idet], compat.second));
- LogTrace("MTDDetLayers") << "MTDDetSector::compatibleDets found compatible det idetMin " << idet
- << " detId = " << theDets[idet]->geographicalId().rawId() << " at "
- << theDets[idet]->position()
- << " dist = " << std::sqrt((tsos.globalPosition() - theDets[idet]->position()).mag2());
}
return compat.first;
@@ -188,32 +172,3 @@ std::ostream& operator<<(std::ostream& os, const MTDDetSector& id) {
<< " phi w/2 : " << std::setw(14) << id.specificSurface().phiHalfExtension() << std::endl;
return os;
}
-
-void MTDDetSector::compatibleDetsLine(const size_t idetMin,
- vector& result,
- const TrajectoryStateOnSurface& tsos,
- const Propagator& prop,
- const MeasurementEstimator& est) const {
- for (int iside = -1; iside <= 1; iside += 2) {
- bool isCompatible(true);
- size_t idetNew(idetMin);
-
- while (isCompatible) {
- idetNew = hshift(theDets[idetNew]->geographicalId().rawId(), iside);
- if (idetNew >= theDets.size()) {
- break;
- }
- isCompatible = add(idetNew, result, tsos, prop, est);
- }
- }
-
- return;
-}
-
-size_t MTDDetSector::hshift(const uint32_t detid, const int horizontalShift) const {
- return topo_->hshiftETL(detid, horizontalShift);
-}
-
-size_t MTDDetSector::vshift(const uint32_t detid, const int verticalShift, size_t& closest) const {
- return topo_->vshiftETL(detid, verticalShift, closest);
-}
diff --git a/RecoMTD/DetLayers/test/BuildFile.xml b/RecoMTD/DetLayers/test/BuildFile.xml
index c9fb7147c279b..2d8892ffe2fd8 100644
--- a/RecoMTD/DetLayers/test/BuildFile.xml
+++ b/RecoMTD/DetLayers/test/BuildFile.xml
@@ -10,10 +10,4 @@
-
-
-
-
-
-
diff --git a/RecoMTD/DetLayers/test/MTDRecoGeometryAnalyzer.cc b/RecoMTD/DetLayers/test/MTDRecoGeometryAnalyzer.cc
index 29bacde8db237..af9b1538a19bf 100644
--- a/RecoMTD/DetLayers/test/MTDRecoGeometryAnalyzer.cc
+++ b/RecoMTD/DetLayers/test/MTDRecoGeometryAnalyzer.cc
@@ -132,9 +132,9 @@ void MTDRecoGeometryAnalyzer::testBTLLayers(const MTDDetLayerGeometry* geo, cons
BTLDetId modId(imod->geographicalId().rawId());
LogVerbatim("MTDLayerDump") << std::fixed << "BTLDetId " << modId.rawId() << " side = " << std::setw(4)
<< modId.mtdSide() << " rod = " << modId.mtdRR() << " mod = " << std::setw(4)
- << modId.module() << std::setw(14) << " R = " << std::setprecision(4)
- << imod->position().perp() << std::setw(14) << " phi = " << imod->position().phi()
- << std::setw(14) << " Z = " << imod->position().z();
+ << modId.module() << std::setw(14) << " R = " << imod->position().perp()
+ << std::setw(14) << " phi = " << imod->position().phi() << std::setw(14)
+ << " Z = " << imod->position().z();
}
}
@@ -163,7 +163,7 @@ void MTDRecoGeometryAnalyzer::testBTLLayers(const MTDDetLayerGeometry* geo, cons
SteppingHelixPropagator prop(field, anyDirection);
pair comp = layer->compatible(tsos, prop, *theEstimator);
- LogVerbatim("MTDLayerDump") << "is compatible: " << comp.first << " at: R=" << std::setw(14) << std::setprecision(4)
+ LogVerbatim("MTDLayerDump") << "is compatible: " << comp.first << " at: R=" << std::setw(14)
<< comp.second.globalPosition().perp() << " phi=" << std::setw(14)
<< comp.second.globalPosition().phi() << " Z=" << std::setw(14)
<< comp.second.globalPosition().z();
@@ -177,7 +177,7 @@ void MTDRecoGeometryAnalyzer::testBTLLayers(const MTDDetLayerGeometry* geo, cons
<< " id: " << std::hex
<< BTLDetId(compDets.front().first->geographicalId().rawId()).rawId() << std::dec
<< "\n"
- << " distance " << std::setw(14) << std::setprecision(4)
+ << " distance " << std::setw(14)
<< (tsos.globalPosition() - compDets.front().first->position()).mag();
} else {
LogVerbatim("MTDLayerDump") << " ERROR : no compatible det found";
@@ -212,15 +212,15 @@ void MTDRecoGeometryAnalyzer::testETLLayers(const MTDDetLayerGeometry* geo, cons
GlobalTrajectoryParameters gtp(gp, gv, charge, field);
TrajectoryStateOnSurface tsos(gtp, disk);
- LogVerbatim("MTDLayerDump") << "\ntestETLLayers: at " << std::setw(14) << std::setprecision(4)
- << tsos.globalPosition() << " R=" << std::setw(14) << tsos.globalPosition().perp()
- << " phi=" << std::setw(14) << tsos.globalPosition().phi() << " Z=" << std::setw(14)
- << tsos.globalPosition().z() << " p = " << std::setw(14) << tsos.globalMomentum();
+ LogVerbatim("MTDLayerDump") << "\ntestETLLayers: at " << std::setw(14) << tsos.globalPosition()
+ << " R=" << std::setw(14) << tsos.globalPosition().perp() << " phi=" << std::setw(14)
+ << tsos.globalPosition().phi() << " Z=" << std::setw(14) << tsos.globalPosition().z()
+ << " p = " << std::setw(14) << tsos.globalMomentum();
SteppingHelixPropagator prop(field, anyDirection);
pair comp = layer->compatible(tsos, prop, *theEstimator);
- LogVerbatim("MTDLayerDump") << "is compatible: " << comp.first << " at: R=" << std::setw(14) << std::setprecision(4)
+ LogVerbatim("MTDLayerDump") << "is compatible: " << comp.first << " at: R=" << std::setw(14)
<< comp.second.globalPosition().perp() << " phi=" << std::setw(14)
<< comp.second.globalPosition().phi() << " Z=" << std::setw(14)
<< comp.second.globalPosition().z();
@@ -228,8 +228,8 @@ void MTDRecoGeometryAnalyzer::testETLLayers(const MTDDetLayerGeometry* geo, cons
vector compDets = layer->compatibleDets(tsos, prop, *theEstimator);
if (!compDets.empty()) {
LogVerbatim("MTDLayerDump") << "compatibleDets: " << std::setw(14) << compDets.size() << "\n"
- << " final state pos: " << std::setw(14) << std::setprecision(4)
- << compDets.front().second.globalPosition() << "\n"
+ << " final state pos: " << std::setw(14) << compDets.front().second.globalPosition()
+ << "\n"
<< " det pos: " << std::setw(14) << compDets.front().first->position()
<< " id: " << std::hex
<< ETLDetId(compDets.front().first->geographicalId().rawId()).rawId() << std::dec
@@ -241,9 +241,8 @@ void MTDRecoGeometryAnalyzer::testETLLayers(const MTDDetLayerGeometry* geo, cons
LogVerbatim("MTDLayerDump") << " MTD crack found ";
} else {
LogVerbatim("MTDLayerDump") << " ERROR : no compatible det found in MTD"
- << " at: R=" << std::setw(14) << std::setprecision(4) << gp.perp()
- << " phi= " << std::setw(14) << gp.phi().degrees() << " Z= " << std::setw(14)
- << gp.z();
+ << " at: R=" << std::setw(14) << gp.perp() << " phi= " << std::setw(14)
+ << gp.phi().degrees() << " Z= " << std::setw(14) << gp.z();
}
}
}
@@ -258,12 +257,11 @@ void MTDRecoGeometryAnalyzer::testETLLayersNew(const MTDDetLayerGeometry* geo, c
const MTDSectorForwardDoubleLayer* layer = static_cast(ilay);
LogVerbatim("MTDLayerDump") << std::fixed << "\nETL layer " << std::setw(4) << layer->subDetector()
- << " at z = " << std::setw(14) << std::setprecision(4)
- << layer->surface().position().z() << " sectors = " << std::setw(14)
- << layer->sectors().size() << " dets = " << std::setw(14)
- << layer->basicComponents().size() << " front dets = " << std::setw(14)
- << layer->frontLayer()->basicComponents().size() << " back dets = " << std::setw(14)
- << layer->backLayer()->basicComponents().size();
+ << " at z = " << std::setw(14) << layer->surface().position().z()
+ << " sectors = " << std::setw(14) << layer->sectors().size()
+ << " dets = " << std::setw(14) << layer->basicComponents().size()
+ << " front dets = " << std::setw(14) << layer->frontLayer()->basicComponents().size()
+ << " back dets = " << std::setw(14) << layer->backLayer()->basicComponents().size();
unsigned int isectInd(0);
for (const auto& isector : layer->sectors()) {
@@ -275,7 +273,7 @@ void MTDRecoGeometryAnalyzer::testETLLayersNew(const MTDDetLayerGeometry* geo, c
<< modId.mtdSide() << " Disc/Side/Sector = " << std::setw(4) << modId.nDisc() << " "
<< std::setw(4) << modId.discSide() << " " << std::setw(4) << modId.sector()
<< " mod/type = " << std::setw(4) << modId.module() << " " << std::setw(4)
- << modId.modType() << " pos = " << std::setprecision(4) << imod->position();
+ << modId.modType() << " pos = " << imod->position();
}
}
}
@@ -300,7 +298,7 @@ void MTDRecoGeometryAnalyzer::testETLLayersNew(const MTDDetLayerGeometry* geo, c
GlobalTrajectoryParameters gtp(gp, gv, charge, field);
TrajectoryStateOnSurface tsos(gtp, disk);
- LogVerbatim("MTDLayerDump") << "\ntestETLLayers: at " << std::setprecision(4) << std::fixed << tsos.globalPosition()
+ LogVerbatim("MTDLayerDump") << "\ntestETLLayers: at " << std::fixed << tsos.globalPosition()
<< " R=" << std::setw(14) << tsos.globalPosition().perp() << " phi=" << std::setw(14)
<< tsos.globalPosition().phi() << " Z=" << std::setw(14) << tsos.globalPosition().z()
<< " p = " << tsos.globalMomentum();
@@ -309,15 +307,15 @@ void MTDRecoGeometryAnalyzer::testETLLayersNew(const MTDDetLayerGeometry* geo, c
pair comp = layer->compatible(tsos, prop, *theEstimator);
LogVerbatim("MTDLayerDump") << std::fixed << "is compatible: " << comp.first << " at: R=" << std::setw(14)
- << std::setprecision(4) << comp.second.globalPosition().perp()
- << " phi=" << std::setw(14) << comp.second.globalPosition().phi()
- << " Z=" << std::setw(14) << comp.second.globalPosition().z();
+ << comp.second.globalPosition().perp() << " phi=" << std::setw(14)
+ << comp.second.globalPosition().phi() << " Z=" << std::setw(14)
+ << comp.second.globalPosition().z();
vector compDets = layer->compatibleDets(tsos, prop, *theEstimator);
if (!compDets.empty()) {
LogVerbatim("MTDLayerDump")
<< std::fixed << "compatibleDets: " << std::setw(14) << compDets.size() << "\n"
- << " final state pos: " << std::setprecision(4) << compDets.front().second.globalPosition() << "\n"
+ << " final state pos: " << compDets.front().second.globalPosition() << "\n"
<< " det pos: " << compDets.front().first->position() << " id: " << std::hex
<< ETLDetId(compDets.front().first->geographicalId().rawId()).rawId() << std::dec << "\n"
<< " distance " << std::setw(14)
@@ -327,9 +325,8 @@ void MTDRecoGeometryAnalyzer::testETLLayersNew(const MTDDetLayerGeometry* geo, c
LogVerbatim("MTDLayerDump") << " MTD crack found ";
} else {
LogVerbatim("MTDLayerDump") << " ERROR : no compatible det found in MTD"
- << " at: R=" << std::setw(14) << std::setprecision(4) << gp.perp()
- << " phi= " << std::setw(14) << gp.phi().degrees() << " Z= " << std::setw(14)
- << gp.z();
+ << " at: R=" << std::setw(14) << gp.perp() << " phi= " << std::setw(14)
+ << gp.phi().degrees() << " Z= " << std::setw(14) << gp.z();
}
}
}
@@ -345,12 +342,10 @@ string MTDRecoGeometryAnalyzer::dumpLayer(const DetLayer* layer) const {
sur = &(layer->surface());
if ((bc = dynamic_cast(sur))) {
output << std::fixed << " subdet = " << std::setw(4) << layer->subDetector() << " Barrel = " << layer->isBarrel()
- << " Forward = " << layer->isForward() << " Cylinder of radius: " << std::setw(14) << std::setprecision(4)
- << bc->radius();
+ << " Forward = " << layer->isForward() << " Cylinder of radius: " << std::setw(14) << bc->radius();
} else if ((bd = dynamic_cast(sur))) {
output << std::fixed << " subdet = " << std::setw(4) << layer->subDetector() << " Barrel = " << layer->isBarrel()
- << " Forward = " << layer->isForward() << " Disk at: " << std::setw(14) << std::setprecision(4)
- << bd->position().z();
+ << " Forward = " << layer->isForward() << " Disk at: " << std::setw(14) << bd->position().z();
}
return output.str();
}
diff --git a/RecoMTD/DetLayers/test/TestETLNavigation.cc b/RecoMTD/DetLayers/test/TestETLNavigation.cc
deleted file mode 100644
index e3f7eb19e6174..0000000000000
--- a/RecoMTD/DetLayers/test/TestETLNavigation.cc
+++ /dev/null
@@ -1,119 +0,0 @@
-#include "FWCore/Framework/interface/Frameworkfwd.h"
-#include "FWCore/Framework/interface/EDAnalyzer.h"
-#include "FWCore/Framework/interface/Event.h"
-#include "FWCore/Framework/interface/EventSetup.h"
-#include "FWCore/Framework/interface/ESTransientHandle.h"
-#include "FWCore/ParameterSet/interface/ParameterSet.h"
-#include "FWCore/MessageLogger/interface/MessageLogger.h"
-
-#include "RecoMTD/DetLayers/interface/MTDDetLayerGeometry.h"
-#include "RecoMTD/Records/interface/MTDRecoGeometryRecord.h"
-
-#include "RecoMTD/DetLayers/interface/MTDSectorForwardDoubleLayer.h"
-#include "RecoMTD/DetLayers/interface/MTDDetSector.h"
-
-#include
-
-#include
-
-using namespace std;
-using namespace edm;
-
-class TestETLNavigation : public EDAnalyzer {
-public:
- TestETLNavigation(const ParameterSet& pset);
-
- void analyze(const Event& ev, const EventSetup& es) override;
-
-private:
- const edm::ESInputTag tag_;
- edm::ESGetToken geomToken_;
-};
-
-TestETLNavigation::TestETLNavigation(const ParameterSet& iConfig) : tag_(edm::ESInputTag{"", ""}) {
- geomToken_ = esConsumes(tag_);
-}
-
-void TestETLNavigation::analyze(const Event& ev, const EventSetup& es) {
- auto geo = es.getTransientHandle(geomToken_);
-
- const vector& layers = geo->allETLLayers();
-
- // dump of ETL layers structure
-
- LogVerbatim("MTDLayerDump") << "\n\nTest of ETL navigation \n\n";
-
- for (const auto& ilay : layers) {
- const MTDSectorForwardDoubleLayer* layer = static_cast(ilay);
-
- LogVerbatim("MTDLayerDump") << std::fixed << "\nETL layer " << std::setw(4) << layer->subDetector()
- << " at z = " << std::setw(14) << layer->surface().position().z()
- << " sectors = " << std::setw(14) << layer->sectors().size()
- << " dets = " << std::setw(14) << layer->basicComponents().size()
- << " front dets = " << std::setw(14) << layer->frontLayer()->basicComponents().size()
- << " back dets = " << std::setw(14) << layer->backLayer()->basicComponents().size();
-
- unsigned int isectInd(0);
- for (const auto& isector : layer->sectors()) {
- isectInd++;
- LogVerbatim("MTDLayerDump") << std::fixed << "\nSector " << std::setw(4) << isectInd << "\n" << (*isector);
- unsigned int imodInd(0);
- for (const auto& imod : isector->basicComponents()) {
- imodInd++;
- ETLDetId modId(imod->geographicalId().rawId());
- LogVerbatim("MTDLayerDump") << std::fixed << std::setw(5) << imodInd << " ETLDetId " << modId.rawId()
- << " side = " << std::setw(4) << modId.mtdSide()
- << " Disc/Side/Sector = " << std::setw(4) << modId.nDisc() << " " << std::setw(4)
- << modId.discSide() << " " << std::setw(4) << modId.sector()
- << " mod/type = " << std::setw(4) << modId.module() << " " << std::setw(4)
- << modId.modType() << " pos = " << std::setprecision(4) << imod->position();
- for (int iside = -1; iside <= 1; iside += 2) {
- size_t idetNew = isector->hshift(modId, iside);
- if (idetNew >= isector->basicComponents().size()) {
- LogVerbatim("MTDLayerDump") << "...............hshift= " << std::fixed << std::setw(2) << iside
- << " out of range";
- } else {
- ETLDetId newId(isector->basicComponents()[idetNew]->geographicalId().rawId());
- LogVerbatim("MTDLayerDump") << std::fixed << "...............hshift= " << std::setw(2) << iside
- << " side = " << std::setw(4) << newId.mtdSide()
- << " Disc/Side/Sector = " << std::setw(4) << newId.nDisc() << " "
- << std::setw(4) << newId.discSide() << " " << std::setw(4) << newId.sector()
- << " mod/type = " << std::setw(4) << newId.module() << " " << std::setw(4)
- << newId.modType() << " pos = " << std::setprecision(4)
- << isector->basicComponents()[idetNew]->position();
- }
- }
- for (int iside = -1; iside <= 1; iside += 2) {
- size_t closest(isector->basicComponents().size());
- size_t idetNew = isector->vshift(modId, iside, closest);
- if (idetNew >= isector->basicComponents().size()) {
- LogVerbatim("MTDLayerDump") << "...............vshift= " << std::fixed << std::setw(2) << iside
- << " out of range";
- if (closest < isector->basicComponents().size()) {
- ETLDetId newId(isector->basicComponents()[closest]->geographicalId().rawId());
- LogVerbatim("MTDLayerDump")
- << std::fixed << ".......closest.vshift= " << std::setw(2) << iside << " side = " << std::setw(4)
- << newId.mtdSide() << " Disc/Side/Sector = " << std::setw(4) << newId.nDisc() << " " << std::setw(4)
- << newId.discSide() << " " << std::setw(4) << newId.sector() << " mod/type = " << std::setw(4)
- << newId.module() << " " << std::setw(4) << newId.modType() << " pos = " << std::setprecision(4)
- << isector->basicComponents()[closest]->position();
- }
- } else {
- ETLDetId newId(isector->basicComponents()[idetNew]->geographicalId().rawId());
- LogVerbatim("MTDLayerDump") << std::fixed << "...............vshift= " << std::setw(2) << iside
- << " side = " << std::setw(4) << newId.mtdSide()
- << " Disc/Side/Sector = " << std::setw(4) << newId.nDisc() << " "
- << std::setw(4) << newId.discSide() << " " << std::setw(4) << newId.sector()
- << " mod/type = " << std::setw(4) << newId.module() << " " << std::setw(4)
- << newId.modType() << " pos = " << std::setprecision(4)
- << isector->basicComponents()[idetNew]->position();
- }
- }
- }
- }
- }
-}
-
-//define this as a plug-in
-#include
-DEFINE_FWK_MODULE(TestETLNavigation);
diff --git a/RecoMTD/DetLayers/test/mtd_cfg.py b/RecoMTD/DetLayers/test/mtd_cfg.py
index dbf9f757a0c0e..36f1c074d2571 100644
--- a/RecoMTD/DetLayers/test/mtd_cfg.py
+++ b/RecoMTD/DetLayers/test/mtd_cfg.py
@@ -10,40 +10,22 @@
process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.MessageLogger.debugModules = cms.untracked.vstring("*")
-process.MessageLogger.cerr.threshold = cms.untracked.string('DEBUG')
-process.MessageLogger.cerr.DEBUG = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
-)
-process.MessageLogger.cerr.MTDLayerDump = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
-)
-process.MessageLogger.cerr.MTDDetLayers = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
-)
-process.MessageLogger.files.mtdDetLayerGeometry = cms.untracked.PSet(
- MTDLayerDump = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
- ),
- MTDDetLayers = cms.untracked.PSet(
- limit = cms.untracked.int32(-1)
- ),
- DEBUG = cms.untracked.PSet(
+process.MessageLogger.files.debugs = cms.untracked.PSet(
+ threshold = cms.untracked.string('DEBUG'),
+ INFO= cms.untracked.PSet(
limit = cms.untracked.int32(0)
),
- ERROR = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
- ),
- FWKINFO = cms.untracked.PSet(
+ DEBUG = cms.untracked.PSet(
limit = cms.untracked.int32(0)
),
- INFO = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
+ MTDLayerDump = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
),
- WARNING = cms.untracked.PSet(
- limit = cms.untracked.int32(0)
+ MTDDetLayers = cms.untracked.PSet(
+ limit = cms.untracked.int32(-1)
),
- noLineBreaks = cms.untracked.bool(True),
- threshold = cms.untracked.string('INFO'))
+ enableStatistics = cms.untracked.bool(True)
+)
# Choose Tracker Geometry
process.load("Configuration.Geometry.GeometryExtended2026D76_cff")
@@ -62,6 +44,5 @@
process.Timing = cms.Service("Timing")
process.prod = cms.EDAnalyzer("MTDRecoGeometryAnalyzer")
-process.prod1 = cms.EDAnalyzer("TestETLNavigation")
-process.p1 = cms.Path(process.prod+process.prod1)
+process.p1 = cms.Path(process.prod)
diff --git a/RecoMTD/DetLayers/test/runTest.sh b/RecoMTD/DetLayers/test/runTest.sh
deleted file mode 100755
index 490b4b42d9f8e..0000000000000
--- a/RecoMTD/DetLayers/test/runTest.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh -e
-
-function die { echo $1: status $2 ; exit $2; }
-function checkDiff {
- FSIZE=$(stat -c%s "$1")
- echo "The output diff is $FSIZE:"
- cat $1;
- if [ $FSIZE -gt 0 ]
- then
- exit -1;
- fi
-}
-
-TEST_DIR=src/RecoMTD/DetLayers/test
-
-F1=${TEST_DIR}/mtd_cfg.py
-
-REF_FILE="Geometry/TestReference/data/mtdDetLayerGeometryRef.log.gz"
-REF=""
-for d in $(echo $CMSSW_SEARCH_PATH | tr ':' '\n') ; do
- if [ -e "${d}/${REF_FILE}" ] ; then
- REF="${d}/${REF_FILE}"
- break
- fi
-done
-[ -z $REF ] && exit 1
-
-FILE1=mtdDetLayerGeometry.log
-LOG=mtddlglog
-DIF=mtddlgdif
-
-echo " testing RecoMTD/DetLayers"
-
-echo "===== Test \"cmsRun mtd_cfg.py\" ===="
-rm -f $LOG $DIF $FILE1
-
-cmsRun $F1 >& $LOG || die "Failure using cmsRun $F1" $?
-gzip -f $FILE1 || die "$FILE1 compression fail" $?
-(zdiff $FILE1.gz $REF >& $DIF || [ -s $DIF ] && checkDiff $DIF || echo "OK") || die "Failure in comparison for $FILE1" $?
diff --git a/SimFastTiming/FastTimingCommon/src/ETLDeviceSim.cc b/SimFastTiming/FastTimingCommon/src/ETLDeviceSim.cc
index 4ef834e20ee3d..113d55625bef0 100644
--- a/SimFastTiming/FastTimingCommon/src/ETLDeviceSim.cc
+++ b/SimFastTiming/FastTimingCommon/src/ETLDeviceSim.cc
@@ -61,12 +61,21 @@ void ETLDeviceSim::getHitsResponse(const std::vector 1.0 - topo.gapxInterpadFrac() || fractionX < topo.gapxInterpadFrac()) ||
+ (ixbin == 0 && fractionX < topo.gapxBorderFrac()) ||
+ (ixbin == topo.nrows() - 1 && fractionX > 1.0 - topo.gapxBorderFrac()))
+ continue;
+ if ((fractionY > 1.0 - topo.gapyInterpadFrac() || fractionY < topo.gapyInterpadFrac()) ||
+ (iybin == 0 && fractionY < topo.gapyBorderFrac()) ||
+ (iybin == topo.ncolumns() - 1 && fractionY > 1.0 - topo.gapyBorderFrac()))
continue;
- }
- const auto& thepixel = topo.pixel(simscaled);
const uint8_t row(thepixel.first), col(thepixel.second);
auto simHitIt =
diff --git a/Validation/MtdValidation/test/mtdValidation_cfg.py b/Validation/MtdValidation/test/mtdValidation_cfg.py
index 4509441227d78..1a84ec60b0cc0 100644
--- a/Validation/MtdValidation/test/mtdValidation_cfg.py
+++ b/Validation/MtdValidation/test/mtdValidation_cfg.py
@@ -7,10 +7,22 @@
process.load("FWCore.MessageService.MessageLogger_cfi")
-process.load("Configuration.Geometry.GeometryExtended2026D76Reco_cff")
+process.load("Configuration.Geometry.GeometryExtended2026D49_cff")
process.load('SimGeneral.MixingModule.mixNoPU_cfi')
+process.load("Geometry.MTDNumberingBuilder.mtdNumberingGeometry_cfi")
+process.load("Geometry.MTDNumberingBuilder.mtdTopology_cfi")
+process.load("Geometry.MTDGeometryBuilder.mtdGeometry_cfi")
+process.load("Geometry.MTDGeometryBuilder.mtdParameters_cfi")
+
+process.mtdGeometry = cms.ESProducer("MTDDigiGeometryESModule",
+ alignmentsLabel = cms.string(''),
+ appendToDataLabel = cms.string(''),
+ applyAlignment = cms.bool(False),
+ fromDDD = cms.bool(True)
+)
+
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
process.MessageLogger.cerr.FwkReport = cms.untracked.PSet(
@@ -41,13 +53,8 @@
# --- Global Validation
process.load("Validation.MtdValidation.mtdTracks_cfi")
-process.btlDigiHits.LocalPositionDebug = True
-process.etlDigiHits.LocalPositionDebug = True
-process.btlLocalReco.LocalPositionDebug = True
-process.etlLocalReco.LocalPositionDebug = True
-
process.DQMStore = cms.Service("DQMStore")
process.load("DQMServices.FileIO.DQMFileSaverOnline_cfi")
-process.p = cms.Path( process.mix + btlValidation + etlValidation + process.mtdTracks + process.dqmSaver)
+process.p = cms.Path( process.mix + btlValidation + etlValidation + process.globalReco + process.dqmSaver)