12#include <Inventor/nodes/SoSeparator.h>
13#include <Inventor/nodes/SoTranslation.h>
14#include <Inventor/nodes/SoTransform.h>
31 std::cout<<
"creating sTGC transform:"<< std::endl;
35 if (!prd || !idhelper)
return new SoTransform;
40 if (!detEl)
return new SoTransform;
50 return theHitTransform;
55 return theHitTransform;
90 if (!pad_design)
return;
94 CornerArray padEdges{};
96 double etaWidth = padEdges[padCorners::topRight].x() - padEdges[padCorners::botRight].x();
97 double phiMinWidth = padEdges[padCorners::botLeft].y();
98 double phiMaxWidth = padEdges[padCorners::topLeft].y();
103 SoSeparator * errDetailed =
new SoSeparator;
104 errDetailed->addChild(
common()->nodeManager()->getShapeNode_Pad(etaWidth,phiMinWidth,phiMaxWidth,0.01));
106 shape_detailed = errDetailed;
129 SoSeparator * errDetailed =
new SoSeparator;
130 errDetailed->addChild(
common()->nodeManager()->getShapeNode_Wire(etaWidth,phiMinWidth,phiMaxWidth,0.01));
132 shape_detailed = errDetailed;
153 SoSeparator * errDetailed =
new SoSeparator;
154 errDetailed->addChild(
common()->nodeManager()->getShapeNode_Strip(striplength,std::min(10.0,stripWidth),0.01));
156 shape_detailed = errDetailed;
170 if (!station) {
VP1Msg::message(
"Warning - sTGC station gives null parent. Something is wrong with the geometry!");
return 0;}
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)
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
int getEtaIndex() const
a la AMDB
int getPhiIndex() const
a la AMDB
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
const MuonPadDesign * getPadDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
virtual bool stripPosition(const Identifier &id, Amg::Vector2D &pos) const override final
strip position - should be renamed to channel position If the strip number is outside the range of va...
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
Class to represent sTgc measurements.
virtual const MuonGM::sTgcReadoutElement * detectorElement() const override final
Returns the detector element corresponding to this PRD.
PRDHandleBase(PRDCollHandleBase *)
PRDSysCommonData * common() const
void buildShapes(SoNode *&shape_simple, SoNode *&shape_detailed)
SoTransform * createTransform() const
PRDHandle_sTGC(PRDCollHandle_sTGC *, const Muon::sTgcPrepData *)
const Muon::sTgcPrepData * stgc() const
const Muon::sTgcPrepData * m_stgc
HitsSoNodeManager * nodeManager() const
Identifier identify() const
return the identifier
static const sTgcIdHelper * stgcIDHelper()
static SoTransform * toSoTransform(const HepGeom::Transform3D &, SoTransform *t=0)
static void messageDebug(const QString &)
static void message(const QString &, IVP1System *sys=0)
int channelType(const Identifier &id) const
int channel(const Identifier &id) const override
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Translation< double, 3 > Translation3D
double channelLength(int channel) const
STRIPS ONLY: calculate channel length for a given strip number.
Parameters defining the design of the readout sTGC pads.
bool channelCorners(const std::pair< int, int > &pad, CornerArray &corners) const
std::array< Amg::Vector2D, 4 > CornerArray
calculate local channel corners for a given channel number