Skip to content

Commit

Permalink
Revert "Move BTL phi order from 0 to 2pi to -pi to +pi"
Browse files Browse the repository at this point in the history
This reverts commit 387021e.
Temporarily silence BTL navigation test for backward compatibility
  • Loading branch information
fabiocos committed Dec 10, 2024
1 parent a372e6b commit 06d30e1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
10 changes: 6 additions & 4 deletions Geometry/MTDNumberingBuilder/plugins/CmsMTDConstruction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include "DataFormats/ForwardDetId/interface/ETLDetId.h"
#include "Geometry/MTDCommonData/interface/MTDBaseNumber.h"

#include "DataFormats/Math/interface/deltaPhi.h"

using angle_units::operators::convertRadToDeg;

template <class FilteredView>
Expand Down Expand Up @@ -37,14 +39,14 @@ bool CmsMTDConstruction<FilteredView>::mtdOrderPhi(const GeometricTimingDet* a,

template <class FilteredView>
bool CmsMTDConstruction<FilteredView>::btlOrderPhi(const GeometricTimingDet* a, const GeometricTimingDet* b) {
return static_cast<int>(convertRadToDeg(makempiToppi(a->phi()))) <
static_cast<int>(convertRadToDeg(makempiToppi(b->phi())));
return static_cast<int>(convertRadToDeg(angle0to2pi::make0To2pi(a->phi()))) <
static_cast<int>(convertRadToDeg(angle0to2pi::make0To2pi(b->phi())));
}

template <class FilteredView>
bool CmsMTDConstruction<FilteredView>::btlOrderZ(const GeometricTimingDet* a, const GeometricTimingDet* b) {
bool order = (static_cast<int>(convertRadToDeg(makempiToppi(a->phi()))) ==
static_cast<int>(convertRadToDeg(makempiToppi(b->phi())))) &&
bool order = (static_cast<int>(convertRadToDeg(angle0to2pi::make0To2pi(a->phi()))) ==
static_cast<int>(convertRadToDeg(angle0to2pi::make0To2pi(b->phi())))) &&
(a->translation().z() < b->translation().z());
return order;
}
Expand Down
13 changes: 0 additions & 13 deletions Geometry/MTDNumberingBuilder/plugins/CmsMTDConstruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,6 @@
#include "Geometry/MTDCommonData/interface/BTLNumberingScheme.h"
#include "Geometry/MTDCommonData/interface/ETLNumberingScheme.h"

#include "DataFormats/Math/interface/deltaPhi.h"

namespace {

template <class valType>
inline constexpr valType makempiToppi(valType angle) {
constexpr valType twoPi = 2. * M_PI;
constexpr valType epsilon = 1.e-13;
auto tmpphi = angle0to2pi::make0To2pi(angle);
return (tmpphi - M_PI > epsilon) ? tmpphi - twoPi : tmpphi;
}
} // namespace

/**
* Adds GeometricTimingDets representing final modules to the previous level
*/
Expand Down
3 changes: 2 additions & 1 deletion RecoMTD/DetLayers/test/mtd_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,5 @@
process.prod1 = cms.EDAnalyzer("TestBTLNavigation")
process.prod2 = cms.EDAnalyzer("TestETLNavigation")

process.p1 = cms.Path(cms.wait(process.prod)+cms.wait(process.prod1)+process.prod2)
# process.p1 = cms.Path(cms.wait(process.prod)+cms.wait(process.prod1)+process.prod2)
process.p1 = cms.Path(cms.wait(process.prod)+process.prod2)

0 comments on commit 06d30e1

Please sign in to comment.