src/core/geometry/SupportLayer.hpp
Definition of support layer. More…
Namespaces
Name |
---|
allpix Helper class to hold support layers for a detector model. |
Classes
Name | |
---|---|
class | allpix::SupportLayer |
Detailed Description
Definition of support layer.
Copyright: Copyright (c) 2022-2024 CERN and the Allpix Squared authors. This software is distributed under the terms of the MIT License, copied verbatim in the file “LICENSE.md”. In applying this license, CERN does not waive the privileges and immunities granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction. SPDX-License-Identifier: MIT
Source code
#ifndef ALLPIX_SUPPORT_LAYER_H
#define ALLPIX_SUPPORT_LAYER_H
#include <Math/Point2D.h>
#include <Math/Point3D.h>
#include <Math/Vector2D.h>
#include <Math/Vector3D.h>
namespace allpix {
class SupportLayer {
friend class DetectorModel;
public:
enum class Location {
SENSOR,
CHIP,
ABSOLUTE
};
const ROOT::Math::XYZPoint& getCenter() const { return center_; }
const ROOT::Math::XYZVector& getSize() const { return size_; }
const std::string& getMaterial() const { return material_; }
bool hasHole() const { return hole_size_.x() > 1e-9 && hole_size_.y() > 1e-9; }
const std::string& getHoleType() const { return type_; }
ROOT::Math::XYZPoint getHoleCenter() const {
return center_ + ROOT::Math::XYZVector(hole_offset_.x(), hole_offset_.y(), 0);
}
const ROOT::Math::XYZVector& getHoleSize() const { return hole_size_; }
const Location& getLocation() const { return location_; }
private:
SupportLayer(ROOT::Math::XYZVector size,
ROOT::Math::XYZVector offset,
std::string material,
std::string type,
const Location location,
ROOT::Math::XYZVector hole_size,
ROOT::Math::XYVector hole_offset)
: size_(std::move(size)), material_(std::move(material)), type_(std::move(type)),
hole_size_(std::move(hole_size)), offset_(std::move(offset)), hole_offset_(std::move(hole_offset)),
location_(location) {}
// Actual parameters returned
ROOT::Math::XYZPoint center_;
ROOT::Math::XYZVector size_;
std::string material_;
std::string type_;
ROOT::Math::XYZVector hole_size_;
// Internal parameters to calculate return parameters
ROOT::Math::XYZVector offset_;
ROOT::Math::XYVector hole_offset_;
Location location_;
};
} // namespace allpix
#endif // ALLPIX_SUPPORT_LAYER_H
Updated on 2024-12-13 at 08:31:37 +0000