Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-10-21 08:04:13

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