13 #include "TEveStraightLineSet.h"
14 #include "TEveCompound.h"
48 int thresholdOffset = 9;
51 unsigned int rawid = (*dri).first.rawId();
54 if (!
geom->contains(rawid)) {
63 const float* shape =
geom->getShapePars(rawid);
64 float length = shape[4];
76 std::vector<int> adcCounts = (*dit).getADCCounts();
78 int signalThreshold = (adcCounts[0] + adcCounts[1]) / 2 + thresholdOffset;
80 TEveStraightLineSet* stripDigiSet =
new TEveStraightLineSet();
83 if (std::find_if(adcCounts.begin(), adcCounts.end(), [&](
auto c) {
return c > signalThreshold; }) !=
85 stripDigiSet->SetLineWidth(3);
86 int stripId = (*dit).getStrip();
88 float yOrigin = centreToIntersection - yCentre;
89 float stripAngle = phiOfOneEdge + yAxisOrientation * (stripId - (0.5 - stripOffset)) * angularWidth;
90 float tanStripAngle =
tan(stripAngle);
93 float localPointTop[3] = {yAxisOrientation * (yOrigin + length) * tanStripAngle, length, 0.0};
95 float localPointBottom[3] = {yAxisOrientation * (yOrigin - length) * tanStripAngle, -length, 0.0};
97 float globalPointTop[3];
98 float globalPointBottom[3];
100 geom->localToGlobal(rawid, localPointTop, globalPointTop, localPointBottom, globalPointBottom);
102 stripDigiSet->AddLine(globalPointBottom[0],
103 globalPointBottom[1],
104 globalPointBottom[2],