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 56 of file AlignmentGeometry.h.

Member Function Documentation

◆ get()

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

retrieves sensor geometry

Definition at line 17 of file AlignmentGeometry.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), data_sources.json_list::as_dicts(), data_sources.json_list::as_table(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), JanAlignmentAlgorithm::feed(), StraightTrackAlignment::finish(), data_sources.json_list::first(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), data_sources.json_list::indices(), data_sources.json_list::last(), StraightTrackAlignment::processEvent(), rrapi.RRApi::report(), util.rrapi.RRApi::report(), util.rrapi.RRApi::reports(), rrapi.RRApi::reports(), IdealResult::solve(), util.rrapi.RRApi::tables(), rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), util.rrapi.RRApi::templates(), rrapi.RRApi::templates(), StraightTrackAlignment::updateDiagnosticHistograms(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

17  {
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 }
std::map< unsigned int, DetGeometry > sensorGeometry

◆ getNumberOfDetectors()

unsigned int AlignmentGeometry::getNumberOfDetectors ( ) const
inline

returns the number of detectors in the collection

Definition at line 73 of file AlignmentGeometry.h.

References sensorGeometry.

Referenced by JanAlignmentAlgorithm::analyze().

73 { return sensorGeometry.size(); }
std::map< unsigned int, DetGeometry > sensorGeometry

◆ getSensorMap()

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

Definition at line 70 of file AlignmentGeometry.h.

References sensorGeometry.

Referenced by JanAlignmentAlgorithm::begin(), StraightTrackAlignment::finish(), IdealResult::solve(), and JanAlignmentAlgorithm::solve().

70 { return sensorGeometry; }
std::map< unsigned int, DetGeometry > sensorGeometry

◆ insert()

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

puts an element to the map

Definition at line 27 of file AlignmentGeometry.cc.

References g, and l1ctLayer2EG_cff::id.

Referenced by SequenceTypes.Schedule::_replaceIfHeldDirectly().

27 { sensorGeometry[id] = g; }
std::map< unsigned int, DetGeometry > sensorGeometry
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

◆ isValidSensorId()

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

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

Definition at line 76 of file AlignmentGeometry.h.

References sensorGeometry.

Referenced by StraightTrackAlignment::processEvent().

76 { return (sensorGeometry.find(id) != sensorGeometry.end()); }
std::map< unsigned int, DetGeometry > sensorGeometry

◆ print()

void AlignmentGeometry::print ( void  ) const

Prints the geometry.

Definition at line 31 of file AlignmentGeometry.cc.

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

Referenced by StraightTrackAlignment::begin().

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  }
46 }
std::map< unsigned int, DetGeometry > sensorGeometry
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
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:32

Member Data Documentation

◆ sensorGeometry

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

Definition at line 58 of file AlignmentGeometry.h.

Referenced by getNumberOfDetectors(), getSensorMap(), and isValidSensorId().

◆ z0

double AlignmentGeometry::z0

a characteristic z in mm

Definition at line 62 of file AlignmentGeometry.h.

Referenced by JanAlignmentAlgorithm::feed().