98{
100 if (!idhelper)
101 return;
102
103 Identifier
id =
m_tgc->identify();
104
105 int plane = idhelper->
gasGap(
id );
108
109 double striplength =0.0, stripWidth = 0.0;
110
111 if (isStrip){
112 striplength =
m_tgc->detectorElement()->stripLength();
113 stripWidth =
m_tgc->detectorElement()->stripWidth(plane,
strip);
114 } else {
115 striplength =
m_tgc->detectorElement()->gangShortWidth(plane,
strip);
116 stripWidth =
m_tgc->detectorElement()->gangRadialLength(plane,
strip);
117 }
118
120 striplength += 300.0;
121
123
124 const bool settingsShowRDOs = true;
125 SoSeparator * errDetailed = new SoSeparator;
126 const std::vector<Identifier> rdolist =
m_tgc->rdoList();
127 if (rdolist.size() == 1 || !settingsShowRDOs)
128 {
129 errDetailed->addChild(
common()->nodeManager()->getShapeNode_Strip(striplength,
130 std::max(10.0,stripWidth),
131 3*0.8));
132 } else
133 {
134 VP1Msg::message(
"Warning: TGC has additional elements in rdoList: THIS HAS NEVER BEEN TESTED");
135 SoSeparator * rdos = new SoSeparator;
136
138
139
141 std::optional<Amg::Vector2D>localposHIT =
m_tgc->detectorElement()->surface(
id ).Trk::Surface::globalToLocal(globalposHIT,
tolerance);
142 if( !localposHIT )
143 {
144 localposHIT.emplace();
145 localposHIT->setZero();
147 }
148
149 rdos->addChild(
common()->nodeManager()->getShapeNode_Strip(striplength,
150 std::max(10.0,stripWidth),
151 3*0.8));
152
153 SoTransparency * transparent = new SoTransparency;
155 rdos->addChild( transparent );
157 for (const Identifier& rdo_id : rdolist)
158 {
159 if (rdo_id == id )
160 continue;
162 std::optional<Amg::Vector2D> localposRDO =
m_tgc->detectorElement()->surface( rdo_id ).Trk::Surface::globalToLocal(globalposRDO,
tolerance);
163 if (!localposRDO)
164 {
166 continue;
167 }
168
169 SoTranslation * localtrans = new SoTranslation;
171 rdos->addChild(localtrans);
172
173 rdos->addChild(
common()->nodeManager()->getShapeNode_Strip(striplength,
174 std::max(10.0,stripWidth),
175 3*0.8));
176
177 localposOLD = *localposRDO;
178 }
179 errDetailed->addChild(rdos);
180 }
181 shape_detailed = errDetailed;
182 }
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
int channel(const Identifier &id) const override
int gasGap(const Identifier &id) const override
get the hashes
int isStrip(const Identifier &id) const
isStrip corresponds to measuresPhi
static const TgcIdHelper * tgcIDHelper()
static void message(const QString &, IVP1System *sys=0)
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
constexpr double tolerance