#include <RpcGeomInfo.h>
Inheritance diagram for RpcGeomInfo:
Public Member Functions | |
RpcGeomInfo (unsigned int rpcid, IDetectorElement *me, IDetectorElement *parent) | |
virtual | ~RpcGeomInfo () |
virtual unsigned int | rpcid () const |
Return the fully qualified packed ID. | |
virtual const CLHEP::Hep3Vector & | globalPosition () const |
Return the position in world coordinates. | |
virtual const CLHEP::Hep3Vector & | localPosition () const |
Return the position in the natural coordinate system for doing reconstruction (AD local or Pool local coordinates). | |
virtual const CLHEP::Hep3Vector & | globalDirection () const |
Return the direction normal to the RPC face in the global coordinate system. | |
virtual const CLHEP::Hep3Vector & | localDirection () const |
Return the direction normal to the RPC face in the natural coordinate system for doing reconstruction (AD local or Pool local coordinates). | |
virtual const IDetectorElement & | detectorElement () const |
Return coresponding DetectorElement. | |
virtual const IDetectorElement & | parentDetector () const |
Return DE for detector volume containing RPC. | |
Private Attributes | |
unsigned int | m_id |
IDetectorElement * | m_me |
IDetectorElement * | m_parent |
CLHEP::Hep3Vector * | m_gp |
CLHEP::Hep3Vector * | m_lp |
CLHEP::Hep3Vector * | m_gd |
CLHEP::Hep3Vector * | m_ld |
Give access to information about a particular touchable Rpc.
xujl@ihep.ac.cn Fri May 29, 2009
Definition at line 18 of file RpcGeomInfo.h.
RpcGeomInfo::RpcGeomInfo | ( | unsigned int | rpcid, | |
IDetectorElement * | me, | |||
IDetectorElement * | parent | |||
) |
RpcGeomInfo::~RpcGeomInfo | ( | ) | [virtual] |
unsigned int RpcGeomInfo::rpcid | ( | ) | const [virtual] |
Return the fully qualified packed ID.
Implements IRpcGeomInfo.
Definition at line 31 of file RpcGeomInfo.cc.
00032 { 00033 return m_id; 00034 }
const Hep3Vector & RpcGeomInfo::globalPosition | ( | ) | const [virtual] |
Return the position in world coordinates.
Implements IRpcGeomInfo.
Definition at line 36 of file RpcGeomInfo.cc.
00037 { 00038 if (m_gp) return *m_gp; 00039 00040 Gaudi::XYZPoint zero(0,0,0); 00041 Gaudi::XYZPoint gp = m_me->geometry()->toGlobal(zero); 00042 00043 m_gp = new Hep3Vector(gp.x(),gp.y(),gp.z()); 00044 return *m_gp; 00045 }
const Hep3Vector & RpcGeomInfo::localPosition | ( | ) | const [virtual] |
Return the position in the natural coordinate system for doing reconstruction (AD local or Pool local coordinates).
Implements IRpcGeomInfo.
Definition at line 47 of file RpcGeomInfo.cc.
00048 { 00049 if (m_lp) return *m_lp; 00050 00051 Gaudi::XYZPoint zero(0,0,0); 00052 Gaudi::XYZPoint gp = m_me->geometry()->toGlobal(zero); 00053 Gaudi::XYZPoint lp = m_parent->geometry()->toLocal(gp); 00054 m_lp = new Hep3Vector(lp.x(),lp.y(),lp.z()); 00055 return *m_lp; 00056 }
const Hep3Vector & RpcGeomInfo::globalDirection | ( | ) | const [virtual] |
Return the direction normal to the RPC face in the global coordinate system.
Implements IRpcGeomInfo.
Definition at line 58 of file RpcGeomInfo.cc.
00059 { 00060 if (m_gd) return *m_gd; 00061 00062 Gaudi::XYZVector norm(0,0,1); 00063 Gaudi::XYZVector gd = m_me->geometry()->toGlobal(norm); 00064 m_gd = new Hep3Vector(gd.x(),gd.y(),gd.z()); 00065 return *m_gd; 00066 }
const Hep3Vector & RpcGeomInfo::localDirection | ( | ) | const [virtual] |
Return the direction normal to the RPC face in the natural coordinate system for doing reconstruction (AD local or Pool local coordinates).
Implements IRpcGeomInfo.
Definition at line 68 of file RpcGeomInfo.cc.
00069 { 00070 if (m_ld) return *m_ld; 00071 00072 Gaudi::XYZVector norm(0,0,1); 00073 Gaudi::XYZVector gd = m_me->geometry()->toGlobal(norm); 00074 Gaudi::XYZVector ld = m_parent->geometry()->toLocal(gd); 00075 m_ld = new Hep3Vector(ld.x(),ld.y(),ld.z()); 00076 return *m_ld; 00077 }
const IDetectorElement & RpcGeomInfo::detectorElement | ( | ) | const [virtual] |
Return coresponding DetectorElement.
Implements IRpcGeomInfo.
Definition at line 79 of file RpcGeomInfo.cc.
00080 { 00081 return *m_me; 00082 }
const IDetectorElement & RpcGeomInfo::parentDetector | ( | ) | const [virtual] |
Return DE for detector volume containing RPC.
Implements IRpcGeomInfo.
Definition at line 84 of file RpcGeomInfo.cc.
00085 { 00086 return *m_parent; 00087 }
unsigned int RpcGeomInfo::m_id [private] |
Definition at line 52 of file RpcGeomInfo.h.
IDetectorElement* RpcGeomInfo::m_me [private] |
Definition at line 53 of file RpcGeomInfo.h.
IDetectorElement* RpcGeomInfo::m_parent [private] |
Definition at line 54 of file RpcGeomInfo.h.
CLHEP::Hep3Vector* RpcGeomInfo::m_gp [mutable, private] |
Definition at line 56 of file RpcGeomInfo.h.
CLHEP::Hep3Vector * RpcGeomInfo::m_lp [mutable, private] |
Definition at line 56 of file RpcGeomInfo.h.
CLHEP::Hep3Vector * RpcGeomInfo::m_gd [mutable, private] |
Definition at line 56 of file RpcGeomInfo.h.
CLHEP::Hep3Vector * RpcGeomInfo::m_ld [mutable, private] |
Definition at line 56 of file RpcGeomInfo.h.