14 #include "TEveStraightLineSet.h"
15 #include "TEveCompound.h"
52 int thresholdOffset = 9;
55 dri != driEnd; ++dri )
57 unsigned int rawid = (*dri).first.rawId();
63 << rawid << std::endl;
72 float length = shape[4];
76 float yAxisOrientation = parameters[0];
77 float centreToIntersection = parameters[1];
78 float yCentre = parameters[2];
79 float phiOfOneEdge = parameters[3];
80 float stripOffset = parameters[4];
81 float angularWidth = parameters[5];
84 dit != range.second; ++dit )
86 std::vector<int> adcCounts = (*dit).getADCCounts();
88 int signalThreshold = (adcCounts[0] + adcCounts[1])/2 + thresholdOffset;
90 TEveStraightLineSet* stripDigiSet =
new TEveStraightLineSet();
93 if( std::find_if( adcCounts.begin(), adcCounts.end(), bind2nd( std::greater<int>(), signalThreshold )) != adcCounts.end())
95 stripDigiSet->SetLineWidth(3);
96 int stripId = (*dit).getStrip();
98 float yOrigin = centreToIntersection-yCentre;
99 float stripAngle = phiOfOneEdge + yAxisOrientation*(stripId-(0.5-stripOffset))*angularWidth;
100 float tanStripAngle =
tan(stripAngle);
103 float localPointTop[3] =
105 yAxisOrientation*(yOrigin+length)*tanStripAngle, length, 0.0
108 float localPointBottom[3] =
110 yAxisOrientation*(yOrigin-length)*tanStripAngle, -length, 0.0
113 float globalPointTop[3];
114 float globalPointBottom[3];
116 geom->
localToGlobal( rawid, localPointTop, globalPointTop, localPointBottom, globalPointBottom);
118 stripDigiSet->AddLine( globalPointBottom[0], globalPointBottom[1], globalPointBottom[2],
119 globalPointTop[0], globalPointTop[1], globalPointTop[2] );
#define REGISTER_PROXYBUILDER_METHODS()
#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
void localToGlobal(unsigned int id, const float *local, float *global) const
static const int kAll3DBits
const float * getShapePars(unsigned int id) const
Tan< T >::type tan(const T &t)
virtual ~FWCSCStripDigiProxyBuilder()
bool contains(unsigned int id) const
std::vector< DigiType >::const_iterator const_iterator
const FWCSCStripDigiProxyBuilder & operator=(const FWCSCStripDigiProxyBuilder &)
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
std::pair< const_iterator, const_iterator > Range
FWCSCStripDigiProxyBuilder()
const FWGeometry * getGeom() const