27 int nstrips,
float stripOffset,
float stripPhiPitch,
28 float whereStripsMeet,
float extentOfStripPlane,
float yCentreOfStripPlane,
29 const CSCWireGroupPackage& wg,
float wireAngleInDegrees,
double yOfFirstWire,
float hThickness )
32 hBottomEdge( bounds.widthAtHalfLength() - bounds.
width()/2. ),
33 hTopEdge( bounds.
width()/2. ), apothem( bounds.length()/2. ),
34 myName(
"CSCLayerGeometry" ), chamberType( iChamberType ) {
36 LogTrace(
"CSCLayerGeometry|CSC") <<
myName <<
": being constructed, this=" <<
this;
39 bool gangedME1A = ( iChamberType == 1 && geom->
gangedStrips() );
43 extentOfStripPlane, whereStripsMeet, stripOffset, yCentreOfStripPlane );
47 delete aStripTopology;
56 float wireCos =
cos(wangler);
57 float wireSin =
sin(wangler);
60 float wireOffset = -y2 + wireSpacing/2.;
61 yOfFirstWire = wireOffset/wireCos;
65 LogTrace(
"CSCLayerGeometry|CSC") <<
myName <<
": constructed: "<< *
this;
83 if ( &melg !=
this ) {
105 LogTrace(
"CSCLayerGeometry|CSC") <<
myName <<
": being destroyed, this=" <<
this <<
130 float xi = ( ms * xs +
yOfWire(wire) ) / ( ms - mw );
131 float yi = ms * (xi - xs );
195 (sw1.
y()-sw2.
y())*(sw1.
y()-sw2.
y()) );
197 return std::pair<LocalPoint,float>( midpt,
length );
225 float c1 = p1.second;
227 float c2 = p2.second;
228 float x = (c2-
c1)/(m1-m2);
229 float y = (m1*c2-m2*
c1)/(m1-m2);
242 float sinAngdif =
sin(strangle-wangle);
243 float sinAngdif2 = sinAngdif * sinAngdif;
245 float du = sigmaStrip/
sin(strangle);
246 float dv = sigmaWire;
254 float wsins = dv *
sin(strangle);
255 float wcoss = dv *
cos(strangle);
256 float ssinw = du *
sin(wangle);
257 float scosw = du *
cos(wangle);
259 float dx2 = (scosw*scosw + wcoss*wcoss)/sinAngdif2;
260 float dy2 = (ssinw*ssinw + wsins*wsins)/sinAngdif2;
261 float dxy = (scosw*ssinw + wcoss*wsins)/sinAngdif2;
271 if ( (lp.
y() > ylims.first) && (lp.
y() < ylims.second) ) {
292 float deltaX = scale*
sqrt(le.
xx());
293 float deltaY = scale*
sqrt(le.
yy());
309 stream <<
"LayerGeometry " << std::endl
310 <<
"------------- " << std::endl
314 <<
"wireAngle (rad) " << lg.
wireAngle() << std::endl
318 <<
"wirePitch " << lg.
wirePitch() << std::endl
319 <<
"stripPitch " << lg.
stripPitch() << std::endl
325 <<
"hTopEdge " << lg.
hTopEdge << std::endl
326 <<
"apothem " << lg.
apothem << std::endl
327 <<
"length (should be 2xapothem) " << lg.
length() << std::endl
328 <<
"thickness " << lg.
thickness() << std::endl;
LocalPoint stripWireGroupIntersection(int strip, int wireGroup) const
Point3DBase< Scalar, LocalTag > LocalPoint
std::pair< LocalPoint, float > possibleRecHitPosition(float s, int w1, int w2) const
std::pair< float, float > equationOfWire(float wire) const
~CSCLayerGeometry() override
common ppss p3p6s2 common epss epspn46 common const1 w2
float lengthOfWireGroup(int wireGroup) const
float strip(const LocalPoint &) const override
float length() const override
Sin< T >::type sin(const T &t)
int numberOfStrips() const
CSCStripTopology * theStripTopology
std::pair< float, float > yLimitsOfStripPlane() const
int numberOfWireGroups() 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)
float yOfWireGroup(int wireGroup, float x=0.) const
LocalError localError(int strip, float sigmaStrip, float sigmaWire) const
LocalPoint intersectionOfTwoLines(std::pair< float, float > p1, std::pair< float, float > p2) const
float xOfStrip(int strip, float y=0.) const
virtual CSCStripTopology * clone() const =0
bool insideYOfWirePlane(float y) const
int wireGroup(int wire) const
LocalPoint intersectionOfStripAndWire(float s, int w) const
bool realWireGeometry() const
float yOfWire(float wire, float x=0.) const
float middleWireOfGroup(int wireGroup) const
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
float strip(const LocalPoint &lp) const
int numberOfWires() const
float thickness() const override
CSCWireTopology * theWireTopology
bool inside(const Local3DPoint &, const LocalError &, float scale=1.f) const override
constexpr long double convertDegToRad(NumType degrees)
std::vector< float > wireValues(float wire) const
bool gangedStrips() const
LocalPoint localCenterOfWireGroup(int wireGroup) const
std::pair< float, float > equationOfStrip(float strip) const
friend std::ostream & operator<<(std::ostream &, const CSCLayerGeometry &)
float stripAngle(float strip) const override
LocalPoint stripWireIntersection(int strip, float wire) const
float restrictToYOfWirePlane(float y) const
constexpr NumType convertMmToCm(NumType millimeters)
CSCLayerGeometry & operator=(const CSCLayerGeometry &)
float stripAngle(int strip) const
void setTopology(CSCStripTopology *topology)