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] );
const float * getParameters(unsigned int id) const
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
void get(const T *&oData) const
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
std::vector< CSCStripDigi >::const_iterator const_iterator
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
std::pair< const_iterator, const_iterator > Range
const FWGeometry * getGeom() const