ATLAS Offline Software
Public Member Functions | List of all members
InDetDD::detail::PixelDiodeTreeMakerBase Struct Referenceabstract

#include <PixelGeoUtils.h>

Inheritance diagram for InDetDD::detail::PixelDiodeTreeMakerBase:
Collaboration diagram for InDetDD::detail::PixelDiodeTreeMakerBase:

Public Member Functions

PixelDiodeTree make (InDetDD::PixelReadoutTechnology readoutTechnology, const std::array< int, kNDirections > &circuits, const std::array< int, kNDirections > &dimPerCircuit, const std::array< std::array< double, kNDirections >, kNPixelLocations > &pitch)
 
virtual MsgStream & msg (const MSG::Level lvl) const =0
 
virtual bool msgLvl (const MSG::Level lvl) const =0
 

Detailed Description

Definition at line 29 of file PixelGeoUtils.h.

Member Function Documentation

◆ make()

PixelDiodeTree InDetDD::detail::PixelDiodeTreeMakerBase::make ( InDetDD::PixelReadoutTechnology  readoutTechnology,
const std::array< int, kNDirections > &  circuits,
const std::array< int, kNDirections > &  dimPerCircuit,
const std::array< std::array< double, kNDirections >, kNPixelLocations > &  pitch 
)

Definition at line 12 of file PixelGeoUtils.cxx.

15  {
16 
17  // helper function to associate correct diode type and front-end number to sub-matrices and diodes
18  // in the diode tree as attributes.
19  auto computeAttribute = [
20  &pitch=pitch[InDetDD::detail::kCentral],
21  &circuits,
22  &dimPerCircuit
23  ](const std::array<PixelDiodeTree::IndexType,2> &split_idx,
24  const PixelDiodeTree::Vector2D &diode_width,
25  [[maybe_unused]] const std::array<bool,4> &ganged,
26  [[maybe_unused]] unsigned int split_i,
27  PixelDiodeTree::AttributeType current_matrix_attribute,
28  PixelDiodeTree::AttributeType current_diode_attribute)
29  -> std::tuple<PixelDiodeTree::AttributeType,PixelDiodeTree::AttributeType>
30  {
31  // split_i defines which of the 4 areas the diode belongs to : 2 | 3 ^
32  // ----- | local-y (chip-columns)
33  // 0 | 1 |
34  // ---> local-x (chip-rows)
35  //
36  // split_idx the absolute index at which this sub-matrix is split into 4 sub-sub-matrices
37  // diode_width the diode pitch in both directions
38  // ganged ganged[0],ganged[1] whether the pixel diode is ganged in the corresponding direction
39  // ganged[2],ganged[3] whether the diode is inside (true) or outside the dead zone
40  // where ganged[2] denotes the flag in local-x and ganged[3] in local-y direction
41  // current_matrix_attribute the default attribute for the unsplit sub-matrix assigned by the builder
42  // current_diode_attribute the default attribute assigned to the current diode associated to the split
43  // area specified by split_i
44  // return new matrix attribute, new diode attribute
45 
46  // if the pixel is significantly wider in one direction consider the pixel to be long
47  // or if wider in both directions large
48  assert(split_idx[0]>=0 && split_idx[1]>=0);
49  std::array<int,2> chip_idx{split_idx[0]/dimPerCircuit[InDetDD::detail::kPhi], split_idx[1]/dimPerCircuit[InDetDD::detail::kEta]};
50 
51  unsigned int n_large_dimensions = ( (std::abs(diode_width[0]-pitch[InDetDD::detail::kPhi])>pitch[InDetDD::detail::kPhi]*.25)
52  +(std::abs(diode_width[1]-pitch[InDetDD::detail::kEta])>pitch[InDetDD::detail::kEta]*.25));
53  switch (n_large_dimensions) {
54  case 1:
56  break;
57  case 2:
59  break;
60  default:
62  }
63 
64  // FEI3 front-end numbering scheme
65  // if there is a single row just the chip-column (local-y, eta)
66  // if there are two rows: top row chip-column starting from the opposite end; bottom row: chip column + chips per top row
67  // ^ 0 |.. |n/2-1
68  // local-x | --------------- [swapped axis direction to fit into fewer lines]
69  // /phi/row | n-1 |... |n/2
70  // --> local-y (chip-column, eta)
71  current_matrix_attribute
72  = InDetDD::detail::makeAttributeType( chip_idx[0] > 0
73  ? circuits[InDetDD::detail::kEta] - chip_idx[1] - 1
74  : (circuits[InDetDD::detail::kPhi]-1) * circuits[InDetDD::detail::kEta] + chip_idx[1]);
75  return std::make_tuple(current_matrix_attribute, current_diode_attribute);
76  };
77 
78  unsigned int nEtaLongEnd = pitch[InDetDD::detail::kOuterEdge][InDetDD::detail::kEta]>0. ? 1u : 0u;
79  unsigned int nEtaLong = pitch[InDetDD::detail::kInnerEdge][InDetDD::detail::kEta]>0. ? 1u : 0u;
80  PixelDiodeTree diode_tree
81  = createPixelDiodeTree(std::array<unsigned int,2>{static_cast<unsigned int>(circuits[InDetDD::detail::kPhi]),
82  static_cast<unsigned int>(circuits[InDetDD::detail::kEta])},
83  std::array<unsigned int,2>{static_cast<unsigned int>(dimPerCircuit[InDetDD::detail::kPhi]),
84  static_cast<unsigned int>(dimPerCircuit[InDetDD::detail::kEta])},
86  pitch[InDetDD::detail::kCentral][InDetDD::detail::kEta]}, // regular ptich
87  std::array<std::array<unsigned int,2>, 2>{ std::array<unsigned int,2>{0u,nEtaLongEnd}, // outer edge in pixels (correct?)
88  std::array<unsigned int,2>{0u,nEtaLong}}, // inner edge in pixels (correct?)
89  std::array<PixelDiodeTree::Vector2D,2>{PixelDiodeTree::Vector2D{0.,
93  },
94  std::array<std::array<unsigned int,2>, 2>{ std::array<unsigned int,2>{0u,0u}, // @TODO add dead zone for run1-3 pixels
95  std::array<unsigned int,2>{0u,0u} // @TODO add dead zone for run1-3 pixels
96  },
97  computeAttribute,
98  nullptr);
99  GEO_MSG_DEBUG( "module " << " " << circuits[InDetDD::detail::kPhi] << "x" << circuits[InDetDD::detail::kEta] << " "
100  << dimPerCircuit[InDetDD::detail::kPhi] << " " << dimPerCircuit[InDetDD::detail::kEta] << ":\n"
101  << " pitch: regular " << pitch[InDetDD::detail::kCentral][InDetDD::detail::kPhi]
103  << " long: " << pitch[InDetDD::detail::kInnerEdge][InDetDD::detail::kEta] << " end " << pitch[InDetDD::detail::kOuterEdge][InDetDD::detail::kEta] << ":\n"
104  << diode_tree.debugStringRepr());
105  return diode_tree;
106 }

