8 #include <CLHEP/Vector/Rotation.h>
9 #include <CLHEP/Vector/ThreeVector.h>
18 os <<
"CylinderGeomIntt Object" << std::endl;
19 os <<
"layer: " <<
get_layer() << std::endl;
30 return TVector3(glob(0), glob(1), glob(2));
35 actslocal(0) = local.X();
36 actslocal(1) = local.Y();
66 return TVector3(local(2), local(0), local(1));
71 TVector2 local(0.0, 0.0);
74 location[0] = global.X();
75 location[1] = global.Y();
76 location[2] = global.Z();
82 double signz = (location[2] > 0) ? 1. : -1;
83 double phi = atan2(location[1], location[0]);
89 segment_phi_bin =
round(segment_phi_bin_tmp);
91 double z_tmp = location[2] / signz;
106 segment_z_bin = itype;
110 segment_z_bin = itype + 2;
116 double signz = (location[2] > 0) ? 1. : -1;
117 double phi = atan2(location[1], location[0]);
123 segment_phi_bin = lround(segment_phi_bin_tmp);
127 double z_tmp = location[2] / signz;
131 if (fabs((1.0 - z_tmp /
m_LadderZ[0])) < 0.01)
142 segment_z_bin = itype;
146 segment_z_bin = itype + 2;
157 CLHEP::Hep3Vector ladder(location[0], location[1], location[2]);
160 const int itype = segment_z_bin % 2;
161 const double strip_z =
m_StripZ[itype];
164 const double strip_localpos_z = strip_z * (strip_column % nstrips_z_sensor) - strip_z / 2. * nstrips_z_sensor + strip_z / 2.;
168 CLHEP::Hep3Vector strip_localpos(
m_StripXOffset, strip_localpos_y, strip_localpos_z);
174 CLHEP::HepRotation rot;
176 strip_localpos = rot * strip_localpos;
177 strip_localpos += ladder;
179 location[0] = strip_localpos.x();
180 location[1] = strip_localpos.y();
181 location[2] = strip_localpos.z();
189 const int itype = segment_z_bin % 2;
190 if (itype != 0 && itype != 1)
192 std::cout <<
"Problem: itype = " << itype << std::endl;
200 const double strip_z =
m_StripZ[itype];
205 double zup = (
double) nstrips_z_sensor * strip_z / 2.0 + zpos;
206 strip_z_index = (int) (zup / strip_z);
210 strip_y_index = (int) (yup /
m_StripY);
225 const int itype = segment_z_bin % 2;
226 if (itype != 0 && itype != 1)
228 std::cout <<
"Problem: itype = " << itype << std::endl;
232 const double strip_z =
m_StripZ[itype];
240 double zpos = (
double) strip_z_index * strip_z + strip_z / 2.0 - (
double) nstrips_z_sensor * strip_z / 2.0;