11 #include <alignment/reconstruction/AlignableEKLMRecoHit.h>
13 #include <alignment/GlobalDerivatives.h>
14 #include <alignment/GlobalLabel.h>
15 #include <alignment/reconstruction/AlignableEKLMRecoHit.h>
16 #include <klm/dataobjects/eklm/EKLMElementNumbers.h>
17 #include <klm/dataobjects/eklm/EKLMHit2d.h>
18 #include <klm/dataobjects/KLMDigit.h>
19 #include <klm/dataobjects/KLMElementNumbers.h>
20 #include <klm/dbobjects/eklm/EKLMAlignment.h>
21 #include <klm/eklm/geometry/GeometryData.h>
22 #include <klm/eklm/geometry/TransformDataGlobalAligned.h>
25 using namespace alignment;
33 genfit::PlanarMeasurement(1)
36 int digit, plane, segment, strip;
37 const HepGeom::Transform3D* t;
39 CLHEP::Hep3Vector origin;
40 CLHEP::Hep3Vector u(1, 0, 0);
41 CLHEP::Hep3Vector v(0, 1, 0);
50 if (hit2ds.
size() != 1)
51 B2FATAL(
"Incorrect number of related EKLMHit2ds.");
53 if (eklmDigits.
size() != 2)
54 B2FATAL(
"Incorrect number of related KLMDigits.");
55 digit = hit->getDigitIdentifier();
56 m_Section = eklmDigits[digit]->getSection();
57 m_Layer = eklmDigits[digit]->getLayer();
58 m_Sector = eklmDigits[digit]->getSector();
59 plane = eklmDigits[digit]->getPlane();
60 segment = (eklmDigits[digit]->getStrip() - 1) /
68 origin = t->getTranslation();
82 r = t->getRotation().inverse();
89 ((eklmDigits[digit]->getStrip() - 1) %
102 std::vector<int> labGlobal;
108 const double dalpha = 0;
109 const double dxs = 0;
110 const double dys = 0;
111 const double sinda = sin(dalpha);
112 const double cosda = cos(dalpha);
115 HepGeom::Transform3D t;
119 globalPos.setX(sop->getPos().X() /
Unit::cm * CLHEP::cm);
120 globalPos.setY(sop->getPos().Y() /
Unit::cm * CLHEP::cm);
121 globalPos.setZ(sop->getPos().Z() /
Unit::cm * CLHEP::cm);
122 globalPos = t * globalPos;
123 double x = globalPos.x() / CLHEP::cm *
Unit::cm;
124 double y = globalPos.y() / CLHEP::cm *
Unit::cm;
131 TMatrixD derGlobal(2, 3);