40 SoSeparator * errDetailed =
new SoSeparator;
41 SoSeparator * errSimple =
new SoSeparator;
42 shape_simple = errSimple;
44 double striplength =
m_csc->detectorElement()->stripLength(
id );
48 errSimple->addChild(line);
49 errSimple->addChild(
common()->nodeManager()->getShapeNode_Cross(10));
50 const double maxCharge = 1e5;
59 const double stripHeight = 1*CLHEP::mm;
61 const std::vector< float > charges =
m_csc->sampleCharges();
62 if (charges.size() == 0 )
65 errDetailed->addChild(
common()->nodeManager()->getShapeNode_Strip(striplength,
69 SoSeparator * rdos =
new SoSeparator;
76 double chargeLength=striplength/
static_cast<double>(charges.size());
78 double ypos=(chargeLength-striplength)/2.0;
80 SoTranslation * localtrans =
new SoTranslation;
81 localtrans->translation.setValue(0.0,ypos,0.0);
82 rdos->addChild(localtrans);
84 for(
float charge : charges ) {
86 const double stripHeightCharge = (1.0 + 4*sqrt(
charge/maxCharge))*CLHEP::mm;
88 rdos->addChild(
common()->nodeManager()->getShapeNode_Strip(chargeLength, stripPitch, stripHeightCharge));
90 SoTranslation * localtrans2 =
new SoTranslation;
91 localtrans2->translation.setValue(0.0,chargeLength,0.0);
92 rdos->addChild(localtrans2);
95 errDetailed->addChild(rdos);
97 SoMaterial * mat =
new SoMaterial;
98 mat->diffuseColor.setValue(1.0,0,0);
99 errDetailed->addChild(mat);
100 errDetailed->addChild(
common()->nodeManager()->getShapeNode_Cross(10));
102 shape_detailed = errDetailed;