Skip to content

Commit

Permalink
Merge branch 'main' into remove-intersection-representation
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Dec 5, 2023
2 parents 9f0644a + 34bd984 commit dbaf03c
Show file tree
Hide file tree
Showing 23 changed files with 23 additions and 18 deletions.
Binary file modified CI/physmon/reference/performance_amvf_gridseeder_seeded_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_gridseeder_ttbar_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_orthogonal_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_seeded_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_truth_estimated_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_truth_smeared_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_ttbar_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ivf_orthogonal_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ivf_seeded_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ivf_truth_estimated_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ivf_truth_smeared_hist.root
Binary file not shown.
2 changes: 1 addition & 1 deletion CI/physmon/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import os
import csv

HERALD_URL = "https://herald.dokku.paulgessinger.com/view/{repo}/runs/{run_id}/artifacts/{artifact_name}/{path}"
HERALD_URL = "https://acts-herald.app.cern.ch/view/{repo}/runs/{run_id}/artifacts/{artifact_name}/{path}"
IS_CI = "GITHUB_ACTIONS" in os.environ


Expand Down
5 changes: 5 additions & 0 deletions CI/physmon/vertexing_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ histograms:
nbins: 100
min: 0.999
max: 1

"trk_weight":
nbins: 100
min: -0.01
max: 1.01

extra_histograms:
- expression: df["nRecoVtx"] / df["nTrueVtx"]
Expand Down
3 changes: 0 additions & 3 deletions Core/include/Acts/Geometry/CylinderVolumeBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,6 @@ class CylinderVolumeBuilder : public ITrackingVolumeBuilder {
/// -------------------- MB (inner [0]) ---------------
std::array<std::shared_ptr<const ISurfaceMaterial>, 6> boundaryMaterial{
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr};

/// Volume signature
int volumeSignature = -1;
};

