41 MeanRPData() : N(0), N_u(0), N_v(0), Sx(0.), Sy(0.), Sz(0.), Sdx_u(0.), Sdx_v(0.), Sdy_u(0.), Sdy_v(0.) {}
43 void Fill(
double x,
double y,
double z,
bool uDir,
double dx,
double dy)
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)
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)
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.;
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.
edm::ESWatcher< IdealGeometryRecord > watcherIdealGeometry
#define DEFINE_FWK_MODULE(type)
RPDeviceMapType::const_iterator endRP() const
end iterator over RPs
uint32_t getRPDecimalId() const
bool isStripsCoordinateUDirection() const
void GetReadoutDirection(unsigned int id, double &dx, double &dy) const
Event setup record containing the real (actual) geometry information.
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
GeometryInfoModule(const edm::ParameterSet &)
Class to print out information on current geometry.
edm::ESWatcher< VeryForwardRealGeometryRecord > watcherRealGeometry
void Fill(double x, double y, double z, bool uDir, double dx, double dy)
The manager class for TOTEM RP geometry.
bool check(const edm::EventSetup &iSetup)
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
ESHandle< TrackerGeometry > geometry
char data[epos_bytes_allocation]
void PrintGeometry(const TotemRPGeometry &, const edm::Event &)
Event setup record containing the misaligned geometry information. It is used for alignment studies o...
mapType::const_iterator beginDet() const
begin iterator over (silicon) detectors
virtual void analyze(const edm::Event &, const edm::EventSetup &)
edm::ESWatcher< VeryForwardMisalignedGeometryRecord > watcherMisalignedGeometry