Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:11:47

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/ProtoTrack.hpp"
0012 #include "ActsExamples/EventData/SimParticle.hpp"
0013 #include "ActsExamples/EventData/Track.hpp"
0014 #include "ActsExamples/Validation/TrackClassification.hpp"
0015 
0016 #include <cstdint>
0017 #include <map>
0018 #include <optional>
0019 #include <vector>
0020 
0021 namespace ActsExamples {
0022 
0023 enum class TrackMatchClassification {
0024   Unknown = 0,
0025   /// The track is associated to a truth particle
0026   Matched,
0027   /// The track is associated to a truth particle, but the track is not unique
0028   Duplicate,
0029   /// The track cannot be uniquely associated to a truth particle
0030   Fake,
0031 };
0032 
0033 struct TrackMatchEntry {
0034   TrackMatchClassification classification{TrackMatchClassification::Unknown};
0035 
0036   std::optional<SimBarcode> particle;
0037 
0038   /// Number of hits on the track that are associated to a particle
0039   /// Sorted by decreasing number of hits
0040   std::vector<ParticleHitCount> contributingParticles;
0041 };
0042 
0043 struct ParticleMatchEntry {
0044   std::optional<TrackIndexType> track;
0045   std::uint32_t duplicates{};
0046   std::uint32_t fakes{};
0047 };
0048 
0049 using TrackParticleMatching = std::map<TrackIndexType, TrackMatchEntry>;
0050 using ParticleTrackMatching = std::map<SimBarcode, ParticleMatchEntry>;
0051 
0052 }  // namespace ActsExamples