CMS 3D CMS Logo

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
DDSolidShape
DDSolidShape
Definition: DDSolidShapes.h:6
magneticfield::volumeHandle::theShape
const DDSolidShape theShape
Definition: DD4hep_volumeHandle.h:80
testProducerWithPsetDescEmpty_cfi.x2
x2
Definition: testProducerWithPsetDescEmpty_cfi.py:28
magneticfield::volumeHandle::shape
DDSolidShape shape() const override
Shape of the solid.
Definition: DD4hep_volumeHandle.h:33
magneticfield::volumeHandle
Definition: DD4hep_volumeHandle.h:23
magneticfield
Definition: MagFieldConfig.h:22
magneticfield::volumeHandle::buildTrap
void buildTrap(double x1, double x2, double x3, double x4, double y1, double y2, double theta, double phi, double halfZ, double alpha1, double alpha2)
cms::DDFilteredView
Definition: DDFilteredView.h:70
findQualityFiles.v
v
Definition: findQualityFiles.py:179
magneticfield::volumeHandle::buildCons
void buildCons(double zhalf, double rInMinusZ, double rOutMinusZ, double rInPlusZ, double rOutPlusZ, double startPhi, double deltaPhi)
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
VolumeSide.h
testProducerWithPsetDescEmpty_cfi.y1
y1
Definition: testProducerWithPsetDescEmpty_cfi.py:29
Surface.h
SiPixelRawToDigiRegional_cfi.deltaPhi
deltaPhi
Definition: SiPixelRawToDigiRegional_cfi.py:9
magneticfield::volumeHandle::buildTubs
void buildTubs(double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
DDFilteredView.h
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
magneticfield::volumeHandle::operator=
volumeHandle operator=(const volumeHandle &v)=delete
testProducerWithPsetDescEmpty_cfi.y2
y2
Definition: testProducerWithPsetDescEmpty_cfi.py:30
magneticfield::volumeHandle::volumeHandle
volumeHandle(const cms::DDFilteredView &fv, bool expand2Pi=false, bool debugVal=false)
Definition: DD4hep_volumeHandle.cc:33
magneticfield::volumeHandle::buildBox
void buildBox(double halfX, double halfY, double halfZ)
magneticfield::volumeHandle::referencePlane
void referencePlane(const cms::DDFilteredView &fv)
Definition: DD4hep_volumeHandle.cc:164
magneticfield::BaseVolumeHandle
Definition: BaseVolumeHandle.h:22
magneticfield::volumeHandle::buildTruncTubs
void buildTruncTubs(double zhalf, double rIn, double rOut, double startPhi, double deltaPhi, double cutAtStart, double cutAtDelta, bool cutInside)
BaseVolumeHandle.h
CosmicsPD_Skims.radius
radius
Definition: CosmicsPD_Skims.py:135
magneticfield::volumeHandle::solid
const cms::DDFilteredView & solid
Definition: DD4hep_volumeHandle.h:81
magneticfield::ShapeType
const typedef char * ShapeType
Definition: DD4hep_volumeHandle.h:21
magneticfield::volumeHandle::buildPseudoTrap
void buildPseudoTrap(double x1, double x2, double y1, double y2, double halfZ, double radius, bool atMinusZ)
magneticfield::volumeHandle::sides
std::vector< VolumeSide > sides() const override
The surfaces and they orientation, as required to build a MagVolume.
Definition: DD4hep_volumeHandle.cc:240