File indexing completed on 2025-07-13 07:50:12
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Detector/DetectorVolume.hpp"
0013 #include "Acts/Geometry/GeometryIdentifier.hpp"
0014 #include "Acts/Geometry/TrackingVolume.hpp"
0015 #include "Acts/Material/MaterialSlab.hpp"
0016
0017 namespace Acts {
0018
0019 class Surface;
0020
0021
0022
0023
0024 struct InteractionVolume {
0025
0026 const TrackingVolume* trackingVolume = nullptr;
0027
0028 const Experimental::DetectorVolume* detectorVolume = nullptr;
0029
0030
0031 InteractionVolume() = default;
0032
0033
0034
0035 explicit InteractionVolume(const TrackingVolume* tv) : trackingVolume(tv) {}
0036
0037
0038
0039 explicit InteractionVolume(const Experimental::DetectorVolume* dv)
0040 : detectorVolume(dv) {}
0041
0042
0043 GeometryIdentifier geometryId() const {
0044 if (trackingVolume != nullptr) {
0045 return trackingVolume->geometryId();
0046 } else if (detectorVolume != nullptr) {
0047 return detectorVolume->geometryId();
0048 } else {
0049 return GeometryIdentifier();
0050 }
0051 }
0052
0053
0054 bool empty() const {
0055 return trackingVolume == nullptr && detectorVolume == nullptr;
0056 }
0057 };
0058
0059
0060
0061
0062 struct MaterialInteraction {
0063
0064 Vector3 position = Vector3(0., 0., 0);
0065
0066 double time = 0.0;
0067
0068 Vector3 direction = Vector3(0., 0., 0);
0069
0070 double deltaP = 0.0;
0071
0072 double sigmaPhi2 = 0.0;
0073
0074 double sigmaTheta2 = 0.0;
0075
0076 double sigmaQoP2 = 0.0;
0077
0078 Vector3 intersection = Vector3(0., 0., 0);
0079
0080 GeometryIdentifier intersectionID;
0081
0082 const Surface* surface = nullptr;
0083
0084 InteractionVolume volume{};
0085
0086 bool updatedVolumeStep = false;
0087
0088 double pathCorrection = 1.;
0089
0090 MaterialSlab materialSlab = MaterialSlab::Nothing();
0091 };
0092
0093
0094
0095
0096 struct RecordedMaterial {
0097
0098 double materialInX0 = 0.;
0099
0100 double materialInL0 = 0.;
0101
0102 std::vector<MaterialInteraction> materialInteractions;
0103 };
0104
0105
0106
0107
0108 using RecordedMaterialTrack =
0109 std::pair<std::pair<Acts::Vector3, Acts::Vector3>, RecordedMaterial>;
0110
0111 }