Back to home page

EIC code displayed by LXR

 
 

    


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

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/PolarGridRPhi2.h>
0016 #include <DDSegmentation/PolarGridRPhi2.h>
0017 
0018 // C/C++ include files
0019 
0020 using namespace dd4hep;
0021 
0022 /// determine the position based on the cell ID
0023 Position PolarGridRPhi2::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 PolarGridRPhi2::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 std::vector<double> PolarGridRPhi2::gridRValues() const  {
0037   return access()->implementation->gridRValues();
0038 }
0039 
0040 /// access the grid size in Phi
0041 std::vector<double> PolarGridRPhi2::gridPhiValues() const  {
0042   return access()->implementation->gridPhiValues();
0043 }
0044 /// set the grid Boundaries in R
0045 void PolarGridRPhi2::setGridSizeR(double cellSize, int rID) const  {
0046   access()->implementation->setGridRValues(cellSize,rID);
0047 }
0048 
0049 /// set the grid size in Phi
0050 void PolarGridRPhi2::setGridSizePhi(double cellSize, int phiID) const  {
0051   access()->implementation->setGridSizePhi(cellSize,phiID);
0052 }
0053 
0054 /// set the grid boundaries for R
0055 void PolarGridRPhi2::setGridRValues(std::vector<double> const& rValues) const  {
0056   access()->implementation->setGridRValues(rValues);
0057 }
0058 
0059 /// set the grid size in Phi for each bin in R
0060 void PolarGridRPhi2::setGridPhiValues(std::vector<double> const& phiValues) const  {
0061   access()->implementation->setGridPhiValues(phiValues);
0062 }
0063 
0064 /// access the coordinate offset in R
0065 double PolarGridRPhi2::offsetR() const  {
0066   return access()->implementation->offsetR();
0067 }
0068 
0069 /// access the coordinate offset in Phi
0070 double PolarGridRPhi2::offsetPhi() const  {
0071   return access()->implementation->offsetPhi();
0072 }
0073 
0074 /// set the coordinate offset in R
0075 void PolarGridRPhi2::setOffsetR(double offset) const  {
0076   access()->implementation->setOffsetR(offset);
0077 }
0078 
0079 /// set the coordinate offset in Phi
0080 void PolarGridRPhi2::setOffsetPhi(double offset) const  {
0081   access()->implementation->setOffsetPhi(offset);
0082 }
0083 
0084 /// access the field name used for R
0085 const std::string& PolarGridRPhi2::fieldNameR() const  {
0086   return access()->implementation->fieldNameR();
0087 }
0088 
0089 /// access the field name used for Phi
0090 const std::string& PolarGridRPhi2::fieldNamePhi() const  {
0091   return access()->implementation->fieldNamePhi();
0092 }
0093 
0094 /** \brief Returns a vector<double> of the cellDimensions of the given cell ID
0095     in natural order of dimensions, e.g., dx/dy/dz, or dr/r*dPhi
0096 
0097     Returns a vector of the cellDimensions of the given cell ID
0098     \param cellID is ignored as all cells have the same dimension
0099     \return vector<double> size 2:
0100     -# size in x
0101     -# size in z
0102 */
0103 std::vector<double> PolarGridRPhi2::cellDimensions(const CellID& id) const  {
0104   return access()->implementation->cellDimensions(id);
0105 }