/// Constructor
Expand Down
6 changes: 5 additions & 1 deletion Core/include/Acts/TrackFinding/TrackSelector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class TrackSelector {
std::size_t maxHoles = std::numeric_limits<std::size_t>::max();
std::size_t maxOutliers = std::numeric_limits<std::size_t>::max();
std::size_t maxSharedHits = std::numeric_limits<std::size_t>::max();
float maxChi2 = std::numeric_limits<float>::max();
double maxChi2 = inf;

// Helper factory functions to produce a populated config object more
// conveniently
Expand Down Expand Up @@ -273,6 +273,10 @@ inline std::ostream& operator<<(std::ostream& os,
print("eta", cuts.etaMin, cuts.etaMax);
print("absEta", cuts.absEtaMin, cuts.absEtaMax);
print("pt", cuts.ptMin, cuts.ptMax);
print("nHoles", 0, cuts.maxHoles);
print("nOutliers", 0, cuts.maxOutliers);
print("nSharedHits", 0, cuts.maxSharedHits);
print("chi2", 0.0, cuts.maxChi2);
os << " - " << cuts.minMeasurements << " <= nMeasurements\n";

return os;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ std::unique_ptr<const Acts::TrackingGeometry> buildDetector(
bpvConfig.layerEnvelopeR = {1. * Acts::UnitConstants::mm,
1. * Acts::UnitConstants::mm};
bpvConfig.buildToRadiusZero = true;
bpvConfig.volumeSignature = 0;
auto beamPipeVolumeBuilder =
std::make_shared<const Acts::CylinderVolumeBuilder>(
bpvConfig,
Expand Down Expand Up @@ -393,7 +392,6 @@ std::unique_ptr<const Acts::TrackingGeometry> buildDetector(
pvbConfig.layerEnvelopeR = {1. * Acts::UnitConstants::mm,
5. * Acts::UnitConstants::mm};
pvbConfig.layerBuilder = pixelLayerBuilder;
pvbConfig.volumeSignature = 0;
auto pixelVolumeBuilder = std::make_shared<const Acts::CylinderVolumeBuilder>(
pvbConfig, Acts::getDefaultLogger("PixelVolumeBuilder", volumeLLevel));
// add to the list of builders
Expand Down Expand Up @@ -427,7 +425,6 @@ std::unique_ptr<const Acts::TrackingGeometry> buildDetector(
pstvolConfig.volumeName = "PST";
pstvolConfig.buildToRadiusZero = false;
pstvolConfig.layerBuilder = pstBuilder;
pstvolConfig.volumeSignature = 0;
auto pstVolumeBuilder = std::make_shared<const Acts::CylinderVolumeBuilder>(
pstvolConfig, Acts::getDefaultLogger("PSTVolumeBuilder", volumeLLevel));
// add to the detector builds
Expand Down Expand Up @@ -623,7 +620,6 @@ std::unique_ptr<const Acts::TrackingGeometry> buildDetector(
ssvbConfig.volumeName = "SStrip";
ssvbConfig.buildToRadiusZero = false;
ssvbConfig.layerBuilder = sstripLayerBuilder;
ssvbConfig.volumeSignature = 0;
auto sstripVolumeBuilder =
std::make_shared<const Acts::CylinderVolumeBuilder>(
ssvbConfig,
Expand Down Expand Up @@ -809,7 +805,6 @@ std::unique_ptr<const Acts::TrackingGeometry> buildDetector(
lsvbConfig.volumeName = "LStrip";
lsvbConfig.buildToRadiusZero = false;
lsvbConfig.layerBuilder = lstripLayerBuilder;
lsvbConfig.volumeSignature = 0;
auto lstripVolumeBuilder =
std::make_shared<const Acts::CylinderVolumeBuilder>(
lsvbConfig,
Expand Down
1 change: 0 additions & 1 deletion Examples/Detectors/TGeoDetector/src/TGeoDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ std::shared_ptr<const Acts::TrackingGeometry> buildTGeoDetector(
ringLayoutConfiguration(lbc.layerConfigurations[0]);
ringLayoutConfiguration(lbc.layerConfigurations[2]);
volumeConfig.layerBuilder = layerBuilder;
volumeConfig.volumeSignature = 0;
auto volumeBuilder = std::make_shared<const Acts::CylinderVolumeBuilder>(
volumeConfig, logger.clone(lbc.configurationName + "VolumeBuilder",
config.volumeLogLevel));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ ActsExamples::VertexPerformanceWriter::VertexPerformanceWriter(
m_outputTree->Branch("trk_pullQOverP", &m_pullQOverP);
m_outputTree->Branch("trk_pullQOverPFitted", &m_pullQOverPFitted);

m_outputTree->Branch("trk_weight", &m_trkWeight);

m_outputTree->Branch("nTracksTruthVtx", &m_nTracksOnTruthVertex);
m_outputTree->Branch("nTracksRecoVtx", &m_nTracksOnRecoVertex);

Expand Down Expand Up @@ -489,6 +491,8 @@ ActsExamples::ProcessCode ActsExamples::VertexPerformanceWriter::writeT(
auto& innerPullThetaFitted = m_pullThetaFitted.emplace_back();
auto& innerPullQOverPFitted = m_pullQOverPFitted.emplace_back();

auto& innerTrkWeight = m_trkWeight.emplace_back();

for (std::size_t j = 0; j < associatedTruthParticles.size(); ++j) {
const auto& particle = associatedTruthParticles[j];
int priVtxId = particle.particleId().vertexPrimary();
Expand Down Expand Up @@ -687,6 +691,8 @@ ActsExamples::ProcessCode ActsExamples::VertexPerformanceWriter::writeT(
innerPullQOverPFitted.push_back(
pull(diffMomFitted[2], momCovFitted(2, 2), "q/p"));

innerTrkWeight.push_back(trk.trackWeight);

const auto& recoUnitDirFitted = paramsAtVtxFitted->direction();
double overlapFitted = trueUnitDir.dot(recoUnitDirFitted);
innerMomOverlapFitted.push_back(overlapFitted);
Expand Down Expand Up @@ -752,6 +758,8 @@ ActsExamples::ProcessCode ActsExamples::VertexPerformanceWriter::writeT(
m_pullQOverP.clear();
m_pullQOverPFitted.clear();

m_trkWeight.clear();

m_nTracksOnTruthVertex.clear();
m_nTracksOnRecoVertex.clear();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ class VertexPerformanceWriter final
std::vector<std::vector<double>> m_pullQOverP;
std::vector<std::vector<double>> m_pullQOverPFitted;

// Track weights from vertex fit, will be set to 1 if we do unweighted vertex
// fitting
std::vector<std::vector<double>> m_trkWeight;

// Number of tracks associated with truth/reconstructed vertex
std::vector<int> m_nTracksOnTruthVertex;
std::vector<int> m_nTracksOnRecoVertex;
Expand Down
3 changes: 0 additions & 3 deletions Plugins/DD4hep/src/ConvertDD4hepDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ std::shared_ptr<const CylinderVolumeBuilder> volumeBuilder_dd4hep(
cvbConfig.layerEnvelopeR = std::make_pair(layerEnvelopeR, layerEnvelopeR);
cvbConfig.layerEnvelopeZ = layerEnvelopeZ;
cvbConfig.trackingVolumeHelper = volumeHelper;
cvbConfig.volumeSignature = 0;
cvbConfig.volumeName = subDetector.name();
cvbConfig.layerBuilder = dd4hepLayerBuilder;
auto cylinderVolumeBuilder =
Expand Down Expand Up @@ -438,7 +437,6 @@ std::shared_ptr<const CylinderVolumeBuilder> volumeBuilder_dd4hep(
// the configuration object of the volume builder
Acts::CylinderVolumeBuilder::Config cvbConfig;
cvbConfig.trackingVolumeHelper = volumeHelper;
cvbConfig.volumeSignature = 0;
cvbConfig.volumeName = subDetector.name();
cvbConfig.layerBuilder = pcLayerBuilder;
cvbConfig.layerEnvelopeR = {layerEnvelopeR, layerEnvelopeR};
Expand Down Expand Up @@ -522,7 +520,6 @@ std::shared_ptr<const CylinderVolumeBuilder> volumeBuilder_dd4hep(
cvbConfig.layerEnvelopeR = std::make_pair(layerEnvelopeR, layerEnvelopeR);
cvbConfig.layerEnvelopeZ = layerEnvelopeZ;
cvbConfig.trackingVolumeHelper = volumeHelper;
cvbConfig.volumeSignature = 0;
cvbConfig.volumeName = subDetector.name();
cvbConfig.layerBuilder = dd4hepLayerBuilder;
cvbConfig.ctVolumeBuilder = dd4hepVolumeBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ struct CylindricalTrackingGeometry {
bpvConfig.layerBuilder = beamPipeBuilder;
bpvConfig.layerEnvelopeR = {1_mm, 1_mm};
bpvConfig.buildToRadiusZero = true;
bpvConfig.volumeSignature = 0;
auto beamPipeVolumeBuilder = std::make_shared<const CylinderVolumeBuilder>(
bpvConfig, getDefaultLogger("BeamPipeVolumeBuilder", volumeLLevel));

Expand Down
2 changes: 0 additions & 2 deletions Tests/UnitTests/Core/Geometry/SimpleGeometryTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ BOOST_AUTO_TEST_CASE(SimpleGeometryTest) {
bpvConfig.layerBuilder = beamPipeBuilder;
bpvConfig.layerEnvelopeR = {1_mm, 1_mm};
bpvConfig.buildToRadiusZero = true;
bpvConfig.volumeSignature = 0;
auto beamPipeVolumeBuilder = std::make_shared<const CylinderVolumeBuilder>(
bpvConfig, getDefaultLogger("BeamPipeVolumeBuilder", volumeLLevel));

Expand All @@ -102,7 +101,6 @@ BOOST_AUTO_TEST_CASE(SimpleGeometryTest) {
cvbConfig.layerBuilder = layerBuilder;
cvbConfig.layerEnvelopeR = {1_mm, 1_mm};
cvbConfig.buildToRadiusZero = false;
cvbConfig.volumeSignature = 0;
auto centralVolumeBuilder = std::make_shared<const CylinderVolumeBuilder>(
cvbConfig, getDefaultLogger("CentralVolumeBuilder", volumeLLevel));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ std::shared_ptr<const TrackingGeometry> trackingGeometry() {
cvbConfig.layerBuilder = layerBuilder;
cvbConfig.layerEnvelopeR = {1_mm, 1_mm};
cvbConfig.buildToRadiusZero = true;
cvbConfig.volumeSignature = 0;
auto centralVolumeBuilder = std::make_shared<const CylinderVolumeBuilder>(
cvbConfig, getDefaultLogger("CentralVolumeBuilder", volumeLLevel));

Expand Down

0 comments on commit dbaf03c

Please sign in to comment.