Skip to content

Commit

Permalink
Merge branch 'main' into track-nholes
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgessinger authored Nov 30, 2023
2 parents 3a59d7e + 9228e3c commit 34fef9e
Show file tree
Hide file tree
Showing 148 changed files with 2,839 additions and 1,624 deletions.
56 changes: 0 additions & 56 deletions CI/physmon/particles_final_config.yml

This file was deleted.

37 changes: 10 additions & 27 deletions CI/physmon/phys_perf_mon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,38 +217,21 @@ function simulation() {
config="CI/physmon/simulation_config.yml"

Examples/Scripts/generic_plotter.py \
$outdir/particles_initial_${suffix}.root \
$outdir/particles_${suffix}.root \
particles \
$outdir/particles_initial_${suffix}_hist.root \
$outdir/particles_${suffix}_hist.root \
--silent \
--config CI/physmon/particles_initial_config.yml
--config $config
ec=$(($ec | $?))

# remove ntuple file because it's large
rm $outdir/particles_initial_${suffix}.root
rm $outdir/particles_${suffix}.root

run_histcmp \
$outdir/particles_initial_${suffix}_hist.root \
$refdir/particles_initial_${suffix}_hist.root \
"Particles inital ${suffix}" \
particles_initial_${suffix}

Examples/Scripts/generic_plotter.py \
$outdir/particles_final_${suffix}.root \
particles \
$outdir/particles_final_${suffix}_hist.root \
--silent \
--config CI/physmon/particles_final_config.yml
ec=$(($ec | $?))

# remove ntuple file because it's large
rm $outdir/particles_final_${suffix}.root

run_histcmp \
$outdir/particles_final_${suffix}_hist.root \
$refdir/particles_final_${suffix}_hist.root \
"Particles final ${suffix}" \
particles_final_${suffix}
$outdir/particles_${suffix}_hist.root \
$refdir/particles_${suffix}_hist.root \
"Particles ${suffix}" \
particles_${suffix}
}

if [[ "$mode" == "all" || "$mode" == "fullchains" ]]; then
Expand Down Expand Up @@ -294,7 +277,7 @@ if [[ "$mode" == "all" || "$mode" == "fullchains" ]]; then
vertexing \
$outdir/performance_amvf_ttbar_hist.root \
--silent \
--config CI/physmon/vertexing_config.yml
--config CI/physmon/vertexing_ttbar_config.yml
ec=$(($ec | $?))

Examples/Scripts/generic_plotter.py \
Expand Down Expand Up @@ -327,7 +310,7 @@ if [[ "$mode" == "all" || "$mode" == "fullchains" ]]; then
vertexing \
$outdir/performance_amvf_gridseeder_ttbar_hist.root \
--silent \
--config CI/physmon/vertexing_config.yml
--config CI/physmon/vertexing_ttbar_config.yml
ec=$(($ec | $?))

# remove ntuple file because it's large
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,26 @@ histograms:
min: 0.0
max: 0.15

e_loss:
nbins: 20
min: 0.0
max: 200.0

total_x0:
nbins: 20
min: 0.0
max: 3.0

total_l0:
nbins: 20
min: 0.0
max: 3.0

number_of_hits:
nbins: 26
min: 0
max: 25

exclude:
- event_id
- particle_id
Expand Down
38 changes: 24 additions & 14 deletions CI/physmon/vertexing_config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
histograms:
"nRecoVtx|nTrueVtx|nVtx.*":
nbins: 51
min: 25
max: 75

"nTracks.*":
nbins: 21
min: 0
max: 20

"trkVtxMatch":
nbins: 100
min: 0.3
max: 1.01

"resX|resY|resZ":
nbins: 100
min: -0.1
Expand All @@ -11,8 +26,8 @@ histograms:

"trk_res.*":
nbins: 100
min: -0.1
max: 0.1
min: -0.02
max: 0.02

"pull.*":
nbins: 50
Expand All @@ -35,11 +50,6 @@ histograms:
min: 0.0
max: 100.0

"^n.*$":
nbins: 250
min: 0
max: 251

"truthX|truthY|recoX|recoY":
nbins: 100
min: -0.06
Expand Down Expand Up @@ -72,22 +82,22 @@ histograms:

"trk_momOverlap|trk_momOverlapFitted":
nbins: 100
min: 0.99
min: 0.999
max: 1

extra_histograms:
- expression: df["nRecoVtx"] / df["nTrueVtx"]
name: "recoOverTrue"
nbins: 50
min: 0.0
max: 1.0
min: 0.8
max: 1.2
- expression: df["nRecoVtx"] / df["nVtxDetectorAcceptance"]
name: "recoOverAcc"
nbins: 50
min: 0.0
max: 1.0
min: 0.8
max: 1.2
- expression: df["nRecoVtx"] / df["nVtxReconstructable"]
name: "recoOverRecble"
nbins: 50
min: 0.0
max: 1.0
min: 0.8
max: 1.2
102 changes: 102 additions & 0 deletions CI/physmon/vertexing_ttbar_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
histograms:
"nRecoVtx|nTrueVtx|nVtx.*":
nbins: 251
min: 0
max: 250

