EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VolumeMaterialInteraction.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file VolumeMaterialInteraction.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2019-2020 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 
15 
16 namespace Acts {
17 namespace detail {
23  const Vector3D pos;
25  const double time;
27  const Vector3D dir;
29  const double momentum;
31  const double q;
33  const double qOverP;
35  const double mass;
37  const int pdg;
42 
47 
56  template <typename propagator_state_t, typename stepper_t>
58  const propagator_state_t& state,
59  const stepper_t& stepper)
60  : volume(vVolume),
61  pos(stepper.position(state.stepping)),
62  time(stepper.time(state.stepping)),
63  dir(stepper.direction(state.stepping)),
64  momentum(stepper.momentum(state.stepping)),
65  q(stepper.charge(state.stepping)),
66  qOverP(q / momentum),
67  mass(state.options.mass),
68  pdg(state.options.absPdgCode),
69  performCovarianceTransport(state.stepping.covTransport),
70  nav(state.stepping.navDir) {}
71 
80  template <typename propagator_state_t>
81  bool evaluateMaterialSlab(const propagator_state_t& state) {
82  pathCorrection = 0;
83  if (state.navigation.currentVolume != nullptr &&
84  state.navigation.currentVolume->volumeMaterial() != nullptr) {
86  state.navigation.currentVolume->volumeMaterial()->material(pos),
87  1); // state.stepping.StepSize
88  } else
89  slab = MaterialSlab();
90  return slab;
91  }
92 };
93 } // namespace detail
94 } // end of namespace Acts