Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MaterialInteraction.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file MaterialInteraction.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2021 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 namespace Acts {
18 
19 class Surface;
20 
26  const TrackingVolume* trackingVolume = nullptr;
29 
31  InteractionVolume() = default;
32 
36 
40  : detectorVolume(dv) {}
41 
44  if (trackingVolume != nullptr) {
45  return trackingVolume->geometryId();
46  } else if (detectorVolume != nullptr) {
47  return detectorVolume->geometryId();
48  } else {
49  return GeometryIdentifier();
50  }
51  }
52 
54  bool empty() const {
55  return trackingVolume == nullptr and detectorVolume == nullptr;
56  }
57 };
58 
64  Vector3 position = Vector3(0., 0., 0);
66  double time = 0.0;
68  Vector3 direction = Vector3(0., 0., 0);
70  double deltaP = 0.0;
72  double sigmaPhi2 = 0.0;
74  double sigmaTheta2 = 0.0;
76  double sigmaQoP2 = 0.0;
82  const Surface* surface = nullptr;
86  bool updatedVolumeStep = false;
88  double pathCorrection = 1.;
91 };
92 
97  // The accumulated materialInX0
98  double materialInX0 = 0.;
100  double materialInL0 = 0.;
102  std::vector<MaterialInteraction> materialInteractions;
103 };
104 
108 using RecordedMaterialTrack =
109  std::pair<std::pair<Acts::Vector3, Acts::Vector3>, RecordedMaterial>;
110 
111 } // namespace Acts