13 #include "TEveStraightLineSet.h"
14 #include "TEveCompound.h"
48 double yAlignmentFrame = 3.49;
49 double alignmentPinToFirstWire;
53 if ( ring == 1 || ring == 4 )
55 alignmentPinToFirstWire = 1.065;
56 yAlignmentFrame = 0.0;
60 alignmentPinToFirstWire = 2.85;
63 else if ( station == 4 && ring == 1 )
64 alignmentPinToFirstWire = 3.04;
66 else if ( station == 3 && ring == 1 )
67 alignmentPinToFirstWire = 2.84;
70 alignmentPinToFirstWire = 2.87;
72 return (yAlignmentFrame-length) + alignmentPinToFirstWire;
89 if ( station == 1 && (ring == 1 || ring == 4))
91 if ( station == 1 && ring == 3 )
93 if ( station == 2 && ring == 1 )
95 if ( station == 3 && ring == 1 )
97 if ( station == 4 && ring == 1 )
118 dri != driEnd; ++dri )
120 const CSCDetId& cscDetId = (*dri).first;
121 unsigned int rawid = cscDetId.
rawId();
127 << rawid << std::endl;
137 float length = shape[4];
138 float topWidth = shape[2];
139 float bottomWidth = shape[1];
151 dit != range.second; ++dit )
153 TEveStraightLineSet* wireDigiSet =
new TEveStraightLineSet();
154 wireDigiSet->SetLineWidth(3);
157 int wireGroup = (*dit).getWireGroup();
158 float yOfWire = yOfFirstWire + ((wireGroup-1)*wireSpacing);
159 float wireLength = yOfWire*(topWidth-bottomWidth) / length;
160 wireLength += bottomWidth*2.0;
162 float localPointLeft[3] =
164 static_cast<float>(-wireLength*0.5), yOfWire,
static_cast<float>(0.0)
169 float localPointRight[3] =
171 static_cast<float>(wireLength*0.5), yOfWire,
static_cast<float>(0.0)
175 float globalPointLeft[3];
176 float globalPointRight[3];
178 geom->
localToGlobal( rawid, localPointLeft, globalPointLeft, localPointRight, globalPointRight );
180 wireDigiSet->AddLine( globalPointLeft[0], globalPointLeft[1], globalPointLeft[2],
181 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