51 double xPos,
double yPos,
double zPos,
double phi,
double tanLambda,
52 double stereoAngle,
double uRes) {
53 Vector3d aCenter(xPos, yPos, zPos);
54 Vector2d aResolution(uRes, 0.);
55 Vector2d aPrecision(1. / (uRes * uRes), 0.);
57 const double cosLambda = 1. / sqrt(1. + tanLambda * tanLambda);
58 Vector3d tDir(cos(phi) * cosLambda, sin(phi) * cosLambda,
59 tanLambda * cosLambda);
61 const double rad = sqrt(xPos * xPos + yPos * yPos);
62 const double scale = sqrt(1. + stereoAngle * stereoAngle);
63 Vector3d vDir(-yPos * stereoAngle / rad / scale,
64 xPos * stereoAngle / rad / scale, 1. / scale);
66 Vector3d uDir = vDir.cross(tDir).normalized();
68 Vector3d nDir = uDir.cross(vDir).normalized();
71 measTrafo << uDir[0], uDir[1], uDir[2], vDir[0], vDir[1], vDir[2], nDir[0], nDir[1], nDir[2];
72 Matrix3d alignTrafo = Matrix3d::Identity();
74 aPrecision, measTrafo, alignTrafo);
91 double xPos,
double yPos,
double zPos,
double phi,
double tanLambda,
92 double xRes,
double yRes,
double zRes) {
94 const double cosLambda = 1. / sqrt(1. + tanLambda * tanLambda);
95 Vector3d tDir(cos(phi) * cosLambda, sin(phi) * cosLambda,
96 tanLambda * cosLambda);
98 Vector3d vDir(0., 0., 1.);
100 Vector3d uDir = vDir.cross(tDir).normalized();
102 Vector3d nDir = uDir.cross(vDir).normalized();
104 const double uVar = uDir[0] * xRes * xRes * uDir[0]
105 + uDir[1] * yRes * yRes * uDir[1];
106 Vector3d aCenter(xPos, yPos, zPos);
107 Vector2d aResolution(sqrt(uVar), zRes);
108 Vector2d aPrecision(1. / uVar, 1. / (zRes * zRes));
111 measTrafo << uDir[0], uDir[1], uDir[2], vDir[0], vDir[1], vDir[2], nDir[0], nDir[1], nDir[2];
112 Matrix3d alignTrafo = Matrix3d::Identity();
114 aPrecision, measTrafo, alignTrafo);
Definitions for exampleUtil(ities) for a Cylindrical Drift Chamber.
Namespace for the general broken lines package.
GblDetectorLayer CreateWireCdc(const std::string aName, unsigned int layer, double xPos, double yPos, double zPos, double phi, double tanLambda, double stereoAngle, double uRes)
Create a drift chamber wire with 1D measurement.
GblDetectorLayer CreateImpactPar(const std::string aName, unsigned int layer, double xPos, double yPos, double zPos, double phi, double tanLambda, double xRes, double yRes, double zRes)
Create detector plane for impact parameters as 2D measurement.