32{
34 if (!idhelper)
35 return;
36
37 Identifier
id =
m_csc->identify();
38
39 SoSeparator * errDetailed = new SoSeparator;
40
41 double striplength =
m_csc->detectorElement()->stripLength(
id );
43 striplength += 300.0;
45
46
49
50
52 std::optional<Amg::Vector2D> localposHIT =
m_csc->detectorElement()->surface(
id ).Trk::Surface::globalToLocal(globalposHIT,
tolerance);
53
54 if( !localposHIT )
55 {
56 localposHIT.emplace();
57 localposHIT->setZero();
59 }
60 SoTranslation * localtrans0 = new SoTranslation;
62
63 const double maxCharge = 1e7;
64
65
66
67
68
69
70
71
72 const double stripHeight = (1 + 4*
m_csc->charge()/(maxCharge/3))*CLHEP::mm;
73
74 const double stripHeightRDOs = 1*CLHEP::mm;
75
76 const std::vector<Identifier> rdolist =
m_csc->rdoList();
77 if (rdolist.size() == 1 || !
collHandle()->drawRDOs())
78 {
79 errDetailed->addChild(localtrans0);
80 errDetailed->addChild(
common()->nodeManager()->getShapeNode_Strip(striplength,
83
84
85 SoTranslation * localtransBack = new SoTranslation;
86 localtransBack->translation.setValue(-(localtrans0->translation.getValue()));
87 errDetailed->addChild(localtransBack);
88 } else
89 {
90 SoSeparator * rdos = new SoSeparator;
91 rdos->addChild(localtrans0);
92
93 rdos->addChild(
common()->nodeManager()->getShapeNode_Strip(striplength,
96
97 SoTransparency * transparent = new SoTransparency;
99 rdos->addChild( transparent );
101 for (const Identifier& rdo_id : rdolist)
102 {
103 if (rdo_id == id )
104 continue;
106
107
108 std::optional<Amg::Vector2D> localposRDO =
m_csc->detectorElement()->surface( rdo_id ).Trk::Surface::globalToLocal(globalposRDO,
tolerance);
109
110 if (!localposRDO)
111 {
113 continue;
114 }
115
116 SoTranslation * localtrans = new SoTranslation;
118 rdos->addChild(localtrans);
119 double striplengthRDO =
m_csc->detectorElement()->stripLength( rdo_id );
120
121 rdos->addChild(
common()->nodeManager()->getShapeNode_Strip(striplengthRDO,
123 idhelper->
measuresPhi( rdo_id )), stripHeightRDOs));
124
125 localposOLD = *localposRDO;
126 }
127 errDetailed->addChild(rdos);
128 }
129
130 SoMaterial *
mat =
new SoMaterial;
131 mat->diffuseColor.setValue(1.0,0,0);
132 errDetailed->addChild(mat);
133 errDetailed->addChild(
common()->nodeManager()->getShapeNode_Cross(10));
134
135 shape_detailed = errDetailed;
136}
T_ResultType project(ParameterMapping::type< N > parameter_map, const T_Matrix &matrix)
int chamberLayer(const Identifier &id) const
bool measuresPhi(const Identifier &id) const override
SoNode * getShapeNode_Strip(double length, double width=0, double depth=0)
PRDSysCommonData * common() const
PRDCollHandleBase * collHandle() const
HitsSoNodeManager * nodeManager() const
static const CscIdHelper * cscIDHelper()
static void message(const QString &, IVP1System *sys=0)
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
constexpr double tolerance