CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Division.cc
Go to the documentation of this file.
2 
3 #include <string>
4 
6 
7 using DDI::Division;
8 
9 Division::Division(const DDLogicalPart& parent, const DDAxes axis, int nReplicas, double width, double offset)
10  : parent_(parent), axis_(axis), nReplicas_(nReplicas), width_(width), offset_(offset) {}
11 
12 Division::Division(const DDLogicalPart& parent, const DDAxes axis, int nReplicas, double offset)
13  : parent_(parent), axis_(axis), nReplicas_(nReplicas), width_(0.0), offset_(offset) {}
14 
15 Division::Division(const DDLogicalPart& parent, const DDAxes axis, double width, double offset)
16  : parent_(parent), axis_(axis), nReplicas_(0), width_(width), offset_(offset) {}
17 
18 DDAxes Division::axis() const { return axis_; }
19 int Division::nReplicas() const { return nReplicas_; }
20 double Division::width() const { return width_; }
21 double Division::offset() const { return offset_; }
22 const DDLogicalPart& Division::parent() const { return parent_; }
23 
24 void Division::stream(std::ostream& os) {
25  os << std::endl;
26  os << " LogicalPart: " << parent_ << std::endl;
27  os << " Solid: " << parent_.solid() << std::endl;
28  os << " axis: " << DDAxesNames::name(axis()) << " nReplicas: " << nReplicas() << " width: " << width()
29  << " offset: " << offset() << std::endl;
30 }
double offset_
Definition: Division.h:35
double offset() const
Definition: Division.cc:21
const DDLogicalPart & parent() const
Definition: Division.cc:22
void stream(std::ostream &)
Definition: Division.cc:24
int nReplicas() const
Definition: Division.cc:19
int nReplicas_
Definition: Division.h:33
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
DDAxes axis() const
Definition: Division.cc:18
double width() const
Definition: Division.cc:20
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
Division(const DDLogicalPart &parent, DDAxes axis, int nReplicas, double width, double offset)
Definition: Division.cc:9
static const std::string name(const DDAxes &s)
DDLogicalPart parent_
Definition: Division.h:31
DDAxes axis_
Definition: Division.h:32
double width_
Definition: Division.h:34
DDAxes
analagous to geant4/source/global/HEPGeometry/include/geomdefs.hh
Definition: DDAxes.h:11