Skip to content

Commit

Permalink
Merge pull request #45993 from emiglior/CMSSW_14_2_X_removeDoubleSens…
Browse files Browse the repository at this point in the history
…GeomDet

bugfix: remove DoubleSensGeomDet (ph-2 InnerTracker)
  • Loading branch information
cmsbuild authored Sep 14, 2024
2 parents 6e31ebe + 31684f2 commit 1be2984
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 223 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import copy, sys, os

import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
GLOBAL_TAG, ERA = _settings.get_era_and_conditions("2026D107") # this should really be _settings.DEFAULT_VERSION :(
GLOBAL_TAG, ERA = _settings.get_era_and_conditions(_settings.DEFAULT_VERSION)
process = cms.Process("Misaligner", ERA)

###################################################################
Expand Down Expand Up @@ -48,7 +48,7 @@
###################################################################
# Ideal geometry producer and standard includes
###################################################################
process.load('Configuration.Geometry.GeometryExtended2026D107Reco_cff')
process.load('Configuration.Geometry.GeometryExtended2026DefaultReco_cff')
process.trackerGeometry.applyAlignment = True

###################################################################
Expand Down
16 changes: 8 additions & 8 deletions Configuration/AlCa/python/autoCondPhase2.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,20 @@
'T21' : ( ','.join( [ 'TrackerAlignment_Upgrade2026_T21_design_v0' ,TkAlRecord, connectionString, "", "2023-03-16 15:30:00"] ), ),
'T25' : ( ','.join( [ 'TrackerAlignment_Upgrade2026_T25_design_v0' ,TkAlRecord, connectionString, "", "2023-03-16 15:30:00"] ), ),
'T30' : ( ','.join( [ 'TrackerAlignment_Upgrade2026_T30_design_v0' ,TkAlRecord, connectionString, "", "2023-03-16 15:30:00"] ), ),
'T33' : ( ','.join( [ 'TrackerAlignment_Upgrade2026_T33_design_v0' ,TkAlRecord, connectionString, "", "2023-06-07 21:00:00"] ), ),
'T36' : ( ','.join( [ 'TrackerAlignment_Upgrade2026_T36_design_v0' ,TkAlRecord, connectionString, "", "2024-04-14 15:19:00"] ), ),
'T37' : ( ','.join( [ 'TrackerAlignment_Upgrade2026_T37_design_v0' ,TkAlRecord, connectionString, "", "2024-04-14 15:19:00"] ), ),
'T38' : ( ','.join( [ 'TrackerAlignment_Upgrade2026_T38_design_v0' ,TkAlRecord, connectionString, "", "2024-04-14 15:19:00"] ), ),
'T33' : ( ','.join( [ 'TrackerAlignment_Upgrade2026_T33_design_v1' ,TkAlRecord, connectionString, "", "2024-09-12 15:37:00"] ), ),
'T36' : ( ','.join( [ 'TrackerAlignment_Upgrade2026_T36_design_v1' ,TkAlRecord, connectionString, "", "2024-09-12 15:37:00"] ), ),
'T37' : ( ','.join( [ 'TrackerAlignment_Upgrade2026_T37_design_v1' ,TkAlRecord, connectionString, "", "2024-09-12 15:37:00"] ), ),
'T38' : ( ','.join( [ 'TrackerAlignment_Upgrade2026_T38_design_v1' ,TkAlRecord, connectionString, "", "2024-09-12 15:37:00"] ), ),
}

