CMS 3D CMS Logo

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:
23 
26 
27  DetLayer(bool doHaveGroup, bool ibar) : GeometricSearchDet(doHaveGroup), theSeqNum(-1), iAmBarrel(ibar) {}
28 
29  ~DetLayer() override;
30 
31  // a detLayer can be either barrel or forward
32  bool isBarrel() const { return iAmBarrel;}
33  bool isForward() const { return !isBarrel();}
34 
35  // sequential number to be used in "maps"
36  int seqNum() const { return theSeqNum;}
37  void setSeqNum(int sq) { theSeqNum=sq;}
38 
39  // Extension of the interface
40 
42  virtual SubDetector subDetector() const = 0;
43 
45  virtual Location location() const = 0;
46 
47 
48 
49  private:
50  int theSeqNum;
51  bool iAmBarrel;
52 };
53 
54 #endif
GeomDetEnumerators::Location Location
Definition: DetLayer.h:25
void setSeqNum(int sq)
Definition: DetLayer.h:37
bool isForward() const
Definition: DetLayer.h:33
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
virtual Location location() const =0
Which part of the detector (barrel, endcap)
int seqNum() const
Definition: DetLayer.h:36
~DetLayer() override
Definition: DetLayer.cc:3
bool iAmBarrel
Definition: DetLayer.h:51
GeomDetEnumerators::SubDetector SubDetector
Definition: DetLayer.h:24
bool isBarrel() const
Definition: DetLayer.h:32
int theSeqNum
Definition: DetLayer.h:50
DetLayer(bool doHaveGroup, bool ibar)
Definition: DetLayer.h:27