Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EventStore.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EventStore.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2021-2023 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
16 
17 #include <memory>
18 #include <mutex>
19 #include <set>
20 #include <unordered_map>
21 #include <vector>
22 
23 #include "G4Types.hh"
24 
25 namespace ActsExamples {
26 
27 class WhiteBoard;
28 
30 struct EventStore {
31  public:
33  WhiteBoard* store = nullptr;
34 
37  using ParticleContainer =
38  std::set<ActsFatras::Particle, ActsExamples::detail::CompareParticleId>;
39 
43 
45  SimHitContainer::sequence_type hits;
46 
48  std::vector<ActsFatras::Hit> hitBuffer;
49 
51  std::size_t numberGeantSteps = 0;
52  std::size_t maxStepsForHit = 0;
53 
55  std::unordered_map<std::size_t, Acts::RecordedMaterialTrack> materialTracks;
56 
58  std::unordered_map<SimBarcode, std::size_t> particleHitCount;
60  std::unordered_map<G4int, SimBarcode> trackIdMapping;
62  std::unordered_map<G4int, std::size_t> trackIdSubparticleCount;
63 
66 
68  std::size_t particleIdCollisionsInitial = 0;
69  std::size_t particleIdCollisionsFinal = 0;
70  std::size_t parentIdNotFound = 0;
71 
77  std::unordered_map<BarcodeWithoutSubparticle, std::size_t> subparticleMap;
78 };
79 
80 } // namespace ActsExamples