Skip to content

Commit

Permalink
Merge branch 'main' into pr/pid_lut_float
Browse files Browse the repository at this point in the history
  • Loading branch information
veprbl authored Feb 7, 2025
2 parents 35a575a + 3bfe28a commit b3b9811
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 122 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/codespell-project/codespell
rev: v2.4.0
rev: v2.4.1
hooks:
- id: codespell
- repo: https://github.com/Lucas-C/pre-commit-hooks
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ add_subdirectory(src/services)
add_subdirectory(src/algorithms)
add_subdirectory(src/benchmarks)
add_subdirectory(src/detectors)
add_subdirectory(src/examples)
add_subdirectory(src/extensions)
add_subdirectory(src/factories)
add_subdirectory(src/global)
Expand Down
5 changes: 5 additions & 0 deletions src/algorithms/digi/SiliconTrackerDigi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <Evaluator/DD4hepUnits.h>
#include <edm4eic/EDM4eicVersion.h>
#include <edm4hep/EDM4hepVersion.h>
#include <edm4hep/MCParticleCollection.h>
#include <edm4hep/Vector3d.h>
#include <edm4hep/Vector3f.h>
Expand Down Expand Up @@ -54,7 +55,11 @@ void SiliconTrackerDigi::process(
debug(" momentum = ({:.2f}, {:.2f}, {:.2f})", sim_hit.getMomentum().x, sim_hit.getMomentum().y, sim_hit.getMomentum().z);
debug(" edep = {:.2f}", sim_hit.getEDep());
debug(" time = {:.4f}[ns]", sim_hit.getTime());
#if EDM4HEP_BUILD_VERSION >= EDM4HEP_VERSION(0, 99, 0)
debug(" particle time = {}[ns]", sim_hit.getParticle().getTime());
#else
debug(" particle time = {}[ns]", sim_hit.getMCParticle().getTime());
#endif
debug(" time smearing: {:.4f}, resulting time = {:.4f} [ns]", time_smearing, result_time);
debug(" hit_time_stamp: {} [~ps]", hit_time_stamp);

Expand Down
5 changes: 5 additions & 0 deletions src/algorithms/pid/IrtCherenkovParticleID.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <edm4eic/CherenkovParticleIDHypothesis.h>
#include <edm4eic/EDM4eicVersion.h>
#include <edm4eic/TrackPoint.h>
#include <edm4hep/EDM4hepVersion.h>
#include <edm4hep/MCParticleCollection.h>
#include <edm4hep/SimTrackerHitCollection.h>
#include <edm4hep/Vector2f.h>
Expand Down Expand Up @@ -218,7 +219,11 @@ void IrtCherenkovParticleID::process(
if(hit_assoc.getRawHit().isAvailable()) {
if(hit_assoc.getRawHit().id() == raw_hit.id()) {
#if EDM4EIC_VERSION_MAJOR >= 6
# if EDM4HEP_BUILD_VERSION >= EDM4HEP_VERSION(0, 99, 0)
mc_photon = hit_assoc.getSimHit().getParticle();
# else
mc_photon = hit_assoc.getSimHit().getMCParticle();
# endif
#else
// hit association found, get the MC photon and break the loop
if(hit_assoc.simHits_size() > 0) {
Expand Down
5 changes: 5 additions & 0 deletions src/algorithms/tracking/ActsToTracks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <edm4eic/EDM4eicVersion.h>
#include <edm4eic/RawTrackerHit.h>
#include <edm4eic/TrackerHit.h>
#include <edm4hep/EDM4hepVersion.h>
#include <edm4hep/MCParticleCollection.h>
#include <edm4hep/SimTrackerHit.h>
#include <edm4hep/Vector2f.h>
Expand Down Expand Up @@ -196,7 +197,11 @@ void ActsToTracks::process(const Input& input, const Output& output) const {
for (const auto raw_hit_assoc : *raw_hit_assocs) {
if (raw_hit_assoc.getRawHit() == raw_hit) {
auto sim_hit = raw_hit_assoc.getSimHit();
#if EDM4HEP_BUILD_VERSION >= EDM4HEP_VERSION(0, 99, 0)
auto mc_particle = sim_hit.getParticle();
#else
auto mc_particle = sim_hit.getMCParticle();
#endif
mcparticle_weight_by_hit_count[mc_particle]++;
}
}
Expand Down
1 change: 0 additions & 1 deletion src/examples/CMakeLists.txt

This file was deleted.

59 changes: 0 additions & 59 deletions src/examples/track_matching/CMakeLists.txt

This file was deleted.

60 changes: 0 additions & 60 deletions src/examples/track_matching/reco_particles_track_matching.cc

This file was deleted.

0 comments on commit b3b9811

Please sign in to comment.