13 #include "TEveStraightLineSet.h"
14 #include "TEveCompound.h"
47 double yAlignmentFrame = 3.49;
48 double alignmentPinToFirstWire;
52 if ( ring == 1 || ring == 4 )
54 alignmentPinToFirstWire = 1.065;
55 yAlignmentFrame = 0.0;
59 alignmentPinToFirstWire = 2.85;
62 else if ( station == 4 && ring == 1 )
63 alignmentPinToFirstWire = 3.04;
65 else if ( station == 3 && ring == 1 )
66 alignmentPinToFirstWire = 2.84;
69 alignmentPinToFirstWire = 2.87;
71 return (yAlignmentFrame-length) + alignmentPinToFirstWire;
88 if ( station == 1 && (ring == 1 || ring == 4))
90 if ( station == 1 && ring == 3 )
92 if ( station == 2 && ring == 1 )
94 if ( station == 3 && ring == 1 )
96 if ( station == 4 && ring == 1 )
117 dri != driEnd; ++dri )
119 const CSCDetId& cscDetId = (*dri).first;
120 unsigned int rawid = cscDetId.
rawId();
126 << rawid << std::endl;
136 float length = shape[4];
137 float topWidth = shape[2];
138 float bottomWidth = shape[1];
150 dit != range.second; ++dit )
152 TEveStraightLineSet* wireDigiSet =
new TEveStraightLineSet();
153 wireDigiSet->SetLineWidth(3);
156 int wireGroup = (*dit).getWireGroup();
157 float yOfWire = yOfFirstWire + ((wireGroup-1)*wireSpacing);
158 float wireLength = yOfWire*(topWidth-bottomWidth) / length;
159 wireLength += bottomWidth*2.0;
161 float localPointLeft[3] =
163 static_cast<float>(-wireLength*0.5), yOfWire,
static_cast<float>(0.0)
168 float localPointRight[3] =
170 static_cast<float>(wireLength*0.5), yOfWire,
static_cast<float>(0.0)
174 float globalPointLeft[3];
175 float globalPointRight[3];
177 geom->
localToGlobal( rawid, localPointLeft, globalPointLeft, localPointRight, globalPointRight );
179 wireDigiSet->AddLine( globalPointLeft[0], globalPointLeft[1], globalPointLeft[2],
180 globalPointRight[0], globalPointRight[1], globalPointRight[2] );
virtual ~FWCSCWireDigiProxyBuilder()
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
static const int kAllRPZBits
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
void get(const T *&oData) const
double getAverageWireSpacing(const int station, const int ring)
static const int kAll3DBits
uint32_t rawId() const
get the raw id
const float * getShapePars(unsigned int id) const
void localToGlobal(unsigned int id, const float *local, float *global, bool translatep=true) const
bool contains(unsigned int id) const
REGISTER_PROXYBUILDER_METHODS()
std::vector< CSCWireDigi >::const_iterator const_iterator
FWCSCWireDigiProxyBuilder()
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
const FWCSCWireDigiProxyBuilder & operator=(const FWCSCWireDigiProxyBuilder &)
std::pair< const_iterator, const_iterator > Range
double getYOfFirstWire(const int station, const int ring, const double length)
const FWGeometry * getGeom() const