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