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());
79 double ypos=(chargeLength-striplength)/2.0;
80 std::vector<float>::const_iterator st = charges.begin();
81 std::vector<float>::const_iterator en = charges.end();
83 SoTranslation * localtrans =
new SoTranslation;
84 localtrans->translation.setValue(0.0,ypos,0.0);
85 rdos->addChild(localtrans);
87 for( std::vector<float>::const_iterator it = st; it!=en; ++it, ++i){
89 float charge = std::max(1.0f,(*it));
90 const double stripHeightCharge = (1.0 + 4*sqrt(
charge/maxCharge))*CLHEP::mm;
92 rdos->addChild(
common()->nodeManager()->getShapeNode_Strip(chargeLength, stripPitch, stripHeightCharge));
94 SoTranslation * localtrans2 =
new SoTranslation;
95 localtrans2->translation.setValue(0.0,chargeLength,0.0);
96 rdos->addChild(localtrans2);
99 errDetailed->addChild(rdos);
101 SoMaterial * mat =
new SoMaterial;
102 mat->diffuseColor.setValue(1.0,0,0);
103 errDetailed->addChild(mat);
104 errDetailed->addChild(
common()->nodeManager()->getShapeNode_Cross(10));
106 shape_detailed = errDetailed;