Belle II Software
release-08-01-10
|
Class to hold misalignment information. More...
#include <MisalignmentCache.h>
Public Types | |
typedef std::unordered_map< Belle2::VxdID::baseType, TGeoHMatrix > | MisalignmentMap |
Hash map type to store existing misalignment transforms. | |
typedef std::tuple< bool, double, double > | MisalignmentShiftType |
Misalignment shift information contains a validity flag (if false, the misaligned object falls outside its sensor) and shifts in u and v. | |
Public Member Functions | |
~MisalignmentCache () | |
destructor to clean up misalignment | |
void | clear () |
clear cache data | |
void | readMisalignmentsFromXml (const std::string &filename) |
Read misalignment data from an xml file and store sensor misalignments. More... | |
void | addMisalignment (Belle2::VxdID sensorID, const TGeoHMatrix &misalignment) |
Add a new entry to the list of sensor misalignments. More... | |
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. More... | |
MisalignmentShiftType | getMisalignmentShift (const VXDTrueHit *hit) |
Return misalignment shift for a VXDTrueHit. More... | |
Static Public Member Functions | |
static MisalignmentShiftType | getMisalignment (const VXDTrueHit *hit) |
Return misalignment shift for a VXDTrueHit. More... | |
static MisalignmentCache & | getInstance () |
Return a reference to the singleton instance. | |
static bool | isAlive () |
Return alive status of the cache (are there misalignment data? | |
Private Member Functions | |
MisalignmentCache () | |
Singleton class, hidden constructor. | |
MisalignmentCache (const MisalignmentCache &)=delete | |
Singleton class, no copying. | |
MisalignmentCache & | operator= (const MisalignmentCache &)=delete |
Singleton class, no assignment. | |
Private Attributes | |
bool | m_isAlive {false} |
Is the cache alive? | |
MisalignmentMap | m_misalignments |
Map to hold solid body misalignments for sensors. | |
Class to hold misalignment information.
Definition at line 29 of file MisalignmentCache.h.
|
inline |
Add a new entry to the list of sensor misalignments.
This method will manually add a new (VxdID, Transform3D) pair to the list.
sensorID | Sensor identifier. |
misalignment | 3D transform to add to the list of sensor misalignments. |
Definition at line 53 of file MisalignmentCache.h.
|
inlinestatic |
Return misalignment shift for a VXDTrueHit.
This is a shorthand for MisalignmentCache::getInstance().getMisalignmentShift.
Definition at line 78 of file MisalignmentCache.h.
MisalignmentCache::MisalignmentShiftType getMisalignmentShift | ( | const VXDTrueHit * | hit | ) |
Return misalignment shift for a VXDTrueHit.
This is the principal misalignment method, used to misalign TrueHits or Clusters (via relation to their TrueHits.
hit | pointer to the TrueHit to misalign |
Definition at line 100 of file MisalignmentCache.cc.
const TGeoHMatrix & getMisalignmentTransform | ( | Belle2::VxdID | id | ) | const |
Return the misalignment transform for a given sensor.
id | VxdID of the desired sensor |
Definition at line 29 of file MisalignmentCache.cc.
void readMisalignmentsFromXml | ( | const std::string & | filename | ) |
Read misalignment data from an xml file and store sensor misalignments.
filename | name of the xml file |
Definition at line 40 of file MisalignmentCache.cc.