src/core/geometry/PixelDetectorModel.hpp
Pixel detector model. More…
Namespaces
Name |
---|
allpix Helper class to hold support layers for a detector model. |
Classes
Name | |
---|---|
class | allpix::PixelDetectorModel Model of a generic pixel detector. This model is further extended by specialized pixel detector models. |
Detailed Description
Pixel detector model.
Copyright: Copyright (c) 2017-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_PIXEL_DETECTOR_MODEL_H
#define ALLPIX_PIXEL_DETECTOR_MODEL_H
#include <array>
#include <string>
#include <utility>
#include <Math/Point2D.h>
#include <Math/Point3D.h>
#include <Math/Vector2D.h>
#include <Math/Vector3D.h>
#include "core/config/ConfigReader.hpp"
#include "core/config/exceptions.h"
#include "core/geometry/DetectorModel.hpp"
#include "core/utils/log.h"
#include "objects/Pixel.hpp"
#include "tools/ROOT.h"
namespace allpix {
class PixelDetectorModel : public DetectorModel {
public:
explicit PixelDetectorModel(std::string type,
const std::shared_ptr<DetectorAssembly>& assembly,
const ConfigReader& reader,
const Configuration& config);
bool isWithinSensor(const ROOT::Math::XYZPoint& local_pos) const override;
bool isOnSensorBoundary(const ROOT::Math::XYZPoint& local_pos) const override;
ROOT::Math::XYZPoint getSensorIntercept(const ROOT::Math::XYZPoint& inside,
const ROOT::Math::XYZPoint& outside) const override;
bool isWithinMatrix(const Pixel::Index& pixel_index) const override;
bool isWithinMatrix(const int x, const int y) const override;
bool isWithinMatrix(const ROOT::Math::XYZPoint& position) const override;
ROOT::Math::XYZPoint getPixelCenter(const int x, const int y) const override;
std::pair<int, int> getPixelIndex(const ROOT::Math::XYZPoint& local_pos) const override;
std::set<Pixel::Index> getNeighbors(const Pixel::Index& idx, const size_t distance) const override;
bool areNeighbors(const Pixel::Index& seed, const Pixel::Index& entrant, const size_t distance) const override;
protected:
void validate() override;
};
} // namespace allpix
#endif // ALLPIX_DETECTOR_MODEL_H
Updated on 2024-12-13 at 08:31:37 +0000