allTags["TkAPE"] = {
'T21' : ( ','.join( [ 'TrackerAlignmentErrorsExtended_Upgrade2026_T21_design_v0' ,TkAPERecord, connectionString, "", "2023-03-16 15:30:00"] ), ),
'T25' : ( ','.join( [ 'TrackerAlignmentErrorsExtended_Upgrade2026_T25_design_v0' ,TkAPERecord, connectionString, "", "2023-03-16 15:30:00"] ), ),
'T30' : ( ','.join( [ 'TrackerAlignmentErrorsExtended_Upgrade2026_T30_design_v0' ,TkAPERecord, connectionString, "", "2023-03-16 15:30:00"] ), ),
'T33' : ( ','.join( [ 'TrackerAlignmentErrorsExtended_Upgrade2026_T33_design_v0' ,TkAPERecord, connectionString, "", "2023-06-07 21:00:00"] ), ),
'T36' : ( ','.join( [ 'TrackerAlignmentErrorsExtended_Upgrade2026_T36_design_v0' ,TkAPERecord, connectionString, "", "2024-04-14 13:10:00"] ), ),
'T37' : ( ','.join( [ 'TrackerAlignmentErrorsExtended_Upgrade2026_T36_design_v0' ,TkAPERecord, connectionString, "", "2024-04-14 13:10:00"] ), ),
'T38' : ( ','.join( [ 'TrackerAlignmentErrorsExtended_Upgrade2026_T36_design_v0' ,TkAPERecord, connectionString, "", "2024-04-14 13:10:00"] ), ),
'T33' : ( ','.join( [ 'TrackerAlignmentErrorsExtended_Upgrade2026_T33_design_v1' ,TkAPERecord, connectionString, "", "2024-09-12 15:37:00"] ), ),
'T36' : ( ','.join( [ 'TrackerAlignmentErrorsExtended_Upgrade2026_T36_design_v1' ,TkAPERecord, connectionString, "", "2024-09-12 15:37:00"] ), ),
'T37' : ( ','.join( [ 'TrackerAlignmentErrorsExtended_Upgrade2026_T36_design_v1' ,TkAPERecord, connectionString, "", "2024-09-12 15:37:00"] ), ),
'T38' : ( ','.join( [ 'TrackerAlignmentErrorsExtended_Upgrade2026_T36_design_v1' ,TkAPERecord, connectionString, "", "2024-09-12 15:37:00"] ), ),
}

