File indexing completed on 2024-04-06 12:05:26
0001 #include "DetectorDescription/Core/src/Division.h"
0002
0003 #include <string>
0004
0005 #include "DetectorDescription/Core/interface/DDSolid.h"
0006
0007 using DDI::Division;
0008
0009 Division::Division(const DDLogicalPart& parent, const DDAxes axis, int nReplicas, double width, double offset)
0010 : parent_(parent), axis_(axis), nReplicas_(nReplicas), width_(width), offset_(offset) {}
0011
0012 Division::Division(const DDLogicalPart& parent, const DDAxes axis, int nReplicas, double offset)
0013 : parent_(parent), axis_(axis), nReplicas_(nReplicas), width_(0.0), offset_(offset) {}
0014
0015 Division::Division(const DDLogicalPart& parent, const DDAxes axis, double width, double offset)
0016 : parent_(parent), axis_(axis), nReplicas_(0), width_(width), offset_(offset) {}
0017
0018 DDAxes Division::axis() const { return axis_; }
0019 int Division::nReplicas() const { return nReplicas_; }
0020 double Division::width() const { return width_; }
0021 double Division::offset() const { return offset_; }
0022 const DDLogicalPart& Division::parent() const { return parent_; }
0023
0024 void Division::stream(std::ostream& os) {
0025 os << std::endl;
0026 os << " LogicalPart: " << parent_ << std::endl;
0027 os << " Solid: " << parent_.solid() << std::endl;
0028 os << " axis: " << DDAxesNames::name(axis()) << " nReplicas: " << nReplicas() << " width: " << width()
0029 << " offset: " << offset() << std::endl;
0030 }