DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
CartesianGridXY.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
15 #include <DD4hep/CartesianGridXY.h>
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 
44 void CartesianGridXY::setGridSizeX(double cellSize) const {
45  access()->implementation->setGridSizeX(cellSize);
46 }
47 
49 void CartesianGridXY::setGridSizeY(double cellSize) const {
50  access()->implementation->setGridSizeY(cellSize);
51 }
52 
54 double CartesianGridXY::offsetX() const {
55  return access()->implementation->offsetX();
56 }
57 
59 double CartesianGridXY::offsetY() const {
60  return access()->implementation->offsetY();
61 }
62 
64 void CartesianGridXY::setOffsetX(double offset) const {
65  access()->implementation->setOffsetX(offset);
66 }
67 
69 void CartesianGridXY::setOffsetY(double offset) const {
70  access()->implementation->setOffsetY(offset);
71 }
72 
74 const std::string& CartesianGridXY::fieldNameX() const {
75  return access()->implementation->fieldNameX();
76 }
77 
79 const std::string& CartesianGridXY::fieldNameY() const {
80  return access()->implementation->fieldNameY();
81 }
82 
83 // Returns a vector<double> of the cellDimensions of the given cell ID
84 std::vector<double> CartesianGridXY::cellDimensions(const CellID& id) const {
85  return access()->implementation->cellDimensions(id);
86 }
dd4hep::CartesianGridXY::setOffsetX
void setOffsetX(double offset) const
set the coordinate offset in X
Definition: CartesianGridXY.cpp:64
dd4hep::CartesianGridXY::setGridSizeX
void setGridSizeX(double cellSize) const
set the grid size in X
Definition: CartesianGridXY.cpp:44
dd4hep::CartesianGridXY::position
Position position(const CellID &cellID) const
determine the position based on the cell ID
Definition: CartesianGridXY.cpp:21
dd4hep::CartesianGridXY::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: CartesianGridXY.cpp:84
dd4hep::CartesianGridXY::fieldNameY
const std::string & fieldNameY() const
access the field name used for Y
Definition: CartesianGridXY.cpp:79
CartesianGridXY.h
dd4hep::CartesianGridXY::setGridSizeY
void setGridSizeY(double cellSize) const
set the grid size in Y
Definition: CartesianGridXY.cpp:49
dd4hep::CartesianGridXY::offsetY
double offsetY() const
access the coordinate offset in Y
Definition: CartesianGridXY.cpp:59
dd4hep::CartesianGridXY::cellID
CellID cellID(const Position &local, const Position &global, const VolumeID &volID) const
determine the cell ID based on the position
Definition: CartesianGridXY.cpp:26
dd4hep::CartesianGridXY::gridSizeX
double gridSizeX() const
access the grid size in X
Definition: CartesianGridXY.cpp:34
dd4hep::CartesianGridXY::fieldNameX
const std::string & fieldNameX() const
access the field name used for X
Definition: CartesianGridXY.cpp:74
CartesianGridXY.h
dd4hep::CartesianGridXY::gridSizeY
double gridSizeY() const
access the grid size in Y
Definition: CartesianGridXY.cpp:39
dd4hep::Position
ROOT::Math::XYZVector Position
Definition: Objects.h:81
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
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::CartesianGridXY::setOffsetY
void setOffsetY(double offset) const
set the coordinate offset in Y
Definition: CartesianGridXY.cpp:69
dd4hep::CartesianGridXY::offsetX
double offsetX() const
access the coordinate offset in X
Definition: CartesianGridXY.cpp:54
CellID
dd4hep::DDSegmentation::CellID CellID
Definition: SegmentationDictionary.h:50