1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#ifndef MuonDetId_DTLayerId_h
#define MuonDetId_DTLayerId_h
/** \class DTLayerId
* DetUnit identifier for DT layers
*
* \author G. Cerminara - INFN Torino
*/
#include <DataFormats/MuonDetId/interface/DTSuperLayerId.h>
class DTLayerId : public DTSuperLayerId {
public:
/// Default constructor.
/// Fills the common part in the base and leaves 0 in all other fields
DTLayerId();
/// Construct from a packed id.
/// It is required that the packed id represents a valid DT DetId
/// (proper Detector and SubDet fields), otherwise an exception is thrown.
/// Any bits outside the DTLayerId fields are zeroed; apart for
/// this, no check is done on the vaildity of the values.
explicit DTLayerId(uint32_t id);
/// Construct from indexes.
/// Input values are required to be within legal ranges, otherwise an
/// exception is thrown.
DTLayerId(int wheel, int station, int sector, int superlayer, int layer);
/// Copy Constructor.
/// Any bits outside the DTLayerId fields are zeroed; apart for
/// this, no check is done on the vaildity of the values.
DTLayerId(const DTLayerId& layerId);
/// Assignment Operator.
DTLayerId& operator=(const DTLayerId& layerId) = default;
/// Constructor from a camberId and SL and layer numbers
DTLayerId(const DTChamberId& chId, int superlayer, int layer);
/// Constructor from a SuperLayerId and layer number
DTLayerId(const DTSuperLayerId& slId, int layer);
/// Return the layer number
int layer() const { return ((id_ >> layerStartBit_) & lMask_); }
/// Return the corresponding SuperLayerId
DTSuperLayerId superlayerId() const { return DTSuperLayerId(id_ & slIdMask_); }
};
std::ostream& operator<<(std::ostream& os, const DTLayerId& id);
#endif
|