15 #include "TEveStraightLineSet.h" 16 #include "TEveCompound.h" 17 #include "TEveGeoNode.h" 55 unsigned int rawid = (*dri).first.rawId();
59 fwLog(
fwlog::kWarning) <<
"Failed to get geometry of GEM roll with detid: " << rawid << std::endl;
69 float halfStripLength = parameters[1] * 0.5;
70 float topPitch = parameters[3];
71 float bottomPitch = parameters[4];
74 TEveStraightLineSet* stripDigiSet =
new TEveStraightLineSet;
75 stripDigiSet->SetLineWidth(3);
78 int strip = (*dit).strip();
79 float topOfStrip = (strip - 0.5) * topPitch - 0.5 * nStrips * topPitch;
80 float bottomOfStrip = (strip - 0.5) * bottomPitch - 0.5 * nStrips * bottomPitch;
82 float localPointTop[3] = {topOfStrip, halfStripLength, 0.0};
84 float localPointBottom[3] = {bottomOfStrip, -halfStripLength, 0.0};
86 float globalPointTop[3];
87 float globalPointBottom[3];
89 geom->
localToGlobal(rawid, localPointTop, globalPointTop, localPointBottom, globalPointBottom);
91 stripDigiSet->AddLine(globalPointTop[0],
96 globalPointBottom[2]);
131 unsigned int rawid = (*dri).first.rawId();
135 fwLog(
fwlog::kWarning) <<
"Failed to get geometry of GEM roll with detid: " << rawid << std::endl;
145 float halfStripLength = parameters[1] * 0.5;
146 float nPads = parameters[5];
147 float topPitch = parameters[3] * nStrips / nPads;
148 float bottomPitch = parameters[4] * nStrips / nPads;
151 TEveStraightLineSet* stripDigiSet =
new TEveStraightLineSet;
152 stripDigiSet->SetLineWidth(3 * nStrips / nPads);
155 int pad = (*dit).pad();
156 float topOfStrip = (pad - 0.5) * topPitch - 0.5 * topPitch * nPads;
157 float bottomOfStrip = (pad - 0.5) * bottomPitch - 0.5 * bottomPitch * nPads;
159 float localPointTop[3] = {topOfStrip, halfStripLength, 0.0};
161 float localPointBottom[3] = {bottomOfStrip, -halfStripLength, 0.0};
163 float globalPointTop[3];
164 float globalPointBottom[3];
166 geom->
localToGlobal(rawid, localPointTop, globalPointTop, localPointBottom, globalPointBottom);
168 stripDigiSet->AddLine(globalPointTop[0],
171 globalPointBottom[0],
172 globalPointBottom[1],
173 globalPointBottom[2]);
~FWGEMDigiProxyBuilder() override
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
~FWGEMPadDigiProxyBuilder() override
static const int kAll3DBits
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
const FWGEMDigiProxyBuilder & operator=(const FWGEMDigiProxyBuilder &)=delete
void localToGlobal(unsigned int id, const float *local, float *global, bool translatep=true) const
bool contains(unsigned int id) const
FWGEMPadDigiProxyBuilder()
std::pair< const_iterator, const_iterator > Range
#define REGISTER_PROXYBUILDER_METHODS()
std::vector< DigiType >::const_iterator const_iterator
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
const FWGeometry * getGeom() const