Definition at line 102 of file DDCutTubsFromPoints.cc.
118 std::vector<DDSolid> segments;
123 if (s1.phi !=
s2.phi) {
128 double phi1 = s1.phi;
129 double phi2 =
s2.phi;
137 double P1_z_l = s1.z_l;
138 double P1_z_t = s1.z_t;
139 double P2_z_l =
s2.z_l;
140 double P2_z_t =
s2.z_t;
142 double P1_x_t =
cos(phi1) *
r;
143 double P1_x_l =
cos(phi1) *
r;
144 double P1_y_t =
sin(phi1) *
r;
145 double P1_y_l =
sin(phi1) *
r;
147 double P2_x_t =
cos(phi2) *
r;
148 double P2_x_l =
cos(phi2) *
r;
149 double P2_y_t =
sin(phi2) *
r;
150 double P2_y_l =
sin(phi2) *
r;
154 double P3_z_l = (P1_z_l + P2_z_l) / 2;
155 double P3_z_t = (P1_z_t + P2_z_t) / 2;
160 double dz = (P3_z_t - P3_z_l) / 2;
161 double offset = (P3_z_t + P3_z_l) / 2;
165 double D1_z_l = P1_z_l - P3_z_l;
166 double D2_z_l = P2_z_l - P3_z_l;
169 double n_x_l = (P1_y_l * D2_z_l) - (D1_z_l * P2_y_l);
170 double n_y_l = (D1_z_l * P2_x_l) - (P1_x_l * D2_z_l);
171 double n_z_l = (P1_x_l * P2_y_l) - (P1_y_l * P2_x_l);
181 double D1_z_t = P1_z_t - P3_z_t;
182 double D2_z_t = P2_z_t - P3_z_t;
184 double n_x_t = (P1_y_t * D2_z_t) - (D1_z_t * P2_y_t);
185 double n_y_t = (D1_z_t * P2_x_t) - (P1_x_t * D2_z_t);
186 double n_z_t = (P1_x_t * P2_y_t) - (P1_y_t * P2_x_t);
194 double dphi = phi2 - phi1;
197 DDSolidFactory::cuttubs(segname,
dz,
r_min,
r_max, phi1, dphi, n_x_l, n_y_l, n_z_l, n_x_t, n_y_t, n_z_t);
198 segments.emplace_back(seg);
204 assert(segments.size() >= 2);
210 for (
unsigned i = 1;
i < segments.size() - 1;
i++) {
219 segments[segments.size() - 1],
224 double offset = -
shift + (min_z + (max_z - min_z) / 2);
References cms::cuda::assert(), funct::cos(), DDSolidFactory::cuttubs(), PVValHelper::dz, mps_fire::i, material, DDName::name(), DDName::ns(), hltrates_dqm_sourceclient-live_cfg::offset, unpackBuffers-CaloStage1::offsets, class-composition::parent, DDCutTubsFromPoints::Section::phi, DDCompactView::position(), alignCSCRings::r, r_max, r_min, indexGen::s2, sections, edm::shift, funct::sin(), solidOutput, mathSSE::sqrt(), square(), DDEnums::support, DDSolidFactory::unionSolid(), DDCutTubsFromPoints::Section::z_l, z_pos, and DDCutTubsFromPoints::Section::z_t.