ATLAS Offline Software
Loading...
Searching...
No Matches
SimHitHandle_SiHit::Imp Class Reference
Collaboration diagram for SimHitHandle_SiHit::Imp:

Public Member Functions

 Imp (const SiHit *h)
bool ensureDetElemInit () const
Amg::Vector3D localToGlobal (const HepGeom::Point3D< double > &) const

Public Attributes

const SiHitthehit
const InDetDD::SiDetectorElementdetelem

Detailed Description

Definition at line 29 of file SimHitHandle_SiHit.cxx.

Constructor & Destructor Documentation

◆ Imp()

SimHitHandle_SiHit::Imp::Imp ( const SiHit * h)
inline

Definition at line 31 of file SimHitHandle_SiHit.cxx.

31: thehit(h),detelem(nullptr) {}
const InDetDD::SiDetectorElement * detelem

Member Function Documentation

◆ ensureDetElemInit()

bool SimHitHandle_SiHit::Imp::ensureDetElemInit ( ) const

Definition at line 54 of file SimHitHandle_SiHit.cxx.

55{
56 if (detelem)
57 return true;
58 int Barrel = thehit->getBarrelEndcap();
59 //Not needed anymore and spoils stuff for slhc studies: if (Barrel== 1) Barrel = -2;//Found this hack in GeoSiHit.
60
61 if (thehit->isPixel()) {
62 Identifier id = VP1DetInfo::pixelIDHelper()->wafer_id( Barrel,
63 thehit->getLayerDisk(),
64 thehit->getPhiModule(),
65 thehit->getEtaModule() );
66 //fixme: id is_valid ?
68 } else {
69 Identifier id = VP1DetInfo::sctIDHelper()->wafer_id( Barrel,
70 thehit->getLayerDisk(),
71 thehit->getPhiModule(),
72 thehit->getEtaModule(),
73 thehit->getSide() );
74 //fixme: id is_valid ?
76 }
77 //Fixme : Handle case where detelem can not be found gracefully. And check pointers from VP1DetInfo!!
78 if (!detelem)
79 VP1Msg::messageDebug("SimHitHandle_SiHit ERROR: Could not get detector element for hit!");
80 return detelem!=nullptr;
81}
virtual const SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier
virtual const SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements via Identifier
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition PixelID.h:360
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
Definition SCT_ID.h:459
static const InDetDD::SCT_DetectorManager * sctDetMgr()
static const InDetDD::PixelDetectorManager * pixelDetMgr()
static const PixelID * pixelIDHelper()
static const SCT_ID * sctIDHelper()
static void messageDebug(const QString &)
Definition VP1Msg.cxx:39
@ Barrel
Definition DetType.h:14

◆ localToGlobal()

Amg::Vector3D SimHitHandle_SiHit::Imp::localToGlobal ( const HepGeom::Point3D< double > & local) const

Definition at line 93 of file SimHitHandle_SiHit.cxx.

94{
95 if (!ensureDetElemInit())
96 return Amg::Vector3D(0,0,0);
97 return Amg::Vector3D(Amg::EigenTransformToCLHEP(detelem->transformHit()) * local);
98}
HepGeom::Transform3D EigenTransformToCLHEP(const Amg::Transform3D &eigenTransf)
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.
Eigen::Matrix< double, 3, 1 > Vector3D

Member Data Documentation

◆ detelem

const InDetDD::SiDetectorElement* SimHitHandle_SiHit::Imp::detelem
mutable

Definition at line 33 of file SimHitHandle_SiHit.cxx.

◆ thehit

const SiHit* SimHitHandle_SiHit::Imp::thehit

Definition at line 32 of file SimHitHandle_SiHit.cxx.


The documentation for this class was generated from the following file: