-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DD4Hep migration (SolidShapes) for TrackerNumberingBuilder (+TkAl & related CondTool/Geometry plugins) #29905
Merged
+493
−710
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
f40eb91
First shot at DD4HEP migration for CondTools/Geometry and TrackerGeom…
adewit 2518ef8
Migrate TrackerNumberingBuilder to DD4HEP-SolidShapes
adewit 20e87b6
Cast to cms::DDSolidShape in MTD GeometricTimingDet
adewit 32a426c
PGeometricDetBuilder: code format
adewit 9dc0976
Removing some old DD headers
adewit 7b51564
Make Tk plugins handle both old DD and DD4hep
adewit 98f81f1
Apply CodeFormat
adewit 31f7356
Add reverse lookup for LegacySolidShape mape and define unsupported c…
adewit 2b604b4
Apply code format
adewit 71f85b4
Remove commented line
adewit 2213b04
Make fromDD4hep a tracked parameter in GeometricDet/TrackerParameters…
adewit c46fd75
Cleanup in TrackerGeometryCompare
adewit dec61a7
SolidShapes enum back to original
adewit 059a143
Code checks
adewit 8801ff3
Removing TrackerNumberingBuilder/bin/stubs/GeometricDetLoader
adewit 6645190
Reduce DDExpandedView use in GeometricDet and add shape_dd4hep
adewit 8a2e981
Code format
adewit ed8b751
Match enums for Legacy and DD4hep SolidShapes
adewit dcff114
Update DDSolidLegacyShapes unit test
adewit af5c936
Apply code format
adewit fbe5d2a
DDSolidLegacyShapes conflict fix attempt
adewit 285678b
GeometricDet: have shape_dd4hep return by value
adewit 823074d
GeometricDet: fix include
adewit 637ae06
Code format
adewit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
620 changes: 300 additions & 320 deletions
620
Alignment/OfflineValidation/plugins/TrackerGeometryCompare.cc
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,33 +10,45 @@ | |
#include "CondFormats/GeometryObjects/interface/PGeometricDetExtra.h" | ||
#include "Geometry/Records/interface/PGeometricDetExtraRcd.h" | ||
#include "Geometry/TrackerNumberingBuilder/interface/GeometricDetExtra.h" | ||
#include "DetectorDescription/DDCMS/interface/DDCompactView.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here as well |
||
#include "DetectorDescription/Core/interface/DDCompactView.h" | ||
#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" | ||
#include "FWCore/MessageLogger/interface/MessageLogger.h" | ||
#include <vector> | ||
|
||
class PGeometricDetExtraBuilder : public edm::one::EDAnalyzer<edm::one::WatchRuns> { | ||
public: | ||
PGeometricDetExtraBuilder(const edm::ParameterSet&) {} | ||
PGeometricDetExtraBuilder(const edm::ParameterSet&); | ||
|
||
void beginRun(edm::Run const& iEvent, edm::EventSetup const&) override; | ||
void analyze(edm::Event const& iEvent, edm::EventSetup const&) override {} | ||
void endRun(edm::Run const& iEvent, edm::EventSetup const&) override {} | ||
|
||
private: | ||
void putOne(const GeometricDetExtra& gde, PGeometricDetExtra* pgde); | ||
bool fromDD4hep_; | ||
}; | ||
|
||
PGeometricDetExtraBuilder::PGeometricDetExtraBuilder(const edm::ParameterSet& iConfig) { | ||
fromDD4hep_ = iConfig.getParameter<bool>("fromDD4hep"); | ||
} | ||
|
||
void PGeometricDetExtraBuilder::beginRun(const edm::Run&, edm::EventSetup const& es) { | ||
PGeometricDetExtra* pgde = new PGeometricDetExtra; | ||
edm::Service<cond::service::PoolDBOutputService> mydbservice; | ||
if (!mydbservice.isAvailable()) { | ||
edm::LogError("PGeometricDetExtraBuilder") << "PoolDBOutputService unavailable"; | ||
return; | ||
} | ||
edm::ESTransientHandle<DDCompactView> cpvH; | ||
|
||
if (!fromDD4hep_) { | ||
edm::ESTransientHandle<DDCompactView> cpvH; | ||
es.get<IdealGeometryRecord>().get(cpvH); | ||
} else { | ||
edm::ESTransientHandle<cms::DDCompactView> cpvH; | ||
es.get<IdealGeometryRecord>().get(cpvH); | ||
} | ||
edm::ESHandle<std::vector<GeometricDetExtra> > gdeH; | ||
es.get<IdealGeometryRecord>().get(cpvH); | ||
es.get<IdealGeometryRecord>().get(gdeH); | ||
const std::vector<GeometricDetExtra>& gdes = (*gdeH); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,31 +5,46 @@ | |
#include "FWCore/ServiceRegistry/interface/Service.h" | ||
#include "CondCore/DBOutputService/interface/PoolDBOutputService.h" | ||
#include "CondFormats/GeometryObjects/interface/PTrackerParameters.h" | ||
#include "DetectorDescription/DDCMS/interface/DDCompactView.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here as well |
||
#include "DetectorDescription/Core/interface/DDCompactView.h" | ||
#include "Geometry/Records/interface/IdealGeometryRecord.h" | ||
#include "Geometry/TrackerGeometryBuilder/interface/TrackerParametersFromDD.h" | ||
|
||
class PTrackerParametersDBBuilder : public edm::one::EDAnalyzer<edm::one::WatchRuns> { | ||
public: | ||
PTrackerParametersDBBuilder(const edm::ParameterSet&) {} | ||
PTrackerParametersDBBuilder(const edm::ParameterSet&); | ||
|
||
void beginRun(edm::Run const& iEvent, edm::EventSetup const&) override; | ||
void analyze(edm::Event const& iEvent, edm::EventSetup const&) override {} | ||
void endRun(edm::Run const& iEvent, edm::EventSetup const&) override {} | ||
|
||
private: | ||
bool fromDD4hep_; | ||
}; | ||
|
||
PTrackerParametersDBBuilder::PTrackerParametersDBBuilder(const edm::ParameterSet& iConfig) { | ||
fromDD4hep_ = iConfig.getParameter<bool>("fromDD4hep"); | ||
} | ||
|
||
void PTrackerParametersDBBuilder::beginRun(const edm::Run&, edm::EventSetup const& es) { | ||
PTrackerParameters* ptp = new PTrackerParameters; | ||
edm::Service<cond::service::PoolDBOutputService> mydbservice; | ||
if (!mydbservice.isAvailable()) { | ||
edm::LogError("PTrackerParametersDBBuilder") << "PoolDBOutputService unavailable"; | ||
return; | ||
} | ||
edm::ESTransientHandle<DDCompactView> cpv; | ||
es.get<IdealGeometryRecord>().get(cpv); | ||
|
||
TrackerParametersFromDD builder; | ||
builder.build(&(*cpv), *ptp); | ||
|
||
if (!fromDD4hep_) { | ||
edm::ESTransientHandle<DDCompactView> cpv; | ||
es.get<IdealGeometryRecord>().get(cpv); | ||
builder.build(&(*cpv), *ptp); | ||
} else { | ||
edm::ESTransientHandle<cms::DDCompactView> cpv; | ||
es.get<IdealGeometryRecord>().get(cpv); | ||
builder.build(&(*cpv), *ptp); | ||
} | ||
|
||
if (mydbservice->isNewTagRequest("PTrackerParametersRcd")) { | ||
mydbservice->createNewIOV<PTrackerParameters>( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here ase well