diff --git a/Alignment/TrackerAlignment/test/Misalignments/createRandomlyMisalignedGeometry_Phase2_cfg.py b/Alignment/TrackerAlignment/test/Misalignments/createRandomlyMisalignedGeometry_Phase2_cfg.py index e73a48ca19a59..642ae88f81815 100644 --- a/Alignment/TrackerAlignment/test/Misalignments/createRandomlyMisalignedGeometry_Phase2_cfg.py +++ b/Alignment/TrackerAlignment/test/Misalignments/createRandomlyMisalignedGeometry_Phase2_cfg.py @@ -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) ################################################################### @@ -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 ################################################################### diff --git a/Configuration/AlCa/python/autoCondPhase2.py b/Configuration/AlCa/python/autoCondPhase2.py index a5c14fed5d8e4..24e0f841d60a4 100644 --- a/Configuration/AlCa/python/autoCondPhase2.py +++ b/Configuration/AlCa/python/autoCondPhase2.py @@ -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"] = { diff --git a/Fireworks/Geometry/python/dumpRecoGeometry_cfg.py b/Fireworks/Geometry/python/dumpRecoGeometry_cfg.py index 73c80aa320d83..a03d6973a7844 100644 --- a/Fireworks/Geometry/python/dumpRecoGeometry_cfg.py +++ b/Fireworks/Geometry/python/dumpRecoGeometry_cfg.py @@ -43,7 +43,7 @@ def versionCheck(ver): print("") help() -def recoGeoLoad(score): +def recoGeoLoad(score, properties): print("Loading configuration for tag ", options.tag ,"...\n") if score == "Run1": @@ -64,7 +64,7 @@ def recoGeoLoad(score): process.GlobalTag.globaltag = autoCond['upgrade2017'] process.load('Configuration.Geometry.GeometryExtended2017Reco_cff') - elif score == "2021": + elif score == "2021": process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") from Configuration.AlCa.autoCond import autoCond process.GlobalTag.globaltag = autoCond['upgrade2021'] @@ -78,10 +78,32 @@ def recoGeoLoad(score): elif "2026" in score: versionCheck(options.version) process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") - from Configuration.AlCa.autoCond import autoCond - process.GlobalTag.globaltag = autoCond['phase2_realistic'] + + # Import the required configuration from the CMSSW module + from Configuration.AlCa.autoCond import autoCond # Ensure autoCond is imported + + # Ensure options.version is defined and set correctly + version_key = '2026' + options.version # This constructs the key for accessing the properties dictionary + print(f"Constructed version key: {version_key}") + + # Check if the key exists in properties for 2026 + if version_key in properties[2026]: + # Get the specific global tag for this version + global_tag_key = properties[2026][version_key]['GT'] + print(f"Global tag key from properties: {global_tag_key}") + + # Check if this key exists in autoCond + if global_tag_key.replace("auto:", "") in autoCond: + # Set the global tag + from Configuration.AlCa.GlobalTag import GlobalTag + process.GlobalTag = GlobalTag(process.GlobalTag, global_tag_key, '') + else: + raise KeyError(f"Global tag key '{global_tag_key}' not found in autoCond.") + else: + raise KeyError(f"Version key '{version_key}' not found in properties[2026].") process.load('Configuration.Geometry.GeometryExtended2026'+options.version+'Reco_cff') - + process.trackerGeometry.applyAlignment = cms.bool(False) + elif score == "MaPSA": process.load('Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff') process.load('Geometry.TrackerCommonData.mapsaGeometryXML_cfi') @@ -114,11 +136,8 @@ def recoGeoLoad(score): help() - - options = VarParsing.VarParsing () - defaultOutputFileName="cmsRecoGeom.root" options.register ('tag', @@ -171,16 +190,33 @@ def recoGeoLoad(score): options.parseArguments() - - - -process = cms.Process("DUMP") +from Configuration.PyReleaseValidation.upgradeWorkflowComponents import upgradeProperties as properties +# Determine version_key based on the value of options.tag +if options.tag == "2026" or options.tag == "MaPSA": + prop_key = 2026 + version_key = options.tag + options.version +elif options.tag == "2017" or options.tag == "2021": #(this leads to crashes in tests ?) + prop_key = 2017 + version_key = options.tag +else: + prop_key = None + version_key = None + +if(prop_key and version_key): + print(f"Constructed version key: {version_key}") + era_key = properties[prop_key][str(version_key)]['Era'] + print(f"Constructed era key: {era_key}") + from Configuration.StandardSequences.Eras import eras + era = getattr(eras, era_key) + process = cms.Process("DUMP",era) +else: + process = cms.Process("DUMP") process.add_(cms.Service("InitRootHandlers", ResetRootErrHandler = cms.untracked.bool(False))) process.source = cms.Source("EmptySource") process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1)) -recoGeoLoad(options.tag) +recoGeoLoad(options.tag,properties) if ( options.tgeo == True): if (options.out == defaultOutputFileName ): diff --git a/Geometry/TrackerGeometryBuilder/src/PixelTopologyMap.cc b/Geometry/TrackerGeometryBuilder/src/PixelTopologyMap.cc index cd4076b13e662..1325579ce9a0e 100644 --- a/Geometry/TrackerGeometryBuilder/src/PixelTopologyMap.cc +++ b/Geometry/TrackerGeometryBuilder/src/PixelTopologyMap.cc @@ -26,10 +26,6 @@ void PixelTopologyMap::buildTopologyMaps() { for (auto det : m_trackerGeom->detsPXB()) { const PixelGeomDetUnit* pixelDet = dynamic_cast(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()); @@ -60,10 +56,6 @@ void PixelTopologyMap::buildTopologyMaps() { for (auto det : m_trackerGeom->detsPXF()) { const PixelGeomDetUnit* pixelDet = dynamic_cast(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()); diff --git a/Geometry/TrackerGeometryBuilder/src/TrackerGeomBuilderFromGeometricDet.cc b/Geometry/TrackerGeometryBuilder/src/TrackerGeomBuilderFromGeometricDet.cc index 58a3527411158..1f414e2c018b1 100644 --- a/Geometry/TrackerGeometryBuilder/src/TrackerGeomBuilderFromGeometricDet.cc +++ b/Geometry/TrackerGeometryBuilder/src/TrackerGeomBuilderFromGeometricDet.cc @@ -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" @@ -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); } } } diff --git a/RecoTracker/MeasurementDet/plugins/MeasurementTrackerImpl.cc b/RecoTracker/MeasurementDet/plugins/MeasurementTrackerImpl.cc index c67f064c30af7..e9abd2d623527 100644 --- a/RecoTracker/MeasurementDet/plugins/MeasurementTrackerImpl.cc +++ b/RecoTracker/MeasurementDet/plugins/MeasurementTrackerImpl.cc @@ -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" @@ -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" @@ -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!"); } @@ -240,19 +233,14 @@ void MeasurementTrackerImpl::addDets(const TrackingGeometry::DetContainer& dets, //Glued or Stack GeomDet const GluedGeomDet* gluedDet = dynamic_cast(*gd); const StackGeomDet* stackDet = dynamic_cast(*gd); - const DoubleSensGeomDet* doubleSensGeomDet = dynamic_cast(*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); } } } @@ -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()); @@ -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, diff --git a/RecoTracker/MeasurementDet/plugins/MeasurementTrackerImpl.h b/RecoTracker/MeasurementDet/plugins/MeasurementTrackerImpl.h index 10c54eb529158..7794f31e5fe94 100644 --- a/RecoTracker/MeasurementDet/plugins/MeasurementTrackerImpl.h +++ b/RecoTracker/MeasurementDet/plugins/MeasurementTrackerImpl.h @@ -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; @@ -102,7 +100,6 @@ class dso_hidden MeasurementTrackerImpl final : public MeasurementTracker { const std::vector& pixelDets() const { return thePixelDets; } const std::vector& gluedDets() const { return theGluedDets; } const std::vector& stackDets() const { return theStackDets; } - const std::vector& doubleSensGeomDets() const { return theDoubleSensGeomDets; } const StMeasurementConditionSet& stripDetConditions() const override { return theStDetConditions; } const PxMeasurementConditionSet& pixelDetConditions() const override { return thePxDetConditions; } @@ -120,7 +117,6 @@ class dso_hidden MeasurementTrackerImpl final : public MeasurementTracker { std::vector thePhase2Dets; std::vector theGluedDets; std::vector theStackDets; - std::vector theDoubleSensGeomDets; const SiPixelFedCabling* thePixelCabling; @@ -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); diff --git a/RecoTracker/MeasurementDet/plugins/TkDoubleSensMeasurementDet.cc b/RecoTracker/MeasurementDet/plugins/TkDoubleSensMeasurementDet.cc deleted file mode 100644 index b2c9b882c07f6..0000000000000 --- a/RecoTracker/MeasurementDet/plugins/TkDoubleSensMeasurementDet.cc +++ /dev/null @@ -1,105 +0,0 @@ -#include "TkDoubleSensMeasurementDet.h" - -#include "TrackingTools/MeasurementDet/interface/MeasurementDetException.h" - -using namespace std; - -TkDoubleSensMeasurementDet::TkDoubleSensMeasurementDet(const DoubleSensGeomDet* gdet, - const PixelClusterParameterEstimator* cpe) - : MeasurementDet(gdet), thePixelCPE(cpe), theFirstDet(nullptr), theSecondDet(nullptr) {} - -void TkDoubleSensMeasurementDet::init(const MeasurementDet* firstDet, const MeasurementDet* secondDet) { - theFirstDet = dynamic_cast(firstDet); - theSecondDet = dynamic_cast(secondDet); - - if ((theFirstDet == nullptr) || (theSecondDet == nullptr)) { - throw MeasurementDetException( - "TkDoubleSensMeasurementDet ERROR: Trying to glue a det which is not a TkPixelMeasurementDet"); - } -} - -TkDoubleSensMeasurementDet::RecHitContainer TkDoubleSensMeasurementDet::recHits( - const TrajectoryStateOnSurface& ts, const MeasurementTrackerEvent& data) const { - RecHitContainer result; - - if (data.pixelData().handle()->data().empty()) - return result; - LogTrace("MeasurementTracker") << " is not empty"; - if (!isActive(data)) - return result; - LogTrace("MeasurementTracker") << " and is active"; - - //find clusters to skip - const detset& firstDetSet = data.pixelData().detSet(firstDet()->index()); - const detset& secondDetSet = data.pixelData().detSet(secondDet()->index()); - std::vector skipClustersUpper(data.pixelClustersToSkip().empty() ? 0 : secondDetSet.size(), false); - std::vector skipClustersLower(data.pixelClustersToSkip().empty() ? 0 : firstDetSet.size(), false); - - const SiPixelCluster* begin = nullptr; - if (!data.pixelData().handle()->data().empty()) { - begin = &(data.pixelData().handle()->data().front()); - } - if (!data.pixelClustersToSkip().empty()) { - if (!firstDetSet.empty()) { - for (const_iterator cil = firstDetSet.begin(); cil != firstDetSet.end(); ++cil) { - if (cil < begin) { - edm::LogError("IndexMisMatch") << "TkDoubleSensMeasurementDet cannot create hit because of index mismatch."; - return result; - } - unsigned int indexl = cil - begin; - if (data.pixelClustersToSkip()[indexl]) { - int iLocalL = std::distance(firstDetSet.begin(), cil); - skipClustersLower[iLocalL] = true; - } - } - } - if (!secondDetSet.empty()) { - for (const_iterator ciu = secondDetSet.begin(); ciu != secondDetSet.end(); ++ciu) { - if (ciu < begin) { - edm::LogError("IndexMisMatch") << "TkDoubleSensMeasurementDet cannot create hit because of index mismatch."; - return result; - } - unsigned int indexu = ciu - begin; - if (data.pixelClustersToSkip()[indexu]) { - int iLocalU = std::distance(secondDetSet.begin(), ciu); - skipClustersUpper[iLocalU] = true; - } - } - } - } - - return result; -} - -bool TkDoubleSensMeasurementDet::measurements(const TrajectoryStateOnSurface& stateOnThisDet, - const MeasurementEstimator& est, - const MeasurementTrackerEvent& data, - TempMeasurements& result) const { - LogDebug("MeasurementTracker") << "TkDoubleSensMeasurementDet::measurements"; - - if (!isActive(data)) { - result.add(theInactiveHit, 0.F); - return true; - } - - LogTrace("MeasurementTracker") << " is active"; - - auto oldSize = result.size(); - MeasurementDet::RecHitContainer&& allHits = recHits(stateOnThisDet, data); - - for (auto&& hit : allHits) { - std::pair diffEst = est.estimate(stateOnThisDet, *hit); - if (diffEst.first) { - LogDebug("MeasurementTracker") << "New vh added with chi2: " << diffEst.second; - result.add(std::move(hit), diffEst.second); - } - } - - if (result.size() > oldSize) - return true; - - // create a TrajectoryMeasurement with an invalid RecHit and zero estimate - result.add(theMissingHit, 0.F); - LogDebug("MeasurementTracker") << "adding missing hit"; - return false; -} diff --git a/RecoTracker/MeasurementDet/plugins/TkDoubleSensMeasurementDet.h b/RecoTracker/MeasurementDet/plugins/TkDoubleSensMeasurementDet.h deleted file mode 100644 index 93afc7b3ecebc..0000000000000 --- a/RecoTracker/MeasurementDet/plugins/TkDoubleSensMeasurementDet.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef TkDoubleSensMeasurementDet_H -#define TkDoubleSensMeasurementDet_H - -#include "TrackingTools/MeasurementDet/interface/MeasurementDet.h" -#include "TkPixelMeasurementDet.h" - -#include "Geometry/CommonDetUnit/interface/StackGeomDet.h" -#include "Geometry/CommonDetUnit/interface/DoubleSensGeomDet.h" -#include "RecoLocalTracker/ClusterParameterEstimator/interface/PixelClusterParameterEstimator.h" - -#include "FWCore/Utilities/interface/Visibility.h" - -class TkDoubleSensMeasurementDet final : public MeasurementDet { -public: - TkDoubleSensMeasurementDet(const DoubleSensGeomDet* gdet, const PixelClusterParameterEstimator* cpe); - - void init(const MeasurementDet* firstDet, const MeasurementDet* secondDet); - - RecHitContainer recHits(const TrajectoryStateOnSurface&, const MeasurementTrackerEvent& data) const override; - - const DoubleSensGeomDet& specificGeomDet() const { return static_cast(fastGeomDet()); } - typedef edm::Ref, Phase2TrackerCluster1D> Phase2TrackerCluster1DRef; - - typedef edmNew::DetSet detset; - typedef detset::const_iterator const_iterator; - - bool measurements(const TrajectoryStateOnSurface& stateOnThisDet, - const MeasurementEstimator& est, - const MeasurementTrackerEvent& data, - TempMeasurements& result) const override; - - const TkPixelMeasurementDet* firstDet() const { return theFirstDet; } - const TkPixelMeasurementDet* secondDet() const { return theSecondDet; } - - /// return TRUE if both first and second components are active - bool isActive(const MeasurementTrackerEvent& data) const override { - return firstDet()->isActive(data) && secondDet()->isActive(data); - } - bool isEmpty(const PxMeasurementDetSet& data) const { - return data.empty(firstDet()->index()) || data.empty(secondDet()->index()); - } - - /// return TRUE if at least one of the first and second components has badChannels - bool hasBadComponents(const TrajectoryStateOnSurface& tsos, const MeasurementTrackerEvent& data) const override { - return (firstDet()->hasBadComponents(tsos, data) || secondDet()->hasBadComponents(tsos, data)); - } - -private: - const PixelClusterParameterEstimator* thePixelCPE; - const TkPixelMeasurementDet* theFirstDet; - const TkPixelMeasurementDet* theSecondDet; -}; - -#endif