CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/DetectorDescription/Core/src/Division.cc

Go to the documentation of this file.
00001 #include "DetectorDescription/Core/src/Division.h"
00002 
00003 #include "DetectorDescription/Core/interface/DDSolid.h"
00004 
00005 #include <algorithm>
00006 
00007 using DDI::Division;
00008 
00009 Division::Division(const DDLogicalPart & parent,
00010                    const DDAxes axis,
00011                    int nReplicas,
00012                    double width, 
00013                    double offset )
00014   : parent_(parent), axis_(axis), nReplicas_(nReplicas), width_(width), offset_(offset)
00015 { }
00016 
00017 Division::Division(const DDLogicalPart & parent,
00018                    const DDAxes axis,
00019                    int nReplicas,
00020                    double offset )
00021   : parent_(parent), axis_(axis), nReplicas_(nReplicas), width_(0.0), offset_(offset)
00022 { }
00023 
00024 Division::Division(const DDLogicalPart & parent,
00025                    const DDAxes axis,
00026                    double width, 
00027                    double offset )
00028   : parent_(parent), axis_(axis), nReplicas_(0), width_(width), offset_(offset)
00029 { }
00030 
00031 const DDAxes Division::axis() const { return axis_; }
00032 const int Division::nReplicas() const { return nReplicas_; }
00033 const double Division::width() const { return width_; }
00034 const double Division::offset() const { return offset_; }
00035 const DDLogicalPart & Division::parent() const { return parent_; }
00036 
00037 void Division::stream(std::ostream & os) 
00038 {
00039   os << std::endl;
00040   os << "  LogicalPart: " << parent_ << std::endl;
00041   os << "  Solid: " << parent_.solid() << std::endl;
00042   os << " axis: " << axis() << " nReplicas: " << nReplicas()
00043      << " width: " << width() << " offset: " << offset() << std::endl; 
00044 }
00045 
00046