Skip to content

Commit

Permalink
Merge pull request #10 from MuonColliderSoft/kk_subdetectorHitNumbers
Browse files Browse the repository at this point in the history
Add subdetectorHitNumbers to EVENT::Track.
  • Loading branch information
kkrizka authored Jun 18, 2022
2 parents d834029 + ed20117 commit d824821
Show file tree
Hide file tree
Showing 14 changed files with 70 additions and 33 deletions.
14 changes: 11 additions & 3 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,23 @@ IncludeCategories:
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '^<UTIL/.*\.h>'
- Regex: '^<EVENT/.*\.h>'
Priority: 4
SortPriority: 0
CaseSensitive: false
- Regex: '^<.*'
- Regex: '^<IMPL/.*\.h>'
Priority: 5
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
- Regex: '^<UTIL/.*\.h>'
Priority: 6
SortPriority: 0
CaseSensitive: false
- Regex: '^<.*'
Priority: 7
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 8
SortPriority: 0
CaseSensitive: false
1 change: 1 addition & 0 deletions ACTSTracking/ACTSDuplicateRemoval.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define ACTSDuplicateRemoval_h 1

#include <EVENT/Track.h>

#include <marlin/Processor.h>

//! \brief Remove track duplicates
Expand Down
3 changes: 2 additions & 1 deletion ACTSTracking/ACTSSeededCKFTrackingProc.hxx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#ifndef ACTSSeededCKFTrackingProc_h
#define ACTSSeededCKFTrackingProc_h 1

#include <EVENT/TrackerHit.h>

#include <UTIL/CellIDDecoder.h>

#include <Acts/Definitions/Units.hpp>
#include <EVENT/TrackerHit.h>

#include "ACTSProcBase.hxx"
#include "GeometryIdSelector.hxx"
Expand Down
3 changes: 2 additions & 1 deletion ACTSTracking/ACTSTruthCKFTrackingProc.hxx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#ifndef ACTSTruthCKFTrackingProc_h
#define ACTSTruthCKFTrackingProc_h 1

#include <EVENT/TrackerHit.h>

#include <UTIL/CellIDDecoder.h>

#include <Acts/Definitions/Units.hpp>
#include <EVENT/TrackerHit.h>

#include "ACTSProcBase.hxx"

Expand Down
3 changes: 2 additions & 1 deletion ACTSTracking/ACTSTruthTrackingProc.hxx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#ifndef ACTSTruthTrackingProc_h
#define ACTSTruthTrackingProc_h 1

#include <EVENT/TrackerHit.h>

#include <UTIL/CellIDDecoder.h>

#include <Acts/Definitions/Units.hpp>
#include <EVENT/TrackerHit.h>

#include "ACTSProcBase.hxx"

Expand Down
5 changes: 3 additions & 2 deletions ACTSTracking/GeometryIdMappingTool.hxx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#pragma once

#include <UTIL/CellIDDecoder.h>

#include <EVENT/SimTrackerHit.h>
#include <EVENT/TrackerHit.h>

#include <UTIL/CellIDDecoder.h>

#include <unordered_map>

