CMS 3D CMS Logo

DDDivision.h
Go to the documentation of this file.
1 #ifndef DDDivision_h
2 #define DDDivision_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 namespace DDI {
72 class Division;
73 } // namespace DDI
74 
75 std::ostream & operator<<( std::ostream &, const DDDivision &);
76 
77 class DDDivision : public DDBase<DDName, DDI::Division*>
78 {
79  friend std::ostream & operator<<( std::ostream &, const DDDivision &);
80 
81  public:
82 
84  DDDivision();
85 
87  DDDivision(const DDName & name);
88 
90 
92  DDDivision(const DDName & name,
93  const DDLogicalPart & parent,
94  const DDAxes axis,
95  const int nReplicas,
96  const double width,
97  const double offset );
98 
99 
101 
103  DDDivision(const DDName & name,
104  const DDLogicalPart & parent,
105  const DDAxes axis,
106  const int nReplicas,
107  const double offset );
108 
110 
112  DDDivision(const DDName & name,
113  const DDLogicalPart & parent,
114  const DDAxes axis,
115  const double width,
116  const double offset );
117 
118  // virtual ~G4PVDivision();
119 
120  DDAxes axis() const;
121  int nReplicas() const;
122  double width() const;
123  double offset() const;
124  const DDLogicalPart & parent() const;
125 
126 
127 };
128 
129 // mike copied from DDLogicalPart
130 // some helpers .... (not very clean, redesign!! according to martin :-))
131 // left this analogy out for now (mec) : pair<bool,std::string> DDIsValid(const std::string & ns, const std::string & name, std::vector<DDDivision> & result,bool doRegex=true);
132 // std::maps name to std::vector of namespaces
134 //void DD_NDC(const DDName &);
135 #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:16
A DDSolid represents the shape of a part.
Definition: DDSolid.h:37
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:92
DDI::Singleton< std::map< std::string, std::vector< DDName > > > DIVNAMES
Definition: DDDivision.h:133
Definition: rep_type.h:4
DDAxes
analagous to geant4/source/global/HEPGeometry/include/geomdefs.hh
Definition: DDAxes.h:11