28#include <Inventor/nodes/SoTransform.h>
29#include <Inventor/nodes/SoGroup.h>
30#include <Inventor/nodes/SoMaterial.h>
32#include "GaudiKernel/SystemOfUnits.h"
50 const bool valid = idhelper &&
m_data->is_valid(idhelper);
52 ll <<
" ===> sTGC Digit data";
53 ll <<
" Identifier: " + QString::fromStdString(
id.getString());
58 ll <<
" type: " + typeName;
60 ll <<
" type: unavailable";
62 ll <<
" is_valid(idhelper): " + (idhelper ? QString::number(valid) : QString(
"unavailable"));
63 ll <<
" bcTag: " + QString::number(
m_data->bcTag());
64 ll <<
" charge: " + QString::number(
m_data->charge());
65 ll <<
" charge_6bit: " + QString::number(
m_data->charge_6bit());
66 ll <<
" charge_10bit: " + QString::number(
m_data->charge_10bit());
67 ll <<
" time: " + QString::number(
m_data->time());
68 ll <<
" isDead: " + QString::number(
m_data->isDead());
69 ll <<
" isPileup: " + QString::number(
m_data->isPileup());
72 ll <<
" Station name: " + QString::fromStdString(idhelper->
stationNameString(
id));
73 ll <<
" Station eta index: " + QString::number(idhelper->
stationEta(
id));
74 ll <<
" Station phi index: " + QString::number(idhelper->
stationPhi(
id));
75 ll <<
" Multilayer: " + QString::number(idhelper->
multilayer(
id));
76 ll <<
" Gas gap: " + QString::number(idhelper->
gasGap(
id));
77 ll <<
" Channel type index: " + QString::number(idhelper->
channelType(
id));
78 ll <<
" Channel: " + QString::number(idhelper->
channel(
id));
80 ll <<
" Pad eta index: " + QString::number(idhelper->
padEta(
id));
81 ll <<
" Pad phi index: " + QString::number(idhelper->
padPhi(
id));
84 ll <<
" Decoded identifier unavailable";
88 if (elem && elem->stripGlobalPosition(
id, position)) {
89 ll << QString(
" Global position [mm] (x, y, z): (%1, %2, %3)")
90 .arg(position.x() / Gaudi::Units::mm, 0,
'g', 10)
91 .arg(position.y() / Gaudi::Units::mm, 0,
'g', 10)
92 .arg(position.z() / Gaudi::Units::mm, 0,
'g', 10);
94 ll <<
" Global position unavailable";
104 SoNode *
node{
nullptr};
111 const int channel = idhelper->
channel(
id);
117 elem->stripGlobalPosition(
id, globalPos);
118 elem->stripPosition(
id, pos);
121 double shortWidth=0, longWidth=0,
length=0;
127 length = elem->channelPitch(
id);
128 std::array<Amg::Vector2D, 4> corners{
130 elem->padCorners(
id, corners);
131 shortWidth = (corners.at(1) - corners.at(0)).norm();
132 longWidth = (corners.at(3) - corners.at(2)).norm();
141 shortWidth = elem->channelPitch(
id);
142 longWidth = shortWidth;
152 std::cout <<
"No wire design for hit " <<
id << std::endl;;
158 double fulllength = design->
xSize();
161 if (std::abs(locY) > 0.5 * design->
minYSize()) {
163 length = (0.5 * design->
maxYSize() - std::abs(locY)) / dY * fulllength;
164 if (std::abs(locY) > 873) {
166 length += 0.5 * fulllength;
168 elem->surface(
id).localToGlobal(
170 Amg::Vector3D::Zero(), globalPos);
175 shortWidth = elem->channelPitch(
id);
176 longWidth = shortWidth;
188 return new SoTransform;
191 elem->stripGlobalPosition(
id, globalPos);
220 return helper ? helper->channelType(
m_data->identify()) : -1;
230 return m_data->isPileup();
constexpr std::array< T, N > make_array(const T &def_val)
Helper function to initialize in-place arrays with non-zero values.
SoNode * getShapeNode_Wire(double length, double minWidth=0, double maxWidth=0, double depth=0)
SoNode * getShapeNode_Strip(double length, double width=0, double depth=0)
SoNode * getShapeNode_Pad(double length, double minWidth=0, double maxWidth=0, double depth=0)
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
const sTgcReadoutElement * getsTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
int stationEta(const Identifier &id) const
const std::string & stationNameString(const Identifier &id) const
int stationPhi(const Identifier &id) const
Class for a planaer rectangular or trapezoidal surface in the ATLAS detector.
static const sTgcIdHelper * stgcIDHelper()
static const MuonGM::MuonDetectorManager * muonDetMgr()
static SoTransform * toSoTransform(const HepGeom::Transform3D &, SoTransform *t=0)
HitsSoNodeManager * nodeManager() const
VP1RawDataCommonData * common() const
VP1RawDataHandleBase(VP1RawDataCollBase *)
VP1RawDataCollBase * coll() const
SoTransform * buildTransform()
const MuonGM::sTgcReadoutElement * element() const
virtual ~VP1RawDataHandle_sTGC_RDO()
QStringList clicked(bool verbose) const
std::string m_channelTypeStr
VP1RawDataHandle_sTGC_RDO(VP1RawDataCollBase *, const sTgcDigit *)
int padPhi(const Identifier &id) const
int multilayer(const Identifier &id) const
int channelType(const Identifier &id) const
int padEta(const Identifier &id) const
int channel(const Identifier &id) const override
int gasGap(const Identifier &id) const override
get the hashes
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
double firstPos() const
Returns the position of the first strip along the x-axis.
double channelLength(int channel) const
STRIPS ONLY: calculate channel length for a given strip number.