Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:17:02

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/PolarGridRPhi.h>
0016 #include <DDSegmentation/PolarGridRPhi.h>
0017 
0018 // C/C++ include files
0019 
0020 using namespace dd4hep;
0021 
0022 /// determine the position based on the cell ID
0023 Position PolarGridRPhi::position(const CellID& id) const   {
0024   return Position(access()->implementation->position(id));
0025 }
0026 
0027 /// determine the cell ID based on the position
0028 dd4hep::CellID PolarGridRPhi::cellID(const Position& local,
0029                                      const Position& global,
0030                                      const VolumeID& volID) const
0031 {
0032   return access()->implementation->cellID(local, global, volID);
0033 }
0034 
0035 /// access the grid size in R
0036 double PolarGridRPhi::gridSizeR() const  {
0037   return access()->implementation->gridSizeR();
0038 }
0039 
0040 /// access the grid size in Phi
0041 double PolarGridRPhi::gridSizePhi() const  {
0042   return access()->implementation->gridSizePhi();
0043 }
0044 
0045 /// access the coordinate offset in R
0046 double PolarGridRPhi::offsetR() const  {
0047   return access()->implementation->offsetR();
0048 }
0049 
0050 /// access the coordinate offset in Phi
0051 double PolarGridRPhi::offsetPhi() const  {
0052   return access()->implementation->offsetPhi();
0053 }
0054 
0055 /// set the coordinate offset in R
0056 void PolarGridRPhi::setOffsetR(double offset) const  {
0057   access()->implementation->setOffsetR(offset);
0058 }
0059 
0060 /// set the coordinate offset in Phi
0061 void PolarGridRPhi::setOffsetPhi(double offset) const  {
0062   access()->implementation->setOffsetPhi(offset);
0063 }
0064 
0065 /// set the grid size in R
0066 void PolarGridRPhi::setGridSizeR(double cellSize) const  {
0067   access()->implementation->setGridSizeR(cellSize);
0068 }
0069 
0070 /// set the grid size in Phi
0071 void PolarGridRPhi::setGridSizePhi(double cellSize) const  {
0072   access()->implementation->setGridSizePhi(cellSize);
0073 }
0074 
0075 /// access the field name used for R
0076 const std::string& PolarGridRPhi::fieldNameR() const  {
0077   return access()->implementation->fieldNameR();
0078 }
0079 
0080 /// access the field name used for Phi
0081 const std::string& PolarGridRPhi::fieldNamePhi() const  {
0082   return access()->implementation->fieldNamePhi();
0083 }
0084 
0085 /** \brief Returns a vector<double> of the cellDimensions of the given cell ID
0086     in natural order of dimensions, e.g., dx/dy/dz, or dr/r*dPhi
0087 
0088     Returns a vector of the cellDimensions of the given cell ID
0089     \param cellID is ignored as all cells have the same dimension
0090     \return vector<double> size 2:
0091     -# size in x
0092     -# size in z
0093 */
0094 std::vector<double> PolarGridRPhi::cellDimensions(const CellID& id) const  {
0095   return access()->implementation->cellDimensions(id);
0096 }