namespace ACTSTracking {
Expand Down
7 changes: 4 additions & 3 deletions ACTSTracking/Helpers.hxx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#pragma once

#include <EVENT/LCEvent.h>
#include <EVENT/Track.h>
#include <EVENT/TrackState.h>

#include <Acts/EventData/TrackParameters.hpp>
#include <Acts/MagneticField/MagneticFieldProvider.hpp>
#include <Acts/TrackFinding/CombinatorialKalmanFilter.hpp>
#include <Acts/TrackFitting/KalmanFitter.hpp>
#include <EVENT/LCEvent.h>
#include <EVENT/Track.h>
#include <EVENT/TrackState.h>

#include "SourceLink.hxx"

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# v1.1.0 (upcoming)
- Fix paths for running ACTSTracking outside of a release.
- Remove dependance on custom ACTS by configuring layer detection envelope in ACTSProcBase.
- Add subdetector hit numbers to Track object.

# v1.0.0
- Initial release.
2 changes: 2 additions & 0 deletions src/ACTSDuplicateRemoval.cxx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#include "ACTSDuplicateRemoval.hxx"

#include <EVENT/LCCollection.h>

#include <IMPL/LCCollectionVec.h>
#include <IMPL/LCFlagImpl.h>

#include <algorithm>

namespace ACTSTracking {
Expand Down
16 changes: 9 additions & 7 deletions src/ACTSSeededCKFTrackingProc.cxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#include "ACTSSeededCKFTrackingProc.hxx"

#include <EVENT/MCParticle.h>
#include <EVENT/SimTrackerHit.h>

#include <IMPL/LCCollectionVec.h>
#include <IMPL/LCFlagImpl.h>
#include <IMPL/LCRelationImpl.h>
#include <IMPL/TrackImpl.h>
#include <IMPL/TrackerHitPlaneImpl.h>

#include <UTIL/LCRelationNavigator.h>
#include <UTIL/LCTrackerConf.h>

Expand All @@ -17,13 +26,6 @@
#include <Acts/TrackFinding/MeasurementSelector.hpp>
#include <Acts/TrackFitting/GainMatrixSmoother.hpp>
#include <Acts/TrackFitting/GainMatrixUpdater.hpp>
#include <EVENT/MCParticle.h>
#include <EVENT/SimTrackerHit.h>
#include <IMPL/LCCollectionVec.h>
#include <IMPL/LCFlagImpl.h>
#include <IMPL/LCRelationImpl.h>
#include <IMPL/TrackImpl.h>
#include <IMPL/TrackerHitPlaneImpl.h>

using namespace Acts::UnitLiterals;

Expand Down
14 changes: 8 additions & 6 deletions src/ACTSTruthCKFTrackingProc.cxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#include "ACTSTruthCKFTrackingProc.hxx"

#include <EVENT/MCParticle.h>
#include <EVENT/SimTrackerHit.h>

#include <IMPL/LCCollectionVec.h>
#include <IMPL/LCFlagImpl.h>
#include <IMPL/LCRelationImpl.h>
#include <IMPL/TrackerHitPlaneImpl.h>

#include <UTIL/LCRelationNavigator.h>
#include <UTIL/LCTrackerConf.h>

Expand All @@ -12,12 +20,6 @@
#include <Acts/TrackFinding/MeasurementSelector.hpp>
#include <Acts/TrackFitting/GainMatrixSmoother.hpp>
#include <Acts/TrackFitting/GainMatrixUpdater.hpp>
#include <EVENT/MCParticle.h>
#include <EVENT/SimTrackerHit.h>
#include <IMPL/LCCollectionVec.h>
#include <IMPL/LCFlagImpl.h>
#include <IMPL/LCRelationImpl.h>
#include <IMPL/TrackerHitPlaneImpl.h>

using namespace Acts::UnitLiterals;

Expand Down
16 changes: 9 additions & 7 deletions src/ACTSTruthTrackingProc.cxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#include "ACTSTruthTrackingProc.hxx"

#include <EVENT/MCParticle.h>
#include <EVENT/SimTrackerHit.h>

#include <IMPL/LCCollectionVec.h>
#include <IMPL/LCFlagImpl.h>
#include <IMPL/LCRelationImpl.h>
#include <IMPL/TrackImpl.h>
#include <IMPL/TrackerHitPlaneImpl.h>

#include <UTIL/LCRelationNavigator.h>
#include <UTIL/LCTrackerConf.h>

Expand All @@ -9,13 +18,6 @@
#include <Acts/TrackFitting/GainMatrixSmoother.hpp>
#include <Acts/TrackFitting/GainMatrixUpdater.hpp>
#include <Acts/TrackFitting/KalmanFitter.hpp>
#include <EVENT/MCParticle.h>
#include <EVENT/SimTrackerHit.h>
#include <IMPL/LCCollectionVec.h>
#include <IMPL/LCFlagImpl.h>
#include <IMPL/LCRelationImpl.h>
#include <IMPL/TrackImpl.h>
#include <IMPL/TrackerHitPlaneImpl.h>

using namespace Acts::UnitLiterals;

Expand Down
13 changes: 13 additions & 0 deletions src/Helpers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

#include <IMPL/TrackImpl.h>
#include <IMPL/TrackStateImpl.h>

#include <UTIL/CellIDDecoder.h>
#include <UTIL/LCTrackerConf.h>

#include <filesystem>

#include "config.h"
Expand Down Expand Up @@ -104,8 +108,17 @@ EVENT::Track* ACTS2Marlin_track(
std::reverse(statesOnTrack.begin(), statesOnTrack.end());

// Save hits
UTIL::CellIDDecoder<lcio::TrackerHit> decoder(
lcio::LCTrackerCellID::encoding_string());
EVENT::IntVec& subdetectorHitNumbers = track->subdetectorHitNumbers();
for (EVENT::TrackerHit* hit : hitsOnTrack) {
track->addHit(hit);

uint32_t sysid = decoder(hit)["system"];
if (subdetectorHitNumbers.size() <= sysid) {
subdetectorHitNumbers.resize(sysid + 1, 0);
}
subdetectorHitNumbers[sysid]++;
}

// Save the track states at hits
Expand Down
5 changes: 3 additions & 2 deletions src/TrackTruthProc.cxx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#include "TrackTruthProc.hxx"

#include <UTIL/LCRelationNavigator.h>

#include <EVENT/MCParticle.h>
#include <EVENT/SimTrackerHit.h>
#include <EVENT/Track.h>

#include <IMPL/LCCollectionVec.h>

#include <UTIL/LCRelationNavigator.h>

#include "Helpers.hxx"

// ----- include for verbosity dependend logging ---------
Expand Down

0 comments on commit d824821

Please sign in to comment.