Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-12 07:51:33

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "Acts/EventData/ParticleHypothesis.hpp"
0012 #include "Acts/Material/MaterialSlab.hpp"
0013 
0014 namespace Acts::detail {
0015 
0016 class MaterialEffectsAccumulator {
0017  public:
0018   bool isVacuum() const { return m_accumulatedMaterial.isVacuum(); }
0019 
0020   void reset() { *this = MaterialEffectsAccumulator(); }
0021 
0022   void initialize(double maxXOverX0Step,
0023                   const ParticleHypothesis& particleHypothesis,
0024                   double initialMomentum);
0025 
0026   void accumulate(const Material& material, double pathLength, double qOverPin,
0027                   double qOverPout);
0028 
0029   std::optional<FreeMatrix> computeAdditionalFreeCovariance(
0030       const Vector3& direction);
0031 
0032  private:
0033   double m_maxXOverX0Step = 0;
0034 
0035   ParticleHypothesis m_particleHypothesis = ParticleHypothesis::pion();
0036   double m_initialMomentum = 0;
0037 
0038   MaterialSlab m_accumulatedMaterial;
0039 
0040   double m_varAngle = 0;
0041   double m_varPosition = 0;
0042   double m_covAnglePosition = 0;
0043 };
0044 
0045 }  // namespace Acts::detail