Belle II Software development
|
Transformation data. More...
#include <TransformData.h>
Public Types | |
enum | Displacement { c_None , c_Displacement , c_Alignment } |
Source of displacement (alignment) data. More... | |
Public Member Functions | |
TransformData (bool global, Displacement displacementType) | |
Constructor. | |
TransformData (const TransformData &)=delete | |
Copy constructor (disabled). | |
TransformData & | operator= (const TransformData &)=delete |
Operator = (disabled). | |
~TransformData () | |
Destructor. | |
const HepGeom::Transform3D * | getSectionTransform (int section) const |
Get section transformation. | |
const HepGeom::Transform3D * | getLayerTransform (int section, int layer) const |
Get layer transformation. | |
const HepGeom::Transform3D * | getSectorTransform (int section, int layer, int sector) const |
Get sector transformation. | |
const HepGeom::Transform3D * | getPlaneTransform (int section, int layer, int sector, int plane) const |
Get plane transformation. | |
const HepGeom::Transform3D * | getPlaneDisplacement (int section, int layer, int sector, int plane) const |
Get additional displacement for plane internal volumes. | |
const HepGeom::Transform3D * | getSegmentTransform (int section, int layer, int sector, int plane, int segment) const |
Get segment transformation. | |
const HepGeom::Transform3D * | getStripLocalToGlobal (KLMDigit *hit) const |
Get strip local to global transformation by hit. | |
const HepGeom::Transform3D * | getStripGlobalToLocal (KLMDigit *hit) const |
Get strip global to local transformation by hit. | |
const HepGeom::Transform3D * | getStripTransform (int section, int layer, int sector, int plane, int strip) const |
Get strip transformation. | |
const HepGeom::Transform3D * | getStripGlobalToLocal (int section, int layer, int sector, int plane, int strip) const |
Get strip global to local transformation by hit. | |
bool | intersection (KLMDigit *hit1, KLMDigit *hit2, HepGeom::Point3D< double > *cross, double *d1, double *d2, double *sd, bool segments=true) const |
Check if strips intersect, and find intersection point if yes. | |
int | getSectorByPosition (int section, const HepGeom::Point3D< double > &position) const |
Get sector by position. | |
int | getStripsByIntersection (const HepGeom::Point3D< double > &intersection, int *strip1, int *strip2) const |
Find strips by intersection. | |
Private Member Functions | |
void | transformsToGlobal () |
Make transformations global from local. | |
Private Attributes | |
const EKLMElementNumbers * | m_ElementNumbers |
Element numbers. | |
const GeometryData * | m_GeoDat |
Geometry data. | |
HepGeom::Transform3D * | m_Section |
Section transformations. | |
HepGeom::Transform3D ** | m_Layer |
Layer transformations. | |
HepGeom::Transform3D *** | m_Sector |
Sector transformations. | |
HepGeom::Transform3D **** | m_Plane |
Plane transformations. | |
HepGeom::Transform3D **** | m_PlaneDisplacement |
Plane internal volumes displacements. | |
HepGeom::Transform3D ***** | m_Segment |
Segment transformations. | |
HepGeom::Transform3D ***** | m_Strip |
Strip transformations. | |
HepGeom::Transform3D ***** | m_StripInverse |
Inverse strip transformations. | |
Transformation data.
All data and function results are in CLHEP units unless noted otherwise.
Definition at line 35 of file TransformData.h.
enum Displacement |
Source of displacement (alignment) data.
Enumerator | |
---|---|
c_None | Displacement is not used. |
c_Displacement | Use displacement data (for geometry). |
c_Alignment | Use alignment data (for everything else). |
Definition at line 42 of file TransformData.h.
TransformData | ( | bool | global, |
Displacement | displacementType | ||
) |
Constructor.
[in] | global | If true, load global transformations (false - local). |
[in] | displacementType | Displacement type. |
Definition at line 25 of file TransformData.cc.
~TransformData | ( | ) |
Destructor.
Definition at line 188 of file TransformData.cc.
const HepGeom::Transform3D * getLayerTransform | ( | int | section, |
int | layer | ||
) | const |
Get layer transformation.
[in] | section | Section number. |
[in] | layer | Layer number. |
Definition at line 290 of file TransformData.cc.
const HepGeom::Transform3D * getPlaneDisplacement | ( | int | section, |
int | layer, | ||
int | sector, | ||
int | plane | ||
) | const |
Get additional displacement for plane internal volumes.
[in] | section | Section number. |
[in] | layer | Layer number. |
[in] | sector | Sector number. |
[in] | plane | Plane number. |
Definition at line 307 of file TransformData.cc.
const HepGeom::Transform3D * getPlaneTransform | ( | int | section, |
int | layer, | ||
int | sector, | ||
int | plane | ||
) | const |
Get plane transformation.
[in] | section | Section number. |
[in] | layer | Layer number. |
[in] | sector | Sector number. |
[in] | plane | Plane number. |
Definition at line 301 of file TransformData.cc.
const HepGeom::Transform3D * getSectionTransform | ( | int | section | ) | const |
Get section transformation.
[in] | section | Section number. |
Definition at line 284 of file TransformData.cc.
int getSectorByPosition | ( | int | section, |
const HepGeom::Point3D< double > & | position | ||
) | const |
Get sector by position.
[in] | section | Section number. |
[in] | position | Position. |
Definition at line 416 of file TransformData.cc.
const HepGeom::Transform3D * getSectorTransform | ( | int | section, |
int | layer, | ||
int | sector | ||
) | const |
Get sector transformation.
[in] | section | Section number. |
[in] | layer | Layer number. |
[in] | sector | Sector number. |
Definition at line 295 of file TransformData.cc.
const HepGeom::Transform3D * getSegmentTransform | ( | int | section, |
int | layer, | ||
int | sector, | ||
int | plane, | ||
int | segment | ||
) | const |
Get segment transformation.
[in] | section | Section number. |
[in] | layer | Layer number. |
[in] | sector | Sector number. |
[in] | plane | Plane number. |
[in] | segment | Segment number. |
Definition at line 313 of file TransformData.cc.
const HepGeom::Transform3D * getStripGlobalToLocal | ( | int | section, |
int | layer, | ||
int | sector, | ||
int | plane, | ||
int | strip | ||
) | const |
Get strip global to local transformation by hit.
[in] | section | Section number. |
[in] | layer | Layer number. |
[in] | sector | Sector number. |
[in] | plane | Plane number. |
[in] | strip | Strip number. |
Definition at line 341 of file TransformData.cc.
const HepGeom::Transform3D * getStripGlobalToLocal | ( | KLMDigit * | hit | ) | const |
Get strip global to local transformation by hit.
[in] | hit | Hit. |
Definition at line 334 of file TransformData.cc.
const HepGeom::Transform3D * getStripLocalToGlobal | ( | KLMDigit * | hit | ) | const |
Get strip local to global transformation by hit.
[in] | hit | Hit. |
Definition at line 327 of file TransformData.cc.
int getStripsByIntersection | ( | const HepGeom::Point3D< double > & | intersection, |
int * | strip1, | ||
int * | strip2 | ||
) | const |
Find strips by intersection.
[in] | intersection | Intersection point. |
[out] | strip1 | Strip 1 global number. |
[out] | strip2 | Strip 2 global number. |
Definition at line 440 of file TransformData.cc.
const HepGeom::Transform3D * getStripTransform | ( | int | section, |
int | layer, | ||
int | sector, | ||
int | plane, | ||
int | strip | ||
) | const |
Get strip transformation.
[in] | section | Section number. |
[in] | layer | Layer number. |
[in] | sector | Sector number. |
[in] | plane | Plane number. |
[in] | strip | Strip number. |
Definition at line 320 of file TransformData.cc.
bool intersection | ( | KLMDigit * | hit1, |
KLMDigit * | hit2, | ||
HepGeom::Point3D< double > * | cross, | ||
double * | d1, | ||
double * | d2, | ||
double * | sd, | ||
bool | segments = true |
||
) | const |
Check if strips intersect, and find intersection point if yes.
[in] | hit1 | First hit. |
[in] | hit2 | Second hit. |
[out] | cross | Crossing point (coordinate unit is cm). |
[out] | d1 | Distance from hit to SiPM of strip 1, cm. |
[out] | d2 | Distance from hit to SiPM of strip 2, cm. |
[out] | sd | Shortest distance between strips, cm. Or if second strip is closer to interaction point, then (- shortest distance). |
[in] | segments | Check if segments intersect (may need to turn this check off for debugging). |
Line parametric equations: (s1_1g) + (s1_2g - s1_1g) * t1 = a1 + v1 * t1, (s2_1g) + (s2_2g - s2_1g) * t2 = a2 + v2 * t2. Points of closest approach: t1 = ((v1,v2)*(d,v2) - v2^2*(d,v1)) / (v1^2*v2^2 - (v1,v2)^2) t2 = - ((v1,v2)*(d,v1) - v1^2*(d,v2)) / (v1^2*v2^2 - (v1,v2)^2) where d = a1 - a2.
Definition at line 348 of file TransformData.cc.
|
private |
Make transformations global from local.
Definition at line 239 of file TransformData.cc.
|
private |
Element numbers.
Definition at line 211 of file TransformData.h.
|
private |
Geometry data.
Definition at line 214 of file TransformData.h.
|
private |
Layer transformations.
Definition at line 220 of file TransformData.h.
|
private |
Plane transformations.
Definition at line 226 of file TransformData.h.
|
private |
Plane internal volumes displacements.
Definition at line 229 of file TransformData.h.
|
private |
Section transformations.
Definition at line 217 of file TransformData.h.
|
private |
Sector transformations.
Definition at line 223 of file TransformData.h.
|
private |
Segment transformations.
Definition at line 232 of file TransformData.h.
|
private |
Strip transformations.
Definition at line 235 of file TransformData.h.
|
private |
Inverse strip transformations.
Definition at line 238 of file TransformData.h.