Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:12:39

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   LayerStub(std::unique_ptr<SurfaceArray> surfaceArray, double thickness = 0,
0028             std::unique_ptr<ApproachDescriptor> ad = nullptr,
0029             LayerType ltype = passive)
0030       : SurfaceStub(),
0031         Layer(std::move(surfaceArray), thickness, std::move(ad), ltype) {}
0032 
0033   /// Destructor
0034   ~LayerStub() override = default;
0035 
0036   /// Assignment is deleted in the Layer baseclass
0037   LayerStub& operator=(const LayerStub& lay) = delete;
0038 
0039   /// surfaceRepresentation is pure virtual in baseclass
0040   const Surface& surfaceRepresentation() const override { return (*this); }
0041 
0042   Surface& surfaceRepresentation() override { return (*this); }
0043 
0044   /// simply return true to show a method can be called on the constructed
0045   /// object
0046   bool constructedOk() const { return true; }
0047 
0048   /// Other methods have implementation in baseclass
0049   /// templated 'onLayer()' from baseclass ?
0050 };
0051 }  // namespace Acts