CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DetLayer.h
Go to the documentation of this file.
1 #ifndef DetLayers_DetLayer_h
2 #define DetLayers_DetLayer_h
3 
15 
18 
19 #include <vector>
20 
21 class DetLayer : public GeometricSearchDet {
22 public:
25 
26  DetLayer(bool doHaveGroup, bool ibar) : GeometricSearchDet(doHaveGroup), theSeqNum(-1), iAmBarrel(ibar) {}
27 
28  ~DetLayer() override;
29 
30  // a detLayer can be either barrel or forward
31  bool isBarrel() const { return iAmBarrel; }
32  bool isForward() const { return !isBarrel(); }
33 
34  // sequential number to be used in "maps"
35  int seqNum() const { return theSeqNum; }
36  void setSeqNum(int sq) { theSeqNum = sq; }
37 
38  // Extension of the interface
39 
41  virtual SubDetector subDetector() const = 0;
42 
44  virtual Location location() const = 0;
45 
46 private:
47  int theSeqNum;
48  bool iAmBarrel;
49 };
50 
51 #endif
GeomDetEnumerators::Location Location
Definition: DetLayer.h:24
void setSeqNum(int sq)
Definition: DetLayer.h:36
virtual Location location() const =0
Which part of the detector (barrel, endcap)
bool isForward() const
Definition: DetLayer.h:32
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
int seqNum() const
Definition: DetLayer.h:35
~DetLayer() override
Definition: DetLayer.cc:3
bool iAmBarrel
Definition: DetLayer.h:48
GeomDetEnumerators::SubDetector SubDetector
Definition: DetLayer.h:23
bool isBarrel() const
Definition: DetLayer.h:31
int theSeqNum
Definition: DetLayer.h:47
DetLayer(bool doHaveGroup, bool ibar)
Definition: DetLayer.h:26