CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
61 
62 namespace DDI { class Division; }
63 
64 class DDMaterial;
65 class DDSolid;
66 class DDDivision;
67 class DDPartSelection;
68 
69 std::ostream & operator<<( std::ostream &, const DDDivision &);
70 
71 class DDDivision : public DDBase<DDName, DDI::Division*>
72 {
73  friend std::ostream & operator<<( std::ostream &, const DDDivision &);
74 
75  public:
76 
78  DDDivision();
79 
81  DDDivision(const DDName & name);
82 
84 
86  DDDivision(const DDName & name,
87  const DDLogicalPart & parent,
88  const DDAxes axis,
89  const int nReplicas,
90  const double width,
91  const double offset );
92 
93 
95 
97  DDDivision(const DDName & name,
98  const DDLogicalPart & parent,
99  const DDAxes axis,
100  const int nReplicas,
101  const double offset );
102 
104 
106  DDDivision(const DDName & name,
107  const DDLogicalPart & parent,
108  const DDAxes axis,
109  const double width,
110  const double offset );
111 
112  // virtual ~G4PVDivision();
113 
114  DDAxes axis() const;
115  int nReplicas() const;
116  double width() const;
117  double offset() const;
118  const DDLogicalPart & parent() const;
119 
120 
121 };
122 
123 // mike copied from DDLogicalPart
124 // some helpers .... (not very clean, redesign!! according to martin :-))
125 // 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);
126 // std::maps name to std::vector of namespaces
128 //void DD_NDC(const DDName &);
129 #endif
Definition: DDBase.h:14
const DDName & name() const
Definition: DDBase.h:82
int nReplicas() const
Definition: DDDivision.cc:90
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:41
double offset() const
Definition: DDDivision.cc:100
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:18
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
A DDSolid represents the shape of a part.
Definition: DDSolid.h:35
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:88
DDDivision()
The default constructor provides an uninitialzed reference object.
Definition: DDDivision.cc:42
DDI::Singleton< std::map< std::string, std::vector< DDName > > > DIVNAMES
Definition: DDDivision.h:127
friend std::ostream & operator<<(std::ostream &, const DDDivision &)
Definition: DDDivision.cc:24
DDAxes axis() const
Definition: DDDivision.cc:85
double width() const
Definition: DDDivision.cc:95
DDAxes
analagous to geant4/source/global/HEPGeometry/include/geomdefs.hh
Definition: DDAxes.h:10
const DDLogicalPart & parent() const
Definition: DDDivision.cc:105