29 float whereStripsMeet,
30 float extentOfStripPlane,
31 float yCentreOfStripPlane,
33 float wireAngleInDegrees,
38 theWireTopology(nullptr),
39 theStripTopology(nullptr),
42 apothem(
bounds.length() / 2.),
43 myName(
"CSCLayerGeometry"),
45 LogTrace(
"CSCLayerGeometry|CSC") <<
myName <<
": being constructed, this=" <<
this;
48 bool gangedME1A = (iChamberType == 1 &&
geom->gangedStrips());
55 delete aStripTopology;
60 if (!
geom->realWireGeometry()) {
63 float wireCos =
cos(wangler);
64 float wireSin =
sin(wangler);
67 float wireOffset = -
y2 + wireSpacing / 2.;
68 yOfFirstWire = wireOffset / wireCos;
72 LogTrace(
"CSCLayerGeometry|CSC") <<
myName <<
": constructed: " << *
this;
77 theWireTopology(nullptr),
78 theStripTopology(nullptr),
79 hBottomEdge(melg.hBottomEdge),
80 hTopEdge(melg.hTopEdge),
81 apothem(melg.apothem),
113 LogTrace(
"CSCLayerGeometry|CSC") <<
myName <<
": being destroyed, this=" <<
this 136 float yi = ms * (
xi - xs);
191 LocalPoint midpt((sw1.
x() + sw2.
x()) / 2., (sw1.
y() + sw2.
y()) / 2);
194 float length =
sqrt((sw1.
x() - sw2.
x()) * (sw1.
x() - sw2.
x()) + (sw1.
y() - sw2.
y()) * (sw1.
y() - sw2.
y()));
196 return std::pair<LocalPoint, float>(midpt,
length);
222 float c1 =
p1.second;
224 float c2 =
p2.second;
225 float x = (c2 -
c1) / (m1 -
m2);
226 float y = (m1 * c2 -
m2 *
c1) / (m1 -
m2);
238 float sinAngdif =
sin(strangle - wangle);
239 float sinAngdif2 = sinAngdif * sinAngdif;
241 float du = sigmaStrip /
sin(strangle);
242 float dv = sigmaWire;
250 float wsins = dv *
sin(strangle);
251 float wcoss = dv *
cos(strangle);
252 float ssinw = du *
sin(wangle);
253 float scosw = du *
cos(wangle);
255 float dx2 = (scosw * scosw + wcoss * wcoss) / sinAngdif2;
256 float dy2 = (ssinw * ssinw + wsins * wsins) / sinAngdif2;
257 float dxy = (scosw * ssinw + wcoss * wsins) / sinAngdif2;
267 if ((lp.
y() > ylims.first) && (lp.
y() < ylims.second)) {
305 stream <<
"LayerGeometry " << std::endl
306 <<
"------------- " << std::endl
315 <<
"wirePitch " << lg.
wirePitch() << std::endl
323 <<
"hTopEdge " << lg.
hTopEdge << std::endl
324 <<
"apothem " << lg.
apothem << std::endl
325 <<
"length (should be 2xapothem) " << lg.
length() << std::endl
326 <<
"thickness " << lg.
thickness() << std::endl;
LocalPoint localCenterOfWireGroup(int wireGroup) const
std::pair< float, float > equationOfWire(float wire) const
float lengthOfWireGroup(int wireGroup) const
LocalPoint intersectionOfTwoLines(std::pair< float, float > p1, std::pair< float, float > p2) const
std::vector< float > wireValues(float wire) const
Point3DBase< Scalar, LocalTag > LocalPoint
constexpr double convertDegToRad(NumType degrees)
~CSCLayerGeometry() override
float middleWireOfGroup(int wireGroup) const
std::pair< float, float > equationOfStrip(float strip) const
float restrictToYOfWirePlane(float y) const
common ppss p3p6s2 common epss epspn46 common const1 w2
float stripOffset(void) const
Sin< T >::type sin(const T &t)
CSCStripTopology * theStripTopology
float strip(const LocalPoint &) const override
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
float stripAngle(int strip) const
CSCLayerGeometry(const CSCGeometry *geom, int iChamberType, const TrapezoidalPlaneBounds &bounds, int nstrips, float stripOffset, float stripPhiPitch, float whereStripsMeet, float extentOfStripPlane, float yCentreOfStripPlane, const CSCWireGroupPackage &wg, float wireAngleInDegrees, double yOfFirstWire, float hThickness)
std::pair< LocalPoint, float > possibleRecHitPosition(float s, int w1, int w2) const
virtual CSCStripTopology * clone() const =0
float strip(const LocalPoint &lp) const
int numberOfStrips() const
int numberOfWireGroups() const
Cos< T >::type cos(const T &t)
std::ostream & operator<<(std::ostream &stream, const CSCLayerGeometry &lg)
Tan< T >::type tan(const T &t)
std::pair< float, float > yLimitsOfStripPlane() const
float yOfWireGroup(int wireGroup, float x=0.) const
CSCWireTopology * theWireTopology
float length() const override
int wireGroup(int wire) const
int numberOfWires() const
float stripPhiPitch() const
constexpr NumType convertMmToCm(NumType millimeters)
LocalPoint intersectionOfStripAndWire(float s, int w) const
LocalPoint stripWireIntersection(int strip, float wire) const
float yOfWire(float wire, float x=0.) const
LocalPoint stripWireGroupIntersection(int strip, int wireGroup) const
bool insideYOfWirePlane(float y) const
float thickness() const override
CSCLayerGeometry & operator=(const CSCLayerGeometry &)
float xOfStrip(int strip, float y=0.) const
LocalError localError(int strip, float sigmaStrip, float sigmaWire) const
bool inside(const Local3DPoint &, const LocalError &, float scale=1.f) const override
void setTopology(CSCStripTopology *topology)
float stripAngle(float strip) const override