Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-01 07:53:10

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "ActsExamples/EventData/SimParticle.hpp"
0012 #include "ActsExamples/EventData/Track.hpp"
0013 #include "ActsExamples/Validation/TrackClassification.hpp"
0014 
0015 #include <cstdint>
0016 #include <map>
0017 #include <optional>
0018 #include <vector>
0019 
0020 namespace ActsExamples {
0021 
0022 enum class TrackMatchClassification {
0023   Unknown = 0,
0024   /// The track is associated to a truth particle
0025   Matched,
0026   /// The track is associated to a truth particle, but the track is not unique
0027   Duplicate,
0028   /// The track cannot be uniquely associated to a truth particle
0029   Fake,
0030 };
0031 
0032 struct TrackMatchEntry {
0033   TrackMatchClassification classification{TrackMatchClassification::Unknown};
0034 
0035   std::optional<SimBarcode> particle;
0036 
0037   /// Number of hits on the track that are associated to a particle
0038   /// Sorted by decreasing number of hits
0039   std::vector<ParticleHitCount> contributingParticles;
0040 };
0041 
0042 struct ParticleMatchEntry {
0043   std::optional<TrackIndexType> track;
0044   std::uint32_t duplicates{};
0045   std::uint32_t fakes{};
0046 };
0047 
0048 using TrackParticleMatching = std::map<TrackIndexType, TrackMatchEntry>;
0049 using ParticleTrackMatching = std::map<SimBarcode, ParticleMatchEntry>;
0050 
0051 }  // namespace ActsExamples