ATLAS Offline Software
Loading...
Searching...
No Matches
Pixel Namespace Reference

Functions

template<typename T>
std::tuple< T, T > sorted_tuple (T a, T b)
 Create a tuple of the given values in increasing order.
double getGoodFraction (const InDet::SiDetectorElementStatus &pixelDetElStatus, const InDetDD::PixelModuleDesign &design, const PixelID &pixelID, const IdentifierHash &modulIdHash, const Identifier &startId, const Identifier &endId)
 Get The fraction of good chips the pixel of a pixel array is connected to.
unsigned int makeReadoutTechnologyBit (InDetDD::PixelReadoutTechnology technology, unsigned int bit_val=1)
 Create a word with a bit representing the given readout technology to the given value.
bool matchingReadoutTechnology (const InDet::SiDetectorElementStatus &elementStatus, const IdentifierHash &moduleIdHash, unsigned int readOutTechnologyMask=(Pixel::makeReadoutTechnologyBit(InDetDD::PixelReadoutTechnology::FEI4)|(Pixel::makeReadoutTechnologyBit(InDetDD::PixelReadoutTechnology::FEI3))))
 Check whether the readout technology of the specified module is contained in the given readout technology mask.

Function Documentation

◆ getGoodFraction()

double Pixel::getGoodFraction ( const InDet::SiDetectorElementStatus & pixelDetElStatus,
const InDetDD::PixelModuleDesign & design,
const PixelID & pixelID,
const IdentifierHash & modulIdHash,
const Identifier & startId,
const Identifier & endId )
inline

Get The fraction of good chips the pixel of a pixel array is connected to.

Parameters
pixelDetElStatushelper class which provides the front-end module status information.
pixelReadoutthe pixel readout manager needed to determine the front-end chip of a pixel.
moduleIdthe identifier of the corresponding module.
moduleIdHashthe identifier hash of the corresponding module.
startIdthe identifier of one corner of the pixel array.
endIdthe identifier of the opposing corner of the pixel array which must be on the same pixel module.

Definition at line 32 of file PixelFEUtils.h.

37 {
38 auto [phiStart,phiEnd] = sorted_tuple( pixelID.phi_index(startId), pixelID.phi_index(endId) );
39 auto [etaStart,etaEnd] = sorted_tuple( pixelID.eta_index(startId), pixelID.eta_index(endId) );
40
41 double nTotal = (phiEnd-phiStart+1.0)*(etaEnd-etaStart+1.0);
42
43 unsigned int nGood=0;
44 for (int i=phiStart; i<=phiEnd; i++) {
45 for (int j=etaStart; j<=etaEnd; j++) {
46
47 std::array<InDetDD::PixelDiodeTree::CellIndexType,2> diode_idx
49 InDetDD::PixelDiodeTree::DiodeProxy si_param ( design.diodeProxyFromIdx(diode_idx));
50 std::uint32_t feValue = design.getFE(si_param);
51
52 if (pixelDetElStatus.isChipGood(modulIdHash,feValue)) {++nGood;}
53 }
54 }
55 return nGood/nTotal;
56 }
static constexpr std::array< PixelDiodeTree::CellIndexType, 2 > makeCellIndex(T local_x_idx, T local_y_idx)
Create a 2D cell index from the indices in local-x (phi, row) and local-y (eta, column) direction.
PixelDiodeTree::DiodeProxy diodeProxyFromIdx(const std::array< PixelDiodeTree::IndexType, 2 > &idx) const
static unsigned int getFE(const PixelDiodeTree::DiodeProxy &diode_proxy)
bool isChipGood(IdentifierHash hash, unsigned int chip) const
int eta_index(const Identifier &id) const
Definition PixelID.h:645
int phi_index(const Identifier &id) const
Definition PixelID.h:639
std::tuple< T, T > sorted_tuple(T a, T b)
Create a tuple of the given values in increasing order.
Helper class to access parameters of a diode.

◆ makeReadoutTechnologyBit()

unsigned int Pixel::makeReadoutTechnologyBit ( InDetDD::PixelReadoutTechnology technology,
unsigned int bit_val = 1 )
inline

Create a word with a bit representing the given readout technology to the given value.

Parameters
technologythe readout technology
thevalue to which the bit should be set to.
Returns
word with readout technology bit set to given value

Definition at line 63 of file PixelFEUtils.h.

63 {
64 assert(static_cast<unsigned int>(technology) < 31);
65 return bit_val << static_cast<unsigned int>(technology);
66 }

◆ matchingReadoutTechnology()

bool Pixel::matchingReadoutTechnology ( const InDet::SiDetectorElementStatus & elementStatus,
const IdentifierHash & moduleIdHash,
unsigned int readOutTechnologyMask = (    Pixel::makeReadoutTechnologyBit(InDetDD::PixelReadoutTechnology::FEI4)                                                                               | ( Pixel::makeReadoutTechnologyBit(InDetDD::PixelReadoutTechnology::FEI3) ) ) )
inline

Check whether the readout technology of the specified module is contained in the given readout technology mask.

Parameters
elementStatusthe detector element status information.
moduleIdHashthe module hash of the module in question.
readOutTechnologyMaska mask which contains a bits per readout technology.

Definition at line 73 of file PixelFEUtils.h.

77 {
78 const InDetDD::SiDetectorElement *element = elementStatus.getDetectorElement(moduleIdHash);
79 const InDetDD::PixelModuleDesign &p_design = dynamic_cast<const InDetDD::PixelModuleDesign &>(element->design());
80 return ( static_cast<uint64_t>(p_design.getReadoutTechnology()) < 31ul && readOutTechnologyMask & Pixel::makeReadoutTechnologyBit(p_design.getReadoutTechnology()) );
81 }
Class used to describe the design of a module (diode segmentation and readout scheme)
PixelReadoutTechnology getReadoutTechnology() const
Class to hold geometrical description of a silicon detector element.
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
const InDetDD::SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
unsigned int makeReadoutTechnologyBit(InDetDD::PixelReadoutTechnology technology, unsigned int bit_val=1)
Create a word with a bit representing the given readout technology to the given value.

◆ sorted_tuple()

template<typename T>
std::tuple< T, T > Pixel::sorted_tuple ( T a,
T b )
inline

Create a tuple of the given values in increasing order.

Definition at line 20 of file PixelFEUtils.h.

20 {
21 return (a<b ? std::make_tuple(a,b) : std::make_tuple(b,a) );
22 }
TList * a