Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-16 08:14:29

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