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

Message Stream Member. More...

Namespaces

namespace  detail
namespace  HGTDDetEl
namespace  ITk

Classes

class  AthenaComps
 Class to hold various Athena components. More...
class  BCM_Builder
class  BCMPrimeDetectorManager
class  BCMPrimeGmxInterface
class  BLM_Builder
class  DetectorDesign
 Base class for the detector design classes for ITk and HGTD. More...
class  DetectorFactoryBase
class  DistortedMaterialManager
class  ExtendedAlignableTransform
 Class to hold alignable transform plus a pointer to the child volume and optionally a frame volume. More...
class  ExtraMaterial
class  GenericTubeMaker
class  HGTD_DetectorElement
 Class to hold geometrical description of an HGTD detector element. More...
class  HGTD_ModuleDesign
 Class used to describe the design of a module (diode segmentation and readout scheme) More...
class  InDetDetectorManager
 Virtual base class for all ID detector managers. More...
class  InDetServMatManager
class  IPixelReadoutManager
class  PairIndexMap
 Class to store map between pair of two ints and an int. More...
class  PconZone
class  PixelDetectorManager
 Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated pixel information, access. More...
class  PixelDiodeMap
 Class used to describe the diode segmentation of a pixel module. More...
class  PixelDiodeMatrix
 Class used to describe the segmentation of the pixel and allow for conversion between cell id and position. More...
class  PixelDiodeParametersProxy
 Helper class to cache a pixel diode position, and provide access to diode parameters. More...
class  PixelDiodeTree
 Tree structure to find the position, index or pitch of a pixel on a semi-regular grid The grid is considered regular if sub grids resulting from consecutive splits in local-x and local-y direction have identical pitch. More...
class  PixelModuleDesign
 Class used to describe the design of a module (diode segmentation and readout scheme) More...
class  PixelMultipleConnection1D
 Class used to handle connection of multiple diodes to the same readout cell. More...
class  PixelReadoutManager
class  PixelReadoutScheme
 Class used to describe the connection scheme of a diode matrix to a set of readout circuits. More...
class  PLRGmxInterface
class  Point
class  Ray
class  SCT_BarrelModuleSideDesign
 Barrel module design description for the SCT. More...
class  SCT_DetectorManager
 Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated SCT information, access. More...
class  SCT_ForwardFrameTransformation
 Class that connect cartesian and pokar coordinates. More...
class  SCT_ForwardModuleSideDesign
 Design descriptor for forward modules in the SCT, carries the bounds, and readout information. More...
class  SCT_ForwardModuleSideGeometry
 Geometry descriptor holding strig number, crystel inner and outer half length & radius. More...
class  SCT_ForwardPolarPosition
 2D position in polar coordinates for the polar frame in the SCT endcaps. More...
class  SCT_ModuleSideDesign
 Base class for the SCT module side design, extended by the Forward and Barrel module design. More...
class  SCT_ReadoutScheme
 Definition of the readout scheme in the SCT detector describing, number of sides, cells, crystals per module. More...
class  Segment
class  SegmentList
class  SegmentSplitter
class  ServiceVolume
class  ServiceVolumeMaker
class  ServiceVolumeMakerMgr
class  ServiceVolumeSchema
class  SiCellId
 Identifier for the strip or pixel cell. More...
class  SiCommonItems
 Helper class to concentrate common items, such as the pointer to the IdHelper, the lorentzAngle tool or the information about the solenoidal frame. More...
class  SiDetectorDesign
 Base class for the detector design classes for Pixel and SCT. More...
class  SiDetectorElement
 Class to hold geometrical description of a silicon detector element. More...
class  SiDetectorElementCollection
 Class to hold the SiDetectorElement objects to be put in the detector store. More...
class  SiDetectorManager
 Base class for Pixel and SCT Detector managers. More...
class  SiDiodesParameters
 Class to handle the position of the centre and the width of a diode or a cluster of diodes Version 1.1 15/08/2001 David Calvet. More...
class  SiIntersect
 class to run intersection tests More...
class  SiLocalPosition
 Class to represent a position in the natural frame of a silicon sensor, for Pixel and SCT For Pixel: eta=column, phi=row. More...
class  SiNumerology
 Class to extract numerology for Pixel and SCT. More...
class  SiReadoutCellId
 Identifier for the strip or pixel readout cell. More...
class  SolidStateDetectorElementBase
 Class to hold geometrical description of a solid state detector element. More...
class  StripAnnulusDesign
class  StripBoxDesign
class  StripStereoAnnulusDesign
class  SubDetectorFactoryBase
class  SurfaceCache
class  SurfaceCacheBase
 These are for internal use in TRT_RedoutGeometry. More...
class  TRT_BarrelCode
 bit definitions to decode TRT straws in barrel More...
class  TRT_BarrelDescriptor
 Local Straw Positions (from the center of the module.) More...
class  TRT_BarrelElement
 Extended TRT_BaseElement to describe a TRT readout element, this is a planar layer with n ( order of 20 ) straws, in one of the 32 sectors of the TRT barrel. More...
class  TRT_BaseElement
 Virtual base class of TRT readout elements. More...
class  TRT_Conditions
 This class is an interface to conditions objects. More...
class  TRT_DetectorManager
 The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements which can be retrieved from the TRT_DetectorManager either via numerology or Identifier access. More...
class  TRT_DetElementCollection
 Class to hold collection of TRT detector elements. More...
class  TRT_DetElementContainer
 Class to hold different TRT detector elements structures. More...
class  TRT_EndcapCode
 bit definitions to decode TRT straws in endcap More...
