CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AlignmentGeometry.cc
Go to the documentation of this file.
1 /****************************************************************************
2 * Authors:
3 * Jan Kašpar (jan.kaspar@gmail.com)
4 ****************************************************************************/
5 
8 
10 
12 
13 using namespace std;
14 
15 //----------------------------------------------------------------------------------------------------
16 
17 const DetGeometry &AlignmentGeometry::get(unsigned int id) const {
18  auto it = sensorGeometry.find(id);
19  if (it == sensorGeometry.end())
20  throw cms::Exception("PPS") << "No geometry available for sensor " << id << ".";
21 
22  return it->second;
23 }
24 
25 //----------------------------------------------------------------------------------------------------
26 
27 void AlignmentGeometry::insert(unsigned int id, const DetGeometry &g) { sensorGeometry[id] = g; }
28 
29 //----------------------------------------------------------------------------------------------------
30 
32  for (const auto &it : sensorGeometry) {
33  printId(it.first);
34 
35  printf(" z = %+10.4f mm │ shift: x = %+7.3f mm, y = %+7.3f mm │ ", it.second.z, it.second.sx, it.second.sy);
36 
37  for (const auto &dit : it.second.directionData) {
38  printf("dir%u: %+.3f, %+.3f, %+.3f │ ", dit.first, dit.second.dx, dit.second.dy, dit.second.dz);
39  }
40 
42  printf("%s", (it.second.isU) ? "U-det" : "V-det");
43 
44  printf("\n");
45  }
46 }
void print() const
Prints the geometry.
A structure to hold relevant geometrical information about one detector/sensor.
uint16_t *__restrict__ id
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
printf("params %d %f %f %f\n", minT, eps, errmax, chi2max)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
void printId(unsigned int id)
Definition: Utilities.cc:26
const DetGeometry & get(unsigned int id) const
retrieves sensor geometry
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:32
void insert(unsigned int id, const DetGeometry &g)
puts an element to the map