DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
CartesianGridXYZ.cpp
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 
14 // Framework include files
17 
18 using namespace dd4hep;
19 
22  return Position(access()->implementation->position(id));
23 }
24 
27  const Position& global,
28  const VolumeID& volID) const
29 {
30  return access()->implementation->cellID(local, global, volID);
31 }
32 
35  return access()->implementation->gridSizeX();
36 }
37 
40  return access()->implementation->gridSizeY();
41 }
42 
45  return access()->implementation->gridSizeZ();
46 }
47 
49 void CartesianGridXYZ::setGridSizeX(double cellSize) const {
50  access()->implementation->setGridSizeX(cellSize);
51 }
52 
54 void CartesianGridXYZ::setGridSizeY(double cellSize) const {
55  access()->implementation->setGridSizeY(cellSize);
56 }
57 
59 void CartesianGridXYZ::setGridSizeZ(double cellSize) const {
60  access()->implementation->setGridSizeZ(cellSize);
61 }
62 
64 double CartesianGridXYZ::offsetX() const {
65  return access()->implementation->offsetX();
66 }
67 
69 double CartesianGridXYZ::offsetY() const {
70  return access()->implementation->offsetY();
71 }
72 
74 double CartesianGridXYZ::offsetZ() const {
75  return access()->implementation->offsetZ();
76 }
77 
79 void CartesianGridXYZ::setOffsetX(double offset) const {
80  access()->implementation->setOffsetX(offset);
81 }
82 
84 void CartesianGridXYZ::setOffsetY(double offset) const {
85  access()->implementation->setOffsetY(offset);
86 }
87 
89 void CartesianGridXYZ::setOffsetZ(double offset) const {
90  access()->implementation->setOffsetZ(offset);
91 }
92 
94 const std::string& CartesianGridXYZ::fieldNameX() const {
95  return access()->implementation->fieldNameX();
96 }
97 
99 const std::string& CartesianGridXYZ::fieldNameY() const {
100  return access()->implementation->fieldNameY();
101 }
102 
104 const std::string& CartesianGridXYZ::fieldNameZ() const {
105  return access()->implementation->fieldNameZ();
106 }
107 
108 // Returns a vector<double> of the cellDimensions of the given cell ID
109 std::vector<double> CartesianGridXYZ::cellDimensions(const CellID& id) const {
110  return access()->implementation->cellDimensions(id);
111 }
dd4hep::CartesianGridXYZ::setGridSizeZ
void setGridSizeZ(double cellSize) const
set the grid size in Z
Definition: CartesianGridXYZ.cpp:59
dd4hep::CartesianGridXYZ::offsetX
double offsetX() const
access the coordinate offset in X
Definition: CartesianGridXYZ.cpp:64
dd4hep::CartesianGridXYZ::offsetZ
double offsetZ() const
access the coordinate offset in Z
Definition: CartesianGridXYZ.cpp:74
dd4hep::CartesianGridXYZ::position
Position position(const CellID &cellID) const
determine the position based on the cell ID
Definition: CartesianGridXYZ.cpp:21
dd4hep::CartesianGridXYZ::setOffsetZ
void setOffsetZ(double offset) const
set the coordinate offset in Z
Definition: CartesianGridXYZ.cpp:89
dd4hep::CartesianGridXYZ::fieldNameZ
const std::string & fieldNameZ() const
access the field name used for Z
Definition: CartesianGridXYZ.cpp:104
dd4hep::CartesianGridXYZ::fieldNameY
const std::string & fieldNameY() const
access the field name used for Y
Definition: CartesianGridXYZ.cpp:99
dd4hep::CartesianGridXYZ::gridSizeZ
double gridSizeZ() const
access the grid size in Z
Definition: CartesianGridXYZ.cpp:44
dd4hep::CartesianGridXYZ::setOffsetX
void setOffsetX(double offset) const
set the coordinate offset in X
Definition: CartesianGridXYZ.cpp:79
CartesianGridXYZ.h
dd4hep::CartesianGridXYZ::setGridSizeX
void setGridSizeX(double cellSize) const
set the grid size in X
Definition: CartesianGridXYZ.cpp:49
CartesianGridXYZ.h
dd4hep::CartesianGridXYZ::gridSizeY
double gridSizeY() const
access the grid size in Y
Definition: CartesianGridXYZ.cpp:39
dd4hep::Position
ROOT::Math::XYZVector Position
Definition: Objects.h:81
dd4hep::CartesianGridXYZ::setOffsetY
void setOffsetY(double offset) const
set the coordinate offset in Y
Definition: CartesianGridXYZ.cpp:84
VolumeID
dd4hep::DDSegmentation::VolumeID VolumeID
Definition: SegmentationDictionary.h:49
dd4hep::Handle::access
T * access() const
Checked object access. Throws invalid handle runtime exception if invalid handle.
dd4hep::CartesianGridXYZ::offsetY
double offsetY() const
access the coordinate offset in Y
Definition: CartesianGridXYZ.cpp:69
dd4hep::CartesianGridXYZ::fieldNameX
const std::string & fieldNameX() const
access the field name used for X
Definition: CartesianGridXYZ.cpp:94
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::CartesianGridXYZ::gridSizeX
double gridSizeX() const
access the grid size in X
Definition: CartesianGridXYZ.cpp:34
dd4hep::CartesianGridXYZ::setGridSizeY
void setGridSizeY(double cellSize) const
set the grid size in Y
Definition: CartesianGridXYZ.cpp:54
dd4hep::CartesianGridXYZ::cellID
CellID cellID(const Position &local, const Position &global, const VolumeID &volID) const
determine the cell ID based on the position
Definition: CartesianGridXYZ.cpp:26
dd4hep::CartesianGridXYZ::cellDimensions
std::vector< double > cellDimensions(const CellID &cellID) const
Returns a vector<double> of the cellDimensions of the given cell ID in natural order of dimensions,...
Definition: CartesianGridXYZ.cpp:109
CellID
dd4hep::DDSegmentation::CellID CellID
Definition: SegmentationDictionary.h:50