ATLAS Offline Software
HomogeneousLayerMaterial.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // HomogeneousLayerMaterial.cxx, (c) ATLAS Detector software
8 
10 
12 
14  : Trk::LayerMaterialProperties(), m_fullMaterial(nullptr) {}
15 
17  const Trk::MaterialProperties& full, double splitFactor)
18  : Trk::LayerMaterialProperties(splitFactor), m_fullMaterial(full.clone()) {}
19 
22  : LayerMaterialProperties(lmp.m_splitFactor),
23  m_fullMaterial(lmp.m_fullMaterial ? lmp.m_fullMaterial->clone()
24  : nullptr) {}
25 
27 
29  const Trk::HomogeneousLayerMaterial& lmp) {
30  if (this != &lmp) {
31  // now refill everything
32  m_fullMaterial.reset(lmp.m_fullMaterial ? lmp.m_fullMaterial->clone()
33  : nullptr);
35  }
36  return (*this);
37 }
38 
40  double scale) {
41  // scale the sub-properties
42  if (m_fullMaterial) (*m_fullMaterial) *= scale;
43 
44  return (*this);
45 }
46 
47 MsgStream& Trk::HomogeneousLayerMaterial::dump(MsgStream& sl) const {
48  sl << "Trk::HomogeneousLayerMaterial : " << std::endl;
49  if (m_fullMaterial) {
50  sl << " - fullMaterial : " << *m_fullMaterial << std::endl;
51  }
52  sl << " - split factor : " << m_splitFactor << std::endl;
53 
54  return sl;
55 }
56 
57 std::ostream& Trk::HomogeneousLayerMaterial::dump(std::ostream& sl) const {
58  sl << "Trk::HomogeneousLayerMaterial : " << std::endl;
59  if (m_fullMaterial) {
60  sl << " - fullMaterial : " << *m_fullMaterial << std::endl;
61  }
62  sl << " - split factor : " << m_splitFactor << std::endl;
63  return sl;
64 }
Trk::HomogeneousLayerMaterial::operator=
HomogeneousLayerMaterial & operator=(const HomogeneousLayerMaterial &lmp)
Assignment operator.
Definition: HomogeneousLayerMaterial.cxx:28
MaterialProperties.h
HomogeneousLayerMaterial.h
Trk::HomogeneousLayerMaterial::operator*=
virtual HomogeneousLayerMaterial & operator*=(double scale) override
Scale operator.
Definition: HomogeneousLayerMaterial.cxx:39
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
python.Utilities.clone
clone
Definition: Utilities.py:134
Trk::HomogeneousLayerMaterial::m_fullMaterial
std::unique_ptr< MaterialProperties > m_fullMaterial
The five different MaterialProperties.
Definition: HomogeneousLayerMaterial.h:108
Trk::LayerMaterialProperties::m_splitFactor
double m_splitFactor
the split factor in favour of oppositePre
Definition: LayerMaterialProperties.h:126
Trk::LayerMaterialProperties
Definition: LayerMaterialProperties.h:62
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::HomogeneousLayerMaterial::~HomogeneousLayerMaterial
virtual ~HomogeneousLayerMaterial() override
Destructor.
find_data.full
full
Definition: find_data.py:27
Trk::MaterialProperties
Definition: MaterialProperties.h:40
Trk::HomogeneousLayerMaterial::HomogeneousLayerMaterial
HomogeneousLayerMaterial()
Default Constructor - creates empty HomogeneousLayerMaterial.
Definition: HomogeneousLayerMaterial.cxx:13
Trk::HomogeneousLayerMaterial
Definition: HomogeneousLayerMaterial.h:53
Trk::HomogeneousLayerMaterial::dump
virtual MsgStream & dump(MsgStream &sl) const override
Output Method for MsgStream, to be overloaded by child classes.
Definition: HomogeneousLayerMaterial.cxx:47