|
|
Go to the documentation of this file.
29 float whereStripsMeet,
30 float extentOfStripPlane,
31 float yCentreOfStripPlane,
33 float wireAngleInDegrees,
37 bounds.widthAtHalfLength() - bounds.
width() / 2., bounds.
width() / 2., bounds.length() / 2., hThickness),
38 theWireTopology(nullptr),
39 theStripTopology(nullptr),
40 hBottomEdge(bounds.widthAtHalfLength() - bounds.
width() / 2.),
41 hTopEdge(bounds.
width() / 2.),
42 apothem(bounds.length() / 2.),
43 myName(
"CSCLayerGeometry"),
44 chamberType(iChamberType) {
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),
82 chamberType(melg.chamberType) {
113 LogTrace(
"CSCLayerGeometry|CSC") <<
myName <<
": being destroyed, this=" <<
this
135 float xi = (ms * xs +
yOfWire(wire)) / (ms - mw);
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;
bool insideYOfWirePlane(float y) const
common ppss p3p6s2 common epss epspn46 common const1 w2
std::pair< float, float > yLimitsOfStripPlane() const
float stripPhiPitch() const
int numberOfWires() const
float thickness() const override
constexpr long double convertDegToRad(NumType degrees)
CSCWireTopology * theWireTopology
int wireGroup(int wire) const
LocalError localError(int strip, float sigmaStrip, float sigmaWire) const
Point3DBase< Scalar, LocalTag > LocalPoint
LocalPoint stripWireIntersection(int strip, float wire) const
std::pair< float, float > equationOfStrip(float strip) const
Sin< T >::type sin(const T &t)
std::pair< float, float > equationOfWire(float wire) const
LocalPoint intersectionOfStripAndWire(float s, int w) const
LocalPoint stripWireGroupIntersection(int strip, int wireGroup) const
Cos< T >::type cos(const T &t)
LocalPoint localCenterOfWireGroup(int wireGroup) const
float lengthOfWireGroup(int wireGroup) const
float xOfStrip(int strip, float y=0.) const
float middleWireOfGroup(int wireGroup) const
float yOfWire(float wire, float x=0.) const
std::vector< float > wireValues(float wire) const
float restrictToYOfWirePlane(float y) const
CSCLayerGeometry & operator=(const CSCLayerGeometry &)
void setTopology(CSCStripTopology *topology)
bool inside(const Local3DPoint &, const LocalError &, float scale=1.f) const override
Tan< T >::type tan(const T &t)
LocalPoint intersectionOfTwoLines(std::pair< float, float > p1, std::pair< float, float > p2) const
float stripAngle(int strip) const
float stripAngle(float strip) const override
~CSCLayerGeometry() override
float length() const override
float strip(const LocalPoint &lp) const
float stripOffset(void) const
float strip(const LocalPoint &) const override
constexpr NumType convertMmToCm(NumType millimeters)
virtual CSCStripTopology * clone() const =0
float yOfWireGroup(int wireGroup, float x=0.) const
CSCStripTopology * theStripTopology
int numberOfStrips() const
int numberOfWireGroups() const
std::pair< LocalPoint, float > possibleRecHitPosition(float s, int w1, int w2) const
std::ostream & operator<<(std::ostream &stream, const CSCLayerGeometry &lg)
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)