32 SoSeparator * errSimple =
new SoSeparator;
33 SoSeparator * errDetailed =
new SoSeparator;
36 std::cerr<<
"isSane check failed for PRD: "<<*
m_cluster<<std::endl;
39 errSimple->addChild(
common()->nodeManager()->getShapeNode_Point());
43 SoTranslation * localtrans0 =
new SoTranslation;
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;
62 const std::vector<Identifier> rdolist =
m_cluster->rdoList();
63 if (rdolist.size() == 1 || !
collHandle()->drawRDOs())
65 errDetailed->addChild(localtrans0);
67 errDetailed->addChild(
common()->nodeManager()->getShapeNode_Strip(
m_cluster->detectorElement()->etaPitch(),
m_cluster->detectorElement()->etaPitch(),
m_cluster->detectorElement()->thickness()/10.0));
70 SoTranslation * localtransBack =
new SoTranslation;
71 localtransBack->translation.setValue(-(localtrans0->translation.getValue()));
72 errDetailed->addChild(localtransBack);
74 SoSeparator * rdos =
new SoSeparator;
75 rdos->addChild(localtrans0);
77 rdos->addChild(
common()->nodeManager()->getShapeNode_Strip(
m_cluster->detectorElement()->etaPitch(),
m_cluster->detectorElement()->phiPitch(
m_cluster->localPosition() ),
m_cluster->detectorElement()->thickness()/10.0));
81 rdos->addChild( transparent );
90 SoTranslation * localtrans =
new SoTranslation;
94 rdos->addChild(localtrans);
97 rdos->addChild(
common()->nodeManager()->getShapeNode_Strip(
m_cluster->detectorElement()->etaPitch(),
99 m_cluster->detectorElement()->thickness()/10.0));
101 localposOLD = localposRDO;
103 errDetailed->addChild(rdos);
106 const double settingsSIGMASCALE=3.0;
110 if (
gr->getNumChildren()==0) {
112 std::cerr<<
"Something seems to have gone wrong: no error added. Dumping PRD: "<<*
m_cluster<<std::endl;
114 errSimple->addChild(
gr );
115 errDetailed->addChild(
gr );
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));
125 shape_simple = errSimple;
126 shape_detailed = errDetailed;
157 if (!prd)
return false;
160 std::cerr<<
"For pixel cluster with Id="<<prd->
identify()<<
", localposition is not sane:"<<(prd->
localPosition())<<std::endl;
162 bool etaNan = std::isnan(
m_cluster->detectorElement()->etaPitch());
163 bool phiNan = std::isnan(
m_cluster->detectorElement()->phiPitch(
m_cluster->localPosition()));
164 bool thickNan = std::isnan(
m_cluster->detectorElement()->thickness());
166 if ( etaNan || phiNan || thickNan){
167 std::cerr<<
"For pixel cluster with Id="<<prd->
identify()<<
", NaN is in detectorElement pitches "<<std::endl;
168 if (etaNan) std::cerr<<
" - eta (which is returning "<<
m_cluster->detectorElement()->etaPitch()<<
")"<<std::endl;
169 if (phiNan) std::cerr<<
" - phi (which is returning "<<
m_cluster->detectorElement()->phiPitch(
m_cluster->localPosition())<<
")"<<std::endl;
170 if (thickNan) std::cerr<<
" - thickness (which is returning "<<
m_cluster->detectorElement()->thickness()<<
")"<<std::endl;
static void addRotatedErrorEllipse(SoGroup *gr, const AmgSymMatrix(5)&covmat, const double &sigmaScale, int numNodes=12, const double &translate=0.0, const bool &symmetric=false)