13 #include "TEveStraightLineSet.h"
14 #include "TEveCompound.h"
50 int thresholdOffset = 9;
53 unsigned int rawid = (*dri).first.rawId();
66 float length = shape[4];
70 float yAxisOrientation = parameters[0];
71 float centreToIntersection = parameters[1];
72 float yCentre = parameters[2];
73 float phiOfOneEdge = parameters[3];
74 float stripOffset = parameters[4];
75 float angularWidth = parameters[5];
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()
const edm::EventSetup & c
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
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 uint16_t range(const Frame &aFrame)
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
std::vector< DigiType >::const_iterator const_iterator
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
FWCSCStripDigiProxyBuilder()
~FWCSCStripDigiProxyBuilder() override
const FWGeometry * getGeom() const