13 #include "TEveStraightLineSet.h" 14 #include "TEveCompound.h" 48 int thresholdOffset = 9;
51 unsigned int rawid = (*dri).first.rawId();
64 float length = shape[4];
68 float yAxisOrientation = parameters[0];
69 float centreToIntersection = parameters[1];
70 float yCentre = parameters[2];
71 float phiOfOneEdge = parameters[3];
72 float stripOffset = parameters[4];
73 float angularWidth = parameters[5];
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],
static const int kAllRPZBits
const float * getParameters(unsigned int id) const
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
void get(const T *&oData) const
static const int kAll3DBits
const float * getShapePars(unsigned int id) const
void localToGlobal(unsigned int id, const float *local, float *global, bool translatep=true) const
Tan< T >::type tan(const T &t)
bool contains(unsigned int id) const
const FWCSCStripDigiProxyBuilder & operator=(const FWCSCStripDigiProxyBuilder &)=delete
std::pair< const_iterator, const_iterator > Range
#define REGISTER_PROXYBUILDER_METHODS()
std::vector< DigiType >::const_iterator const_iterator
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
FWCSCStripDigiProxyBuilder()
~FWCSCStripDigiProxyBuilder() override
const FWGeometry * getGeom() const