CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  virtual LocalPoint localPosition( const MeasurementPoint& ) const { return LocalPoint();}
64  virtual LocalError
65  localError( const MeasurementPoint&, const MeasurementError& ) const { return LocalError();}
66  virtual MeasurementPoint measurementPosition( const LocalPoint&) const { return MeasurementPoint();}
67  virtual MeasurementError
68  measurementError( const LocalPoint&, const LocalError& ) const { return MeasurementError();}
69  virtual int channel( const LocalPoint& p) const { return -1;}
70 };
71  const DummyTopology dummyTopology{};
72 
73 struct DummyGeomDetType final : public GeomDetType {
74  DummyGeomDetType() : GeomDetType("", GeomDetEnumerators::invalidDet){}
75  const Topology& topology() const { 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 
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
virtual const GeomDetType & type() const
Definition: GeomDet.cc:85
ReferenceCountingPointer< Plane > thePlane
Definition: GeomDet.h:126
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:43
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
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:79
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
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:37
virtual LocalError localError(const MeasurementPoint &, const MeasurementError &) const =0
virtual bool setAlignmentPositionError(const AlignmentPositionError &ape)
Definition: GeomDet.cc:31
virtual const Topology & topology() const =0
virtual void setSurfaceDeformation(const SurfaceDeformation *deformation)
Definition: GeomDet.cc:48
static int position[264][3]
Definition: ReadPGInfo.cc:509
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
void rotate(const Surface::RotationType &rotation)
Definition: GeomDet.cc:16
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
virtual SubDetector subDetector() const
Which subdetector.
Definition: GeomDet.cc:44
SubDetector subDetector() const
Definition: GeomDetType.h:22