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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
#ifndef Geometry_CommonTopologies_ProxyPixelTopology_H
#define Geometry_CommonTopologies_ProxyPixelTopology_H
/// ProxyStripTopology
///
/// Class derived from PixelTopology that serves as a proxy to the
/// actual topology for a given PixelGeomDetType. In addition, the
/// class holds a pointer to the surface deformation parameters.
/// ProxyPixelTopology takes over ownership of the surface
/// deformation parameters.
///
/// All inherited virtual methods that take the predicted track
/// state as a parameter are reimplemented in order to apply
/// corrections due to the surface deformations.
//
/// The 'old' methods without the track predictions simply call
/// the method of the actual topology.
///
/// \author : Andreas Mussgiller
/// date : December 2010
#include "Geometry/CommonTopologies/interface/SurfaceDeformation.h"
#include "Geometry/CommonTopologies/interface/PixelTopology.h"
#include "Geometry/CommonTopologies/interface/PixelGeomDetType.h"
#include <memory>
class Plane;
class ProxyPixelTopology final : public PixelTopology {
public:
ProxyPixelTopology(PixelGeomDetType const *type, Plane *bp);
LocalPoint localPosition(const MeasurementPoint &) const override;
/// conversion taking also the predicted track state
LocalPoint localPosition(const MeasurementPoint &mp, const Topology::LocalTrackPred &trkPred) const override;
LocalError localError(const MeasurementPoint &, const MeasurementError &) const override;
/// conversion taking also the predicted track state
LocalError localError(const MeasurementPoint &mp,
const MeasurementError &me,
const Topology::LocalTrackPred &trkPred) const override;
MeasurementPoint measurementPosition(const LocalPoint &) const override;
MeasurementPoint measurementPosition(const LocalPoint &lp, const Topology::LocalTrackAngles &dir) const override;
MeasurementError measurementError(const LocalPoint &lp, const LocalError &le) const override;
MeasurementError measurementError(const LocalPoint &lp,
const LocalError &le,
const Topology::LocalTrackAngles &dir) const override;
int channel(const LocalPoint &) const override;
int channel(const LocalPoint &lp, const Topology::LocalTrackAngles &dir) const override;
std::pair<float, float> pixel(const LocalPoint &p) const override;
/// conversion taking also the angle from the track state
std::pair<float, float> pixel(const LocalPoint &p, const Topology::LocalTrackAngles <p) const override;
std::pair<float, float> pitch() const override { return specificTopology().pitch(); }
int nrows() const override { return specificTopology().nrows(); }
int ncolumns() const override { return specificTopology().ncolumns(); }
int rocsY() const override { return specificTopology().rocsY(); }
int rocsX() const override { return specificTopology().rocsX(); }
int rowsperroc() const override { return specificTopology().rowsperroc(); }
int colsperroc() const override { return specificTopology().colsperroc(); }
bool bigpixelsX() const override { return specificTopology().bigpixelsX(); }
bool bigpixelsY() const override { return specificTopology().bigpixelsY(); }
float localX(const float mpX) const override;
float localX(const float mpX, const Topology::LocalTrackPred &trkPred) const override;
float localY(const float mpY) const override;
float localY(const float mpY, const Topology::LocalTrackPred &trkPred) const override;
bool isItBigPixelInX(const int ixbin) const override { return specificTopology().isItBigPixelInX(ixbin); }
bool isItBigPixelInY(const int iybin) const override { return specificTopology().isItBigPixelInY(iybin); }
float pixelFractionInX(int ixbin) const override { return specificTopology().pixelFractionInX(ixbin); }
float pixelFractionInY(int iybin) const override { return specificTopology().pixelFractionInY(iybin); }
bool containsBigPixelInX(int ixmin, int ixmax) const override {
return specificTopology().containsBigPixelInX(ixmin, ixmax);
}
bool containsBigPixelInY(int iymin, int iymax) const override {
return specificTopology().containsBigPixelInY(iymin, iymax);
}
bool isItEdgePixelInX(int ixbin) const override { return specificTopology().isItEdgePixelInX(ixbin); }
bool isItEdgePixelInY(int iybin) const override { return specificTopology().isItEdgePixelInY(iybin); }
bool isItEdgePixel(int ixbin, int iybin) const override { return specificTopology().isItEdgePixel(ixbin, iybin); }
virtual const GeomDetType &type() const { return *theType; }
virtual PixelGeomDetType const &specificType() const { return *theType; }
const SurfaceDeformation *surfaceDeformation() const { return theSurfaceDeformation.operator->(); }
virtual void setSurfaceDeformation(const SurfaceDeformation *deformation);
virtual const PixelTopology &specificTopology() const { return specificType().specificTopology(); }
private:
/// Internal method to get correction of the position from SurfaceDeformation,
/// must not be called if 'theSurfaceDeformation' is a null pointer.
SurfaceDeformation::Local2DVector positionCorrection(const LocalPoint &pos,
const Topology::LocalTrackAngles &dir) const;
/// Internal method to get correction of the position from SurfaceDeformation,
/// must not be called if 'theSurfaceDeformation' is a null pointer.
SurfaceDeformation::Local2DVector positionCorrection(const Topology::LocalTrackPred &trk) const;
PixelGeomDetType const *theType;
float theLength, theWidth;
std::unique_ptr<const SurfaceDeformation> theSurfaceDeformation;
};
#endif
|