ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PointwiseMaterialInteraction.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PointwiseMaterialInteraction.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2019 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 
12 
13 namespace Acts {
14 namespace detail {
16  bool multipleScattering, bool energyLoss) {
17  if (energyLoss) {
19  }
20  // Compute contributions from interactions
22  covarianceContributions(multipleScattering, energyLoss);
23  }
24 }
25 
27  bool multipleScattering, bool energyLoss) {
28  // Compute contributions from interactions
29  if (multipleScattering) {
30  // TODO use momentum before or after energy loss in backward mode?
31  const auto theta0 =
33  // sigmaPhi = theta0 / sin(theta)
34  const auto sigmaPhi = theta0 * (dir.norm() / VectorHelpers::perp(dir));
35  variancePhi = sigmaPhi * sigmaPhi;
36  // sigmaTheta = theta0
37  varianceTheta = theta0 * theta0;
38  }
39  // TODO just ionisation loss or full energy loss?
40  if (energyLoss) {
41  const auto sigmaQoverP =
43  varianceQoverP = sigmaQoverP * sigmaQoverP;
44  }
45 }
46 
48  double variance, double change, NoiseUpdateMode updateMode) const {
49  // Add/Subtract the change
50  // Protect the variance against becoming negative
51  return std::max(0., variance + std::copysign(change, updateMode));
52 }
53 } // namespace detail
54 } // end of namespace Acts