30{
32 if (!idhelper)
33 return;
34
35 Identifier
id =
m_rpc->identify();
36 SoSeparator * errDetailed = new SoSeparator;
37
39 double striplength =
m_rpc->detectorElement()->StripLength(measPhi);
41
42
43
46
47
49
50 std::optional<Amg::Vector2D> localposHIT =
m_rpc->detectorElement()->surface(
id ).Trk::Surface::globalToLocal(globalposHIT,
tolerance);
51 if( !localposHIT )
52 {
53 localposHIT.emplace();
54 localposHIT->setZero();
56 }
57 SoTranslation * localtrans0 = new SoTranslation;
59
61
62 const std::vector<Identifier> rdolist =
m_rpc->rdoList();
63 if (rdolist.size() == 1 || !
collHandle()->drawRDOs())
64 {
65 errDetailed->addChild(localtrans0);
66 errDetailed->addChild(
common()->nodeManager()->getShapeNode_Strip(
project ? striplength+0.2 : striplength,
67 m_rpc->detectorElement()->StripWidth(measPhi),
69
70 SoTranslation * localtransBack = new SoTranslation;
71 localtransBack->translation.setValue(-(localtrans0->translation.getValue()));
72 errDetailed->addChild(localtransBack);
73 } else {
74 VP1Msg::message(
"Warning: RPC has additional elements in rdoList: THIS HAS NEVER BEEN TESTED");
75 SoSeparator * rdos = new SoSeparator;
76 rdos->addChild(localtrans0);
77
78 rdos->addChild(
common()->nodeManager()->getShapeNode_Strip(
project ? striplength+0.2 : striplength,
79 m_rpc->detectorElement()->StripWidth(measPhi),
81
82 SoTransparency * transparent = new SoTransparency;
84 rdos->addChild( transparent );
86 for (const Identifier& rdo_id : rdolist)
87 {
88 if (rdo_id == id )
89 continue;
91 std::optional<Amg::Vector2D> localposRDO =
m_rpc->detectorElement()->surface( rdo_id ).Trk::Surface::globalToLocal(globalposRDO,
tolerance);
92 if (!localposRDO)
93 {
95 continue;
96 }
97
98 SoTranslation * localtrans = new SoTranslation;
100 rdos->addChild(localtrans);
101
102 rdos->addChild(
common()->nodeManager()->getShapeNode_Strip(
project ? striplength+0.2 : striplength,
103 m_rpc->detectorElement()->StripWidth(measPhi),
104 project ? 2*(6.85+0.1) : 0.8));
105
106 localposOLD = *localposRDO;
107 }
108 errDetailed->addChild(rdos);
109 }
110 shape_detailed = errDetailed;
111}
T_ResultType project(ParameterMapping::type< N > parameter_map, const T_Matrix &matrix)
SoNode * getShapeNode_Strip(double length, double width=0, double depth=0)
PRDSysCommonData * common() const
PRDCollHandleBase * collHandle() const
HitsSoNodeManager * nodeManager() const
bool measuresPhi(const Identifier &id) const override
static const RpcIdHelper * rpcIDHelper()
static void message(const QString &, IVP1System *sys=0)
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
constexpr double tolerance