DTWireId

Macros

Line Code
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 54 55
#ifndef MuonDetId_DTWireId_h
#define MuonDetId_DTWireId_h

/** \class DTWireId
 *  DetUnit identifier for DT wires
 *
 *  \author G. Cerminara - INFN Torino
 */

#include <DataFormats/MuonDetId/interface/DTLayerId.h>

class DTWireId : public DTLayerId {
public:
  /// Default constructor.
  /// Fills the common part in the base and leaves 0 in all other fields
  DTWireId();

  /// 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.
  /// No check is done on the vaildity of the values.
  explicit DTWireId(uint32_t id);

  /// Construct from fully qualified identifier.
  /// Input values are required to be within legal ranges, otherwise an
  /// exception is thrown.
  DTWireId(int wheel, int station, int sector, int superlayer, int layer, int wire);

  /// Copy Constructor.
  DTWireId(const DTWireId& wireId);

  /// Assignment Operator.
  DTWireId& operator=(const DTWireId& wireId) = default;

  /// Constructor from a CamberId and SL, layer and wire numbers
  DTWireId(const DTChamberId& chId, int superlayer, int layer, int wire);

  /// Constructor from a SuperLayerId and layer and wire numbers
  DTWireId(const DTSuperLayerId& slId, int layer, int wire);

  /// Constructor from a layerId and a wire number
  DTWireId(const DTLayerId& layerId, int wire);

  /// Return the wire number
  int wire() const { return ((id_ >> wireStartBit_) & wireMask_); }

  /// Return the corresponding LayerId
  DTLayerId layerId() const { return DTLayerId(id_ & layerIdMask_); }

private:
};

std::ostream& operator<<(std::ostream& os, const DTWireId& id);

#endif