ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetDetDescr
PixelGeoModel
src
PixelGeoUtils.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
#ifndef PIXEL_GEO_UTILS_H
5
#define PIXEL_GEO_UTILS_H
6
7
#include "
ReadoutGeometryBase/PixelDiodeTree.h
"
8
#include "
PixelReadoutDefinitions/PixelReadoutDefinitions.h
"
9
#include <array>
10
#include "Identifier/Identifier.h"
11
#include "
InDetIdentifier/PixelID.h
"
12
13
#define MSG_HELPER(LEVEL,body) if (this->msgLvl(LEVEL)) { this->msg(LEVEL) << body << endmsg;} do {} while (0)
14
#define GEO_MSG_DEBUG(body) MSG_HELPER(MSG::DEBUG,body)
15
#define GEO_MSG_INFO(body) MSG_HELPER(MSG::INFO,body)
16
#define GEO_MSG_WARNING(body) MSG_HELPER(MSG::WARNING,body)
17
#define GEO_MSG_ERROR(body) MSG_HELPER(MSG::ERROR,body)
18
19
namespace
InDetDD
{
20
namespace
detail
{
21
enum
EPixelLocation
{
kCentral
,
kOuterEdge
,
kInnerEdge
,
kNPixelLocations
};
22
enum
EDirection
{
kPhi
,
kEta
,
kNDirections
};
23
24
enum class
FENumbering
{
25
kRegular
,
26
kMirror
27
};
28
29
struct
MessagingAdapter
{
30
virtual
~MessagingAdapter
() =
default
;
31
virtual
MsgStream&
msg
(
const
MSG::Level lvl)
const
= 0;
32
virtual
bool
msgLvl
(
const
MSG::Level lvl)
const
= 0;
33
};
34
35
// helper to allow usage of MSG macros
36
struct
PixelDiodeTreeMakerBase
:
public
MessagingAdapter
{
37
PixelDiodeTree
make
(
InDetDD::PixelReadoutTechnology
readoutTechnology,
38
const
std::array<int,kNDirections> &circuits,
39
const
std::array<int,kNDirections> &dimPerCircuit,
40
const
std::array<std::array<double,kNDirections>,
kNPixelLocations
> &pitch,
41
FENumbering
fe_numbering);
42
};
43
44
template
<
class
T_MsgParent>
45
struct
PixelDiodeTreeMaker
final :
public
PixelDiodeTreeMakerBase
{
46
T_MsgParent*
m_msgParent
;
47
PixelDiodeTreeMaker
(T_MsgParent* msgParent) :
m_msgParent
(msgParent) {}
48
virtual
MsgStream&
msg
(
const
MSG::Level lvl)
const override
{
return
m_msgParent
->msg(lvl); }
49
virtual
bool
msgLvl
(
const
MSG::Level lvl)
const override
{
return
m_msgParent
?
m_msgParent
->msgLvl(lvl) :
false
; }
50
};
51
52
// create a pixel diode tree for run1-3 pixel, DBM
53
template
<
class
T_MsgParent>
54
inline
PixelDiodeTree
makePixelDiodeTree
(T_MsgParent* gmt_mgr,
55
InDetDD::PixelReadoutTechnology
readoutTechnology,
56
const
std::array<int,kNDirections> &circuits,
57
const
std::array<int,kNDirections> &dimPerCircuit,
58
const
std::array<std::array<double,kNDirections>,
kNPixelLocations
> &pitch,
59
FENumbering
fe_numbering) {
60
61
PixelDiodeTreeMaker<T_MsgParent>
maker(gmt_mgr);
62
auto
ret=maker.
make
(readoutTechnology, circuits, dimPerCircuit, pitch, fe_numbering);
63
return
ret;
64
}
65
}
66
}
67
68
#endif
PixelDiodeTree.h
PixelID.h
This is an Identifier helper class for the Pixel subdetector.
PixelReadoutDefinitions.h
InDetDD::PixelDiodeTree
Tree structure to find the position, index or pitch of a pixel on a semi-regular grid The grid is con...
Definition
PixelDiodeTree.h:33
InDetDD::detail::FENumbering
FENumbering
Definition
PixelGeoUtils.h:24
InDetDD::detail::FENumbering::kRegular
@ kRegular
Definition
PixelGeoUtils.h:25
InDetDD::detail::FENumbering::kMirror
@ kMirror
Definition
PixelGeoUtils.h:26
InDetDD::detail::makePixelDiodeTree
PixelDiodeTree makePixelDiodeTree(T_MsgParent *gmt_mgr, InDetDD::PixelReadoutTechnology readoutTechnology, const std::array< int, kNDirections > &circuits, const std::array< int, kNDirections > &dimPerCircuit, const std::array< std::array< double, kNDirections >, kNPixelLocations > &pitch, FENumbering fe_numbering)
Definition
PixelGeoUtils.h:54
InDetDD::detail::EPixelLocation
EPixelLocation
Definition
PixelGeoUtils.h:21
InDetDD::detail::kNPixelLocations
@ kNPixelLocations
Definition
PixelGeoUtils.h:21
InDetDD::detail::kInnerEdge
@ kInnerEdge
Definition
PixelGeoUtils.h:21
InDetDD::detail::kOuterEdge
@ kOuterEdge
Definition
PixelGeoUtils.h:21
InDetDD::detail::kCentral
@ kCentral
Definition
PixelGeoUtils.h:21
InDetDD::detail::EDirection
EDirection
Definition
PixelGeoUtils.h:22
InDetDD::detail::kPhi
@ kPhi
Definition
PixelGeoUtils.h:22
InDetDD::detail::kEta
@ kEta
Definition
PixelGeoUtils.h:22
InDetDD::detail::kNDirections
@ kNDirections
Definition
PixelGeoUtils.h:22
InDetDD
Message Stream Member.
Definition
FakeTrackBuilder.h:8
InDetDD::PixelReadoutTechnology
PixelReadoutTechnology
Definition
PixelReadoutDefinitions.h:37
detail
Definition
extract_histogram_tag.cxx:14
InDetDD::detail::MessagingAdapter
Definition
PixelGeoUtils.h:29
InDetDD::detail::MessagingAdapter::~MessagingAdapter
virtual ~MessagingAdapter()=default
InDetDD::detail::MessagingAdapter::msg
virtual MsgStream & msg(const MSG::Level lvl) const =0
InDetDD::detail::MessagingAdapter::msgLvl
virtual bool msgLvl(const MSG::Level lvl) const =0
InDetDD::detail::PixelDiodeTreeMakerBase
Definition
PixelGeoUtils.h:36
InDetDD::detail::PixelDiodeTreeMakerBase::make
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, FENumbering fe_numbering)
Definition
PixelGeoUtils.cxx:13
InDetDD::detail::PixelDiodeTreeMaker
Definition
PixelGeoUtils.h:45
InDetDD::detail::PixelDiodeTreeMaker::msgLvl
virtual bool msgLvl(const MSG::Level lvl) const override
Definition
PixelGeoUtils.h:49
InDetDD::detail::PixelDiodeTreeMaker::m_msgParent
T_MsgParent * m_msgParent
Definition
PixelGeoUtils.h:46
InDetDD::detail::PixelDiodeTreeMaker::msg
virtual MsgStream & msg(const MSG::Level lvl) const override
Definition
PixelGeoUtils.h:48
InDetDD::detail::PixelDiodeTreeMaker::PixelDiodeTreeMaker
PixelDiodeTreeMaker(T_MsgParent *msgParent)
Definition
PixelGeoUtils.h:47
Generated on
for ATLAS Offline Software by
1.17.0