13 #include "TEveStraightLineSet.h" 14 #include "TEveCompound.h" 50 int thresholdOffset = 9;
53 unsigned int rawid = (*dri).first.rawId();
56 if (!
geom->contains(rawid)) {
65 const float* shape =
geom->getShapePars(rawid);
66 float length = shape[4];
78 std::vector<int> adcCounts = (*dit).getADCCounts();
80 int signalThreshold = (adcCounts[0] + adcCounts[1]) / 2 + thresholdOffset;
82 TEveStraightLineSet* stripDigiSet =
new TEveStraightLineSet();
85 if (std::find_if(adcCounts.begin(), adcCounts.end(), [&](
auto c) {
return c > signalThreshold; }) !=
87 stripDigiSet->SetLineWidth(3);
88 int stripId = (*dit).getStrip();
90 float yOrigin = centreToIntersection - yCentre;
91 float stripAngle = phiOfOneEdge + yAxisOrientation * (stripId - (0.5 - stripOffset)) * angularWidth;
92 float tanStripAngle =
tan(stripAngle);
95 float localPointTop[3] = {yAxisOrientation * (yOrigin + length) * tanStripAngle, length, 0.0};
97 float localPointBottom[3] = {yAxisOrientation * (yOrigin - length) * tanStripAngle, -length, 0.0};
99 float globalPointTop[3];
100 float globalPointBottom[3];
102 geom->localToGlobal(rawid, localPointTop, globalPointTop, localPointBottom, globalPointBottom);
104 stripDigiSet->AddLine(globalPointBottom[0],
105 globalPointBottom[1],
106 globalPointBottom[2],
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
static const int kAllRPZBits
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
void get(const T *&oData) const
static const int kAll3DBits
Tan< T >::type tan(const T &t)
const FWCSCStripDigiProxyBuilder & operator=(const FWCSCStripDigiProxyBuilder &)=delete
const FWGeometry * getGeom() const
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
std::pair< const_iterator, const_iterator > Range
std::vector< DigiType >::const_iterator const_iterator
FWCSCStripDigiProxyBuilder()
~FWCSCStripDigiProxyBuilder() override