The manager class for TOTEM RP geometry. More...
#include <CTPPSGeometry.h>
Public Types | |
typedef std::map< unsigned int, std::set< unsigned int > > | mapSetType |
typedef std::map< unsigned int, const DetGeomDesc * > | mapType |
typedef std::map< int, const DetGeomDesc * > | RPDeviceMapType |
Public Member Functions | |
bool | addRP (unsigned int id, const DetGeomDesc *&) |
adds a RP box to a map More... | |
bool | addSensor (unsigned int, const DetGeomDesc *&) |
adds an item to the map (detector ID –> DetGeomDesc) performs necessary checks More... | |
RPDeviceMapType::const_iterator | beginRP () const |
begin iterator over RPs More... | |
mapType::const_iterator | beginSensor () const |
begin iterator over sensors More... | |
void | build (const DetGeomDesc *) |
build up from DetGeomDesc structure More... | |
CTPPSGeometry () | |
CTPPSGeometry (const DetGeomDesc *gd) | |
build up from DetGeomDesc More... | |
RPDeviceMapType::const_iterator | endRP () const |
end iterator over RPs More... | |
mapType::const_iterator | endSensor () const |
end iterator over sensors More... | |
const DetGeomDesc * | getRP (unsigned int id) const |
returns geometry of a RP box More... | |
const DetGeomDesc * | getRPNoThrow (unsigned int id) const |
const std::set< unsigned int > & | getRPsInStation (unsigned int) const |
after checks returns set of RP ids corresponding to the given station id More... | |
CLHEP::Hep3Vector | getRPTranslation (unsigned int id) const |
const DetGeomDesc * | getSensor (unsigned int id) const |
returns geometry of a detector performs necessary checks, returns NULL if fails More... | |
const DetGeomDesc * | getSensorNoThrow (unsigned int id) const |
const std::set< unsigned int > & | getSensorsInRP (unsigned int) const |
after checks returns set of sensor ids corresponding to the given RP id More... | |
CLHEP::Hep3Vector | getSensorTranslation (unsigned int id) const |
const std::set< unsigned int > & | getStationsInArm (unsigned int) const |
after checks returns set of station ids corresponding to the given arm id More... | |
CLHEP::Hep3Vector | globalToLocal (const DetGeomDesc *, const CLHEP::Hep3Vector &) const |
CLHEP::Hep3Vector | globalToLocal (unsigned int, const CLHEP::Hep3Vector &) const |
CLHEP::Hep3Vector | globalToLocalDirection (unsigned int id, const CLHEP::Hep3Vector &) const |
CLHEP::Hep3Vector | localToGlobal (const DetGeomDesc *, const CLHEP::Hep3Vector &) const |
CLHEP::Hep3Vector | localToGlobal (unsigned int, const CLHEP::Hep3Vector &) const |
CLHEP::Hep3Vector | localToGlobalDirection (unsigned int id, const CLHEP::Hep3Vector &) const |
~CTPPSGeometry () | |
Protected Attributes | |
mapSetType | dets_in_rp_ |
mapSetType | rps_in_station_ |
RPDeviceMapType | rps_map_ |
map: rp id –> DetGeomDesc More... | |
mapType | sensors_map_ |
map: sensor id –> DetGeomDesc More... | |
mapSetType | stations_in_arm_ |
map: parent ID -> set of subelements E.g. stations_in_arm_ is map of arm ID -> set of stations (in that arm) More... | |
The manager class for TOTEM RP geometry.
This is kind of "public relation class" for the tree structure of DetGeomDesc. It provides convenient interface to answer frequently asked questions about the geometry of TOTEM Roman Pots. These questions are of type:
Definition at line 33 of file CTPPSGeometry.h.
typedef std::map<unsigned int, std::set<unsigned int> > CTPPSGeometry::mapSetType |
Definition at line 38 of file CTPPSGeometry.h.
typedef std::map<unsigned int, const DetGeomDesc* > CTPPSGeometry::mapType |
Definition at line 36 of file CTPPSGeometry.h.
typedef std::map<int, const DetGeomDesc* > CTPPSGeometry::RPDeviceMapType |
Definition at line 37 of file CTPPSGeometry.h.
|
inline |
Definition at line 40 of file CTPPSGeometry.h.
|
inline |
Definition at line 41 of file CTPPSGeometry.h.
|
inline |
build up from DetGeomDesc
Definition at line 44 of file CTPPSGeometry.h.
References addRP(), addSensor(), build(), getRP(), getRPNoThrow(), getSensor(), getSensorNoThrow(), and noexcept.
bool CTPPSGeometry::addRP | ( | unsigned int | id, |
const DetGeomDesc *& | gD | ||
) |
adds a RP box to a map
Definition at line 77 of file CTPPSGeometry.cc.
References triggerObjects_cff::id, and rps_map_.
Referenced by build(), and CTPPSGeometry().
bool CTPPSGeometry::addSensor | ( | unsigned int | id, |
const DetGeomDesc *& | gD | ||
) |
adds an item to the map (detector ID –> DetGeomDesc) performs necessary checks
Definition at line 66 of file CTPPSGeometry.cc.
References triggerObjects_cff::id, and sensors_map_.
Referenced by build(), and CTPPSGeometry().
|
inline |
begin iterator over RPs
Definition at line 77 of file CTPPSGeometry.h.
References rps_map_.
Referenced by CTPPSGeometryInfo::printGeometry().
|
inline |
begin iterator over sensors
Definition at line 72 of file CTPPSGeometry.h.
References sensors_map_.
Referenced by CTPPSGeometryInfo::printGeometry().
void CTPPSGeometry::build | ( | const DetGeomDesc * | gD | ) |
build up from DetGeomDesc structure
Definition at line 15 of file CTPPSGeometry.cc.
References addRP(), addSensor(), edmScanValgrind::buffer, AlCaHLTBitMon_QueryRunRegistry::comp, DetGeomDesc::components(), edmIntegrityCheck::d, DDD_CTPPS_DIAMONDS_RP_NAME, DDD_CTPPS_DIAMONDS_SEGMENT_NAME, DDD_CTPPS_PIXELS_RP_NAME, DDD_CTPPS_PIXELS_SENSOR_NAME, DDD_CTPPS_UFSD_SEGMENT_NAME, DDD_TOTEM_RP_RP_NAME, DDD_TOTEM_RP_SENSOR_NAME, DDD_TOTEM_TIMING_RP_NAME, DDD_TOTEM_TIMING_SENSOR_TMPL, dets_in_rp_, DetGeomDesc::geographicalID(), CTPPSDetId::getArmId(), CTPPSDetId::getRPId(), CTPPSDetId::getStationId(), DetGeomDesc::name(), year_2016_postTS2_cff::rpId, rps_in_station_, rps_map_, sensors_map_, and stations_in_arm_.
Referenced by CTPPSGeometry().
|
inline |
end iterator over RPs
Definition at line 79 of file CTPPSGeometry.h.
References getRPsInStation(), getRPTranslation(), getSensorsInRP(), getSensorTranslation(), getStationsInArm(), globalToLocal(), globalToLocalDirection(), localToGlobal(), localToGlobalDirection(), and rps_map_.
Referenced by CTPPSGeometryInfo::printGeometry().
|
inline |
end iterator over sensors
Definition at line 74 of file CTPPSGeometry.h.
References sensors_map_.
Referenced by CTPPSGeometryInfo::printGeometry().
const DetGeomDesc * CTPPSGeometry::getRP | ( | unsigned int | id | ) | const |
returns geometry of a RP box
Definition at line 113 of file CTPPSGeometry.cc.
References Exception, and getRPNoThrow().
Referenced by CTPPSGeometry(), getRPTranslation(), and TotemRPUVPatternFinder::produce().
const DetGeomDesc * CTPPSGeometry::getRPNoThrow | ( | unsigned int | id | ) | const |
Definition at line 126 of file CTPPSGeometry.cc.
References rps_map_.
Referenced by CTPPSGeometry(), and getRP().
const std::set< unsigned int > & CTPPSGeometry::getRPsInStation | ( | unsigned int | id | ) | const |
after checks returns set of RP ids corresponding to the given station id
Definition at line 149 of file CTPPSGeometry.cc.
References rps_in_station_.
Referenced by endRP().
CLHEP::Hep3Vector CTPPSGeometry::getRPTranslation | ( | unsigned int | id | ) | const |
returns position of a RP box
id | RP id |
Definition at line 228 of file CTPPSGeometry.cc.
References getRP().
Referenced by TotemRPDQMSource::analyze(), CTPPSProtonReconstructionPlotter::CalculateTimingTrackingDistance(), endRP(), TotemRPLocalTrackFitter::produce(), CTPPSProtonProducer::produce(), and CTPPSPixelLocalTrackProducer::produce().
const DetGeomDesc * CTPPSGeometry::getSensor | ( | unsigned int | id | ) | const |
returns geometry of a detector performs necessary checks, returns NULL if fails
Definition at line 88 of file CTPPSGeometry.cc.
References Exception, g, and getSensorNoThrow().
Referenced by TotemRPDQMSource::analyze(), TotemTimingDQMSource::analyze(), CTPPSDiamondRecHitProducerAlgorithm::build(), RPixPlaneCombinatoryTracking::calculatePointOnDetector(), channelAlignedWithTrack(), CTPPSGeometry(), CTPPSDiamondDQMSource::dqmBeginRun(), RPixRoadFinder::findPattern(), RPixPlaneCombinatoryTracking::findTracks(), getSensorTranslation(), globalToLocal(), globalToLocalDirection(), localToGlobal(), localToGlobalDirection(), and CTPPSDirectProtonSimulation::processProton().
const DetGeomDesc * CTPPSGeometry::getSensorNoThrow | ( | unsigned int | id | ) | const |
Definition at line 101 of file CTPPSGeometry.cc.
References sensors_map_.
Referenced by TotemTimingRecHitProducerAlgorithm::build(), CTPPSGeometry(), TotemTimingDQMSource::dqmBeginRun(), and getSensor().
const std::set< unsigned int > & CTPPSGeometry::getSensorsInRP | ( | unsigned int | id | ) | const |
after checks returns set of sensor ids corresponding to the given RP id
Definition at line 160 of file CTPPSGeometry.cc.
References dets_in_rp_.
Referenced by endRP(), and CTPPSDirectProtonSimulation::processProton().
CLHEP::Hep3Vector CTPPSGeometry::getSensorTranslation | ( | unsigned int | id | ) | const |
returns translation (position) of a detector
id | sensor id |
Definition at line 219 of file CTPPSGeometry.cc.
References getSensor().
Referenced by endRP(), and TotemRPLocalTrackFitterAlgorithm::prepareReconstAlgebraData().
const std::set< unsigned int > & CTPPSGeometry::getStationsInArm | ( | unsigned int | id | ) | const |
after checks returns set of station ids corresponding to the given arm id
Definition at line 138 of file CTPPSGeometry.cc.
References stations_in_arm_.
Referenced by endRP().
CLHEP::Hep3Vector CTPPSGeometry::globalToLocal | ( | const DetGeomDesc * | gd, |
const CLHEP::Hep3Vector & | r | ||
) | const |
Definition at line 187 of file CTPPSGeometry.cc.
References DetGeomDesc::rotation(), and DetGeomDesc::translation().
Referenced by TotemRPDQMSource::analyze(), endRP(), globalToLocal(), and CTPPSDirectProtonSimulation::processProton().
CLHEP::Hep3Vector CTPPSGeometry::globalToLocal | ( | unsigned int | id, |
const CLHEP::Hep3Vector & | r | ||
) | const |
Definition at line 195 of file CTPPSGeometry.cc.
References getSensor(), and globalToLocal().
CLHEP::Hep3Vector CTPPSGeometry::globalToLocalDirection | ( | unsigned int | id, |
const CLHEP::Hep3Vector & | dir | ||
) | const |
direction transformations between global and local reference frames
id | sensor id |
Definition at line 211 of file CTPPSGeometry.cc.
References dir, getSensor(), and DetGeomDesc::rotation().
Referenced by endRP().
CLHEP::Hep3Vector CTPPSGeometry::localToGlobal | ( | const DetGeomDesc * | gd, |
const CLHEP::Hep3Vector & | r | ||
) | const |
coordinate transformations between local<–>global reference frames dimensions in mm sensor id expected
Definition at line 171 of file CTPPSGeometry.cc.
References DetGeomDesc::rotation(), and DetGeomDesc::translation().
Referenced by RPixPlaneCombinatoryTracking::calculatePointOnDetector(), endRP(), RPixRoadFinder::findPattern(), localToGlobal(), CTPPSGeometryInfo::printGeometry(), and CTPPSDirectProtonSimulation::processProton().
CLHEP::Hep3Vector CTPPSGeometry::localToGlobal | ( | unsigned int | id, |
const CLHEP::Hep3Vector & | r | ||
) | const |
Definition at line 179 of file CTPPSGeometry.cc.
References getSensor(), and localToGlobal().
CLHEP::Hep3Vector CTPPSGeometry::localToGlobalDirection | ( | unsigned int | id, |
const CLHEP::Hep3Vector & | dir | ||
) | const |
direction transformations between local and global reference frames
id | sensor id |
Definition at line 203 of file CTPPSGeometry.cc.
References dir, getSensor(), and DetGeomDesc::rotation().
Referenced by TotemRPDQMSource::analyze(), endRP(), and TotemRPLocalTrackFitterAlgorithm::prepareReconstAlgebraData().
|
protected |
Definition at line 124 of file CTPPSGeometry.h.
Referenced by build(), and getSensorsInRP().
|
protected |
Definition at line 124 of file CTPPSGeometry.h.
Referenced by build(), and getRPsInStation().
|
protected |
map: rp id –> DetGeomDesc
Definition at line 120 of file CTPPSGeometry.h.
Referenced by addRP(), beginRP(), build(), endRP(), and getRPNoThrow().
|
protected |
map: sensor id –> DetGeomDesc
Definition at line 117 of file CTPPSGeometry.h.
Referenced by addSensor(), beginSensor(), build(), endSensor(), and getSensorNoThrow().
|
protected |
map: parent ID -> set of subelements E.g. stations_in_arm_ is map of arm ID -> set of stations (in that arm)
Definition at line 124 of file CTPPSGeometry.h.
Referenced by build(), and getStationsInArm().