15 #include "TEveStraightLineSet.h"
16 #include "TEveCompound.h"
17 #include "TEveGeoNode.h"
57 unsigned int rawid = (*dri).first.rawId();
61 fwLog(
fwlog::kWarning) <<
"Failed to get geometry of GEM roll with detid: " << rawid << std::endl;
71 float halfStripLength = parameters[1] * 0.5;
72 float topPitch = parameters[3];
73 float bottomPitch = parameters[4];
76 TEveStraightLineSet* stripDigiSet =
new TEveStraightLineSet;
77 stripDigiSet->SetLineWidth(3);
80 int strip = (*dit).strip();
81 float topOfStrip = (strip - 0.5) * topPitch - 0.5 * nStrips * topPitch;
82 float bottomOfStrip = (strip - 0.5) * bottomPitch - 0.5 * nStrips * bottomPitch;
84 float localPointTop[3] = {topOfStrip, halfStripLength, 0.0};
86 float localPointBottom[3] = {bottomOfStrip, -halfStripLength, 0.0};
88 float globalPointTop[3];
89 float globalPointBottom[3];
91 geom->
localToGlobal(rawid, localPointTop, globalPointTop, localPointBottom, globalPointBottom);
93 stripDigiSet->AddLine(globalPointTop[0],
98 globalPointBottom[2]);
135 unsigned int rawid = (*dri).first.rawId();
139 fwLog(
fwlog::kWarning) <<
"Failed to get geometry of GEM roll with detid: " << rawid << std::endl;
149 float halfStripLength = parameters[1] * 0.5;
150 float nPads = parameters[5];
151 float topPitch = parameters[3] * nStrips / nPads;
152 float bottomPitch = parameters[4] * nStrips / nPads;
155 TEveStraightLineSet* stripDigiSet =
new TEveStraightLineSet;
156 stripDigiSet->SetLineWidth(3 * nStrips / nPads);
159 int pad = (*dit).pad();
160 float topOfStrip = (pad - 0.5) * topPitch - 0.5 * topPitch * nPads;
161 float bottomOfStrip = (pad - 0.5) * bottomPitch - 0.5 * bottomPitch * nPads;
163 float localPointTop[3] = {topOfStrip, halfStripLength, 0.0};
165 float localPointBottom[3] = {bottomOfStrip, -halfStripLength, 0.0};
167 float globalPointTop[3];
168 float globalPointBottom[3];
170 geom->
localToGlobal(rawid, localPointTop, globalPointTop, localPointBottom, globalPointBottom);
172 stripDigiSet->AddLine(globalPointTop[0],
175 globalPointBottom[0],
176 globalPointBottom[1],
177 globalPointBottom[2]);
#define REGISTER_PROXYBUILDER_METHODS()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
~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
const FWGEMPadDigiProxyBuilder & operator=(const FWGEMPadDigiProxyBuilder &)=delete
tuple nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
static const int kAll3DBits
const uint16_t range(const Frame &aFrame)
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
std::vector< DigiType >::const_iterator const_iterator
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
const FWGeometry * getGeom() const