Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-08 08:11:23

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/Geometry/Layer.hpp"
0012 
0013 #include "../Surfaces/SurfaceStub.hpp"
0014 
0015 namespace Acts {
0016 /// Layer derived class stub
0017 /// Note: Layer classes in general have a static 'create' factory method, but
0018 /// nothing
0019 /// in the baseclasses mandates this.
0020 class LayerStub : virtual public SurfaceStub, public Layer {
0021  public:
0022   /// constructor (deleted in Surface baseclass)
0023   LayerStub() = delete;
0024   /// copy constructor (deleted in Surface baseclass)
0025   LayerStub(const LayerStub& otherLayer) = delete;
0026   /// constructor with pointer to SurfaceArray (protected in Layer baseclass)
0027   explicit LayerStub(std::unique_ptr<SurfaceArray> surfaceArray,
0028                      double thickness = 0,
0029                      std::unique_ptr<ApproachDescriptor> ad = nullptr,
0030                      LayerType ltype = passive)
0031       : SurfaceStub(),
0032         Layer(std::move(surfaceArray), thickness, std::move(ad), ltype) {}
0033 
0034   /// Destructor
0035   ~LayerStub() override = default;
0036 
0037   /// Assignment is deleted in the Layer baseclass
0038   LayerStub& operator=(const LayerStub& lay) = delete;
0039 
0040   /// surfaceRepresentation is pure virtual in baseclass
0041   const Surface& surfaceRepresentation() const override { return (*this); }
0042 
0043   Surface& surfaceRepresentation() override { return (*this); }
0044 
0045   /// simply return true to show a method can be called on the constructed
0046   /// object
0047   bool constructedOk() const { return true; }
0048 
0049   /// Other methods have implementation in baseclass
0050   /// templated 'onLayer()' from baseclass ?
0051 };
0052 }  // namespace Acts