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 <string>
59 #include <vector>
60 
66 
67 class DDDivision;
68 class DDMaterial;
69 class DDPartSelection;
70 class DDSolid;
71 
72 namespace DDI {
73  class Division;
74 }
75 
76 std::ostream & operator<<( std::ostream &, const DDDivision &);
77 
78 class DDDivision : public DDBase<DDName, DDI::Division*>
79 {
80  public:
81 
83  DDDivision();
84 
86  DDDivision(const DDName & name);
87 
89 
91  DDDivision(const DDName & name,
92  const DDLogicalPart & parent,
93  DDAxes axis,
94  int nReplicas,
95  double width,
96  double offset );
97 
99 
101  DDDivision(const DDName & name,
102  const DDLogicalPart & parent,
103  DDAxes axis,
104  int nReplicas,
105  double offset );
106 
108 
110  DDDivision(const DDName & name,
111  const DDLogicalPart & parent,
112  DDAxes axis,
113  double width,
114  double offset );
115 
116  DDAxes axis() const;
117  int nReplicas() const;
118  double width() const;
119  double offset() const;
120  const DDLogicalPart & parent() const;
121 
122 };
123 
124 #endif
Definition: DDBase.h:10
std::ostream & operator<<(std::ostream &, const DDDivision &)
Definition: DDDivision.cc:12
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:41
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
A DDSolid represents the shape of a part.
Definition: DDSolid.h:38
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:92
DDAxes
analagous to geant4/source/global/HEPGeometry/include/geomdefs.hh
Definition: DDAxes.h:11