CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GeomDet.h
Go to the documentation of this file.
1 #ifndef CommonDet_GeomDet_H
2 #define CommonDet_GeomDet_H
3 
14 
19 
21 
22 #include <vector>
23 
25 
26 class GeomDet {
27 public:
29 
30  explicit GeomDet(BoundPlane* plane);
31 
32  explicit GeomDet(const ReferenceCountingPointer<BoundPlane>& plane);
33 
34  virtual ~GeomDet();
35 
37  virtual const BoundPlane& surface() const {return *thePlane;}
38 
40  virtual const BoundPlane& specificSurface() const {return *thePlane;}
41 
43  const Surface::PositionType& position() const {return surface().position();}
44 
46  const Surface::RotationType& rotation() const { return surface().rotation();}
47 
49  GlobalPoint toGlobal(const Local2DPoint& lp) const {
50  return surface().toGlobal( lp);
51  }
52 
54  GlobalPoint toGlobal(const Local3DPoint& lp) const {
55  return surface().toGlobal( lp);
56  }
57 
59  GlobalVector toGlobal(const LocalVector& lv) const {
60  return surface().toGlobal( lv);
61  }
62 
64  LocalPoint toLocal(const GlobalPoint& gp) const {
65  return surface().toLocal( gp);
66  }
67 
69  LocalVector toLocal(const GlobalVector& gv) const {
70  return surface().toLocal( gv);
71  }
72 
74  DetId geographicalId() const { return m_detId; }
75 
77  virtual SubDetector subDetector() const = 0;
78 
82 
84  virtual std::vector< const GeomDet*> components() const = 0;
85 
87  // FIXME: must become pure virtual
88  virtual const GeomDet* component(DetId id) const {return 0;}
89 
90 
91  protected:
92 
93  void setDetId(DetId id) {
94  m_detId = id;
95  }
96 
97 private:
98 
102 
103 
105  friend class DetPositioner;
106 
109  void move( const GlobalVector& displacement);
110 
113  void rotate( const Surface::RotationType& rotation);
114 
118 
121 
126 
127  virtual void setAlignmentPositionError (const AlignmentPositionError& ape);
128 
129 };
130 
131 #endif
132 
133 
134 
135 
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:78
virtual AlignmentPositionError * alignmentPositionError() const
Definition: GeomDet.h:81
ReferenceCountingPointer< BoundPlane > thePlane
Definition: GeomDet.h:99
const Surface::RotationType & rotation() const
The rotation defining the local R.F.
Definition: GeomDet.h:46
void setDetId(DetId id)
Definition: GeomDet.h:93
virtual ~GeomDet()
Definition: GeomDet.cc:11
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
LocalVector toLocal(const GlobalVector &gv) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:69
virtual SubDetector subDetector() const =0
Which subdetector.
void setPosition(const Surface::PositionType &position, const Surface::RotationType &rotation)
Definition: GeomDet.cc:32
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:64
virtual const GeomDet * component(DetId id) const
Returns a component GeomDet given its DetId, if existing.
Definition: GeomDet.h:88
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
virtual const BoundPlane & specificSurface() const
Same as surface(), kept for backward compatibility.
Definition: GeomDet.h:40
GlobalVector toGlobal(const LocalVector &lv) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:59
LocalPoint toLocal(const GlobalPoint &gp) const
virtual void setAlignmentPositionError(const AlignmentPositionError &ape)
Definition: GeomDet.cc:39
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:74
void move(const GlobalVector &displacement)
Definition: GeomDet.cc:16
AlignmentPositionError * theAlignmentPositionError
Definition: GeomDet.h:100
virtual std::vector< const GeomDet * > components() const =0
Returns direct components, if any.
DetId m_detId
Definition: GeomDet.h:101
Definition: DetId.h:20
GeomDet(BoundPlane *plane)
Definition: GeomDet.cc:5
const RotationType & rotation() const
GeomDetEnumerators::SubDetector SubDetector
Definition: GeomDet.h:28
void rotate(const Surface::RotationType &rotation)
Definition: GeomDet.cc:24
const PositionType & position() const
GlobalPoint toGlobal(const Local3DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:54
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37