Belle II Software development
TransformData.h
Go to the documentation of this file.
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11/* KLM headers. */
12#include <klm/eklm/geometry/GeometryData.h>
13#include <klm/dataobjects/KLMDigit.h>
14
15/* CLHEP headers. */
16#include <CLHEP/Geometry/Transform3D.h>
17
23namespace Belle2 {
29 namespace EKLM {
30
36
37 public:
38
46 };
47
54 TransformData(bool global, Displacement displacementType);
55
59 TransformData(const TransformData&) = delete;
60
65
70
75 const HepGeom::Transform3D* getSectionTransform(int section) const;
76
82 const HepGeom::Transform3D*
83 getLayerTransform(int section, int layer) const;
84
91 const HepGeom::Transform3D*
92 getSectorTransform(int section, int layer, int sector) const;
93
101 const HepGeom::Transform3D*
102 getPlaneTransform(int section, int layer, int sector, int plane) const;
103
111 const HepGeom::Transform3D*
112 getPlaneDisplacement(int section, int layer, int sector, int plane) const;
113
122 const HepGeom::Transform3D*
123 getSegmentTransform(int section, int layer, int sector, int plane,
124 int segment) const;
125
131 const HepGeom::Transform3D* getStripLocalToGlobal(KLMDigit* hit) const;
132
138 const HepGeom::Transform3D* getStripGlobalToLocal(KLMDigit* hit) const;
139
148 const HepGeom::Transform3D*
149 getStripTransform(int section, int layer, int sector, int plane,
150 int strip) const;
151
161 const HepGeom::Transform3D*
162 getStripGlobalToLocal(int section, int layer, int sector, int plane,
163 int strip) const;
164
179 bool intersection(KLMDigit* hit1, KLMDigit* hit2,
181 double* d1, double* d2, double* sd,
182 bool segments = true) const;
183
189 int getSectorByPosition(int section,
190 const HepGeom::Point3D<double>& position) const;
191
192
201 int* strip1, int* strip2) const;
202
203 private:
204
208 void transformsToGlobal();
209
212
215
217 HepGeom::Transform3D* m_Section;
218
220 HepGeom::Transform3D** m_Layer;
221
223 HepGeom::Transform3D*** m_Sector;
224
226 HepGeom::Transform3D**** m_Plane;
227
229 HepGeom::Transform3D**** m_PlaneDisplacement;
230
232 HepGeom::Transform3D***** m_Segment;
233
235 HepGeom::Transform3D***** m_Strip;
236
238 HepGeom::Transform3D***** m_StripInverse;
239
240 };
241
242 }
243
245}
EKLM element numbers.
EKLM geometry data.
Definition: GeometryData.h:38
Transformation data.
Definition: TransformData.h:35
const HepGeom::Transform3D * getStripTransform(int section, int layer, int sector, int plane, int strip) const
Get strip transformation.
TransformData(const TransformData &)=delete
Copy constructor (disabled).
Displacement
Source of displacement (alignment) data.
Definition: TransformData.h:42
@ c_None
Displacement is not used.
Definition: TransformData.h:43
@ c_Displacement
Use displacement data (for geometry).
Definition: TransformData.h:44
@ c_Alignment
Use alignment data (for everything else).
Definition: TransformData.h:45
HepGeom::Transform3D * m_Section
Section transformations.
const HepGeom::Transform3D * getPlaneDisplacement(int section, int layer, int sector, int plane) const
Get additional displacement for plane internal volumes.
HepGeom::Transform3D ***** m_Strip
Strip transformations.
const HepGeom::Transform3D * getPlaneTransform(int section, int layer, int sector, int plane) const
Get plane transformation.
TransformData & operator=(const TransformData &)=delete
Operator = (disabled).
HepGeom::Transform3D ** m_Layer
Layer transformations.
HepGeom::Transform3D *** m_Sector
Sector transformations.
void transformsToGlobal()
Make transformations global from local.
const HepGeom::Transform3D * getSegmentTransform(int section, int layer, int sector, int plane, int segment) const
Get segment transformation.
int getStripsByIntersection(const HepGeom::Point3D< double > &intersection, int *strip1, int *strip2) const
Find strips by intersection.
const HepGeom::Transform3D * getLayerTransform(int section, int layer) const
Get layer transformation.
HepGeom::Transform3D **** m_Plane
Plane transformations.
HepGeom::Transform3D ***** m_StripInverse
Inverse strip transformations.
int getSectorByPosition(int section, const HepGeom::Point3D< double > &position) const
Get sector by position.
const EKLMElementNumbers * m_ElementNumbers
Element numbers.
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 * getSectorTransform(int section, int layer, int sector) const
Get sector transformation.
HepGeom::Transform3D **** m_PlaneDisplacement
Plane internal volumes displacements.
HepGeom::Transform3D ***** m_Segment
Segment transformations.
const GeometryData * m_GeoDat
Geometry data.
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.
const HepGeom::Transform3D * getSectionTransform(int section) const
Get section transformation.
KLM digit (class representing a digitized hit in RPCs or scintillators).
Definition: KLMDigit.h:29
Abstract base class for different kinds of events.