13 #include "TEveStraightLineSet.h" 14 #include "TEveCompound.h" 45 double yAlignmentFrame = 3.49;
46 double alignmentPinToFirstWire;
49 if (ring == 1 || ring == 4) {
50 alignmentPinToFirstWire = 1.065;
51 yAlignmentFrame = 0.0;
55 alignmentPinToFirstWire = 2.85;
58 else if (station == 4 && ring == 1)
59 alignmentPinToFirstWire = 3.04;
61 else if (station == 3 && ring == 1)
62 alignmentPinToFirstWire = 2.84;
65 alignmentPinToFirstWire = 2.87;
67 return (yAlignmentFrame - length) + alignmentPinToFirstWire;
81 if (station == 1 && (ring == 1 || ring == 4))
83 if (station == 1 && ring == 3)
85 if (station == 2 && ring == 1)
87 if (station == 3 && ring == 1)
89 if (station == 4 && ring == 1)
107 const CSCDetId& cscDetId = (*dri).first;
108 unsigned int rawid = cscDetId.
rawId();
112 fwLog(
fwlog::kWarning) <<
"Failed to get geometry of CSC chamber with detid: " << rawid << std::endl;
122 float length = shape[4];
123 float topWidth = shape[2];
124 float bottomWidth = shape[1];
136 TEveStraightLineSet* wireDigiSet =
new TEveStraightLineSet();
137 wireDigiSet->SetLineWidth(3);
140 int wireGroup = (*dit).getWireGroup();
141 float yOfWire = yOfFirstWire + ((wireGroup - 1) * wireSpacing);
142 float wireLength = yOfWire * (topWidth - bottomWidth) / length;
143 wireLength += bottomWidth * 2.0;
145 float localPointLeft[3] = {
static_cast<float>(-wireLength * 0.5), yOfWire,
static_cast<float>(0.0)};
149 float localPointRight[3] = {
150 static_cast<float>(wireLength * 0.5), yOfWire,
static_cast<float>(0.0)
154 float globalPointLeft[3];
155 float globalPointRight[3];
157 geom->
localToGlobal(rawid, localPointLeft, globalPointLeft, localPointRight, globalPointRight);
159 wireDigiSet->AddLine(globalPointLeft[0],
164 globalPointRight[2]);
static const int kAllRPZBits
const FWCSCWireDigiProxyBuilder & operator=(const FWCSCWireDigiProxyBuilder &)=delete
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
void get(const T *&oData) const
constexpr uint32_t rawId() const
get the raw id
double getAverageWireSpacing(const int station, const int ring)
static const int kAll3DBits
~FWCSCWireDigiProxyBuilder() override
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
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_)
FWCSCWireDigiProxyBuilder()
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
double getYOfFirstWire(const int station, const int ring, const double length)
const FWGeometry * getGeom() const