CMS 3D CMS Logo

GeomDet.cc
Go to the documentation of this file.
4 
5 
7 
8 void GeomDet::move( const GlobalVector& displacement)
9 {
10  //
11  // Should recreate the surface like the set* methods ?
12  //
13  thePlane->move(displacement);
14 }
15 
17 {
18  //
19  // Should recreate the surface like the set* methods ?
20  //
21  thePlane->rotate(rotation);
22 }
23 
26 {
27  thePlane = ModifiedSurfaceGenerator<Plane>(thePlane).atNewPosition(position,
28  rotation);
29 }
30 
32 {
35  }
36  else *theAlignmentPositionError = ape;
37  return ape.valid();
38 }
39 
43 
45  return type().subDetector();
46 }
47 
49 {
50  throw cms::Exception("Geometry")
51  << "setting SurfaceDeformation not implemented for DetId "
52  << geographicalId().rawId() << " det="
53  << geographicalId().det() << " subdetId="
54  << geographicalId().subdetId();
55 }
56 
57 
58 
60 
61 namespace {
62 struct DummyTopology final : public Topology {
63  LocalPoint localPosition( const MeasurementPoint& ) const override { return LocalPoint();}
65  localError( const MeasurementPoint&, const MeasurementError& ) const override { return LocalError();}
66  MeasurementPoint measurementPosition( const LocalPoint&) const override { return MeasurementPoint();}
68  measurementError( const LocalPoint&, const LocalError& ) const override { return MeasurementError();}
69  int channel( const LocalPoint& p) const override { return -1;}
70 };
71  const DummyTopology dummyTopology{};
72 
73 struct DummyGeomDetType final : public GeomDetType {
74  DummyGeomDetType() : GeomDetType("", GeomDetEnumerators::invalidDet){}
75  const Topology& topology() const override { return dummyTopology;}
76 };
77  const DummyGeomDetType dummyGeomDetType{};
78 }
79 
80 
81 const Topology& GeomDet::topology() const {
82  return dummyTopology;
83 }
84 
85 const GeomDetType& GeomDet::type() const {
86  return dummyGeomDetType;
87 }
88 
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:32
virtual const GeomDetType & type() const
Definition: GeomDet.cc:85
ReferenceCountingPointer< Plane > thePlane
Definition: GeomDet.h:126
const Surface::RotationType & rotation() const
The rotation defining the local R.F.
Definition: GeomDet.h:51
virtual const Topology & topology() const
Definition: GeomDet.cc:81
virtual ~GeomDet()
Definition: GeomDet.cc:6
void setPosition(const Surface::PositionType &position, const Surface::RotationType &rotation)
Definition: GeomDet.cc:24
uint32_t rawId() const
get the raw id
Definition: DetId.h:44
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:48
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
void move(const GlobalVector &displacement)
Definition: GeomDet.cc:8
AlignmentPositionError * theAlignmentPositionError
Definition: GeomDet.h:131
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:38
virtual bool setAlignmentPositionError(const AlignmentPositionError &ape)
Definition: GeomDet.cc:31
virtual void setSurfaceDeformation(const SurfaceDeformation *deformation)
Definition: GeomDet.cc:48
void rotate(const Surface::RotationType &rotation)
Definition: GeomDet.cc:16
Detector det() const
get the detector field from this detid
Definition: DetId.h:36
virtual SubDetector subDetector() const
Which subdetector.
Definition: GeomDet.cc:44
SubDetector subDetector() const
Definition: GeomDetType.h:22