ATLAS Offline Software
Loading...
Searching...
No Matches
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
9#include <array>
10#include "Identifier/Identifier.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
19namespace InDetDD {
20 namespace detail {
23
24 enum class FENumbering {
27 };
28
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
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>
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
62 auto ret=maker.make(readoutTechnology, circuits, dimPerCircuit, pitch, fe_numbering);
63 return ret;
64 }
65 }
66}
67
68#endif
This is an Identifier helper class for the Pixel subdetector.
Tree structure to find the position, index or pitch of a pixel on a semi-regular grid The grid is con...
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)
Message Stream Member.
virtual ~MessagingAdapter()=default
virtual MsgStream & msg(const MSG::Level lvl) const =0
virtual bool msgLvl(const MSG::Level lvl) const =0
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)
virtual bool msgLvl(const MSG::Level lvl) const override
virtual MsgStream & msg(const MSG::Level lvl) const override
PixelDiodeTreeMaker(T_MsgParent *msgParent)