Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:16:56

0001 //==========================================================================
0002 //  AIDA Detector description implementation 
0003 //--------------------------------------------------------------------------
0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 // All rights reserved.
0006 //
0007 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 //
0010 // Author     : M.Frank
0011 //
0012 //==========================================================================
0013 
0014 // Framework include files
0015 #include <DD4hep/CartesianGridXYZ.h>
0016 #include <DDSegmentation/CartesianGridXYZ.h>
0017 
0018 using namespace dd4hep;
0019 
0020 /// determine the position based on the cell ID
0021 Position CartesianGridXYZ::position(const CellID& id) const   {
0022   return Position(access()->implementation->position(id));
0023 }
0024 
0025 /// determine the cell ID based on the position
0026 dd4hep::CellID CartesianGridXYZ::cellID(const Position& local,
0027                                         const Position& global,
0028                                         const VolumeID& volID) const
0029 {
0030   return access()->implementation->cellID(local, global, volID);
0031 }
0032 
0033 /// access the grid size in X
0034 double CartesianGridXYZ::gridSizeX() const {
0035   return access()->implementation->gridSizeX();
0036 }
0037 
0038 /// access the grid size in Y
0039 double CartesianGridXYZ::gridSizeY() const {
0040   return access()->implementation->gridSizeY();
0041 }
0042 
0043 /// access the grid size in Z
0044 double CartesianGridXYZ::gridSizeZ() const {
0045   return access()->implementation->gridSizeZ();
0046 }
0047 
0048 /// set the grid size in X
0049 void CartesianGridXYZ::setGridSizeX(double cellSize) const   {
0050   access()->implementation->setGridSizeX(cellSize);
0051 }
0052 
0053 /// set the grid size in Y
0054 void CartesianGridXYZ::setGridSizeY(double cellSize) const   {
0055   access()->implementation->setGridSizeY(cellSize);
0056 }
0057 
0058 /// set the grid size in Z
0059 void CartesianGridXYZ::setGridSizeZ(double cellSize) const   {
0060   access()->implementation->setGridSizeZ(cellSize);
0061 }
0062 
0063 /// access the coordinate offset in X
0064 double CartesianGridXYZ::offsetX() const {
0065   return access()->implementation->offsetX();
0066 }
0067 
0068 /// access the coordinate offset in Y
0069 double CartesianGridXYZ::offsetY() const {
0070   return access()->implementation->offsetY();
0071 }
0072 
0073 /// access the coordinate offset in Z
0074 double CartesianGridXYZ::offsetZ() const {
0075   return access()->implementation->offsetZ();
0076 }
0077 
0078 /// set the coordinate offset in X
0079 void CartesianGridXYZ::setOffsetX(double offset) const   {
0080   access()->implementation->setOffsetX(offset);
0081 }
0082 
0083 /// set the coordinate offset in Y
0084 void CartesianGridXYZ::setOffsetY(double offset) const   {
0085   access()->implementation->setOffsetY(offset);
0086 }
0087 
0088 /// set the coordinate offset in Z
0089 void CartesianGridXYZ::setOffsetZ(double offset) const   {
0090   access()->implementation->setOffsetZ(offset);
0091 }
0092 
0093 /// access the field name used for X
0094 const std::string& CartesianGridXYZ::fieldNameX() const {
0095   return access()->implementation->fieldNameX();
0096 }
0097 
0098 /// access the field name used for Y
0099 const std::string& CartesianGridXYZ::fieldNameY() const {
0100   return access()->implementation->fieldNameY();
0101 }
0102 
0103 /// access the field name used for Z
0104 const std::string& CartesianGridXYZ::fieldNameZ() const {
0105   return access()->implementation->fieldNameZ();
0106 }
0107 
0108 // Returns a vector<double> of the cellDimensions of the given cell ID
0109 std::vector<double> CartesianGridXYZ::cellDimensions(const CellID& id) const  {
0110   return access()->implementation->cellDimensions(id);
0111 }