23 deque<const DetGeomDesc *> buffer;
25 while (buffer.size() > 0)
54 if (theMap.find(
id) != theMap.end())
70 mapType::const_iterator it = theMap.find(
id);
71 if (it == theMap.end())
72 throw cms::Exception(
"TotemRPGeometry") <<
"Not found detector with ID " <<
id <<
", i.e. " 95 double x=-36.07/2+22.276/(2*
sqrt(2));
96 return LocalToGlobal(
id, CLHEP::Hep3Vector(x, x, 0.));
105 return GetDetector(
id)->rotation() * CLHEP::Hep3Vector(-
sqrt(2)/2, -
sqrt(2)/2, 0.);
113 if (theRomanPotMap.find(
id) != theRomanPotMap.end())
126 RPDeviceMapType::const_iterator it = theRomanPotMap.find(
id);
127 if (it == theRomanPotMap.end())
128 throw cms::Exception(
"TotemRPGeometry") <<
"Not found RP device with ID " <<
id <<
", i.e. " 140 return LocalToGlobal(GetRPDevice(copy_no), CLHEP::Hep3Vector(0., -135.65/2.0, 0.));
147 return GetRPDevice(copy_no)->rotation() * CLHEP::Hep3Vector(0., -1., 0.);
155 stationsInArm.clear();
156 rpsInStation.clear();
160 for (mapType::const_iterator it = theMap.begin(); it != theMap.end(); ++it)
167 stationsInArm[armId].insert(armId);
168 rpsInStation[stId].insert(rpId);
169 detsInRP[rpId].insert(detId);
176 mapSetType::const_iterator it = stationsInArm.find(
id);
177 if (it == stationsInArm.end())
178 throw cms::Exception(
"TotemRPGeometry") <<
"Arm with ID " <<
id <<
" not found.";
186 mapSetType::const_iterator it = rpsInStation.find(
id);
187 if (it == rpsInStation.end())
188 throw cms::Exception(
"TotemRPGeometry") <<
"Station with ID " <<
id <<
" not found.";
196 mapSetType::const_iterator it = detsInRP.find(
id);
197 if (it == detsInRP.end())
198 throw cms::Exception(
"TotemRPGeometry") <<
"RP with ID " <<
id <<
" not found.";
229 CLHEP::Hep3Vector
tmp =
r;
241 CLHEP::Hep3Vector
tmp =
r;
252 return GetDetector(
id)->rotation() *
dir;
259 return (GetDetector(
id)->
rotation()).Inverse() *
dir;
267 CLHEP::Hep3Vector
tmp;
278 CLHEP::Hep3Vector
d = LocalToGlobalDirection(
id, CLHEP::Hep3Vector(0., 1., 0.));
287 CLHEP::Hep3Vector
tmp;
300 GetRPDevice(copy_no)->rotation().GetComponents(xx, xy, xz, yx, yy, yz, zx, zy, zz);
301 CLHEP::HepRep3x3 rot_mat( xx, xy, xz, yx, yy, yz, zx, zy, zz);
302 CLHEP::HepRotation
rot(rot_mat);
Detector ID class for TOTEM Si strip detectors.
DetGeomDesc * GetRPDevice(unsigned int id) const
returns geometry of a RP box
DDRotationMatrix rotation() const
geometry information
CLHEP::Hep3Vector GetDetEdgePosition(unsigned int id) const
returns the position of the edge of a detector
CLHEP::Hep3Vector GetRPGlobalTranslation(int copy_no) const
position of a RP package (translation z corresponds to the first plane - TODO check it) ...
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
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 ...
CTPPSDetId getStationId() const
char AddRPDevice(unsigned int id, const DetGeomDesc *&det_geom_desc)
adds a RP package (primary vacuum) to a map
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
std::set< unsigned int > DetsInRP(unsigned int) const
T x() const
Cartesian x coordinate.
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
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< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Geometrical description of a detector.
DDTranslation translation() const
CTPPSDetId getRPId() 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
const char DDD_CTPPS_DIAMONDS_DETECTOR_NAME[]
CLHEP::HepRotation GetRPGlobalRotation(int copy_no) const
returns number of detectors in the geometry (size of theMap)
CTPPSDetId getArmId() const
virtual DetId geographicalID() const
CLHEP::Hep3Vector LocalToGlobal(DetGeomDesc *gd, const CLHEP::Hep3Vector r) const
Base class for CTPPS detector IDs.
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
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 succesf...
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