CMS 3D CMS Logo

DDDivision.h
Go to the documentation of this file.
1 #ifndef DETECTOR_DESCRIPTION_CORE_DD_DIVISION_H
2 #define DETECTOR_DESCRIPTION_CORE_DD_DIVISION_H
3 
4 // The following is based on G4PVDivision of Gean4 as of 4/2004
5 //
6 // The elements' positions are calculated by means of a simple
7 // linear formula.
8 //
9 // G4PVDivision(const G4String& pName,
10 // G4LogicalVolume* pLogical,
11 // G4LogicalVolume* pMother,
12 // const EAxis pAxis,
13 // const G4int nReplicas,
14 // const G4double width,
15 // const G4double offset=0)
16 //
17 // Division may occur along:
18 //
19 // o Cartesian axes (kXAxis,kYAxis,kZAxis)
20 //
21 // The divisions, of specified width have coordinates of
22 // form (-width*(nReplicas-1)*0.5+n*width,0,0) where n=0.. nReplicas-1
23 // for the case of kXAxis, and are unrotated.
24 //
25 // o Radial axis (cylindrical polar) (kRho)
26 //
27 // The divisions are cons/tubs sections, centred on the origin
28 // and are unrotated.
29 // They have radii of width*n+offset to width*(n+1)+offset
30 // where n=0..nReplicas-1
31 //
32 // o Phi axis (cylindrical polar) (kPhi)
33 // The divisions are `phi sections' or wedges, and of cons/tubs form
34 // They have phi of offset+n*width to offset+(n+1)*width where
35 // n=0..nReplicas-1
36 
37 // GEANT4 History:
38 // 09.05.01 - P.Arce Initial version
39 //
40 // DDD History:
41 // 13.04.04 - M. Case Initial DDD version.
42 // ********************************************************************
43 
44 
46 
56 #include <iosfwd>
57 #include <map>
58 #include <memory>
59 #include <string>
60 #include <vector>
61 
67 
68 class DDDivision;
69 class DDMaterial;
70 class DDPartSelection;
71 class DDSolid;
72 
73 namespace DDI {
74  class Division;
75 }
76 
77 std::ostream & operator<<( std::ostream &, const DDDivision &);
78 
79 class DDDivision : public DDBase<DDName, std::unique_ptr<DDI::Division> >
80 {
81  public:
82 
84  DDDivision();
85 
87  DDDivision(const DDName & name);
88 
90 
92  DDDivision(const DDName & name,
93  const DDLogicalPart & parent,
94  DDAxes axis,
95  int nReplicas,
96  double width,
97  double offset );
98 
100 
102  DDDivision(const DDName & name,
103  const DDLogicalPart & parent,
104  DDAxes axis,
105  int nReplicas,
106  double offset );
107 
109 
111  DDDivision(const DDName & name,
112  const DDLogicalPart & parent,
113  DDAxes axis,
114  double width,
115  double offset );
116 
117  DDAxes axis() const;
118  int nReplicas() const;
119  double width() const;
120  double offset() const;
121  const DDLogicalPart & parent() const;
122 
123 };
124 
125 #endif
Definition: DDBase.h:10
std::ostream & operator<<(std::ostream &, const DDDivision &)
Definition: DDDivision.cc:11
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:43
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
DDAxes
analagous to geant4/source/global/HEPGeometry/include/geomdefs.hh
Definition: DDAxes.h:11