allTags["TkSurf"] = {
Expand Down
2 changes: 1 addition & 1 deletion Fireworks/Geometry/src/FWRecoGeometryESProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ void FWRecoGeometryESProducer::addPixelBarrelGeometry(FWRecoGeometry& fwRecoGeom
++it) {
const GeomDet* det = *it;

if (det and det->isLeaf()) {
if (det) {
DetId detid = det->geographicalId();
unsigned int rawid = detid.rawId();
unsigned int current = insert_id(rawid, fwRecoGeometry);
Expand Down
8 changes: 0 additions & 8 deletions Geometry/TrackerGeometryBuilder/src/PixelTopologyMap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ void PixelTopologyMap::buildTopologyMaps() {
for (auto det : m_trackerGeom->detsPXB()) {
const PixelGeomDetUnit* pixelDet = dynamic_cast<const PixelGeomDetUnit*>(det);

// discard dets that are not a geomDetUnit
if (!pixelDet)
continue;

const auto& layer = m_trackerTopo->pxbLayer(pixelDet->geographicalId());
const auto& ladder = m_trackerTopo->pxbLadder(pixelDet->geographicalId());
const auto& module = m_trackerTopo->pxbModule(pixelDet->geographicalId());
Expand Down Expand Up @@ -60,10 +56,6 @@ void PixelTopologyMap::buildTopologyMaps() {
for (auto det : m_trackerGeom->detsPXF()) {
const PixelGeomDetUnit* pixelDet = dynamic_cast<const PixelGeomDetUnit*>(det);

// discard dets that are not a geomDetUnit
if (!pixelDet)
continue;

const auto& disk = m_trackerTopo->pxfDisk(pixelDet->geographicalId());
const auto& blade = m_trackerTopo->pxfBlade(pixelDet->geographicalId());
const auto& pxf_module = m_trackerTopo->pxfModule(pixelDet->geographicalId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "Geometry/CommonDetUnit/interface/GeomDet.h"
#include "Geometry/CommonDetUnit/interface/GluedGeomDet.h"
#include "Geometry/CommonDetUnit/interface/StackGeomDet.h"
#include "Geometry/CommonDetUnit/interface/DoubleSensGeomDet.h"
#include "Geometry/CommonDetUnit/interface/PixelGeomDetType.h"
#include "Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h"
#include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetType.h"
Expand Down Expand Up @@ -312,13 +311,6 @@ void TrackerGeomBuilderFromGeometricDet::buildGeomDet(TrackerGeometry* tracker)
StackGeomDet* stackDet = new StackGeomDet(&(*plane), dus, dum, composedDetId);
tracker->addDet((GeomDet*)stackDet);
tracker->addDetId(composedDetId);
} else if (gduTypeName.find("One") != std::string::npos) {
//The plane is *not* built in the middle, but on the First surface
Plane* plane = new Plane(dus->surface());
composedDetId = theTopo->doubleSensor(gduId[i]);
DoubleSensGeomDet* doubleSensDet = new DoubleSensGeomDet(&(*plane), dus, dum, composedDetId);
tracker->addDet((GeomDet*)doubleSensDet);
tracker->addDetId(composedDetId);
}
}
}
Expand Down
33 changes: 2 additions & 31 deletions RecoTracker/MeasurementDet/plugins/MeasurementTrackerImpl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "Geometry/CommonDetUnit/interface/GeomDet.h"
#include "Geometry/CommonDetUnit/interface/GluedGeomDet.h"
#include "Geometry/CommonDetUnit/interface/StackGeomDet.h"
#include "Geometry/CommonDetUnit/interface/DoubleSensGeomDet.h"
#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"

#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
Expand All @@ -32,7 +31,6 @@
#include "TkPhase2OTMeasurementDet.h"
#include "TkGluedMeasurementDet.h"
#include "TkStackMeasurementDet.h"
#include "TkDoubleSensMeasurementDet.h"

#include "CondFormats/SiStripObjects/interface/SiStripNoises.h"
#include "CondFormats/DataRecord/interface/SiStripNoisesRcd.h"
Expand Down Expand Up @@ -172,11 +170,6 @@ void MeasurementTrackerImpl::initialize(const TrackerTopology* trackerTopology)
for (unsigned int i = 0; i != theStackDets.size(); ++i)
initStackDet(theStackDets[i]);

// and then the double sensor dets
sortTKD(theDoubleSensGeomDets);
for (unsigned int i = 0; i != theDoubleSensGeomDets.size(); ++i)
initDoubleSensDet(theDoubleSensGeomDets[i]);

if (!checkDets())
throw MeasurementDetException("Number of dets in MeasurementTracker not consistent with TrackerGeometry!");
}
Expand Down Expand Up @@ -240,19 +233,14 @@ void MeasurementTrackerImpl::addDets(const TrackingGeometry::DetContainer& dets,
//Glued or Stack GeomDet
const GluedGeomDet* gluedDet = dynamic_cast<const GluedGeomDet*>(*gd);
const StackGeomDet* stackDet = dynamic_cast<const StackGeomDet*>(*gd);
const DoubleSensGeomDet* doubleSensGeomDet = dynamic_cast<const DoubleSensGeomDet*>(*gd);

if ((gluedDet == nullptr && stackDet == nullptr && doubleSensGeomDet == nullptr) ||
(gluedDet != nullptr && stackDet != nullptr && doubleSensGeomDet != nullptr)) {
throw MeasurementDetException(
"MeasurementTracker ERROR: GeomDet neither DetUnit nor GluedDet nor StackDet nor DoubleSensGeomDet");
if ((gluedDet == nullptr && stackDet == nullptr) || (gluedDet != nullptr && stackDet != nullptr)) {
throw MeasurementDetException("MeasurementTracker ERROR: GeomDet neither DetUnit nor GluedDet nor StackDet");
}
if (gluedDet != nullptr)
addGluedDet(gluedDet);
else if (stackDet != nullptr)
addStackDet(stackDet);
else
addDoubleSensGeomDet(doubleSensGeomDet);
}
}
}
Expand Down Expand Up @@ -297,10 +285,6 @@ void MeasurementTrackerImpl::addStackDet(const StackGeomDet* gd) {
theStackDets.push_back(TkStackMeasurementDet(gd, thePxDetConditions.pixelCPE()));
}

void MeasurementTrackerImpl::addDoubleSensGeomDet(const DoubleSensGeomDet* gd) {
theDoubleSensGeomDets.push_back(TkDoubleSensMeasurementDet(gd, thePxDetConditions.pixelCPE()));
}

void MeasurementTrackerImpl::initGluedDet(TkGluedMeasurementDet& det, const TrackerTopology* trackerTopology) {
const GluedGeomDet& gd = det.specificGeomDet();
const MeasurementDet* monoDet = findDet(gd.monoDet()->geographicalId());
Expand All @@ -325,19 +309,6 @@ void MeasurementTrackerImpl::initStackDet(TkStackMeasurementDet& det) {
theDetMap[gd.geographicalId()] = &det;
}

void MeasurementTrackerImpl::initDoubleSensDet(TkDoubleSensMeasurementDet& det) {
const DoubleSensGeomDet& gd = det.specificGeomDet();
const MeasurementDet* firstDet = findDet(gd.firstDet()->geographicalId());
const MeasurementDet* secondDet = findDet(gd.secondDet()->geographicalId());
if (firstDet == nullptr || secondDet == nullptr) {
edm::LogError("MeasurementDet")
<< "MeasurementTracker ERROR: DoubleSensDet components not found as MeasurementDets ";
throw MeasurementDetException("MeasurementTracker ERROR: DoubleSensDet components not found as MeasurementDets");
}
det.init(firstDet, secondDet);
theDetMap[gd.geographicalId()] = &det;
}

void MeasurementTrackerImpl::initializeStripStatus(const BadStripCutsDet& badStripCuts,
const SiStripQuality* quality,
int qualityFlags,
Expand Down
6 changes: 0 additions & 6 deletions RecoTracker/MeasurementDet/plugins/MeasurementTrackerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ class TkPixelMeasurementDet;
class TkPhase2OTMeasurementDet;
class TkGluedMeasurementDet;
class TkStackMeasurementDet;
class TkDoubleSensMeasurementDet;
class GeometricSearchTracker;
class SiStripRecHitMatcher;
class GluedGeomDet;
class StackGeomDet;
class DoubleSensGeomDet;
class SiPixelFedCabling;
class TrackerGeometry;

Expand Down Expand Up @@ -102,7 +100,6 @@ class dso_hidden MeasurementTrackerImpl final : public MeasurementTracker {
const std::vector<TkPixelMeasurementDet>& pixelDets() const { return thePixelDets; }
const std::vector<TkGluedMeasurementDet>& gluedDets() const { return theGluedDets; }
const std::vector<TkStackMeasurementDet>& stackDets() const { return theStackDets; }
const std::vector<TkDoubleSensMeasurementDet>& doubleSensGeomDets() const { return theDoubleSensGeomDets; }

const StMeasurementConditionSet& stripDetConditions() const override { return theStDetConditions; }
const PxMeasurementConditionSet& pixelDetConditions() const override { return thePxDetConditions; }
Expand All @@ -120,7 +117,6 @@ class dso_hidden MeasurementTrackerImpl final : public MeasurementTracker {
std::vector<TkPhase2OTMeasurementDet> thePhase2Dets;
std::vector<TkGluedMeasurementDet> theGluedDets;
std::vector<TkStackMeasurementDet> theStackDets;
std::vector<TkDoubleSensMeasurementDet> theDoubleSensGeomDets;

const SiPixelFedCabling* thePixelCabling;

Expand All @@ -135,11 +131,9 @@ class dso_hidden MeasurementTrackerImpl final : public MeasurementTracker {

void addGluedDet(const GluedGeomDet* gd);
void addStackDet(const StackGeomDet* gd);
void addDoubleSensGeomDet(const DoubleSensGeomDet* gd);

void initGluedDet(TkGluedMeasurementDet& det, const TrackerTopology* trackerTopology);
void initStackDet(TkStackMeasurementDet& det);
void initDoubleSensDet(TkDoubleSensMeasurementDet& det);

void addDets(const TrackingGeometry::DetContainer& dets, bool subIsPixel, bool subIsOT);

Expand Down
105 changes: 0 additions & 105 deletions RecoTracker/MeasurementDet/plugins/TkDoubleSensMeasurementDet.cc

This file was deleted.

54 changes: 0 additions & 54 deletions RecoTracker/MeasurementDet/plugins/TkDoubleSensMeasurementDet.h

This file was deleted.

0 comments on commit 1be2984

Please sign in to comment.