15 #include "TEveStraightLineSet.h"
16 #include "TEveCompound.h"
17 #include "TEveGeoNode.h"
59 dri != driEnd; ++dri )
61 unsigned int rawid = (*dri).first.rawId();
67 << rawid << std::endl;
76 float nStrips = parameters[0];
77 float halfStripLength = parameters[1]*0.5;
78 float topPitch = parameters[3];
79 float bottomPitch = parameters[4];
82 dit != range.second; ++dit )
84 TEveStraightLineSet* stripDigiSet =
new TEveStraightLineSet;
85 stripDigiSet->SetLineWidth(3);
88 int strip = (*dit).strip();
89 float topOfStrip = (strip-0.5)*topPitch - 0.5*nStrips*topPitch;
90 float bottomOfStrip = (strip-0.5)*bottomPitch - 0.5*nStrips*bottomPitch;
92 float localPointTop[3] =
94 topOfStrip, halfStripLength, 0.0
97 float localPointBottom[3] =
99 bottomOfStrip, -halfStripLength, 0.0
102 float globalPointTop[3];
103 float globalPointBottom[3];
105 geom->
localToGlobal( rawid, localPointTop, globalPointTop, localPointBottom, globalPointBottom );
107 stripDigiSet->AddLine(globalPointTop[0], globalPointTop[1], globalPointTop[2],
108 globalPointBottom[0], globalPointBottom[1], globalPointBottom[2]);
146 dri != driEnd; ++dri )
148 unsigned int rawid = (*dri).first.rawId();
154 << rawid << std::endl;
163 float nStrips = parameters[0];
164 float halfStripLength = parameters[1]*0.5;
165 float nPads = parameters[5];
166 float topPitch = parameters[3]*nStrips/nPads;
167 float bottomPitch = parameters[4]*nStrips/nPads;
170 dit != range.second; ++dit )
172 TEveStraightLineSet* stripDigiSet =
new TEveStraightLineSet;
173 stripDigiSet->SetLineWidth(3*nStrips/nPads);
176 int pad = (*dit).pad();
177 float topOfStrip = (pad-0.5)*topPitch - 0.5*topPitch*nPads;
178 float bottomOfStrip = (pad-0.5)*bottomPitch - 0.5*bottomPitch*nPads;
180 float localPointTop[3] =
182 topOfStrip, halfStripLength, 0.0
185 float localPointBottom[3] =
187 bottomOfStrip, -halfStripLength, 0.0
190 float globalPointTop[3];
191 float globalPointBottom[3];
193 geom->
localToGlobal( rawid, localPointTop, globalPointTop, localPointBottom, globalPointBottom );
195 stripDigiSet->AddLine(globalPointTop[0], globalPointTop[1], globalPointTop[2],
196 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