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 
12 
19 
20 #include <vector>
21 
23 
24 class GeomDet {
25 public:
27 
28  explicit GeomDet(Plane* plane);
29 
30  explicit GeomDet(const ReferenceCountingPointer<Plane>& plane);
31 
32  virtual ~GeomDet();
33 
35  const Plane& surface() const {return *thePlane;}
36 
38  const Plane& specificSurface() const {return *thePlane;}
39 
41  const Surface::PositionType& position() const {return surface().position();}
42 
44  const Surface::RotationType& rotation() const { return surface().rotation();}
45 
47  GlobalPoint toGlobal(const Local2DPoint& lp) const {
48  return surface().toGlobal( lp);
49  }
50 
52  GlobalPoint toGlobal(const Local3DPoint& lp) const {
53  return surface().toGlobal( lp);
54  }
55 
57  GlobalVector toGlobal(const LocalVector& lv) const {
58  return surface().toGlobal( lv);
59  }
60 
62  LocalPoint toLocal(const GlobalPoint& gp) const {
63  return surface().toLocal( gp);
64  }
65 
67  LocalVector toLocal(const GlobalVector& gv) const {
68  return surface().toLocal( gv);
69  }
70 
72  DetId geographicalId() const { return m_detId; }
73 
75  virtual SubDetector subDetector() const = 0;
76 
79 
81  virtual std::vector< const GeomDet*> components() const = 0;
82 
84  // FIXME: must become pure virtual
85  virtual const GeomDet* component(DetId /*id*/) const {return 0;}
86 
89 
90 
91  // specific unix index in a given subdetector (such as Tracker)
92  int index() const { return m_index;}
93  void setIndex(int i) { m_index=i;}
94 
95  protected:
96 
97  void setDetId(DetId id) {
98  m_detId = id;
99  }
100 
101 private:
102 
107  int m_index;
108 
110  friend class DetPositioner;
111 
114  void move( const GlobalVector& displacement);
115 
118  void rotate( const Surface::RotationType& rotation);
119 
123 
126 
129 
131 
132 };
133 
134 #endif
135 
136 
137 
138 
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:114
int i
Definition: DBlmapReader.cc:9
ReferenceCountingPointer< Plane > thePlane
Definition: GeomDet.h:103
const Surface::RotationType & rotation() const
The rotation defining the local R.F.
Definition: GeomDet.h:44
void setDetId(DetId id)
Definition: GeomDet.h:97
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:47
LocalVector toLocal(const GlobalVector &gv) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:67
virtual SubDetector subDetector() const =0
Which subdetector.
void setIndex(int i)
Definition: GeomDet.h:93
void setPosition(const Surface::PositionType &position, const Surface::RotationType &rotation)
Definition: GeomDet.cc:29
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:62
LocalError theLocalAlignmentError
Definition: GeomDet.h:105
int m_index
Definition: GeomDet.h:107
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
Definition: Plane.h:17
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:41
GlobalVector toGlobal(const LocalVector &lv) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:57
LocalPoint toLocal(const GlobalPoint &gp) const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
void move(const GlobalVector &displacement)
Definition: GeomDet.cc:13
int index() const
Definition: GeomDet.h:92
AlignmentPositionError * theAlignmentPositionError
Definition: GeomDet.h:104
virtual std::vector< const GeomDet * > components() const =0
Returns direct components, if any.
DetId m_detId
Definition: GeomDet.h:106
LocalError const & localAlignmentError() const
Return local alligment error.
Definition: GeomDet.h:78
Definition: DetId.h:18
bool setAlignmentPositionError(const AlignmentPositionError &ape)
Definition: GeomDet.cc:37
virtual const GeomDet * component(DetId) const
Returns a component GeomDet given its DetId, if existing.
Definition: GeomDet.h:85
const RotationType & rotation() const
GeomDetEnumerators::SubDetector SubDetector
Definition: GeomDet.h:26
void rotate(const Surface::RotationType &rotation)
Definition: GeomDet.cc:21
GeomDet(Plane *plane)
Definition: GeomDet.cc:5
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:52
AlignmentPositionError const * alignmentPositionError() const
Return pointer to alignment errors.
Definition: GeomDet.h:88
const Plane & specificSurface() const
Same as surface(), kept for backward compatibility.
Definition: GeomDet.h:38