CMS 3D CMS Logo

CSCLayer.h
Go to the documentation of this file.
1 #ifndef Geometry_CSCGeometry_CSCLayer_H
2 #define Geometry_CSCGeometry_CSCLayer_H
3 
13 
20 
21 //#include <boost/shared_ptr.hpp>
22 //typedef boost::shared_ptr<CSCChamber> Pointer2Chamber;
23 
24 class CSCLayer : public GeomDetUnit {
25 
26 public:
27 
28  CSCLayer( const BoundPlane::BoundPlanePointer& sp, CSCDetId id, const CSCChamber* ch, const CSCLayerGeometry* geo ) :
29  GeomDetUnit( sp ), theId( id ), theChamber( ch ), theGeometry( geo ) {
30  setDetId(id);
31 }
32 
33  const GeomDetType& type() const override { return chamber()->type(); }
34 
35  const Topology& topology() const override { return *(geometry()->topology()); }
36 
37 
42  CSCDetId id() const { return theId; }
43 
47  const CSCLayerGeometry* geometry() const { return theGeometry; }
48 
52  const CSCChamber* chamber() const { return theChamber; }
53 
58  GlobalPoint centerOfStrip(int strip) const;
59 
64  GlobalPoint centerOfWireGroup(int wireGroup) const;
65 
66 private:
67 
69 
70  const CSCChamber* theChamber; // NOT owned
71  // Pointer2Chamber theChamber; // use a smart pointer instead
72 
73  // Local geometry is handled by the LayerGeometry
74  // but only the Layer itself knows how to transform to the
75  // global frame so global calculations are handled by the
76  // Layer not the LayerGeometry.
77  const CSCLayerGeometry* theGeometry; // must have topology()
78 };
79 
80 #endif // Geometry_CSCGeometry_CSCLayer_H
void setDetId(DetId id)
Definition: GeomDet.h:120
CSCDetId id() const
Definition: CSCLayer.h:42
GlobalPoint centerOfWireGroup(int wireGroup) const
Definition: CSCLayer.cc:10
const CSCChamber * theChamber
Definition: CSCLayer.h:70
CSCLayer(const BoundPlane::BoundPlanePointer &sp, CSCDetId id, const CSCChamber *ch, const CSCLayerGeometry *geo)
Definition: CSCLayer.h:28
const Topology & topology() const override
Definition: CSCLayer.h:35
GlobalPoint centerOfStrip(int strip) const
Definition: CSCLayer.cc:4
const CSCStripTopology * topology() const
const GeomDetType & type() const override
Definition: CSCLayer.h:33
const CSCLayerGeometry * theGeometry
Definition: CSCLayer.h:77
const CSCChamber * chamber() const
Definition: CSCLayer.h:52
const CSCLayerGeometry * geometry() const
Definition: CSCLayer.h:47
CSCDetId theId
Definition: CSCLayer.h:68
const GeomDetType & type() const override
Definition: CSCChamber.h:34