CMS 3D CMS Logo

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 
31 void AlignmentGeometry::print() const {
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 }
MessageLogger.h
DetGeometry
A structure to hold relevant geometrical information about one detector/sensor.
Definition: AlignmentGeometry.h:19
CTPPSDetId::sdTrackingStrip
Definition: CTPPSDetId.h:44
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
AlignmentGeometry.h
AlignmentGeometry::insert
void insert(unsigned int id, const DetGeometry &g)
puts an element to the map
Definition: AlignmentGeometry.cc:26
CTPPSDetId
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:31
Utilities.h
AlignmentGeometry::get
const DetGeometry & get(unsigned int id) const
retrieves sensor geometry
Definition: AlignmentGeometry.cc:16
std
Definition: JetResolutionObject.h:76
printId
void printId(unsigned int id)
Definition: Utilities.cc:25
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
CTPPSDetId.h
AlignmentGeometry::print
void print() const
Prints the geometry.
Definition: AlignmentGeometry.cc:30
cms::Exception
Definition: Exception.h:70
g
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