Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AccumulatedMaterialSlab.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file AccumulatedMaterialSlab.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2018-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 
12 
13 #include <utility>
14 
15 namespace Acts {
16 
32  public:
33  // this class does not have a custom default constructor and thus should not
34  // provide any custom default cstors, dstor, or assignment. see ISOCPP C.20.
35 
49  void accumulate(MaterialSlab slabAlongTrack, float pathCorrection = 1);
50 
58  void trackVariance(MaterialSlab slabReference, bool useEmptyTrack = false);
59 
72  void trackAverage(bool useEmptyTrack = false);
73 
82  std::pair<MaterialSlab, unsigned int> totalAverage() const;
83 
92  std::pair<float, unsigned int> totalVariance() const;
93 
94  private:
100  float m_totalVariance = 0.0;
101  // Number of tracks contributing to the total average.
102  unsigned int m_totalCount = 0u;
103 };
104 
105 } // namespace Acts