Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-03-13 08:19:40

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/MultiSegmentation.h>
0016 #include <DDSegmentation/MultiSegmentation.h>
0017 
0018 using namespace dd4hep;
0019 
0020 /// access the field name used to discriminate sub-segmentations
0021 const std::string& MultiSegmentation::discriminatorName() const   {
0022   return access()->implementation->discriminatorName();
0023 }
0024 
0025 /// Discriminating bitfield entry
0026 const BitFieldElement* MultiSegmentation::discriminator() const  {
0027   return access()->implementation->discriminator();
0028 }
0029 
0030 /// The underlying sub-segementations
0031 const MultiSegmentation::Segmentations&
0032 MultiSegmentation::subSegmentations()  const   {
0033   return access()->implementation->subSegmentations();
0034 }
0035 
0036 /// determine the position based on the cell ID
0037 Position MultiSegmentation::position(const CellID& id) const   {
0038   return Position(access()->implementation->position(id));
0039 }
0040 
0041 /// determine the cell ID based on the position
0042 dd4hep::CellID MultiSegmentation::cellID(const Position& local,
0043                                          const Position& global,
0044                                          const VolumeID& volID) const
0045 {
0046   return access()->implementation->cellID(local, global, volID);
0047 }
0048 
0049 /** \brief Returns a vector<double> of the cellDimensions of the given cell ID
0050     in natural order of dimensions, e.g., dx/dy/dz, or dr/r*dPhi
0051 
0052     Returns a vector of the cellDimensions of the given cell ID
0053     \param cellID is ignored as all cells have the same dimension
0054     \return vector<double> size 2:
0055     -# size in x
0056     -# size in y
0057 */
0058 std::vector<double> MultiSegmentation::cellDimensions(const CellID& id) const  {
0059   return access()->implementation->cellDimensions(id);
0060 }