154 time_t unixTime =
event.time().unixTime();
156 strftime(timeStr, 50,
"%F %T", localtime(&unixTime));
157 printf(
">> GeometryInfoModule::PrintGeometry\n\tnew %s geometry found in run=%u, event=%llu, UNIX timestamp=%lu (%s)\n",
158 geometryType.c_str(),
event.id().run(),
event.id().event(), unixTime, timeStr);
163 printf(
"\n* RPs:\n");
164 printf(
" ID | x (mm) | y (mm) | z (m) |\n");
165 for (TotemRPGeometry::RPDeviceMapType::const_iterator it = geometry.
beginRP(); it != geometry.
endRP(); ++it)
168 printf(
" %3i | %+11.3f | %+11.3f | %+9.4f |\n", it->first, t.x(), t.y(), t.z() * 1E-3);
175 printf(
"\n* silicon sensors:\n");
176 printf(
"DetId | detector center | readout direction |\n");
177 printf(
" | x (mm) | y (mm) | z (m) | dx | dy |\n");
178 for (TotemRPGeometry::mapType::const_iterator it = geometry.
beginDet(); it != geometry.
endDet(); ++it)
182 double x = it->second->translation().x();
183 double y = it->second->translation().y();
184 double z = it->second->translation().z() * 1E-3;
186 double dx = 0.,
dy = 0.;
189 printf(
"%4i | %8.3f | %8.3f | %9.4f | %8.3f | %8.3f |\n",
id.getPlaneDecimalId(), x, y, z, dx,
dy);
196 printf(
"\n* average over silicon sensors of 1 RP:\n");
198 map<unsigned int, MeanRPData>
data;
200 for (TotemRPGeometry::mapType::const_iterator it = geometry.
beginDet(); it != geometry.
endDet(); ++it)
203 unsigned int rpDecId = plId.getRPDecimalId();
204 bool uDirection = plId.isStripsCoordinateUDirection();
206 double x = it->second->translation().x();
207 double y = it->second->translation().y();
208 double z = it->second->translation().z() * 1E-3;
210 double dx = 0.,
dy = 0.;
213 data[rpDecId].Fill(x, y, z, uDirection, dx,
dy);
216 printf(
"RPId | center | U direction | V direction |\n");
217 printf(
" | x (mm) | y (mm) | z (m) | dx | dy | dx | dy |\n");
219 for (map<unsigned int, MeanRPData>::iterator it = data.begin(); it != data.end(); ++it)
221 const MeanRPData &
d = it->second;
223 double mx = (d.N > 0) ? d.Sx / d.N : 0.;
224 double my = (d.N > 0) ? d.Sy / d.N : 0.;
225 double mz = (d.N > 0) ? d.Sz / d.N : 0.;
227 double mdx_u = (d.N_u > 0) ? d.Sdx_u / d.N_u : 0.;
228 double mdy_u = (d.N_u > 0) ? d.Sdy_u / d.N_u : 0.;
230 double mdx_v = (d.N_v > 0) ? d.Sdx_v / d.N_v : 0.;
231 double mdy_v = (d.N_v > 0) ? d.Sdy_v / d.N_v : 0.;
234 printf(
" %3i | %8.3f | %8.3f | %9.4f | %8.3f | %8.3f | %8.3f | %8.3f |\n", it->first, mx, my, mz, mdx_u, mdy_u, mdx_v, mdy_v);
Detector ID class for TOTEM Si strip detectors.
RPDeviceMapType::const_iterator endRP() const
end iterator over RPs
void GetReadoutDirection(unsigned int id, double &dx, double &dy) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
mapType::const_iterator endDet() const
end iterator over (silicon) detectors
RPDeviceMapType::const_iterator beginRP() const
begin iterator over RPs
char data[epos_bytes_allocation]
mapType::const_iterator beginDet() const
begin iterator over (silicon) detectors