CMS 3D CMS Logo

GeomDet.cc
Go to the documentation of this file.
4 
6 
7 void GeomDet::move(const GlobalVector& displacement) {
8  //
9  // Should recreate the surface like the set* methods ?
10  //
11  thePlane->move(displacement);
12 }
13 
15  //
16  // Should recreate the surface like the set* methods ?
17  //
18  thePlane->rotate(rotation);
19 }
20 
23 }
24 
27  if (ape.valid())
29  } else
31  return ape.valid();
32 }
33 
37 
39 
40 void GeomDet::setSurfaceDeformation(const SurfaceDeformation* /*deformation*/) {
41  throw cms::Exception("Geometry") << "setting SurfaceDeformation not implemented for DetId "
42  << geographicalId().rawId() << " det=" << geographicalId().det()
43  << " subdetId=" << geographicalId().subdetId();
44 }
45 
47 
48 namespace {
49  struct DummyTopology final : public Topology {
50  LocalPoint localPosition(const MeasurementPoint&) const override { return LocalPoint(); }
51  LocalError localError(const MeasurementPoint&, const MeasurementError&) const override { return LocalError(); }
52  MeasurementPoint measurementPosition(const LocalPoint&) const override { return MeasurementPoint(); }
53  MeasurementError measurementError(const LocalPoint&, const LocalError&) const override {
54  return MeasurementError();
55  }
56  int channel(const LocalPoint& p) const override { return -1; }
57  };
58  const DummyTopology dummyTopology{};
59 
60  struct DummyGeomDetType final : public GeomDetType {
61  DummyGeomDetType() : GeomDetType("", GeomDetEnumerators::invalidDet) {}
62  const Topology& topology() const override { return dummyTopology; }
63  };
64  const DummyGeomDetType dummyGeomDetType{};
65 } // namespace
66 
67 const Topology& GeomDet::topology() const { return dummyTopology; }
68 
69 const GeomDetType& GeomDet::type() const { return dummyGeomDetType; }
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
ReferenceCountingPointer< Plane > thePlane
Definition: GeomDet.h:102
virtual ~GeomDet()
Definition: GeomDet.cc:5
virtual const Topology & topology() const
Definition: GeomDet.cc:67
SubDetector subDetector() const
Definition: GeomDetType.h:21
void setPosition(const Surface::PositionType &position, const Surface::RotationType &rotation)
Definition: GeomDet.cc:21
virtual const GeomDetType & type() const
Definition: GeomDet.cc:69
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
const Surface::RotationType & rotation() const
The rotation defining the local R.F.
Definition: GeomDet.h:46
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
virtual int channel(const LocalPoint &p) const =0
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
void move(const GlobalVector &displacement)
Definition: GeomDet.cc:7
AlignmentPositionError * theAlignmentPositionError
Definition: GeomDet.h:106
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
Point3DBase< float, GlobalTag > PositionType
virtual LocalError localError(const MeasurementPoint &, const MeasurementError &) const =0
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
virtual SubDetector subDetector() const
Which subdetector.
Definition: GeomDet.cc:38
virtual bool setAlignmentPositionError(const AlignmentPositionError &ape)
Definition: GeomDet.cc:25
virtual const Topology & topology() const =0
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
virtual void setSurfaceDeformation(const SurfaceDeformation *deformation)
Definition: GeomDet.cc:40
static int position[264][3]
Definition: ReadPGInfo.cc:289
TkRotation< float > RotationType
void rotate(const Surface::RotationType &rotation)
Definition: GeomDet.cc:14