CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Protected Attributes
AlignmentGeometry Class Reference

#include <AlignmentGeometry.h>

Public Member Functions

const DetGeometryget (unsigned int id) const
 retrieves sensor geometry More...
 
unsigned int getNumberOfDetectors () const
 returns the number of detectors in the collection More...
 
const std::map< unsigned int, DetGeometry > & getSensorMap () const
 
void insert (unsigned int id, const DetGeometry &g)
 puts an element to the map More...
 
bool isValidSensorId (unsigned int id) const
 check whether the sensor Id is valid (present in the map) More...
 
void print () const
 Prints the geometry. More...
 

Public Attributes

double z0
 a characteristic z in mm More...
 

Protected Attributes

std::map< unsigned int, DetGeometrysensorGeometry
 

Detailed Description

A collection of geometrical information.

Definition at line 55 of file AlignmentGeometry.h.

Member Function Documentation

◆ get()

const DetGeometry & AlignmentGeometry::get ( unsigned int  id) const

◆ getNumberOfDetectors()

unsigned int AlignmentGeometry::getNumberOfDetectors ( ) const
inline

returns the number of detectors in the collection

Definition at line 72 of file AlignmentGeometry.h.

73 { return sensorGeometry.size(); }

Referenced by JanAlignmentAlgorithm::analyze().

◆ getSensorMap()

const std::map<unsigned int, DetGeometry>& AlignmentGeometry::getSensorMap ( ) const
inline

◆ insert()

void AlignmentGeometry::insert ( unsigned int  id,
const DetGeometry g 
)

puts an element to the map

Definition at line 26 of file AlignmentGeometry.cc.

References g, and triggerObjects_cff::id.

Referenced by BeautifulSoup.PageElement::append().

◆ isValidSensorId()

bool AlignmentGeometry::isValidSensorId ( unsigned int  id) const
inline

check whether the sensor Id is valid (present in the map)

Definition at line 75 of file AlignmentGeometry.h.

76 { return (sensorGeometry.find(id) != sensorGeometry.end()); }

Referenced by StraightTrackAlignment::processEvent().

◆ print()

void AlignmentGeometry::print ( void  ) const

Prints the geometry.

Definition at line 30 of file AlignmentGeometry.cc.

31  {
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  }

References printId(), CTPPSDetId::sdTrackingStrip, and DetId::subdetId().

Referenced by StraightTrackAlignment::begin().

Member Data Documentation

◆ sensorGeometry

std::map<unsigned int, DetGeometry> AlignmentGeometry::sensorGeometry
protected

Definition at line 57 of file AlignmentGeometry.h.

Referenced by getSensorMap().

◆ z0

double AlignmentGeometry::z0

a characteristic z in mm

Definition at line 61 of file AlignmentGeometry.h.

Referenced by JanAlignmentAlgorithm::feed().

AlignmentGeometry::sensorGeometry
std::map< unsigned int, DetGeometry > sensorGeometry
Definition: AlignmentGeometry.h:57
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
CTPPSDetId
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:31
printId
void printId(unsigned int id)
Definition: Utilities.cc:25
cms::Exception
Definition: Exception.h:70