Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:46

0001 #ifndef MuonDetId_DTWireId_h
0002 #define MuonDetId_DTWireId_h
0003 
0004 /** \class DTWireId
0005  *  DetUnit identifier for DT wires
0006  *
0007  *  \author G. Cerminara - INFN Torino
0008  */
0009 
0010 #include <DataFormats/MuonDetId/interface/DTLayerId.h>
0011 
0012 class DTWireId : public DTLayerId {
0013 public:
0014   /// Default constructor.
0015   /// Fills the common part in the base and leaves 0 in all other fields
0016   DTWireId();
0017 
0018   /// Construct from a packed id.
0019   /// It is required that the packed id represents a valid DT DetId
0020   /// (proper Detector and  SubDet fields), otherwise an exception is thrown.
0021   /// No check is done on the vaildity of the values.
0022   explicit DTWireId(uint32_t id);
0023 
0024   /// Construct from fully qualified identifier.
0025   /// Input values are required to be within legal ranges, otherwise an
0026   /// exception is thrown.
0027   DTWireId(int wheel, int station, int sector, int superlayer, int layer, int wire);
0028 
0029   /// Copy Constructor.
0030   DTWireId(const DTWireId& wireId);
0031 
0032   /// Assignment Operator.
0033   DTWireId& operator=(const DTWireId& wireId) = default;
0034 
0035   /// Constructor from a CamberId and SL, layer and wire numbers
0036   DTWireId(const DTChamberId& chId, int superlayer, int layer, int wire);
0037 
0038   /// Constructor from a SuperLayerId and layer and wire numbers
0039   DTWireId(const DTSuperLayerId& slId, int layer, int wire);
0040 
0041   /// Constructor from a layerId and a wire number
0042   DTWireId(const DTLayerId& layerId, int wire);
0043 
0044   /// Return the wire number
0045   int wire() const { return ((id_ >> wireStartBit_) & wireMask_); }
0046 
0047   /// Return the corresponding LayerId
0048   DTLayerId layerId() const { return DTLayerId(id_ & layerIdMask_); }
0049 
0050 private:
0051 };
0052 
0053 std::ostream& operator<<(std::ostream& os, const DTWireId& id);
0054 
0055 #endif