15 #include "TEveStraightLineSet.h"
16 #include "TEveCompound.h"
17 #include "TEveGeoNode.h"
57 dri != driEnd; ++dri )
59 unsigned int rawid = (*dri).first.rawId();
65 << rawid << std::endl;
74 float nStrips = parameters[0];
75 float halfStripLength = parameters[1]*0.5;
76 float topPitch = parameters[3];
77 float bottomPitch = parameters[4];
80 dit != range.second; ++dit )
82 TEveStraightLineSet* stripDigiSet =
new TEveStraightLineSet;
83 stripDigiSet->SetLineWidth(3);
86 int strip = (*dit).strip();
87 float topOfStrip = (strip-0.5)*topPitch - 0.5*nStrips*topPitch;
88 float bottomOfStrip = (strip-0.5)*bottomPitch - 0.5*nStrips*bottomPitch;
90 float localPointTop[3] =
92 topOfStrip, halfStripLength, 0.0
95 float localPointBottom[3] =
97 bottomOfStrip, -halfStripLength, 0.0
100 float globalPointTop[3];
101 float globalPointBottom[3];
103 geom->
localToGlobal( rawid, localPointTop, globalPointTop, localPointBottom, globalPointBottom );
105 stripDigiSet->AddLine(globalPointTop[0], globalPointTop[1], globalPointTop[2],
106 globalPointBottom[0], globalPointBottom[1], globalPointBottom[2]);
144 dri != driEnd; ++dri )
146 unsigned int rawid = (*dri).first.rawId();
152 << rawid << std::endl;
161 float nStrips = parameters[0];
162 float halfStripLength = parameters[1]*0.5;
163 float nPads = parameters[5];
164 float topPitch = parameters[3]*nStrips/nPads;
165 float bottomPitch = parameters[4]*nStrips/nPads;
168 dit != range.second; ++dit )
170 TEveStraightLineSet* stripDigiSet =
new TEveStraightLineSet;
171 stripDigiSet->SetLineWidth(3*nStrips/nPads);
174 int pad = (*dit).pad();
175 float topOfStrip = (pad-0.5)*topPitch - 0.5*topPitch*nPads;
176 float bottomOfStrip = (pad-0.5)*bottomPitch - 0.5*bottomPitch*nPads;
178 float localPointTop[3] =
180 topOfStrip, halfStripLength, 0.0
183 float localPointBottom[3] =
185 bottomOfStrip, -halfStripLength, 0.0
188 float globalPointTop[3];
189 float globalPointBottom[3];
191 geom->
localToGlobal( rawid, localPointTop, globalPointTop, localPointBottom, globalPointBottom );
193 stripDigiSet->AddLine(globalPointTop[0], globalPointTop[1], globalPointTop[2],
194 globalPointBottom[0], globalPointBottom[1], globalPointBottom[2]);
virtual ~FWGEMPadDigiProxyBuilder()
#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
const FWGEMPadDigiProxyBuilder & operator=(const FWGEMPadDigiProxyBuilder &)
static const int kAll3DBits
const FWGEMDigiProxyBuilder & operator=(const FWGEMDigiProxyBuilder &)
void localToGlobal(unsigned int id, const float *local, float *global, bool translatep=true) const
bool contains(unsigned int id) const
FWGEMPadDigiProxyBuilder()
virtual ~FWGEMDigiProxyBuilder()
std::vector< GEMDigi >::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