CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DD4hep_volumeHandle.h
Go to the documentation of this file.
1 #ifndef MagneticField_GeomBuilder_DD4hep_volumeHandle_h
2 #define MagneticField_GeomBuilder_DD4hep_volumeHandle_h
3 
13 #include "BaseVolumeHandle.h"
14 
18 
19 namespace magneticfield {
20 
21  typedef const char* ShapeType;
22 
23  class volumeHandle : public BaseVolumeHandle {
24  public:
25  volumeHandle(const cms::DDFilteredView& fv, bool expand2Pi = false, bool debugVal = false);
26 
27  // Disallow Default/copy ctor & assignment op.
28  // (we want to handle only pointers!!!)
29  volumeHandle(const volumeHandle& v) = delete;
30  volumeHandle operator=(const volumeHandle& v) = delete;
31 
32  // Shape at initialization
33  DDSolidShape shape() const override { return (theShape); }
34 
36  std::vector<VolumeSide> sides() const override;
37 
38  private:
39  // initialise the refPlane
40  void referencePlane(const cms::DDFilteredView& fv);
41 
42  // Build the surfaces for a box
43  void buildBox(double halfX, double halfY, double halfZ);
44  // Build the surfaces for a trapezoid
45  void buildTrap(double x1,
46  double x2,
47  double x3,
48  double x4,
49  double y1,
50  double y2,
51  double theta,
52  double phi,
53  double halfZ,
54  double alpha1,
55  double alpha2);
56  // Build the surfaces for a ddtubs shape
57  void buildTubs(double zhalf, double rIn, double rOut, double startPhi, double deltaPhi);
58  // Build the surfaces for a ddcons shape
59  void buildCons(double zhalf,
60  double rInMinusZ,
61  double rOutMinusZ,
62  double rInPlusZ,
63  double rOutPlusZ,
64  double startPhi,
65  double deltaPhi);
66  // Build the surfaces for a ddpseudotrap. This is not a supported
67  // shape in DD4hep; it is handled here to cope with legacy geometries.
68  void buildPseudoTrap(double x1, double x2, double y1, double y2, double halfZ, double radius, bool atMinusZ);
69  // Build the surfaces for a ddtrunctubs shape
70  void buildTruncTubs(double zhalf,
71  double rIn,
72  double rOut,
73  double startPhi,
74  double deltaPhi,
75  double cutAtStart,
76  double cutAtDelta,
77  bool cutInside);
78 
79  // Shape at initialization
82  // "solid" name is for backwards compatibility. Can be changed to "fview" after DD4hep migration.
83  };
84 } // namespace magneticfield
85 
86 #endif
void buildBox(double halfX, double halfY, double halfZ)
const char * ShapeType
Geom::Theta< T > theta() const
volumeHandle operator=(const volumeHandle &v)=delete
void referencePlane(const cms::DDFilteredView &fv)
void buildTrap(double x1, double x2, double x3, double x4, double y1, double y2, double theta, double phi, double halfZ, double alpha1, double alpha2)
void buildTruncTubs(double zhalf, double rIn, double rOut, double startPhi, double deltaPhi, double cutAtStart, double cutAtDelta, bool cutInside)
void buildPseudoTrap(double x1, double x2, double y1, double y2, double halfZ, double radius, bool atMinusZ)
DDSolidShape
Definition: DDSolidShapes.h:6
void buildCons(double zhalf, double rInMinusZ, double rOutMinusZ, double rInPlusZ, double rOutPlusZ, double startPhi, double deltaPhi)
DDSolidShape shape() const override
Shape of the solid.
std::vector< VolumeSide > sides() const override
The surfaces and they orientation, as required to build a MagVolume.
const cms::DDFilteredView & solid
volumeHandle(const cms::DDFilteredView &fv, bool expand2Pi=false, bool debugVal=false)
void buildTubs(double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)