9#ifndef VXD_MISALIGNMENT_CACHE_H
10#define VXD_MISALIGNMENT_CACHE_H
12#include <vxd/dataobjects/VxdID.h>
13#include <vxd/dataobjects/VXDTrueHit.h>
14#include <unordered_map>
17#include <TGeoMatrix.h>
Class VXDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Class to hold misalignment information.
static bool isAlive()
Return alive status of the cache (are there misalignment data?
static MisalignmentShiftType getMisalignment(const VXDTrueHit *hit)
Return misalignment shift for a VXDTrueHit.
void addMisalignment(Belle2::VxdID sensorID, const TGeoHMatrix &misalignment)
Add a new entry to the list of sensor misalignments.
MisalignmentCache()
Singleton class, hidden constructor.
bool m_isAlive
Is the cache alive?
MisalignmentShiftType getMisalignmentShift(const VXDTrueHit *hit)
Return misalignment shift for a VXDTrueHit.
const MisalignmentMap & getMisalignments() const
Return the list of sensor misalignments.
const TGeoHMatrix & getMisalignmentTransform(Belle2::VxdID id) const
Return the misalignment transform for a given sensor.
MisalignmentCache & operator=(const MisalignmentCache &)=delete
Singleton class, no assignment.
std::tuple< bool, double, double > MisalignmentShiftType
Misalignment shift information contains a validity flag (if false, the misaligned object falls outsid...
MisalignmentMap m_misalignments
Map to hold solid body misalignments for sensors.
std::unordered_map< Belle2::VxdID::baseType, TGeoHMatrix > MisalignmentMap
Hash map type to store existing misalignment transforms.
void clear()
clear cache data
static MisalignmentCache & getInstance()
Return a reference to the singleton instance.
~MisalignmentCache()
destructor to clean up misalignment
MisalignmentCache(const MisalignmentCache &)=delete
Singleton class, no copying.
void readMisalignmentsFromXml(const std::string &filename)
Read misalignment data from an xml file and store sensor misalignments.
Class to uniquely identify a any structure of the PXD and SVD.
Abstract base class for different kinds of events.