Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:13:52

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/CartesianGridUV.h>
0016 #include <DDSegmentation/CartesianGridUV.h>
0017 
0018 using namespace dd4hep;
0019 
0020 /// determine the position based on the cell ID
0021 Position CartesianGridUV::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 CartesianGridUV::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 U
0034 double CartesianGridUV::gridSizeU() const {
0035   return access()->implementation->gridSizeU();
0036 }
0037 
0038 /// access the grid size in V
0039 double CartesianGridUV::gridSizeV() const {
0040   return access()->implementation->gridSizeV();
0041 }
0042 
0043 /// set the grid size in U
0044 void CartesianGridUV::setGridSizeU(double cellSize) const   {
0045   access()->implementation->setGridSizeU(cellSize);
0046 }
0047 
0048 /// set the grid size in V
0049 void CartesianGridUV::setGridSizeV(double cellSize) const   {
0050   access()->implementation->setGridSizeV(cellSize);
0051 }
0052 
0053 /// access the coordinate offset in U
0054 double CartesianGridUV::offsetU() const {
0055   return access()->implementation->offsetU();
0056 }
0057 
0058 /// access the coordinate offset in V
0059 double CartesianGridUV::offsetV() const {
0060   return access()->implementation->offsetV();
0061 }
0062 
0063 /// access the rotation angle
0064 double CartesianGridUV::gridAngle() const {
0065   return access()->implementation->gridAngle();
0066 }
0067 
0068 /// set the coordinate offset in U
0069 void CartesianGridUV::setOffsetU(double offset) const   {
0070   access()->implementation->setOffsetU(offset);
0071 }
0072 
0073 /// set the coordinate offset in V
0074 void CartesianGridUV::setOffsetV(double offset) const   {
0075   access()->implementation->setOffsetV(offset);
0076 }
0077 
0078 /// access the field name used for U
0079 const std::string& CartesianGridUV::fieldNameU() const {
0080   return access()->implementation->fieldNameU();
0081 }
0082 
0083 /// access the field name used for V
0084 const std::string& CartesianGridUV::fieldNameV() const {
0085   return access()->implementation->fieldNameV();
0086 }
0087 
0088 // Returns a vector<double> of the cellDimensions of the given cell ID
0089 std::vector<double> CartesianGridUV::cellDimensions(const CellID& id) const  {
0090   return access()->implementation->cellDimensions(id);
0091 }