◆ msg()

virtual MsgStream& InDetDD::detail::MessagingAdapter::msg ( const MSG::Level  lvl) const
pure virtualinherited

◆ msgLvl()

virtual bool InDetDD::detail::MessagingAdapter::msgLvl ( const MSG::Level  lvl) const
pure virtualinherited

The documentation for this struct was generated from the following files:
InDetDD::detail::kOuterEdge
@ kOuterEdge
Definition: PixelGeoUtils.h:19
InDetDD::detail::kInnerEdge
@ kInnerEdge
Definition: PixelGeoUtils.h:19
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
InDetDD::PixelDiodeType::LONG
@ LONG
InDetDD::PixelDiodeTree::AttributeType
unsigned int AttributeType
Definition: PixelDiodeTree.h:39
InDetDD::PixelDiodeType::LARGE
@ LARGE
InDetDD::detail::makeAttributeType
InDetDD::PixelDiodeTree::AttributeType makeAttributeType(T val)
convenience method to convert the given value into an attribute
Definition: PixelDiodeTreeBuilder.h:79
InDetDD::PixelDiodeTree::Vector2D
Amg::Vector2D Vector2D
Definition: PixelDiodeTree.h:35
InDetDD::detail::kEta
@ kEta
Definition: PixelGeoUtils.h:20
InDetDD::detail::kCentral
@ kCentral
Definition: PixelGeoUtils.h:19
InDetDD::detail::kPhi
@ kPhi
Definition: PixelGeoUtils.h:20
InDetDD::PixelDiodeType::NORMAL
@ NORMAL
InDetDD::createPixelDiodeTree
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.
Definition: PixelDiodeTreeBuilder.cxx:224
GEO_MSG_DEBUG
#define GEO_MSG_DEBUG(body)
Definition: PixelGeoUtils.h:12