19 unsigned int numberOfCells =
topology.totalGeomModules();
20 int detType =
topology.detectorType();
22 std::cout <<
"Number of Cells " << numberOfCells <<
" for type " << detType <<
" of sub-detector "
26 geom->allocateCorners(numberOfCells);
33 std::cout <<
"FastTimeGeometryLoader with # of transformation matrices " << numberOfCells << std::endl;
35 for (
unsigned itr = 0;
itr < numberOfCells; ++
itr) {
38 std::cout <<
"FastTimeGeometryLoader:: Z:Layer:Type " <<
zside <<
":" << detType << std::endl;
40 double zv =
zside * (
topology.dddConstants().getZPos(detType));
42 (
zside > 0) ? CLHEP::HepRep3x3(1, 0, 0, 0, 1, 0, 0, 0, 1) : CLHEP::HepRep3x3(-1, 0, 0, 0, 1, 0, 0, 0, -1);
43 const CLHEP::HepRotation hr(
rotation);
44 const CLHEP::Hep3Vector h3v(0, 0, zv);
45 const HepGeom::Transform3D ht3d(hr, h3v);
48 std::cout <<
"FastTimeGeometryLoader:: transf " << ht3d.getTranslation() <<
" and " << ht3d.getRotation();
64 std::cerr <<
"inconsistent # of cells: expected " << numberOfCells <<
" , inited " <<
counter << std::endl;
72 const HepGeom::Transform3D& ht3d,
78 for (
unsigned int i = 0;
i < 12; ++
i)
83 std::vector<GlobalPoint> corners =
topology.dddConstants().getCorners(
id.
type(), 1, 1,
id.
zside());
89 GlobalPoint front(0.25 * (corners[0].
x() + corners[1].
x() + corners[2].
x() + corners[3].
x()),
90 0.25 * (corners[0].
y() + corners[1].
y() + corners[2].
y() + corners[3].
y()),
91 0.25 * (corners[0].
z() + corners[1].
z() + corners[2].
z() + corners[3].
z()));
93 GlobalPoint back(0.25 * (corners[4].
x() + corners[5].
x() + corners[6].
x() + corners[7].
x()),
94 0.25 * (corners[4].
y() + corners[5].
y() + corners[6].
y() + corners[7].
y()),
95 0.25 * (corners[4].
z() + corners[5].
z() + corners[6].
z() + corners[7].
z()));
99 std::swap_ranges(corners.begin(), corners.begin() + 4, corners.begin() + 4);
102 geom->newCell(front, back, corners[0], parmPtr, detId);