class  TRT_EndcapDescriptor
 class TRT_EndcapDescriptor More...
class  TRT_EndcapElement
 Extended class of a TRT_BaseElement to describe a readout elment in the endcap. More...
class  TRT_Numerology
 Helper class to organize the straw elements on TRT readout elements. More...
class  TubeVolData
 Helper class to read in generic TUBE, TUBS, CONS or PCON type volumes. More...
class  TubeZone
class  UnboundedZone
class  Version
 Class to hold version information consisting of tag, name layout and description as strings, such as their integer regpresentation in the major-minor-tag scheme. More...
class  VolumeBuilder
class  VolumeSplitter
class  Zone

Typedefs

using AttributeRefiner
using HGTD_DetectorElementCollection = DataVector<HGTD_DetectorElement>
using GeoShapeHolder = GeoIntrusivePtr<const GeoShape>
using PhysVolPtr = VolumeBuilder::PhysVolPtr
typedef std::map< std::string, const void * > RawAlignmentObjects

Enumerations

enum  DetectorShape {
  Box =0 , Trapezoid , Annulus , Other ,
  PolarAnnulus
}
enum  DetectorType {
  Undefined =0 , PixelBarrel , PixelEndcap , PixelInclined ,
  StripBarrel , StripEndcap , BCMPrime , PLR ,
  HGTD
}
enum  FrameType { local , global , other }
enum  CarrierType { holes , electrons }
enum  AlignFolderType { none = -1 , static_run1 = 0 , timedependent_run2 = 1 }
enum class  PixelModuleType {
  NONE =-1 , DBM , IBL_PLANAR , IBL_3D ,
  PIX_BARREL , PIX_ENDCAP , N_PIXELMODULETYPES
}
enum class  PixelDiodeType {
  NONE =-1 , NORMAL , LONG , GANGED ,
  LARGE , N_DIODETYPES
}
enum class  PixelReadoutTechnology {
  NONE =-1 , FEI3 , FEI4 , RD53 ,
  N_TECHNOLOGIES
}

Functions

PixelDiodeTree createPixelDiodeTree (const std::array< unsigned int, 2 > &chip_dim, const std::array< unsigned int, 2 > &chip_matrix_dim, const PixelDiodeTree::Vector2D &pitch, const std::array< std::array< unsigned int, 2 >, 2 > &edge_dim, const std::array< PixelDiodeTree::Vector2D, 2 > &edge_pitch, const std::array< std::array< unsigned int, 2 >, 2 > &dead_zone, const AttributeRefiner &func_compute_attribute, std::ostream *debug_out=nullptr)
 Create a pixel diode tree.
std::ostream & operator<< (std::ostream &os, const SiCellId &cellId)
SiLocalPosition operator+ (const SiLocalPosition &position1, const SiLocalPosition &position2)
SiLocalPosition operator* (const SiLocalPosition &position, const double factor)
SiLocalPosition operator* (const double factor, const SiLocalPosition &position)
SiLocalPosition operator/ (const SiLocalPosition &position, const double factor)
std::ostream & operator<< (std::ostream &os, const InDetDD::Point &point)
std::ostream & operator<< (std::ostream &os, const InDetDD::Ray &ray)
template<typename T>
constexpr std::size_t enum2uint (T n, std::string_view callingFunctionName="")
 Convert an enum class to size_t for use as an array index.
std::string PixelModuleTypeName (const PixelModuleType &t)
std::string PixelDiodeTypeName (const PixelDiodeType &t)
std::string PixelReadoutTechnologyName (const PixelReadoutTechnology &t)
void TRT_DetectorManager::addKey ATLAS_NOT_THREAD_SAFE (const std::string &key, int level)

Variables

constexpr uint32_t invalidRow = 0xFFFFFFFF
constexpr uint32_t invalidColumn = 0xFFFFFFFF
constexpr uint32_t invalidFrontEnd = 0xFFFFFFFF
const int FIRST_HIGHER_LEVEL = 1

Detailed Description

Message Stream Member.

Authors: John Alison (johnd.nosp@m.a@he.nosp@m.p.upe.nosp@m.nn.e.nosp@m.du)

Base class.

Helper class to make general tubes used mainly for services.

Takes as input a DB table which has the following columns Handles numberouse cases Simple tubes: Rmin2, Rmax2 <=0. Cones: Uses Rmin2 and Rmax2. Tube and cone sectors: Uses phi start and phi delta. If RadialDiv > 0 then simulates the CLHEP::radial dependence of tubes/cables going outward CLHEP::radially.

Date: 22 Aug 2008

Description: This algorithm loops over the Inner Detector elements and prints thier local frames to a text file (IDLocalFrames.txt)

Date: 22 Aug 2008

Description: This algorithm loops over the Inner Detector elements and prints thier global positions to a text file (IDgeometryTextFile.txt)

Typedef Documentation

◆ AttributeRefiner

