ATLAS Offline Software
Functions
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. More...
 
double getGoodFraction (const InDet::SiDetectorElementStatus &pixelDetElStatus, const InDetDD::IPixelReadoutManager &pixelReadout, const PixelID &pixelID, const Identifier &moduleId, const IdentifierHash &moudlIdHash, const Identifier &startId, const Identifier &endId)
 Get The fraction of good chips the pixel of a pixel array is connected to. More...
 
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. More...
 
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. More...
 

Function Documentation

◆ getGoodFraction()

double Pixel::getGoodFraction ( const InDet::SiDetectorElementStatus pixelDetElStatus,
const InDetDD::IPixelReadoutManager pixelReadout,
const PixelID pixelID,
const Identifier moduleId,
const IdentifierHash moudlIdHash,
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 33 of file PixelFEUtils.h.

39  {
40  auto [phiStart,phiEnd] = sorted_tuple( pixelID.phi_index(startId), pixelID.phi_index(endId) );
41  auto [etaStart,etaEnd] = sorted_tuple( pixelID.eta_index(startId), pixelID.eta_index(endId) );
42 
43  double nTotal = (phiEnd-phiStart+1.0)*(etaEnd-etaStart+1.0);
44 
45  unsigned int nGood=0;
46  for (int i=phiStart; i<=phiEnd; i++) {
47  for (int j=etaStart; j<=etaEnd; j++) {
48  int chFE = pixelReadout.getFE(pixelID.pixel_id(moduleId,i,j), moduleId);
49  if (pixelDetElStatus.isChipGood(moudlIdHash,chFE)) {++nGood;}
50  }
51  }
52  return nGood/nTotal;
53  }

◆ 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 60 of file PixelFEUtils.h.

60  {
61  assert(static_cast<unsigned int>(technology) < 31);
62  return bit_val << static_cast<unsigned int>(technology);
63  }

◆ 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 70 of file PixelFEUtils.h.

74  {
75  const InDetDD::SiDetectorElement *element = elementStatus.getDetectorElement(moduleIdHash);
76  const InDetDD::PixelModuleDesign &p_design = dynamic_cast<const InDetDD::PixelModuleDesign &>(element->design());
77  return ( static_cast<uint64_t>(p_design.getReadoutTechnology()) < 31ul && readOutTechnologyMask & Pixel::makeReadoutTechnologyBit(p_design.getReadoutTechnology()) );
78  }

◆ sorted_tuple()

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

Create a tuple of the given values in increasing order.

Definition at line 21 of file PixelFEUtils.h.

21  {
22  return (a<b ? std::make_tuple(a,b) : std::make_tuple(b,a) );
23  }
PixelID::phi_index
int phi_index(const Identifier &id) const
Definition: PixelID.h:658
InDetDD::PixelModuleDesign
Definition: PixelModuleDesign.h:48
InDet::SiDetectorElementStatus::isChipGood
bool isChipGood(IdentifierHash hash, unsigned int chip) const
Definition: SiDetectorElementStatus.h:100
InDet::SiDetectorElementStatus::getDetectorElement
const InDetDD::SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
Definition: SiDetectorElementStatus.h:91
Pixel::makeReadoutTechnologyBit
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.
Definition: PixelFEUtils.h:60
lumiFormat.i
int i
Definition: lumiFormat.py:92
PixelID::eta_index
int eta_index(const Identifier &id) const
Definition: PixelID.h:664
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
python.compareNtuple.nGood
nGood
Definition: compareNtuple.py:55
InDetDD::IPixelReadoutManager::getFE
virtual uint32_t getFE(Identifier diodeId, Identifier offlineId) const =0
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
InDetDD::PixelModuleDesign::getReadoutTechnology
PixelReadoutTechnology getReadoutTechnology() const
Definition: PixelModuleDesign.h:368
a
TList * a
Definition: liststreamerinfos.cxx:10
PixelID::pixel_id
Identifier pixel_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int phi_index, int eta_index) const
For an individual pixel.
Definition: PixelID.h:432
InDetDD::SiDetectorElement::design
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
Pixel::sorted_tuple
std::tuple< T, T > sorted_tuple(T a, T b)
Create a tuple of the given values in increasing order.
Definition: PixelFEUtils.h:21