File indexing completed on 2024-04-06 12:05:26
0001 #include "DetectorDescription/Core/interface/TruncTubs.h"
0002
0003 #include <vector>
0004
0005 #include "DetectorDescription/Core/interface/DDSolidShapes.h"
0006 #include "DataFormats/Math/interface/GeantUnits.h"
0007 #include "DetectorDescription/Core/interface/Solid.h"
0008
0009 using namespace geant_units::operators;
0010
0011 DDI::TruncTubs::TruncTubs(double zHalf,
0012 double rIn,
0013 double rOut,
0014 double startPhi,
0015 double deltaPhi,
0016 double cutAtStart,
0017 double cutAtDelta,
0018 bool cutInside)
0019 : Solid(DDSolidShape::ddtrunctubs) {
0020 p_.emplace_back(zHalf);
0021 p_.emplace_back(rIn);
0022 p_.emplace_back(rOut);
0023 p_.emplace_back(startPhi);
0024 p_.emplace_back(deltaPhi);
0025 p_.emplace_back(cutAtStart);
0026 p_.emplace_back(cutAtDelta);
0027 p_.emplace_back(cutInside);
0028 }
0029
0030 void DDI::TruncTubs::stream(std::ostream& os) const {
0031 os << " zHalf=" << convertMmToCm(p_[0]) << "cm rIn=" << convertMmToCm(p_[1]) << "cm rOut=" << convertMmToCm(p_[2])
0032 << "cm startPhi=" << convertRadToDeg(p_[3]) << "deg deltaPhi=" << convertRadToDeg(p_[4])
0033 << "deg cutAtStart=" << convertMmToCm(p_[5]) << "cm cutAtDelta=" << convertMmToCm(p_[6])
0034 << "cm cutInside=" << p_[7];
0035 }