Initial value:
std::function<std::tuple<PixelDiodeTree::AttributeType,PixelDiodeTree::AttributeType>
(const std::array<PixelDiodeTree::IndexType,2> & ,
const std::array<bool,4> & ,
unsigned int ,

Definition at line 39 of file PixelDiodeTreeBuilder.h.

◆ GeoShapeHolder

using InDetDD::GeoShapeHolder = GeoIntrusivePtr<const GeoShape>

◆ HGTD_DetectorElementCollection

◆ PhysVolPtr

◆ RawAlignmentObjects

typedef std::map<std::string, const void*> InDetDD::RawAlignmentObjects

Definition at line 43 of file InDetDetectorManager.h.

Enumeration Type Documentation

◆ AlignFolderType

Enumerator
none 
static_run1 
timedependent_run2 

Definition at line 19 of file InDetDD_Defs.h.

19{none = -1, static_run1 = 0, timedependent_run2 = 1};
@ timedependent_run2

◆ CarrierType

Enumerator
holes 
electrons 

Definition at line 17 of file InDetDD_Defs.h.

◆ DetectorShape

Enumerator
Box 
Trapezoid 
Annulus 
Other 
PolarAnnulus 

Definition at line 41 of file DetectorDesign.h.

◆ DetectorType

Enumerator
Undefined 
PixelBarrel 
PixelEndcap 
PixelInclined 
StripBarrel 
StripEndcap 
BCMPrime 
PLR 
HGTD 

Definition at line 45 of file DetectorDesign.h.

45 {
47};
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.

◆ FrameType

Enumerator
local 
global 
other 

Definition at line 16 of file InDetDD_Defs.h.

◆ PixelDiodeType

enum class InDetDD::PixelDiodeType
strong
Enumerator
NONE 
NORMAL 
LONG 
GANGED 
LARGE 
N_DIODETYPES 

Definition at line 28 of file PixelReadoutDefinitions.h.

◆ PixelModuleType

enum class InDetDD::PixelModuleType
strong
Enumerator
NONE 
DBM 
IBL_PLANAR 
IBL_3D 
PIX_BARREL 
PIX_ENDCAP 
N_PIXELMODULETYPES 

Definition at line 18 of file PixelReadoutDefinitions.h.

◆ PixelReadoutTechnology

Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

void TRT_DetectorManager::addKey InDetDD::ATLAS_NOT_THREAD_SAFE ( const std::string & key,
int level )

Definition at line 224 of file TRT_DetectorManager.cxx.

225 {
226 if(msgLvl(MSG::DEBUG))
227 msg(MSG::DEBUG) << "Registering alignmentCallback with key " << key << ", at level " << level
228 << endmsg;
229
230 const DataHandle<AlignableTransform> transformCollection;
231 if (m_detStore->regFcn(&TRT_DetectorManager::alignmentCallback, this, transformCollection, key).isFailure()) {
232 ATH_MSG_ERROR("Cannot register callback with DetectorStore");
233 }
234 addKey(key, level, InDetDD::other);
235 }
#define endmsg
#define ATH_MSG_ERROR(x)
an iterator over instances of a given type in StoreGateSvc.
Definition DataHandle.h:43
StatusCode alignmentCallback(IOVSVC_CALLBACK_ARGS)
Call back for alignment updates, DEPRECATED.
MsgStream & msg
Definition testRead.cxx:32

◆ createPixelDiodeTree()

PixelDiodeTree InDetDD::createPixelDiodeTree ( const std::array< unsigned int, 2 > & chip_dim,
const std::array< unsigned int, 2 > & chip_matrix_dim,
const PixelDiodeTree::Vector2D & pitch,
const std::array< std::array< unsigned int, 2 >, 2 > & edge_dim,
const std::array< PixelDiodeTree::Vector2D, 2 > & edge_pitch,
const std::array< std::array< unsigned int, 2 >, 2 > & dead_zone,
const AttributeRefiner & func_compute_attribute,
std::ostream * debug_out = nullptr )

Create a pixel diode tree.

Parameters
chip_dimthe number of circuits in local-x (phi, row) and local-y (eta, column) direction.
chip_matrix_dimthe width of a matrix in number of pixels in local-x(phi, row) and local-y (eta, column) direction.
pitchthe pitch of regular pixels in local-x (phi, row) and local-y (eta, column) direction.
edge_dimthe width of the outer, and inner edge of the sub-matrix associated to one circuit.
edge_pitchthe pitch of diodes in the outer or inner edge of a sub-matrix in local-x and local-y direction.
dead_zonethe width of a "dead" zone at the the outside of an outer or inner edge in pixels.
func_compute_attributea functional to "compute" attributes to diodes and sub-matrices.
debug_outnullptr or a valid output stream to get debug output. Will create a diode tree to compute diode positions or indices from indices or positions and

Definition at line 224 of file PixelDiodeTreeBuilder.cxx.

231 {
232 // strategy :
233 // split the entire pixel matrix first by circuit, then by special pixel areas
234 // add new diodes for sub matrices only composed of a single diode type, where the
235 // diode type is defined by the area i.e. it is located on one of the outer edges of the full matrix,
236 // one of the inner edges i.e. areas "between" circuits, in the "dead" zone between circuits
237 // or on the regular matrix.
238 //
239 // 1) first split circuit arrays in roughly by half until all sub-matrices span only a single circuit
240 // 2) split sub-matrices until the sub matrix only contains pixel of an outer edge, inner edge
241 // or the "normal" pixels. Inner-edge sub-matrices are split further if there is a dead zone.
242 // @TODO split by circuit and edge type independently per axis, to reduce number of unused splits
243 // original pixel matrix (Run 1-Run 3)
244
245 std::array<unsigned int,2> dim{};
246 PixelDiodeTree::Vector2D width(PixelDiodeTree::Vector2D::Zero());
247 // compute total width of diode matrix
248 for (unsigned int axis_i=0; axis_i<2; ++axis_i) {
249 dim[axis_i] = chip_dim[axis_i] * chip_matrix_dim[axis_i];
250 unsigned int n_inner_edges = chip_dim[axis_i]*2-2 ;
251 constexpr unsigned int n_outer_edges = 2;
252 width[axis_i] = ( ( chip_dim[axis_i]*chip_matrix_dim[axis_i]
253 - edge_dim[kInner][axis_i]*n_inner_edges
254 - edge_dim[kOuter][axis_i]*n_outer_edges ) * pitch[axis_i]
255 + edge_dim[kInner][axis_i]*edge_pitch[kInner][axis_i]*n_inner_edges
256 + edge_dim[kOuter][axis_i]*edge_pitch[kOuter][axis_i]*n_outer_edges);
257 }
258 PixelDiodeTree diode_tree(width);
259 std::unordered_map<unsigned int, DiodeInfo > diode_idx;
260
261 std::array<std::string,SubMatrixData::kDeadZoneInner+1> edgeName {
262 std::string("Outer"),
263 std::string("Inner"),
264 std::string("Internal"),
265 std::string("DeadZoneOuter"),
266 std::string("DeadZoneInner")
267 };
268
269
270 std::vector< SubMatrixData > stack;
271 stack.emplace_back(width,dim, chip_dim);
272 while (!stack.empty()) {
273 SubMatrixData current_submatrix = std::move(stack.back());
274 const std::array<unsigned int,2 > &split_chip_dim = current_submatrix.m_chipDim;
275 stack.pop_back();
276
277 std::array<PixelDiodeTree::Vector2D,2> split_width{current_submatrix.m_width,
278 PixelDiodeTree::Vector2D::Zero()}; // default for no splitting
279 std::array<unsigned int,2> split_idx{current_submatrix.m_idx[0]+current_submatrix.m_dim[0], //set split point to outside outermost cell
280 current_submatrix.m_idx[1]+current_submatrix.m_dim[1]};
281 std::array<std::array<unsigned int,2>,2 > new_chip_dim{ split_chip_dim, split_chip_dim};
282 unsigned int n_sub_matrices=0;
283
284 if (debug_out) {
285 *debug_out << "Split : " << std::setw(4) << current_submatrix.m_idx[0] << ", " << std::setw(4) << current_submatrix.m_idx[1]
286 << " " << std::setw(4) << current_submatrix.m_dim[0] << " x " << std::setw(4) << current_submatrix.m_dim[1]
287 << " pos " << std::setw(6) << current_submatrix.m_pos[0] << " , " << std::setw(6) << current_submatrix.m_pos[1]
288 << " w " << std::setw(6) << current_submatrix.m_width[0] << " , " << std::setw(6) << current_submatrix.m_width[1]
289 << " chips " << current_submatrix.m_chipDim[0] << " x " << current_submatrix.m_chipDim[1]
290 << " edges: " << edgeName[current_submatrix.m_edgeType[0] ] << " | " << edgeName[current_submatrix.m_edgeType[1] ]
291 << " , " << edgeName[current_submatrix.m_edgeType[2] ] << " | " << edgeName[current_submatrix.m_edgeType[3] ]
292 << std::endl;
293 }
294
295 // 1) split circuits until sub-matrix composed of a single circuit
296 for (unsigned int axis_i=0; axis_i<2; ++axis_i) {
297 if (current_submatrix.m_chipDim[axis_i]>1) {
298 n_sub_matrices+=2;
299 unsigned int odd = current_submatrix.m_chipDim[axis_i] & 1;
300 unsigned int axis_idx= current_submatrix.m_idx[axis_i];
301
302 for (unsigned int part_i=0; part_i<2; ++part_i) {
303 unsigned n_chips = (current_submatrix.m_chipDim[axis_i] + odd)/2;
304 new_chip_dim[part_i][axis_i]=n_chips;
305 unsigned int n_outer_edges=(current_submatrix.m_edgeType[axis_i*2+part_i]==SubMatrixData::kOuter);
306 unsigned int n_inner_edges=n_chips*2-n_outer_edges;
307 split_idx[axis_i]=axis_idx;
308 split_width[part_i][axis_i] = ( n_chips*chip_matrix_dim[axis_i]
309 - edge_dim[kInner][axis_i]*n_inner_edges
310 - edge_dim[kOuter][axis_i]*n_outer_edges ) * pitch[axis_i]
311 + n_inner_edges*edge_dim[kInner][axis_i]*edge_pitch[kInner][axis_i]
312 + n_outer_edges*edge_dim[kOuter][axis_i]*edge_pitch[kOuter][axis_i];
313 axis_idx += n_chips * chip_matrix_dim[axis_i];
314 odd=0u;
315 }
316 }
317 }
318 std::array<bool,2> dead_zone_split{};
319 // composed of a single circuit split off special pixel edges, or split off dead zone
320 if (n_sub_matrices<=1) {
321 if (debug_out){
322 (*debug_out) << "Split circuit arrays into " << n_sub_matrices << " sub arrays." << std::endl;
323 }
324 n_sub_matrices=0;
325 for (unsigned int axis_i=0; axis_i<2; ++axis_i) {
326 // compute the dimension of the edges on both sides
327 std::array<unsigned int, 2> axis_edge_dim{0,0};
328 for (unsigned int side_i=0; side_i<2; ++side_i) {
329 new_chip_dim[side_i][axis_i]=0u;
330 if (current_submatrix.m_edgeType[axis_i*2+side_i]<SubMatrixData::kInternal) {
331 axis_edge_dim[side_i]=edge_dim[ kOuter + (current_submatrix.m_edgeType[axis_i*2+side_i]==SubMatrixData::kInner) ][axis_i];
332 }
333 }
334
335 if (debug_out) {
336 (*debug_out) << "Split submatrix " << (axis_i == 0 ? "x: " : "y: ")
337 << edgeName[current_submatrix.m_edgeType[axis_i*2]]
338 << " | "
339 << edgeName[current_submatrix.m_edgeType[axis_i*2+1]]
340 << " -> " << axis_edge_dim[0] << " , " << axis_edge_dim[1]
341 << std::endl;
342 }
343 unsigned int axis_dim = std::min(current_submatrix.m_dim[axis_i],chip_matrix_dim[axis_i]);
344 split_idx[axis_i]=current_submatrix.m_idx[axis_i]+axis_dim;
345
346 // loop over the two sides until one side has an edge or dead zone that can be split off
347 if (axis_edge_dim[0]+axis_edge_dim[1]>0 ) { // if either side has a margin tht needs to be split off
348 for (unsigned int side_i=0; side_i<2; ++side_i) {
349 split_width[side_i][axis_i]=0.;
350 if (axis_edge_dim[side_i] > 0 ) {
351 unsigned int inner_outer = kOuter + (current_submatrix.m_edgeType[axis_i*2+side_i]==SubMatrixData::kInner);
352 ++n_sub_matrices;
353 split_idx[axis_i]=current_submatrix.m_idx[axis_i];
354 if (side_i==0) {
355 split_idx[axis_i] += std::min(axis_edge_dim[side_i], current_submatrix.m_dim[axis_i]);
356 // if there is no split check whether the edge has a dead zone
357 if (split_idx[axis_i] == current_submatrix.m_idx[axis_i] + axis_dim
358 && axis_dim == edge_dim[inner_outer][axis_i]
359 && dead_zone[inner_outer][axis_i]>0u ) {
360 split_idx[axis_i] = current_submatrix.m_idx[axis_i] + dead_zone[inner_outer][axis_i];
361 split_width[side_i][axis_i]=dead_zone[inner_outer][axis_i]*edge_pitch[inner_outer][axis_i];
362 split_width[side_i^1][axis_i]=(edge_dim[inner_outer][axis_i] - dead_zone[inner_outer][axis_i])*edge_pitch[inner_outer][axis_i];
363 dead_zone_split[axis_i]=true;
364 break;
365 }
366 }
367 else {
368 split_idx[axis_i] += axis_dim - std::min(axis_edge_dim[side_i],current_submatrix.m_dim[axis_i]) ;
369 // if there is no split check whether the edge has a dead zone
370 if (split_idx[axis_i] == current_submatrix.m_idx[axis_i]
371 && axis_dim == axis_edge_dim[side_i]
372 && dead_zone[inner_outer][axis_i]>0u ) {
373 split_idx[axis_i] = current_submatrix.m_idx[axis_i] + current_submatrix.m_dim[axis_i] - dead_zone[inner_outer][axis_i];
374 split_width[side_i][axis_i]=dead_zone[inner_outer][axis_i]*edge_pitch[inner_outer][axis_i];
375 split_width[side_i^1][axis_i]=(edge_dim[inner_outer][axis_i] - dead_zone[inner_outer][axis_i])*edge_pitch[inner_outer][axis_i];
376 dead_zone_split[axis_i]=true;
377 break;
378 }
379 // lower side only
380 }
381 if (split_idx[axis_i]<current_submatrix.m_idx[axis_i]
382 || split_idx[axis_i]>current_submatrix.m_idx[axis_i]+current_submatrix.m_dim[axis_i]
383 || (current_submatrix.m_dim[axis_i] < edge_dim[kOuter][axis_i] && current_submatrix.m_dim[axis_i] < edge_dim[kInner][axis_i])
384 ) {
385 throw std::logic_error("invalid split index.");
386 }
387 split_width[side_i][axis_i]=axis_edge_dim[side_i] * edge_pitch[inner_outer][axis_i];
388 // only edges on side 0 here
389 unsigned int n_inner_edges = current_submatrix.m_edgeType[axis_i*2+(side_i^1)]==SubMatrixData::kInner;
390 unsigned int n_outer_edges = current_submatrix.m_edgeType[axis_i*2+(side_i^1)]==SubMatrixData::kOuter;
391 split_width[side_i^1][axis_i] = ( ( axis_dim
392 // edges on both sides here
393 - edge_dim[kInner][axis_i]*(n_inner_edges+current_submatrix.m_edgeType[axis_i*2+side_i]==SubMatrixData::kInner)
394 - edge_dim[kOuter][axis_i]*(n_outer_edges+current_submatrix.m_edgeType[axis_i*2+side_i]==SubMatrixData::kOuter))
395 * pitch[axis_i]
396 + edge_dim[kInner][axis_i]*edge_pitch[kInner][axis_i]*n_inner_edges
397 + edge_dim[kOuter][axis_i]*edge_pitch[kOuter][axis_i]*n_outer_edges);
398 break;
399 }
400 }
401 }
402 }
403 if (n_sub_matrices>0) {
404 if( (split_idx[0]>=current_submatrix.m_idx[0]+current_submatrix.m_dim[0] || split_idx[0]==current_submatrix.m_idx[0])
405 && (split_idx[1]>=current_submatrix.m_idx[1]+current_submatrix.m_dim[1] || split_idx[1]==current_submatrix.m_idx[1])) {
406 // nothing to split
407 n_sub_matrices=0;
408 }
409 }
410 }
411
412 if (n_sub_matrices>0)
413 {
414 // split current matrix further into sub-matrices
415 if (debug_out) {
416 (*debug_out) << "Split : " << current_submatrix.m_idx[0] << " , " << current_submatrix.m_idx[1] << " " << current_submatrix.m_dim[0] << "x" << current_submatrix.m_dim[1]
417 << " split at " << split_idx[0] << ", " << split_idx[1]
418 << " " << (split_idx[0] - current_submatrix.m_idx[0]) << "|" << (current_submatrix.m_idx[0]+current_submatrix.m_dim[0]-split_idx[0])
419 << ", " << (split_idx[1] - current_submatrix.m_idx[1]) << "|" << (current_submatrix.m_idx[1]+current_submatrix.m_dim[1]-split_idx[1])
420 << " width " << split_width[0][0] << ", " << split_width[0][1] << "; " << split_width[1][0] << ", " << split_width[1][1]
421 << std::endl;
422 }
423 std::size_t stack_size=stack.size();
424 splitMatrix(current_submatrix,
425 split_idx,
426 split_width,
427 new_chip_dim,
428 dead_zone_split,
429 std::array<std::array<PixelDiodeTree::AttributeType, 2>,2> {std::array<PixelDiodeTree::AttributeType, 2>{SubMatrixData::s_defaultMatrixAttribute,
430 SubMatrixData::s_defaultMatrixAttribute},
431 std::array<PixelDiodeTree::AttributeType, 2>{SubMatrixData::s_defaultMatrixAttribute,
432 SubMatrixData::s_defaultMatrixAttribute}},
433 stack,
434 diode_tree,
435 debug_out,
436 &edgeName);
437 if (stack_size == stack.size()) {
438 // split surprisingly resulted in zero new sub-matrices. @TODO is this possible ? Should this be a logic error ?
439 n_sub_matrices=0;
440 }
441 }
442
443 // if the current matrix was not split into further sub-matrices
444 // register and assign a diode for it.
445 if (n_sub_matrices==0) {
446
447 // if the diode tree is still empty
448 // create a dummy split of which only the first area is used.
449 if (diode_tree.empty()) {
450 assert( stack.empty() ); // this can only happen if no matrix has been split yet, and then the stack must also be empty
451 assert( chip_dim[0]==1 && chip_dim[1]==1); // should only happen for single chip modules
452 assert( current_submatrix.m_subMatrixIdx==std::numeric_limits<unsigned int>::max());
453 current_submatrix.m_subMatrixIdx
454 = diode_tree.split( std::array<PixelDiodeTree::CellIndexType,2>{ static_cast< PixelDiodeTree::CellIndexType>(current_submatrix.m_dim[0]),
455 static_cast< PixelDiodeTree::CellIndexType>(current_submatrix.m_dim[1]) },
456 current_submatrix.m_pos+current_submatrix.m_width,
457 current_submatrix.m_attribute);
458 }
459
460 // determine diode type by evaluating whether it is on an inner, or outer edge, a dead zone or just a normal pixel diode
461 PixelDiodeTree::Vector2D diode_width(PixelDiodeTree::Vector2D::Zero());
462 PixelDiodeTree::AttributeType full_diode_type{};
463 for (unsigned int axis_i=0; axis_i<2; ++axis_i) {
464 // count inner and outer edges of the current sub matrix
465 unsigned int axis_inner_edges = ( (current_submatrix.m_edgeType[axis_i*2] == SubMatrixData::kInner)
466 + (current_submatrix.m_edgeType[axis_i*2+1] == SubMatrixData::kInner));
467 unsigned int axis_outer_edges = ( (current_submatrix.m_edgeType[axis_i*2] == SubMatrixData::kOuter)
468 + (current_submatrix.m_edgeType[axis_i*2+1] == SubMatrixData::kOuter));
469
470 // set corresponding bit in diode type if sub-matrix has a non empty inner or outer edge
471 // in principle only one of the two should be true per axis
472 unsigned int diode_type = ((axis_inner_edges * edge_dim[kInner][axis_i]) > 0) << (kInner+1);
473 diode_type |= ((axis_outer_edges * edge_dim[kOuter][axis_i]) > 0) << (kOuter+1);
474 bool ganged=false;
475 unsigned int n = 0;
476 // special handling if this is an edge with a dead zone
477 // @TODO should distinguish inner or outer edges adjacent to dead zone from actual dead zones.
478 if ( current_submatrix.m_edgeType[axis_i*2]>SubMatrixData::kInternal
479 || current_submatrix.m_edgeType[axis_i*2+1]>SubMatrixData::kInternal) {
480 diode_type = ((current_submatrix.m_edgeType[axis_i*2]==SubMatrixData::kDeadZoneInner) << (kInner+1))
481 | ((current_submatrix.m_edgeType[axis_i*2+1]==SubMatrixData::kDeadZoneInner) << (kInner+1))
482 | ((current_submatrix.m_edgeType[axis_i*2]==SubMatrixData::kDeadZoneOuter) << (kOuter+1))
483 | ((current_submatrix.m_edgeType[axis_i*2+1]==SubMatrixData::kDeadZoneOuter) << (kOuter+1));
484 ganged=true;
485 }
486 else {
487 n = current_submatrix.m_dim[axis_i] - edge_dim[kOuter][axis_i] *axis_outer_edges - edge_dim[kInner][axis_i] * axis_inner_edges;
488 }
489 diode_type |= (n>0) << 0u;
490 if (debug_out) {
491 *debug_out << (axis_i==0 ? "x: " : "y:" )
492 << " outer " << axis_outer_edges << " * " << edge_dim[kOuter][axis_i] << " * " << edge_pitch[kOuter][axis_i]
493 << " inner " << axis_inner_edges << " * " << edge_dim[kInner][axis_i] << " * " << edge_pitch[kInner][axis_i]
494 << " normal " << n
495 << " -> " << diode_type
496 << std::endl;
497 }
498 // determine diode width depending on diode type
499 switch (diode_type) {
500 case (1u<<0):
501 diode_width[axis_i]=pitch[axis_i];
502 break;
503 case (1u<<(kOuter+1)):
504 diode_width[axis_i]=edge_pitch[kOuter][axis_i];
505 break;
506 case (1u<<(kInner+1)):
507 diode_width[axis_i]=edge_pitch[kInner][axis_i];
508 break;
509 default:
510 throw std::logic_error("Invalid diode type. Matrix not fully split.");
511 }
512
513 // one byte per axis
514 full_diode_type<<=8;
515 diode_type|=ganged<<3u;
516 full_diode_type|=(diode_type&0xff);
517 }
518 // first two elements whether the diode is in a ganged area in one of the two directions
519 // second two elements whether
520 // if the diode is adjacent to an inner or outer edge it is in the dead zone if the diode is marked ganged.
521 std::array<bool,4> ganged_flags{ (static_cast<std::size_t>(full_diode_type) & (1u<<3u)) != 0u,
522 (static_cast<std::size_t>(full_diode_type) & (1u<<(3u+8u))) != 0u,
523 current_submatrix.m_edgeType[0]==SubMatrixData::kInner
524 || current_submatrix.m_edgeType[0+1]==SubMatrixData::kInner
525 || current_submatrix.m_edgeType[0]==SubMatrixData::kOuter
526 || current_submatrix.m_edgeType[0+1]==SubMatrixData::kOuter,
527 current_submatrix.m_edgeType[2]==SubMatrixData::kInner
528 || current_submatrix.m_edgeType[2+1]==SubMatrixData::kInner
529 || current_submatrix.m_edgeType[2]==SubMatrixData::kOuter
530 || current_submatrix.m_edgeType[2+1]==SubMatrixData::kOuter};
531 // cannot be in a dead-zone if the pixel is not marked ganged.
532 ganged_flags[2]=ganged_flags[2]&ganged_flags[0];
533 ganged_flags[3]=ganged_flags[3]&ganged_flags[1];
534
535 PixelDiodeTree::AttributeType current_sub_matrix_attribute=diode_tree.attribute(current_submatrix.m_subMatrixIdx);
536 auto [new_sub_matrix_attribute, new_diode_attribute]
537 = func_compute_attribute(std::array<PixelDiodeTree::CellIndexType,2>{ static_cast<PixelDiodeTree::CellIndexType>(current_submatrix.m_idx[0]),
538 static_cast<PixelDiodeTree::CellIndexType>(current_submatrix.m_idx[1])},
539 diode_width,
540 ganged_flags,
541 current_submatrix.m_splitIdx,
542 current_sub_matrix_attribute,
543 full_diode_type);
544
545 std::pair< std::unordered_map<unsigned int, DiodeInfo >::iterator, bool>
546 ret = diode_idx.insert( std::make_pair(full_diode_type, DiodeInfo(std::numeric_limits<unsigned int>::max(),new_diode_attribute)));
547 if (ret.second) {
548 unsigned int diode_idx = diode_tree.addDiode(diode_width,
549 new_diode_attribute);
550 assert( diode_idx < std::numeric_limits<PixelDiodeTree::IndexType>::max());
551 ret.first->second.setIndex( diode_idx );
552 }
553 assert( ret.second || ret.first->second.attributeAgrees(new_diode_attribute) );
554 diode_tree.setAttribute(current_submatrix.m_subMatrixIdx, new_sub_matrix_attribute);
555 assert( current_sub_matrix_attribute==SubMatrixData::s_defaultMatrixAttribute
556 || current_sub_matrix_attribute==new_sub_matrix_attribute);
557
558 diode_tree.setDiodeForSubMatrix(current_submatrix.m_subMatrixIdx, current_submatrix.m_splitIdx,ret.first->second.diodeIndex());
559 if (debug_out) {
560 (*debug_out) << "Created Diode "
561 << current_submatrix.m_idx[0] << ", " << current_submatrix.m_idx[1] << " "
562 << current_submatrix.m_dim[0] << " x " << current_submatrix.m_dim[1]
563 << " attr: " << new_sub_matrix_attribute
564 << " : diode_pitch " << diode_width[0] << ", " << diode_width[1]
565 << " sub-matrix index " << current_submatrix.m_subMatrixIdx
566 << " split index " << current_submatrix.m_splitIdx
567 << " -> " << -static_cast<PixelDiodeTree::IndexType>(ret.first->second.diodeIndex())
568 << " attribute " << full_diode_type << " -> " << new_diode_attribute
569 << std::endl;
570 }
571 }
572 }
573 if (diode_tree.cloneSingleSplitsToUnusedHalf()>0) {
574 throw std::logic_error("Some splits have invalid indices. That should not happen.");
575 }
576 // set the positions of the upper and lower corner of the matrix
577 diode_tree.computeMatrixCorner(PixelDiodeTree::makeCellIndex(dim[0],dim[1]));
578 return diode_tree;
579}
const double width
Tree structure to find the position, index or pitch of a pixel on a semi-regular grid The grid is con...
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.
@ u
Enums for curvilinear frames.
Definition ParamDefs.h:77

◆ enum2uint()

template<typename T>
std::size_t InDetDD::enum2uint ( T n,
std::string_view callingFunctionName = "" )
constexpr

Convert an enum class to size_t for use as an array index.

Definition at line 51 of file PixelReadoutDefinitions.h.

51 {
52 if (n==T::NONE){
53 throw std::out_of_range(std::format("{} InDetDD::enum2uint: 'NONE' type is out of range for {}", callingFunctionName, typeid(T).name()));
54 }
55 return static_cast<size_t>(n);
56 }

◆ operator*() [1/2]

SiLocalPosition InDetDD::operator* ( const double factor,
const SiLocalPosition & position )
inline

Definition at line 186 of file SiLocalPosition.h.

187{
188 return position*factor;
189}

◆ operator*() [2/2]

SiLocalPosition InDetDD::operator* ( const SiLocalPosition & position,
const double factor )

Definition at line 98 of file SiLocalPosition.cxx.

99{
100 SiLocalPosition result(position);
101 result*=factor;
102 return result;
103}
Class to represent a position in the natural frame of a silicon sensor, for Pixel and SCT For Pixel: ...

◆ operator+()

SiLocalPosition InDetDD::operator+ ( const SiLocalPosition & position1,
const SiLocalPosition & position2 )

Definition at line 90 of file SiLocalPosition.cxx.

92{
93 SiLocalPosition result(position1);
94 result+=position2;
95 return result;
96}

◆ operator/()

SiLocalPosition InDetDD::operator/ ( const SiLocalPosition & position,
const double factor )

Definition at line 105 of file SiLocalPosition.cxx.

106{
107 SiLocalPosition result(position);
108 result/=factor;
109 return result;
110}

◆ operator<<() [1/3]

std::ostream & InDetDD::operator<< ( std::ostream & os,
const InDetDD::Point & point )

Definition at line 423 of file VolumeSplitterUtils.cxx.

424 {
425 if (!point.valid()) {
426 os << "INVALID";
427 } else {
428 os << "(" << point.z() << ", " << point.r() << ")";
429 }
430 return os;
431 }

◆ operator<<() [2/3]

std::ostream & InDetDD::operator<< ( std::ostream & os,
const InDetDD::Ray & ray )

Definition at line 413 of file VolumeSplitterUtils.cxx.

414 {
415 if (!ray.valid()) {
416 os << "INVALID";
417 } else {
418 os << ray.start() << " --> " << ray.end();
419 }
420 return os;
421 }
bool valid() const
const Point & end() const
const Point & start() const

◆ operator<<() [3/3]

std::ostream & InDetDD::operator<< ( std::ostream & os,
const SiCellId & cellId )

Definition at line 8 of file SiCellId.cxx.

9 {
10 if (cellId.isValid()){
11 return os << "[" << cellId.phiIndex() << "." << cellId.etaIndex() << "]";
12 } else {
13 return os << "[INVALID]";
14 }
15 }
int phiIndex() const
Get phi index. Equivalent to strip().
Definition SiCellId.h:122
bool isValid() const
Test if its in a valid state.
Definition SiCellId.h:136
int etaIndex() const
Get eta index.
Definition SiCellId.h:114

◆ PixelDiodeTypeName()

std::string InDetDD::PixelDiodeTypeName ( const PixelDiodeType & t)

Definition at line 19 of file PixelReadoutDefinitions.cxx.

19 {
20 if (t==PixelDiodeType::NONE) return "unknown";
21 static const std::array<std::string, enum2uint(PixelDiodeType::N_DIODETYPES)> PixelDiodeTypeNames{
22 "NORMAL", "LONG", "GANGED", "LARGE"
23 };
24 return PixelDiodeTypeNames[enum2uint(t)];
25 }
constexpr std::size_t enum2uint(T n, std::string_view callingFunctionName="")
Convert an enum class to size_t for use as an array index.

◆ PixelModuleTypeName()

std::string InDetDD::PixelModuleTypeName ( const PixelModuleType & t)

Definition at line 10 of file PixelReadoutDefinitions.cxx.

10 {
11 if (t==PixelModuleType::NONE) return "unknown";
12 static const std::array<std::string, enum2uint(PixelModuleType::N_PIXELMODULETYPES)> PixelModuleTypeNames{
13 "DBM", "IBL_PLANAR", "IBL_3D", "PIX_BARREL", "PIX_ENDCAP"
14 };
15 return PixelModuleTypeNames[enum2uint(t)];
16 }

◆ PixelReadoutTechnologyName()

std::string InDetDD::PixelReadoutTechnologyName ( const PixelReadoutTechnology & t)

Definition at line 28 of file PixelReadoutDefinitions.cxx.

28 {
29 if (t==PixelReadoutTechnology::NONE) return "unknown";
30 static const std::array<std::string, enum2uint(PixelReadoutTechnology::N_TECHNOLOGIES)> PixelReadoutTechnologyNames{
31 "FEI3", "FEI4", "RD53"
32 };
33 return PixelReadoutTechnologyNames[enum2uint(t)];
34 }

Variable Documentation

◆ FIRST_HIGHER_LEVEL

const int InDetDD::FIRST_HIGHER_LEVEL = 1

Definition at line 22 of file PixelDetectorManager.cxx.

◆ invalidColumn

uint32_t InDetDD::invalidColumn = 0xFFFFFFFF
constexpr

Definition at line 46 of file PixelReadoutDefinitions.h.

◆ invalidFrontEnd

uint32_t InDetDD::invalidFrontEnd = 0xFFFFFFFF
constexpr

Definition at line 47 of file PixelReadoutDefinitions.h.

◆ invalidRow

uint32_t InDetDD::invalidRow = 0xFFFFFFFF
constexpr

Definition at line 45 of file PixelReadoutDefinitions.h.