The manager class for TOTEM RP geometry. More...
#include <TotemRPGeometry.h>
Public Types | |
typedef std::map< unsigned int, std::set< unsigned int > > | mapSetType |
typedef std::map< unsigned int, DetGeomDesc * > | mapType |
typedef std::map< int, DetGeomDesc * > | RPDeviceMapType |
Public Member Functions | |
char | AddDetector (unsigned int, const DetGeomDesc *&) |
adds an item to the map (detector ID –> DetGeomDesc) performs necessary checks, returns 0 if succesful More... | |
char | AddDetector (const DetId &id, const DetGeomDesc *&gd) |
char | AddRPDevice (int copy_no, const DetGeomDesc *&det_geom_desc) |
adds a RP package (primary vacuum) to a map copy_no means RPId (i.e. 3 digit decimal number) More... | |
mapType::const_iterator | beginDet () const |
begin iterator over (silicon) detectors More... | |
RPDeviceMapType::const_iterator | beginRP () const |
begin iterator over RPs More... | |
char | Build (const DetGeomDesc *) |
build up from DetGeomDesc structure, return 0 = success More... | |
void | BuildSets () |
builds maps element ID –> set of subelements (re)builds stationsInArm, rpsInStation, detsInRP out of theMap More... | |
std::set< unsigned int > | DetsInRP (unsigned int) const |
std::set< unsigned int > | DetsInRP (const DetId &id) const |
mapType::const_iterator | endDet () const |
end iterator over (silicon) detectors More... | |
RPDeviceMapType::const_iterator | endRP () const |
end iterator over RPs More... | |
DetGeomDesc * | GetDetector (unsigned int) const |
returns geometry of a detector performs necessary checks, returns NULL if fails input is raw ID More... | |
DetGeomDesc * | GetDetector (const TotemRPDetId &id) const |
CLHEP::Hep3Vector | GetDetEdgeNormalVector (unsigned int id) const |
returns a normal vector for the edge of a detector More... | |
CLHEP::Hep3Vector | GetDetEdgePosition (unsigned int id) const |
returns the position of the edge of a detector More... | |
CLHEP::Hep3Vector | GetDetTranslation (unsigned int id) const |
void | GetReadoutDirection (unsigned int id, double &dx, double &dy) const |
DetGeomDesc * | GetRPDevice (int copy_no) const |
returns geometry of a RP box More... | |
CLHEP::HepRotation | GetRPGlobalRotation (int copy_no) const |
returns number of detectors in the geometry (size of theMap) More... | |
CLHEP::Hep3Vector | GetRPGlobalTranslation (int copy_no) const |
position of a RP package (translation z corresponds to the first plane - TODO check it) More... | |
CLHEP::Hep3Vector | GetRPThinFoilNormalVector (int copy_no) const |
returns a normal vector for the thin foil of a RP box More... | |
CLHEP::Hep3Vector | GetRPThinFoilPosition (int copy_no) const |
returns the (outer) position of the thin foil of a RP box More... | |
double | GetStationCentreZPosition (unsigned int) const |
CLHEP::Hep3Vector | GlobalToLocal (DetGeomDesc *gd, const CLHEP::Hep3Vector r) const |
CLHEP::Hep3Vector | GlobalToLocal (unsigned int id, const CLHEP::Hep3Vector r) const |
CLHEP::Hep3Vector | GlobalToLocalDirection (unsigned int id, const CLHEP::Hep3Vector dir) const |
CLHEP::Hep3Vector | LocalToGlobal (DetGeomDesc *gd, const CLHEP::Hep3Vector r) const |
CLHEP::Hep3Vector | LocalToGlobal (unsigned int id, const CLHEP::Hep3Vector r) const |
CLHEP::Hep3Vector | LocalToGlobalDirection (unsigned int id, const CLHEP::Hep3Vector dir) const |
unsigned int | NumberOfDetsIncluded () const |
DetGeomDesc * | operator[] (unsigned int id) const |
same as GetDetector More... | |
std::set< unsigned int > | RPsInStation (unsigned int) const |
after checks returns set of RP corresponding to the given station ID More... | |
std::set< unsigned int > | StationsInArm (unsigned int) const |
after checks returns set of stations corresponding to the given arm ID More... | |
TotemRPGeometry () | |
TotemRPGeometry (const DetGeomDesc *gd) | |
build up from DetGeomDesc More... | |
~TotemRPGeometry () | |
Protected Attributes | |
mapSetType | detsInRP |
mapSetType | rpsInStation |
mapSetType | stationsInArm |
map: parent ID -> set of subelements E.g. stationsInArm is map of arm ID -> set of stations (in that arm) More... | |
mapType | theMap |
map: detectorID –> DetGeomDesc More... | |
RPDeviceMapType | theRomanPotMap |
map: RPID –> DetGeomDesc More... | |
The manager class for TOTEM RP geometry.
See schema of TOTEM RP geometry classes
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:
a) If detector ID is xxx, what is the ID of corresponding station?
b) What is the geometry (shift, roatation, material, etc.) of detector with id xxx?
c) If RP ID is xxx, which are the detector IDs inside this pot?
d) If hit position in local detector coordinate system is xxx, what is the hit position in global c.s.?
etc. (see the comments in definition bellow)
This class is built for both ideal and real geometry. I.e. it is produced by TotemRPIdealGeometryESModule in IdealGeometryRecord and similarly for the real geometry
ID conversions (based on the class TotRPDetID)
detector ID = |arm|station|RP|det|, i.e. 4-digit decimal number
Roman Pot ID = |arm|station|RP|, i.e. two digits
station ID = |arm|station|
arm ID = |arm|
where
Definition at line 51 of file TotemRPGeometry.h.
typedef std::map<unsigned int, std::set<unsigned int> > TotemRPGeometry::mapSetType |
Definition at line 56 of file TotemRPGeometry.h.
typedef std::map<unsigned int, DetGeomDesc* > TotemRPGeometry::mapType |
Definition at line 54 of file TotemRPGeometry.h.
typedef std::map<int, DetGeomDesc* > TotemRPGeometry::RPDeviceMapType |
Definition at line 55 of file TotemRPGeometry.h.
|
inline |
Definition at line 58 of file TotemRPGeometry.h.
|
inline |
Definition at line 59 of file TotemRPGeometry.h.
|
inline |
build up from DetGeomDesc
Definition at line 62 of file TotemRPGeometry.h.
References Build().
char TotemRPGeometry::AddDetector | ( | unsigned int | id, |
const DetGeomDesc *& | gD | ||
) |
adds an item to the map (detector ID –> DetGeomDesc) performs necessary checks, returns 0 if succesful
Definition at line 53 of file TotemRPGeometry.cc.
References theMap.
Referenced by Build().
|
inline |
Definition at line 70 of file TotemRPGeometry.h.
References AddDetector().
Referenced by AddDetector().
char TotemRPGeometry::AddRPDevice | ( | int | copy_no, |
const DetGeomDesc *& | det_geom_desc | ||
) |
adds a RP package (primary vacuum) to a map copy_no means RPId (i.e. 3 digit decimal number)
Definition at line 113 of file TotemRPGeometry.cc.
References theRomanPotMap.
Referenced by Build().
|
inline |
begin iterator over (silicon) detectors
Definition at line 100 of file TotemRPGeometry.h.
References theMap.
Referenced by GeometryInfoModule::PrintGeometry().
|
inline |
begin iterator over RPs
Definition at line 107 of file TotemRPGeometry.h.
References theRomanPotMap.
Referenced by GeometryInfoModule::PrintGeometry().
char TotemRPGeometry::Build | ( | const DetGeomDesc * | gD | ) |
build up from DetGeomDesc structure, return 0 = success
Definition at line 17 of file TotemRPGeometry.cc.
References AddDetector(), AddRPDevice(), BuildSets(), DetGeomDesc::components(), DetGeomDesc::copyno(), ztail::d, DDD_TOTEM_RP_DETECTOR_NAME, DDD_TOTEM_RP_PRIMARY_VACUUM_NAME, DetGeomDesc::geographicalID(), i, DDName::name(), DetGeomDesc::name(), and DetId::rawId().
Referenced by TotemRPGeometry().
void TotemRPGeometry::BuildSets | ( | ) |
builds maps element ID –> set of subelements (re)builds stationsInArm, rpsInStation, detsInRP out of theMap
Definition at line 154 of file TotemRPGeometry.cc.
References TotemRPDetId::armOfDet(), detsInRP, TotemRPDetId::rawToDecId(), TotemRPDetId::rpOfDet(), rpsInStation, stationsInArm, TotemRPDetId::stOfDet(), and theMap.
Referenced by Build().
std::set< unsigned int > TotemRPGeometry::DetsInRP | ( | unsigned int | id | ) | const |
after checks returns set of detectors corresponding to the given RP ID containts decimal detetector IDs
Definition at line 204 of file TotemRPGeometry.cc.
References detsInRP.
|
inline |
Definition at line 130 of file TotemRPGeometry.h.
References DetsInRP().
Referenced by DetsInRP().
|
inline |
end iterator over (silicon) detectors
Definition at line 103 of file TotemRPGeometry.h.
References theMap.
Referenced by GeometryInfoModule::PrintGeometry().
|
inline |
end iterator over RPs
Definition at line 110 of file TotemRPGeometry.h.
References theRomanPotMap.
Referenced by GeometryInfoModule::PrintGeometry().
DetGeomDesc * TotemRPGeometry::GetDetector | ( | unsigned int | id | ) | const |
returns geometry of a detector performs necessary checks, returns NULL if fails input is raw ID
Definition at line 68 of file TotemRPGeometry.cc.
References theMap.
Referenced by GetDetEdgeNormalVector(), GetDetTranslation(), GlobalToLocal(), GlobalToLocalDirection(), LocalToGlobal(), LocalToGlobalDirection(), and operator[]().
|
inline |
Definition at line 80 of file TotemRPGeometry.h.
References GetDetector().
Referenced by GetDetector().
CLHEP::Hep3Vector TotemRPGeometry::GetDetEdgeNormalVector | ( | unsigned int | id | ) | const |
returns a normal vector for the edge of a detector
Definition at line 106 of file TotemRPGeometry.cc.
References GetDetector(), DetGeomDesc::rotation(), and mathSSE::sqrt().
CLHEP::Hep3Vector TotemRPGeometry::GetDetEdgePosition | ( | unsigned int | id | ) | const |
returns the position of the edge of a detector
Definition at line 87 of file TotemRPGeometry.cc.
References LocalToGlobal(), mathSSE::sqrt(), and x.
CLHEP::Hep3Vector TotemRPGeometry::GetDetTranslation | ( | unsigned int | id | ) | const |
returns translation (position) of a detector raw ID as input
Definition at line 274 of file TotemRPGeometry.cc.
References GetDetector(), tmp, DetGeomDesc::translation(), x, y, and z.
Referenced by GetStationCentreZPosition(), and BuildElasticCorrectionsFile::ProcessOnePot().
void TotemRPGeometry::GetReadoutDirection | ( | unsigned int | id, |
double & | dx, | ||
double & | dy | ||
) | const |
returns (the transverse part of) the readout direction in global coordinates raw ID expected
Definition at line 286 of file TotemRPGeometry.cc.
References ztail::d, and LocalToGlobalDirection().
Referenced by GeometryInfoModule::PrintGeometry().
DetGeomDesc * TotemRPGeometry::GetRPDevice | ( | int | copy_no | ) | const |
returns geometry of a RP box
Definition at line 126 of file TotemRPGeometry.cc.
References theRomanPotMap.
Referenced by GetRPGlobalRotation(), GetRPGlobalTranslation(), GetRPThinFoilNormalVector(), and GetRPThinFoilPosition().
CLHEP::HepRotation TotemRPGeometry::GetRPGlobalRotation | ( | int | copy_no | ) | const |
returns number of detectors in the geometry (size of theMap)
Definition at line 307 of file TotemRPGeometry.cc.
References GetRPDevice(), makeMuonMisalignmentScenario::rot, DetGeomDesc::rotation(), and create_public_lumi_plots::xy.
CLHEP::Hep3Vector TotemRPGeometry::GetRPGlobalTranslation | ( | int | copy_no | ) | const |
position of a RP package (translation z corresponds to the first plane - TODO check it)
Definition at line 295 of file TotemRPGeometry.cc.
References GetRPDevice(), tmp, DetGeomDesc::translation(), x, y, and z.
CLHEP::Hep3Vector TotemRPGeometry::GetRPThinFoilNormalVector | ( | int | copy_no | ) | const |
returns a normal vector for the thin foil of a RP box
Definition at line 147 of file TotemRPGeometry.cc.
References GetRPDevice(), and DetGeomDesc::rotation().
CLHEP::Hep3Vector TotemRPGeometry::GetRPThinFoilPosition | ( | int | copy_no | ) | const |
returns the (outer) position of the thin foil of a RP box
Definition at line 138 of file TotemRPGeometry.cc.
References GetRPDevice(), and LocalToGlobal().
double TotemRPGeometry::GetStationCentreZPosition | ( | unsigned int | id | ) | const |
after checks returns the centre of a given station
id | 2-digit decimal number |
Definition at line 191 of file TotemRPGeometry.cc.
References GetDetTranslation(), and z.
CLHEP::Hep3Vector TotemRPGeometry::GlobalToLocal | ( | DetGeomDesc * | gd, |
const CLHEP::Hep3Vector | r | ||
) | const |
Definition at line 237 of file TotemRPGeometry.cc.
References alignCSCRings::r, DetGeomDesc::rotation(), tmp, DetGeomDesc::translation(), x, y, and z.
CLHEP::Hep3Vector TotemRPGeometry::GlobalToLocal | ( | unsigned int | id, |
const CLHEP::Hep3Vector | r | ||
) | const |
Definition at line 248 of file TotemRPGeometry.cc.
References GetDetector(), alignCSCRings::r, DetGeomDesc::rotation(), tmp, DetGeomDesc::translation(), x, y, and z.
CLHEP::Hep3Vector TotemRPGeometry::GlobalToLocalDirection | ( | unsigned int | id, |
const CLHEP::Hep3Vector | dir | ||
) | const |
Definition at line 267 of file TotemRPGeometry.cc.
References dir, GetDetector(), and idealTransformation::rotation.
CLHEP::Hep3Vector TotemRPGeometry::LocalToGlobal | ( | DetGeomDesc * | gd, |
const CLHEP::Hep3Vector | r | ||
) | const |
coordinate transformations between local<–>global reference frames dimensions in mm, raw ID expected
Definition at line 214 of file TotemRPGeometry.cc.
References alignCSCRings::r, DetGeomDesc::rotation(), tmp, DetGeomDesc::translation(), x, y, and z.
Referenced by GetDetEdgePosition(), and GetRPThinFoilPosition().
CLHEP::Hep3Vector TotemRPGeometry::LocalToGlobal | ( | unsigned int | id, |
const CLHEP::Hep3Vector | r | ||
) | const |
Definition at line 225 of file TotemRPGeometry.cc.
References GetDetector(), alignCSCRings::r, DetGeomDesc::rotation(), tmp, DetGeomDesc::translation(), x, y, and z.
CLHEP::Hep3Vector TotemRPGeometry::LocalToGlobalDirection | ( | unsigned int | id, |
const CLHEP::Hep3Vector | dir | ||
) | const |
direction transformations between local<–>global reference frames (dimensions in mm), raw ID expected
Definition at line 260 of file TotemRPGeometry.cc.
References dir, GetDetector(), and DetGeomDesc::rotation().
Referenced by GetReadoutDirection().
|
inline |
Definition at line 158 of file TotemRPGeometry.h.
References theMap.
|
inline |
same as GetDetector
Definition at line 82 of file TotemRPGeometry.h.
References GetDetector().
std::set< unsigned int > TotemRPGeometry::RPsInStation | ( | unsigned int | id | ) | const |
after checks returns set of RP corresponding to the given station ID
Definition at line 181 of file TotemRPGeometry.cc.
References rpsInStation.
std::set< unsigned int > TotemRPGeometry::StationsInArm | ( | unsigned int | id | ) | const |
after checks returns set of stations corresponding to the given arm ID
Definition at line 171 of file TotemRPGeometry.cc.
References stationsInArm.
|
protected |
Definition at line 166 of file TotemRPGeometry.h.
Referenced by BuildSets(), and DetsInRP().
|
protected |
Definition at line 166 of file TotemRPGeometry.h.
Referenced by BuildSets(), and RPsInStation().
|
protected |
map: parent ID -> set of subelements E.g. stationsInArm is map of arm ID -> set of stations (in that arm)
Definition at line 166 of file TotemRPGeometry.h.
Referenced by BuildSets(), and StationsInArm().
|
protected |
map: detectorID –> DetGeomDesc
Definition at line 161 of file TotemRPGeometry.h.
Referenced by AddDetector(), beginDet(), BuildSets(), endDet(), GetDetector(), and NumberOfDetsIncluded().
|
protected |
map: RPID –> DetGeomDesc
Definition at line 162 of file TotemRPGeometry.h.
Referenced by AddRPDevice(), beginRP(), endRP(), and GetRPDevice().