From 874fdf9bd2ab4f43d9f90a1c8ccfc59441f31063 Mon Sep 17 00:00:00 2001 From: Karol Krizka Date: Fri, 17 Jun 2022 17:01:59 -0700 Subject: [PATCH 1/3] Add subdetectorHitNumbers to track. --- .clang-format | 10 +++++++--- src/Helpers.cxx | 11 +++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.clang-format b/.clang-format index 15c3822..eabe60e 100644 --- a/.clang-format +++ b/.clang-format @@ -14,15 +14,19 @@ IncludeCategories: Priority: 3 SortPriority: 0 CaseSensitive: false - - Regex: '^' + - Regex: '^' Priority: 4 SortPriority: 0 CaseSensitive: false - - Regex: '^<.*' + - Regex: '^' Priority: 5 SortPriority: 0 CaseSensitive: false - - Regex: '.*' + - Regex: '^<.*' Priority: 6 SortPriority: 0 CaseSensitive: false + - Regex: '.*' + Priority: 7 + SortPriority: 0 + CaseSensitive: false diff --git a/src/Helpers.cxx b/src/Helpers.cxx index 4c20e81..a2f267f 100644 --- a/src/Helpers.cxx +++ b/src/Helpers.cxx @@ -1,5 +1,8 @@ #include "Helpers.hxx" + +#include +#include #include #include #include @@ -104,8 +107,16 @@ EVENT::Track* ACTS2Marlin_track( std::reverse(statesOnTrack.begin(), statesOnTrack.end()); // Save hits + UTIL::CellIDDecoder 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 From 007ee429cacdbfa592a11e13ad85e8e1b0c4219c Mon Sep 17 00:00:00 2001 From: Karol Krizka Date: Sat, 18 Jun 2022 08:32:01 -0700 Subject: [PATCH 2/3] Formatting fix. --- .clang-format | 12 ++++++++---- ACTSTracking/ACTSDuplicateRemoval.hxx | 1 + ACTSTracking/ACTSSeededCKFTrackingProc.hxx | 3 ++- ACTSTracking/ACTSTruthCKFTrackingProc.hxx | 3 ++- ACTSTracking/ACTSTruthTrackingProc.hxx | 3 ++- ACTSTracking/GeometryIdMappingTool.hxx | 5 +++-- ACTSTracking/Helpers.hxx | 7 ++++--- src/ACTSDuplicateRemoval.cxx | 2 ++ src/ACTSSeededCKFTrackingProc.cxx | 16 +++++++++------- src/ACTSTruthCKFTrackingProc.cxx | 14 ++++++++------ src/ACTSTruthTrackingProc.cxx | 16 +++++++++------- src/Helpers.cxx | 14 ++++++++------ src/TrackTruthProc.cxx | 5 +++-- 13 files changed, 61 insertions(+), 40 deletions(-) diff --git a/.clang-format b/.clang-format index eabe60e..0701c84 100644 --- a/.clang-format +++ b/.clang-format @@ -14,19 +14,23 @@ IncludeCategories: Priority: 3 SortPriority: 0 CaseSensitive: false - - Regex: '^' + - Regex: '^' Priority: 4 SortPriority: 0 CaseSensitive: false - - Regex: '^' + - Regex: '^' Priority: 5 SortPriority: 0 CaseSensitive: false - - Regex: '^<.*' + - Regex: '^' Priority: 6 SortPriority: 0 CaseSensitive: false - - Regex: '.*' + - Regex: '^<.*' Priority: 7 SortPriority: 0 CaseSensitive: false + - Regex: '.*' + Priority: 8 + SortPriority: 0 + CaseSensitive: false diff --git a/ACTSTracking/ACTSDuplicateRemoval.hxx b/ACTSTracking/ACTSDuplicateRemoval.hxx index 8f3843f..9c732fc 100644 --- a/ACTSTracking/ACTSDuplicateRemoval.hxx +++ b/ACTSTracking/ACTSDuplicateRemoval.hxx @@ -2,6 +2,7 @@ #define ACTSDuplicateRemoval_h 1 #include + #include //! \brief Remove track duplicates diff --git a/ACTSTracking/ACTSSeededCKFTrackingProc.hxx b/ACTSTracking/ACTSSeededCKFTrackingProc.hxx index ae33dd1..d7b7e35 100644 --- a/ACTSTracking/ACTSSeededCKFTrackingProc.hxx +++ b/ACTSTracking/ACTSSeededCKFTrackingProc.hxx @@ -1,10 +1,11 @@ #ifndef ACTSSeededCKFTrackingProc_h #define ACTSSeededCKFTrackingProc_h 1 +#include + #include #include -#include #include "ACTSProcBase.hxx" #include "GeometryIdSelector.hxx" diff --git a/ACTSTracking/ACTSTruthCKFTrackingProc.hxx b/ACTSTracking/ACTSTruthCKFTrackingProc.hxx index 244ada2..a39199e 100644 --- a/ACTSTracking/ACTSTruthCKFTrackingProc.hxx +++ b/ACTSTracking/ACTSTruthCKFTrackingProc.hxx @@ -1,10 +1,11 @@ #ifndef ACTSTruthCKFTrackingProc_h #define ACTSTruthCKFTrackingProc_h 1 +#include + #include #include -#include #include "ACTSProcBase.hxx" diff --git a/ACTSTracking/ACTSTruthTrackingProc.hxx b/ACTSTracking/ACTSTruthTrackingProc.hxx index 3910dca..9dd97b6 100644 --- a/ACTSTracking/ACTSTruthTrackingProc.hxx +++ b/ACTSTracking/ACTSTruthTrackingProc.hxx @@ -1,10 +1,11 @@ #ifndef ACTSTruthTrackingProc_h #define ACTSTruthTrackingProc_h 1 +#include + #include #include -#include #include "ACTSProcBase.hxx" diff --git a/ACTSTracking/GeometryIdMappingTool.hxx b/ACTSTracking/GeometryIdMappingTool.hxx index 01e54cd..fdbbf1d 100644 --- a/ACTSTracking/GeometryIdMappingTool.hxx +++ b/ACTSTracking/GeometryIdMappingTool.hxx @@ -1,9 +1,10 @@ #pragma once -#include - #include #include + +#include + #include namespace ACTSTracking { diff --git a/ACTSTracking/Helpers.hxx b/ACTSTracking/Helpers.hxx index be9e48a..406e2b0 100644 --- a/ACTSTracking/Helpers.hxx +++ b/ACTSTracking/Helpers.hxx @@ -1,12 +1,13 @@ #pragma once +#include +#include +#include + #include #include #include #include -#include -#include -#include #include "SourceLink.hxx" diff --git a/src/ACTSDuplicateRemoval.cxx b/src/ACTSDuplicateRemoval.cxx index c000317..9b42e19 100644 --- a/src/ACTSDuplicateRemoval.cxx +++ b/src/ACTSDuplicateRemoval.cxx @@ -1,8 +1,10 @@ #include "ACTSDuplicateRemoval.hxx" #include + #include #include + #include namespace ACTSTracking { diff --git a/src/ACTSSeededCKFTrackingProc.cxx b/src/ACTSSeededCKFTrackingProc.cxx index f9384ea..6b15f67 100644 --- a/src/ACTSSeededCKFTrackingProc.cxx +++ b/src/ACTSSeededCKFTrackingProc.cxx @@ -1,5 +1,14 @@ #include "ACTSSeededCKFTrackingProc.hxx" +#include +#include + +#include +#include +#include +#include +#include + #include #include @@ -17,13 +26,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include using namespace Acts::UnitLiterals; diff --git a/src/ACTSTruthCKFTrackingProc.cxx b/src/ACTSTruthCKFTrackingProc.cxx index e8fdbbb..a1f6e3b 100644 --- a/src/ACTSTruthCKFTrackingProc.cxx +++ b/src/ACTSTruthCKFTrackingProc.cxx @@ -1,5 +1,13 @@ #include "ACTSTruthCKFTrackingProc.hxx" +#include +#include + +#include +#include +#include +#include + #include #include @@ -12,12 +20,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include using namespace Acts::UnitLiterals; diff --git a/src/ACTSTruthTrackingProc.cxx b/src/ACTSTruthTrackingProc.cxx index c6bb1a7..1b7273f 100644 --- a/src/ACTSTruthTrackingProc.cxx +++ b/src/ACTSTruthTrackingProc.cxx @@ -1,5 +1,14 @@ #include "ACTSTruthTrackingProc.hxx" +#include +#include + +#include +#include +#include +#include +#include + #include #include @@ -9,13 +18,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include using namespace Acts::UnitLiterals; diff --git a/src/Helpers.cxx b/src/Helpers.cxx index a2f267f..41e40a0 100644 --- a/src/Helpers.cxx +++ b/src/Helpers.cxx @@ -1,10 +1,11 @@ #include "Helpers.hxx" +#include +#include #include #include -#include -#include + #include #include "config.h" @@ -107,14 +108,15 @@ EVENT::Track* ACTS2Marlin_track( std::reverse(statesOnTrack.begin(), statesOnTrack.end()); // Save hits - UTIL::CellIDDecoder decoder(lcio::LCTrackerCellID::encoding_string()); + UTIL::CellIDDecoder 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); + uint32_t sysid = decoder(hit)["system"]; + if (subdetectorHitNumbers.size() <= sysid) { + subdetectorHitNumbers.resize(sysid + 1, 0); } subdetectorHitNumbers[sysid]++; } diff --git a/src/TrackTruthProc.cxx b/src/TrackTruthProc.cxx index d2f9d02..1087188 100644 --- a/src/TrackTruthProc.cxx +++ b/src/TrackTruthProc.cxx @@ -1,12 +1,13 @@ #include "TrackTruthProc.hxx" -#include - #include #include #include + #include +#include + #include "Helpers.hxx" // ----- include for verbosity dependend logging --------- From ed20117738a4390c3c55566894d1868cd4d7b61d Mon Sep 17 00:00:00 2001 From: Karol Krizka Date: Sat, 18 Jun 2022 08:34:30 -0700 Subject: [PATCH 3/3] Update CHANGELOG. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 331f429..f698f49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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.