23 deque<const DetGeomDesc *> buffer;
25 while (buffer.size() > 0) {
74 mapType::const_iterator it =
theMap.find(
id);
76 throw cms::Exception(
"TotemRPGeometry") <<
"Detector with ID " <<
id <<
" not found.";
98 double x=-36.07/2+22.276/(2*
sqrt(2));
129 RPDeviceMapType::const_iterator it =
theRomanPotMap.find(copy_no);
131 throw cms::Exception(
"TotemRPGeometry") <<
"RP device with ID " << copy_no <<
" not found.";
162 for (mapType::const_iterator it =
theMap.begin(); it !=
theMap.end(); ++it) {
175 throw cms::Exception(
"TotemRPGeometry") <<
"Arm with ID " <<
id <<
" not found.";
185 throw cms::Exception(
"TotemRPGeometry") <<
"Station with ID " <<
id <<
" not found.";
193 unsigned int st_id =
id%10;
194 unsigned int arm_id =
id/10;
206 mapSetType::const_iterator it =
detsInRP.find(
id);
208 throw cms::Exception(
"TotemRPGeometry") <<
"RP with ID " <<
id <<
" not found.";
239 CLHEP::Hep3Vector
tmp =
r;
251 CLHEP::Hep3Vector
tmp =
r;
277 CLHEP::Hep3Vector
tmp;
297 CLHEP::Hep3Vector
tmp;
309 double xx,
xy, xz, yx, yy, yz, zx, zy, zz;
311 CLHEP::HepRep3x3 rot_mat( xx, xy, xz, yx, yy, yz, zx, zy, zz);
312 CLHEP::HepRotation
rot(rot_mat);
DDRotationMatrix rotation() const
geometry information
CLHEP::Hep3Vector GetDetEdgePosition(unsigned int id) const
returns the position of the edge of a detector
static unsigned int rpOfDet(unsigned int i)
returns ID of RP for given detector ID ''i''
CLHEP::Hep3Vector GetRPGlobalTranslation(int copy_no) const
position of a RP package (translation z corresponds to the first plane - TODO check it) ...
double GetStationCentreZPosition(unsigned int) const
CLHEP::Hep3Vector GetRPThinFoilPosition(int copy_no) const
returns the (outer) position of the thin foil of a RP box
char Build(const DetGeomDesc *)
build up from DetGeomDesc structure, return 0 = success
void BuildSets()
builds maps element ID –> set of subelements (re)builds stationsInArm, rpsInStation, detsInRP out of theMap
static unsigned int rawToDecId(unsigned int raw)
fast conversion Raw to Decimal ID
const char DDD_TOTEM_RP_PRIMARY_VACUUM_NAME[]
DDD name of RP.
DetGeomDesc * GetDetector(unsigned int) const
returns geometry of a detector performs necessary checks, returns NULL if fails input is raw ID ...
void GetReadoutDirection(unsigned int id, double &dx, double &dy) const
std::set< unsigned int > RPsInStation(unsigned int) const
after checks returns set of RP corresponding to the given station ID
uint32_t rawId() const
get the raw id
std::set< unsigned int > DetsInRP(unsigned int) const
CLHEP::Hep3Vector GlobalToLocalDirection(unsigned int id, const CLHEP::Hep3Vector dir) const
CLHEP::Hep3Vector GetDetTranslation(unsigned int id) const
virtual ConstContainer components() const
access to the tree structure
static unsigned int stOfDet(unsigned int i)
returns ID of station for given detector ID ''i''
mapSetType stationsInArm
map: parent ID -> set of subelements E.g. stationsInArm is map of arm ID -> set of stations (in that ...
Geometrical description of a detector.
mapType theMap
map: detectorID –> DetGeomDesc
DDTranslation translation() const
CLHEP::Hep3Vector GetDetEdgeNormalVector(unsigned int id) const
returns a normal vector for the edge of a detector
CLHEP::Hep3Vector GlobalToLocal(DetGeomDesc *gd, const CLHEP::Hep3Vector r) const
CLHEP::Hep3Vector LocalToGlobalDirection(unsigned int id, const CLHEP::Hep3Vector dir) const
DetGeomDesc * GetRPDevice(int copy_no) const
returns geometry of a RP box
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) ...
virtual int copyno() const
CLHEP::HepRotation GetRPGlobalRotation(int copy_no) const
returns number of detectors in the geometry (size of theMap)
static unsigned int armOfDet(unsigned int i)
returns ID of arm for given detector ID ''i''
virtual DetId geographicalID() const
CLHEP::Hep3Vector LocalToGlobal(DetGeomDesc *gd, const CLHEP::Hep3Vector r) const
std::set< unsigned int > StationsInArm(unsigned int) const
after checks returns set of stations corresponding to the given arm ID
std::vector< std::vector< double > > tmp
RPDeviceMapType theRomanPotMap
map: RPID –> DetGeomDesc
const char DDD_TOTEM_RP_DETECTOR_NAME[]
DDD name of RP detector.
char AddDetector(unsigned int, const DetGeomDesc *&)
adds an item to the map (detector ID –> DetGeomDesc) performs necessary checks, returns 0 if succesfu...
const std::string & name() const
Returns the name.
CLHEP::Hep3Vector GetRPThinFoilNormalVector(int copy_no) const
returns a normal vector for the thin foil of a RP box