Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 09:58: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   Markus Frank
0011 //  \date     2016-10-18
0012 //  \version  1.0
0013 //
0014 //==========================================================================
0015 #ifndef DD4HEP_NOSEGMENTATION_H
0016 #define DD4HEP_NOSEGMENTATION_H 1
0017 
0018 // Framework include files
0019 #include <DD4hep/Segmentations.h>
0020 
0021 /// Namespace for the AIDA detector description toolkit
0022 namespace dd4hep {
0023 
0024   /// Namespace for base segmentations
0025   namespace DDSegmentation  {    class NoSegmentation;  }
0026   
0027   /// We need some abbreviation to make the code more readable.
0028   typedef Handle<SegmentationWrapper<DDSegmentation::NoSegmentation> > NoSegmentationHandle;
0029 
0030   /// Implementation class for the grid XY segmentation.
0031   /**
0032    *
0033    *  \author  M.Frank
0034    *  \version 1.0
0035    *  \ingroup DD4HEP_CORE
0036    */
0037   class NoSegmentation : public NoSegmentationHandle  {
0038   public:
0039     NoSegmentation() = default;
0040     NoSegmentation(const NoSegmentation& e) = default;
0041     NoSegmentation(const Segmentation& e) : Handle<Object>(e) { }
0042     NoSegmentation(const Handle<Object>& e) : Handle<Object>(e) { }
0043     template <typename Q>
0044     NoSegmentation(const Handle<Q>& e) : Handle<Object>(e) { }
0045     NoSegmentation& operator=(const NoSegmentation& seg) = default;
0046     bool operator==(const NoSegmentation& seg) const {
0047       return m_element == seg.m_element;
0048     }
0049 
0050     Position position(const CellID& cellID) const;
0051     CellID cellID(const Position& local, const Position& global, const VolumeID& volID) const;
0052   };
0053 }       /* End namespace dd4hep                */
0054 #endif // DD4HEP_NOSEGMENTATION_H