"nTracks.*":
nbins: 301
min: 0
max: 300

"trkVtxMatch":
nbins: 100
min: 0.0
max: 1.01

"resX|resY|resZ":
nbins: 100
min: -0.2
max: 0.2

"resT":
nbins: 100
min: -50
max: 50

"trk_res.*":
nbins: 100
min: -0.02
max: 0.02

"pull.*":
nbins: 100
min: -10
max: 10

"trk_pull.*":
nbins: 50
min: -10
max: 10

"covXX|covXY|covXZ|covXT|covYY|covYZ|covYT|covZZ|covZT":
nbins: 100
min: -0.0005
max: 0.0005

"covTT":
nbins: 100
min: 0.0
max: 100.0

"truthX|truthY|recoX|recoY":
nbins: 100
min: -0.1
max: 0.1

"truthZ|recoZ":
nbins: 100
min: -200
max: 200

"truthT|recoT":
nbins: 100
min: -2000
max: 2000

"trk_truthPhi|trk_recoPhi|trk_recoPhiFitted":
nbins: 100
min: -3.2
max: 3.2

"trk_truthTheta|trk_recoTheta|trk_recoThetaFitted":
nbins: 100
min: -0.1
max: 3.1

"trk_truthQOverP|trk_recoQOverP|trk_recoQOverPFitted":
nbins: 100
min: -1
max: 1

"trk_momOverlap|trk_momOverlapFitted":
nbins: 100
min: 0.999
max: 1

extra_histograms:
- expression: df["nRecoVtx"] / df["nTrueVtx"]
name: "recoOverTrue"
nbins: 100
min: 0.0
max: 1.2
- expression: df["nRecoVtx"] / df["nVtxDetectorAcceptance"]
name: "recoOverAcc"
nbins: 100
min: 0.0
max: 1.2
- expression: df["nRecoVtx"] / df["nVtxReconstructable"]
name: "recoOverRecble"
nbins: 100
min: 0.0
max: 1.2
6 changes: 2 additions & 4 deletions CI/physmon/workflows/physmon_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,8 @@
del s

for file, name in [
(tp / "fatras" / "particles_initial.root", "particles_initial_fatras.root"),
(tp / "fatras" / "particles_final.root", "particles_final_fatras.root"),
(tp / "geant4" / "particles_initial.root", "particles_initial_geant4.root"),
(tp / "geant4" / "particles_final.root", "particles_final_geant4.root"),
(tp / "fatras" / "particles_simulation.root", "particles_fatras.root"),
(tp / "geant4" / "particles_simulation.root", "particles_geant4.root"),
]:
assert file.exists(), "file not found"
shutil.copy(file, setup.outdir / name)
14 changes: 7 additions & 7 deletions Core/include/Acts/Detector/Detector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ class Detector : public std::enable_shared_from_this<Detector> {
///
/// @param name the detecor name
/// @param rootVolumes the volumes contained by this detector
/// @param detectorVolumeUpdator is a Delegate to find the associated volume
/// @param detectorVolumeUpdater is a Delegate to find the associated volume
///
/// @note will throw an exception if volumes vector is empty
/// @note will throw an exception if duplicate volume names exist
/// @note will throw an exception if the delegate is not connected
Detector(std::string name,
std::vector<std::shared_ptr<DetectorVolume>> rootVolumes,
DetectorVolumeUpdator detectorVolumeUpdator) noexcept(false);
DetectorVolumeUpdater detectorVolumeUpdater) noexcept(false);

public:
/// Factory for producing memory managed instances of Detector.
static std::shared_ptr<Detector> makeShared(
std::string name,
std::vector<std::shared_ptr<DetectorVolume>> rootVolumes,
DetectorVolumeUpdator detectorVolumeUpdator);
DetectorVolumeUpdater detectorVolumeUpdater);

/// Retrieve a @c std::shared_ptr for this surface (non-const version)
///
Expand Down Expand Up @@ -128,11 +128,11 @@ class Detector : public std::enable_shared_from_this<Detector> {

/// Update the volume finder
///
/// @param detectorVolumeUpdator the new volume finder
void updateDetectorVolumeFinder(DetectorVolumeUpdator detectorVolumeUpdator);
/// @param detectorVolumeUpdater the new volume finder
void updateDetectorVolumeFinder(DetectorVolumeUpdater detectorVolumeUpdater);

/// Const access to the volume finder
const DetectorVolumeUpdator& detectorVolumeFinder() const;
const DetectorVolumeUpdater& detectorVolumeFinder() const;

/// Return the name of the detector
const std::string& name() const;
Expand All @@ -148,7 +148,7 @@ class Detector : public std::enable_shared_from_this<Detector> {
DetectorVolume::ObjectStore<std::shared_ptr<DetectorVolume>> m_volumes;

/// A volume finder delegate
DetectorVolumeUpdator m_detectorVolumeUpdator;
DetectorVolumeUpdater m_detectorVolumeUpdater;

/// Name/index map to find volumes by name and detect duplicates
std::unordered_map<std::string, std::size_t> m_volumeNameIndex;
Expand Down
Loading

0 comments on commit 34fef9e

Please sign in to comment.