26 inline constexpr unsigned int getChip(
unsigned int side,
bool swap,
unsigned int strip) {
59 throw std::range_error(
"Invalid SCT strip");
62 return getChip(
static_cast<unsigned int>(sct_id.
side(stripId)),
96 assert( (side==0 && physical_chip_id<6) || (side ==1 && physical_chip_id<12));
125 assert( geometrical_chip_id<6 && side<2);
140 geometrical_chip_id);
153 unsigned int chip_flags = ( side==0 ? physical_chip_flags : physical_chip_flags>>
N_CHIPS_PER_SIDE);
155 unsigned int chip_flags_out=0;
160 chip_flags_out |= (chip_flags & 1);
163 chip_flags = chip_flags_out;
177 physical_chip_flags);
void swap(DataVector< T > &a, DataVector< T > &b)
See DataVector<T, BASE>::swap().
This is an Identifier helper class for the SCT subdetector.
Class to hold geometrical description of a silicon detector element.
bool swapPhiReadoutDirection() const
Determine if readout direction between online and offline needs swapping.
virtual Identifier identify() const override final
identifier of this detector element (inline)
This is an Identifier helper class for the SCT subdetector.
int side(const Identifier &id) const
int strip(const Identifier &id) const
constexpr unsigned int getGeometricalFromPhysicalChipFlags(unsigned int side, bool swap, unsigned int physical_chip_flags)
Convert a word in which each bit represents the status of a certain physical chip to a word in which ...
constexpr unsigned int getChip(unsigned int side, bool swap, unsigned int strip)
Get the physical chip ID for the given strip.
constexpr unsigned int N_STRIPS_PER_CHIP
constexpr unsigned int N_CHIPS_PER_SIDE
constexpr unsigned int getGeometricalChipID(unsigned int strip)
Get the geometrical chip ID for the given strip.
constexpr unsigned int N_SIDES
constexpr unsigned int N_STRIPS_PER_SIDE
constexpr unsigned int getGeometricalFromPhysicalChipID(unsigned int side, bool swap, unsigned int physical_chip_id)
Get the geometrical chip ID from a physica chip ID.
constexpr unsigned int getPhysicalFromGeometricalChipID(unsigned int side, bool swap, unsigned int geometrical_chip_id)
Get the physical chip ID from a geometrical chip ID.