1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
#ifndef GeometryCommonTopologiesTwoBowedSurfacesDeformation_H
#define GeometryCommonTopologiesTwoBowedSurfacesDeformation_H
/// TwoBowedSurfacesAlignmentParameters
///
/// Class to apply corrections to local positions resulting
/// from two surfaces chained in local y. Possible bows are
/// parametrised using Legendre polynomials up to second order,
/// excluding 0th and 1st order that are already treated by
/// local w shift and rotations around local u and v axes.
/// In addition store relative shifts and rotations of the
/// two surfaces.
///
#include "Geometry/CommonTopologies/interface/SurfaceDeformation.h"
#include <array>
class TwoBowedSurfacesDeformation : public SurfaceDeformation {
public:
/// Constructor from vector of parameters, its size() must be
/// between minParameterSize() and maxParameterSize().
/// The parameters are (in that order)
/// - mean sagittaX of both surfaces
/// - mean sagittaXY
/// - mean sagittaY
/// - 'delta' u of both surfaces (shift surface at lower/higher y by +u/-u)
/// - 'delta' v of both surfaces
/// - 'delta' w of both surfaces
/// - 'delta' alpha of both surfaces (rotate around local x)
/// - 'delta' beta
/// - 'delta' gamma
/// - 'delta' sagittaX of both surfaces (add/subtract for surfaces at lower/higher y)
/// - 'delta' sagittaXY
/// - 'delta' sagittaY
/// - ySplit: y-value where surfaces are split
TwoBowedSurfacesDeformation(const std::vector<double> ¶meters);
TwoBowedSurfacesDeformation *clone() const override;
/// specific type, i.e. SurfaceDeformationFactory::kTwoBowedSurfaces
int type() const override;
/// correction to add to local position depending on
/// - track parameters in local frame (from LocalTrajectoryParameters):
/// * track position as Local2DPoint(x,y)
/// * track angles as LocalTrackAngles(dxdz, dydz)
/// - length of surface (local y-coordinate)
/// - width of surface (local x-coordinate)
Local2DVector positionCorrection(const Local2DPoint &localPos,
const LocalTrackAngles &localAngles,
double length,
double width) const override;
/// update information with parameters of 'other',
/// false in case the type or some parameters do not match and thus
/// the information cannot be used (then no changes are done),
/// true if merge was successful
bool add(const SurfaceDeformation &other) override;
/// parameters - see constructor for meaning
std::vector<double> parameters() const override;
// the size
static constexpr unsigned int parSize = 13;
static constexpr unsigned int parameterSize() { return parSize; }
/// minimum size of vector that is accepted by constructor from vector
static constexpr unsigned int minParameterSize() { return parameterSize(); }
/// maximum size of vector that is accepted by constructor from vector
static constexpr unsigned int maxParameterSize() { return parameterSize(); }
// location of ySplit
static constexpr unsigned int k_ySplit() { return parameterSize() - 1; }
private:
double theParameters[parSize];
};
#endif
|