ATLAS Offline Software
Loading...
Searching...
No Matches
MaterialEffectsBase.icc
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5namespace Trk {
6
7inline MaterialEffectsBase::MaterialEffectsBase()
8 : SurfacePtrHolderDetEl(nullptr)
9 , m_tInX0(0.0)
10 , m_typeFlags(0)
11{
12}
13
14inline MaterialEffectsBase::MaterialEffectsBase(
15 double tInX0,
16 const Surface& sf,
17 const std::bitset<Trk::MaterialEffectsBase::NumberOfMaterialEffectsTypes>&
18 typePattern)
19 : SurfacePtrHolderDetEl(sf)
20 , m_tInX0(tInX0)
21 , m_typeFlags(typePattern.to_ulong())
22{
23}
24
25inline const Trk::Surface&
26Trk::MaterialEffectsBase::associatedSurface() const
27{
28 return *m_associatedSurface;
29}
30
31inline void
32Trk::MaterialEffectsBase::setValues(const Trk::Surface* assocSurface)
33{
34 m_associatedSurface = assocSurface;
35}
36
37inline double
38Trk::MaterialEffectsBase::thicknessInX0() const
39{
40 return m_tInX0;
41}
42
43inline bool
44Trk::MaterialEffectsBase::type(
45 const Trk::MaterialEffectsBase::MaterialEffectsType& type) const
46{
47 if (type == NumberOfMaterialEffectsTypes) {
48 return false;
49 }
50 return ((1 << static_cast<int>(type)) & m_typeFlags) != 0;
51}
52
53}