51 int thresholdOffset = 9;
54 dri != driEnd; ++dri )
56 unsigned int rawid = (*dri).first.rawId();
62 << rawid << std::endl;
71 float length = shape[4];
75 float yAxisOrientation = parameters[0];
76 float centreToIntersection = parameters[1];
77 float yCentre = parameters[2];
78 float phiOfOneEdge = parameters[3];
79 float stripOffset = parameters[4];
80 float angularWidth = parameters[5];
83 dit != range.second; ++dit )
85 std::vector<int> adcCounts = (*dit).getADCCounts();
87 int signalThreshold = (adcCounts[0] + adcCounts[1])/2 + thresholdOffset;
89 TEveStraightLineSet* stripDigiSet =
new TEveStraightLineSet();
92 if( std::find_if( adcCounts.begin(), adcCounts.end(), bind2nd( std::greater<int>(), signalThreshold )) != adcCounts.end())
94 stripDigiSet->SetLineWidth(3);
95 int stripId = (*dit).getStrip();
97 float yOrigin = centreToIntersection-yCentre;
98 float stripAngle = phiOfOneEdge + yAxisOrientation*(stripId-(0.5-stripOffset))*angularWidth;
99 float tanStripAngle =
tan(stripAngle);
102 float localPointTop[3] =
104 yAxisOrientation*(yOrigin+length)*tanStripAngle, length, 0.0
107 float localPointBottom[3] =
109 yAxisOrientation*(yOrigin-length)*tanStripAngle, -length, 0.0
112 float globalPointTop[3];
113 float globalPointBottom[3];
115 geom->
localToGlobal( rawid, localPointTop, globalPointTop, localPointBottom, globalPointBottom);
117 stripDigiSet->AddLine( globalPointBottom[0], globalPointBottom[1], globalPointBottom[2],
118 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