CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ProxyPixelTopology.cc
Go to the documentation of this file.
3 
6 
9  :theType(type), theLength(bp->bounds().length()), theWidth(bp->bounds().width())
10 {
11 
12 }
13 
16 {
17  return specificTopology().localPosition(mp);
18 }
19 
22  const Topology::LocalTrackPred &trkPred ) const
23 {
24  if (!this->surfaceDeformation()) return specificTopology().localPosition(mp);
25 
26  // add correction from SurfaceDeformation
27  const LocalPoint posOld(specificTopology().localPosition(mp)); // 'original position'
29 
30  return LocalPoint(posOld.x()+corr.x(), posOld.y()+corr.y(), posOld.z());
31 }
32 
35  const MeasurementError& me ) const
36 {
37  return specificTopology().localError(mp, me);
38 }
39 
42  const MeasurementError& me,
43  const Topology::LocalTrackPred &trkPred ) const
44 {
45  // The topology knows to calculate the cartesian error from measurement frame.
46  // But assuming no uncertainty on the SurfaceDeformation variables,
47  // the errors do not change from a simple shift to compensate
48  // that the track 'sees' the surface at another place than it thinks...
49  return specificTopology().localError(mp, me);
50 }
51 
54 {
56 }
57 
60  const Topology::LocalTrackAngles &dir ) const
61 {
62  if (!this->surfaceDeformation()) return specificTopology().measurementPosition(lp);
63 
64  // subtract correction from SurfaceDeformation
66  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
67 
68  return specificTopology().measurementPosition(posOrig);
69 }
70 
73 {
74  return specificTopology().measurementError(lp, le);
75 }
76 
79  const Topology::LocalTrackAngles &dir ) const
80 {
81  if (!this->surfaceDeformation()) return specificTopology().measurementError(lp, le);
82 
83  // subtract correction from SurfaceDeformation
85  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
86 
87  return specificTopology().measurementError(posOrig, le);
88 }
89 
92 {
93  return specificTopology().channel(lp);
94 }
95 
98 {
99  if (!this->surfaceDeformation()) return specificTopology().channel(lp);
100 
101  // subtract correction from SurfaceDeformation
103  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
104 
105  return specificTopology().channel(posOrig);
106 }
107 
109 std::pair<float,float> ProxyPixelTopology::pixel( const LocalPoint& lp ) const
110 {
111  return specificTopology().pixel(lp);
112 }
113 
115 std::pair<float,float> ProxyPixelTopology::pixel( const LocalPoint& lp,
116  const Topology::LocalTrackAngles &dir ) const
117 {
118  if (!this->surfaceDeformation()) return specificTopology().pixel(lp);
119 
120  // subtract correction from SurfaceDeformation
122  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
123 
124  return specificTopology().pixel(posOrig);
125 }
126 
128 float ProxyPixelTopology::localX(const float mpX) const
129 {
130  return specificTopology().localX(mpX);
131 }
132 
134 float ProxyPixelTopology::localX(const float mpX,
135  const Topology::LocalTrackPred &trkPred) const
136 {
137  if (!this->surfaceDeformation()) return specificTopology().localX(mpX);
138 
139  // add correction from SurfaceDeformation
140  float xOld = specificTopology().localX(mpX); // 'original position'
142 
143  return xOld + corr.x();
144 }
145 
147 float ProxyPixelTopology::localY(const float mpY) const
148 {
149  return specificTopology().localY(mpY);
150 }
151 
153 float ProxyPixelTopology::localY(const float mpY,
154  const Topology::LocalTrackPred &trkPred) const
155 {
156  if (!this->surfaceDeformation()) return specificTopology().localY(mpY);
157 
158  // add correction from SurfaceDeformation
159  float yOld = specificTopology().localY(mpY); // 'original position'
161 
162  return yOld + corr.y();
163 }
164 
166 std::pair<float,float> ProxyPixelTopology::pitch() const { return specificTopology().pitch(); }
167 
170 
173 
175 const GeomDetType& ProxyPixelTopology::type() const { return *theType; }
176 
179 
182 {
183  return specificType().specificTopology();
184 }
185 
188 {
189  theSurfaceDeformation = deformation;
190 }
191 
195  const Topology::LocalTrackAngles &dir) const
196 {
197  const SurfaceDeformation::Local2DPoint pos2D(pos.x(), pos.y());// change precision and dimension
198 
199  return this->surfaceDeformation()->positionCorrection(pos2D, dir,
201 }
202 
206 {
207  return this->surfaceDeformation()->positionCorrection(trk.point(), trk.angles(),
209 }
SurfaceDeformation::Local2DVector positionCorrection(const LocalPoint &pos, const Topology::LocalTrackAngles &dir) const
type
Definition: HCALResponse.h:22
virtual void setSurfaceDeformation(const SurfaceDeformation *deformation)
PixelGeomDetType * theType
T y() const
Definition: PV2DBase.h:45
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
virtual int ncolumns() const =0
virtual LocalError localError(const MeasurementPoint &, const MeasurementError &) const
virtual int ncolumns() const
virtual int nrows() const
T y() const
Definition: PV3DBase.h:62
virtual int nrows() const =0
virtual const GeomDetType & type() const
virtual MeasurementPoint measurementPosition(const LocalPoint &) const
virtual const PixelTopology & specificTopology() const
virtual std::pair< float, float > pitch() const
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
virtual std::pair< float, float > pixel(const LocalPoint &p) const =0
ProxyPixelTopology(PixelGeomDetType *type, BoundPlane *bp)
T z() const
Definition: PV3DBase.h:63
virtual const TopologyType & specificTopology() const
const LocalTrackAngles & angles() const
Definition: Topology.h:66
virtual int channel(const LocalPoint &p) const =0
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
DeepCopyPointerByClone< const SurfaceDeformation > theSurfaceDeformation
JetCorrectorParameters corr
Definition: classes.h:9
virtual std::pair< float, float > pitch() const =0
virtual float localX(const float mpX) const =0
virtual float localY(const float mpY) const
virtual LocalError localError(const MeasurementPoint &, const MeasurementError &) const =0
const Local2DPoint & point() const
Definition: Topology.h:65
virtual Local2DVector positionCorrection(const Local2DPoint &localPos, const LocalTrackAngles &localAngles, double length, double width) const =0
virtual MeasurementError measurementError(const LocalPoint &lp, const LocalError &le) const
virtual LocalPoint localPosition(const MeasurementPoint &) const
virtual PixelGeomDetType & specificType() const
const SurfaceDeformation * surfaceDeformation() const
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
virtual float localX(const float mpX) const
dbl *** dir
Definition: mlp_gen.cc:35
T x() const
Definition: PV2DBase.h:44
T x() const
Definition: PV3DBase.h:61
virtual int channel(const LocalPoint &) const
virtual std::pair< float, float > pixel(const LocalPoint &p) const
virtual float localY(const float mpY) const =0
unsigned long long le
Definition: VDTMath.h:202