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 
6  thePlane(plane), m_index(-1), theAlignmentPositionError(nullptr) {}
7 
9  thePlane(plane), m_index(-1), theAlignmentPositionError(nullptr) {}
10 
12 
13 void GeomDet::move( const GlobalVector& displacement)
14 {
15  //
16  // Should recreate the surface like the set* methods ?
17  //
18  thePlane->move(displacement);
19 }
20 
22 {
23  //
24  // Should recreate the surface like the set* methods ?
25  //
26  thePlane->rotate(rotation);
27 }
28 
31 {
32  thePlane = ModifiedSurfaceGenerator<Plane>(thePlane).atNewPosition(position,
33  rotation);
34 }
35 
37 {
40  }
41  else *theAlignmentPositionError = ape;
42  return ape.valid();
43 }
44 
48 
50  return type().subDetector();
51 }
52 
54 {
55  throw cms::Exception("Geometry")
56  << "setting SurfaceDeformation not implemented for DetId "
57  << geographicalId().rawId() << " det="
58  << geographicalId().det() << " subdetId="
59  << geographicalId().subdetId();
60 }
61 
62 
63 
65 
66 namespace {
67 struct DummyTopology final : public Topology {
68  virtual LocalPoint localPosition( const MeasurementPoint& ) const { return LocalPoint();}
69  virtual LocalError
70  localError( const MeasurementPoint&, const MeasurementError& ) const { return LocalError();}
71  virtual MeasurementPoint measurementPosition( const LocalPoint&) const { return MeasurementPoint();}
72  virtual MeasurementError
73  measurementError( const LocalPoint&, const LocalError& ) const { return MeasurementError();}
74  virtual int channel( const LocalPoint& p) const { return -1;}
75 };
76  const DummyTopology dummyTopology{};
77 
78 struct DummyGeomDetType final : public GeomDetType {
79  DummyGeomDetType() : GeomDetType("", GeomDetEnumerators::invalidDet){}
80  const Topology& topology() const { return dummyTopology;}
81 };
82  const DummyGeomDetType dummyGeomDetType{};
83 }
84 
85 
86 const Topology& GeomDet::topology() const {
87  return dummyTopology;
88 }
89 
90 const GeomDetType& GeomDet::type() const {
91  return dummyGeomDetType;
92 }
93 
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
virtual const GeomDetType & type() const
Definition: GeomDet.cc:90
ReferenceCountingPointer< Plane > thePlane
Definition: GeomDet.h:120
virtual const Topology & topology() const
Definition: GeomDet.cc:86
virtual ~GeomDet()
Definition: GeomDet.cc:11
void setPosition(const Surface::PositionType &position, const Surface::RotationType &rotation)
Definition: GeomDet.cc:29
#define nullptr
Definition: Plane.h:17
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:77
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
void move(const GlobalVector &displacement)
Definition: GeomDet.cc:13
AlignmentPositionError * theAlignmentPositionError
Definition: GeomDet.h:124
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:36
virtual const Topology & topology() const =0
virtual void setSurfaceDeformation(const SurfaceDeformation *deformation)
Definition: GeomDet.cc:53
static int position[264][3]
Definition: ReadPGInfo.cc:509
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
void rotate(const Surface::RotationType &rotation)
Definition: GeomDet.cc:21
GeomDet(Plane *plane)
Definition: GeomDet.cc:5
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
virtual SubDetector subDetector() const
Which subdetector.
Definition: GeomDet.cc:49
SubDetector subDetector() const
Definition: GeomDetType.h:22