31{
32 SoSeparator * errSimple = new SoSeparator;
33 SoSeparator * errDetailed = new SoSeparator;
34
36 std::cerr<<
"isSane check failed for PRD: "<<*
m_cluster<<std::endl;
37 return;
38 }
39 errSimple->addChild(
common()->nodeManager()->getShapeNode_Point());
40
43 SoTranslation * localtrans0 = new SoTranslation;
44
47
48 if (xdiff!=xdiff || ydiff!=ydiff) {
49 std::cerr<<"NaN is in local pos calc"<<std::endl;
50 if (xdiff!=xdiff) std::cerr<<"X diff"<<std::endl;
51 if (ydiff!=ydiff) std::cerr<<"Y diff"<<std::endl;
52 std::cerr<<"localposHIT:"<<localposHIT<<std::endl;
53 std::cerr<<"localpos:"<<localpos<<std::endl;
54 std::cerr<<"localposHIT[Trk::locX]-localpos[Trk::locX]:"<<xdiff<<std::endl;
55 std::cerr<<"localposHIT[Trk::locY]-localpos[Trk::locY]:"<<ydiff<<std::endl;
56 localtrans0->unref();
57 return;
58 } else {
60 }
61
62 const std::vector<Identifier> rdolist =
m_cluster->rdoList();
63 if (rdolist.size() == 1 || !
collHandle()->drawRDOs())
64 {
65 errDetailed->addChild(localtrans0);
66
67 errDetailed->addChild(
common()->nodeManager()->getShapeNode_Strip(
m_cluster->detectorElement()->etaPitch(),
m_cluster->detectorElement()->etaPitch(),
m_cluster->detectorElement()->thickness()/10.0));
68
69
70 SoTranslation * localtransBack = new SoTranslation;
71 localtransBack->translation.setValue(-(localtrans0->translation.getValue()));
72 errDetailed->addChild(localtransBack);
73 } else {
74 SoSeparator * rdos = new SoSeparator;
75 rdos->addChild(localtrans0);
76
77 rdos->addChild(
common()->nodeManager()->getShapeNode_Strip(
m_cluster->detectorElement()->etaPitch(),
m_cluster->detectorElement()->phiPitch(
m_cluster->localPosition() ),
m_cluster->detectorElement()->thickness()/10.0));
78
79 SoTransparency * transparent = new SoTransparency;
81 rdos->addChild( transparent );
83 for (const Identifier& rdo_id : rdolist)
84 {
86 continue;
87
89
90 SoTranslation * localtrans = new SoTranslation;
93 0);
94 rdos->addChild(localtrans);
95
96
97 rdos->addChild(
common()->nodeManager()->getShapeNode_Strip(
m_cluster->detectorElement()->etaPitch(),
99 m_cluster->detectorElement()->thickness()/10.0));
100
101 localposOLD = localposRDO;
102 }
103 errDetailed->addChild(rdos);
104 }
105
106 const double settingsSIGMASCALE=3.0;
108 {
110 if (
gr->getNumChildren()==0) {
112 std::cerr<<
"Something seems to have gone wrong: no error added. Dumping PRD: "<<*
m_cluster<<std::endl;
113 } else {
114 errSimple->addChild(
gr );
115 errDetailed->addChild(
gr );
116 }
117 }
118
119
120 SoMaterial *
mat =
new SoMaterial;
121 mat->diffuseColor.setValue(1.0,0,0);
122 errDetailed->addChild(mat);
123 errDetailed->addChild(
common()->nodeManager()->getShapeNode_Cross(0.1));
124
125 shape_simple = errSimple;
126 shape_detailed = errDetailed;
127}
PRDSysCommonData * common() const
PRDCollHandleBase * collHandle() const
SoGroup * createErrorAtPixelCluster(const double &sigmaScale, const int &numPoints) const
bool isSane() const
returns false if anything seems weird about the Pixelcluster
Eigen::Matrix< double, 2, 1 > Vector2D