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 
45 
55 #include <iosfwd>
56 #include <map>
57 #include <memory>
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, std::unique_ptr<DDI::Division> > {
79 public:
81  DDDivision();
82 
84  DDDivision(const DDName &name);
85 
87 
89  DDDivision(const DDName &name, const DDLogicalPart &parent, DDAxes axis, int nReplicas, double width, double offset);
90 
92 
94  DDDivision(const DDName &name, const DDLogicalPart &parent, DDAxes axis, int nReplicas, double offset);
95 
97 
99  DDDivision(const DDName &name, const DDLogicalPart &parent, DDAxes axis, double width, double offset);
100 
101  DDAxes axis() const;
102  int nReplicas() const;
103  double width() const;
104  double offset() const;
105  const DDLogicalPart &parent() const;
106 };
107 
108 #endif
Definition: DDBase.h:10
std::ostream & operator<<(std::ostream &, const DDDivision &)
Definition: DDDivision.cc:10
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:45
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