Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:25

0001 #include "DetectorDescription/Core/interface/CutTubs.h"
0002 #include "DataFormats/Math/interface/GeantUnits.h"
0003 
0004 #include <cmath>
0005 #include <vector>
0006 
0007 #include "DetectorDescription/Core/interface/DDSolidShapes.h"
0008 #include "DetectorDescription/Core/interface/Solid.h"
0009 
0010 using namespace geant_units;
0011 using namespace geant_units::operators;
0012 
0013 DDI::CutTubs::CutTubs(double zhalf,
0014                       double rIn,
0015                       double rOut,
0016                       double startPhi,
0017                       double deltaPhi,
0018                       double lx,
0019                       double ly,
0020                       double lz,
0021                       double tx,
0022                       double ty,
0023                       double tz)
0024     : Solid(DDSolidShape::ddcuttubs) {
0025   p_.emplace_back(zhalf);
0026   p_.emplace_back(rIn);
0027   p_.emplace_back(rOut);
0028   p_.emplace_back(startPhi);
0029   p_.emplace_back(deltaPhi);
0030   p_.emplace_back(lx);
0031   p_.emplace_back(ly);
0032   p_.emplace_back(lz);
0033   p_.emplace_back(tx);
0034   p_.emplace_back(ty);
0035   p_.emplace_back(tz);
0036 }
0037 
0038 void DDI::CutTubs::stream(std::ostream& os) const {
0039   os << " zhalf=" << convertMmToCm(p_[0]) << " rIn=" << convertMmToCm(p_[1]) << " rOut=" << convertMmToCm(p_[2])
0040      << " startPhi=" << convertRadToDeg(p_[3]) << " deltaPhi=" << convertRadToDeg(p_[4]) << " Outside Normal at -z ("
0041      << p_[5] << "," << p_[6] << "," << p_[7] << ")"
0042      << " Outside Normal at +z (" << p_[8] << "," << p_[9] << "," << p_[10] << ")";
0043 }