Mantid
Loading...
Searching...
No Matches
GridDetectorPixel.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
12#include "MantidKernel/V3D.h"
13
14namespace Mantid {
15namespace Geometry {
16
17// Forward declaration
18class GridDetector;
19
28class MANTID_GEOMETRY_DLL GridDetectorPixel : public Detector {
29 friend class GridDetector;
30
31public:
33 virtual std::string type() const override { return "GridDetectorPixel"; }
34
35 GridDetectorPixel(const std::string &name, int id, const std::shared_ptr<IObject> &shape, IComponent *parent,
36 const GridDetector *panel, size_t col, size_t row, size_t layer);
37
40 return new GridDetectorPixel(this, map);
41 }
42
43 Kernel::V3D getRelativePos() const override;
44
45private:
49 size_t m_col;
51 size_t m_row;
53 size_t m_layer;
54
55protected:
57 GridDetectorPixel(const GridDetectorPixel *base, const ParameterMap *map);
58};
59
60} // namespace Geometry
61} // namespace Mantid
This class represents a detector - i.e.
Definition: Detector.h:30
GridrDetectorPixel: a sub-class of Detector that is one pixel inside a GridDetector.
const GridDetector * m_panel
GridDetector that is the parent of this pixel.
virtual std::string type() const override
A string representation of the component type.
size_t m_row
Column of the pixel in the panel (y/row index)
size_t m_col
Row of the pixel in the panel (x/col index)
size_t m_layer
Plane of the pixel in the panel (z/layer index)
GridDetectorPixel * cloneParameterized(const ParameterMap *map) const override
Create a cloned instance with a parameter map applied.
GridDetector is a type of CompAssembly, an assembly of components.
Definition: GridDetector.h:34
base class for Geometric IComponent
Definition: IComponent.h:51
Class for 3D vectors.
Definition: V3D.h:34
Helper class which provides the Collimation Length for SANS instruments.