#include <CSCLayerGeometry.h>
Public Member Functions | |
int | channel (int strip) const |
virtual Bounds * | clone () 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) | |
CSCLayerGeometry (const CSCLayerGeometry &) | |
bool | inside (const Local3DPoint &, const LocalError &, float scale=1.f) const |
bool | inside (const Local3DPoint &) const |
Determine if the point is inside the bounds. More... | |
bool | inside (const Local2DPoint &) const |
LocalPoint | intersectionOfStripAndWire (float s, int w) const |
LocalPoint | intersectionOfTwoLines (std::pair< float, float > p1, std::pair< float, float > p2) const |
float | lengthOfWireGroup (int wireGroup) const |
LocalPoint | localCenterOfWireGroup (int wireGroup) const |
LocalError | localError (int strip, float sigmaStrip, float sigmaWire) const |
float | middleWireOfGroup (int wireGroup) const |
int | nearestStrip (const LocalPoint &lp) const |
int | nearestWire (const LocalPoint &lp) const |
int | numberOfStrips () const |
int | numberOfWireGroups () const |
int | numberOfWires () const |
int | numberOfWiresPerGroup (int wireGroup) const |
CSCLayerGeometry & | operator= (const CSCLayerGeometry &) |
std::pair< LocalPoint, float > | possibleRecHitPosition (float s, int w1, int w2) const |
void | setTopology (CSCStripTopology *topology) |
int | stagger () const |
float | strip (const LocalPoint &lp) const |
float | stripAngle (int strip) const |
float | stripOffset (void) const |
float | stripPhiPitch () const |
float | stripPitch () const |
float | stripPitch (const LocalPoint &lp) const |
LocalPoint | stripWireGroupIntersection (int strip, int wireGroup) const |
LocalPoint | stripWireIntersection (int strip, float wire) const |
const CSCStripTopology * | topology () const |
float | wireAngle () const |
int | wireGroup (int wire) const |
float | wirePitch () const |
const CSCWireTopology * | wireTopology () const |
float | xOfStrip (int strip, float y=0.) const |
std::pair< float, float > | yLimitsOfStripPlane () const |
float | yOfWire (float wire, float x=0.) const |
float | yOfWireGroup (int wireGroup, float x=0.) const |
float | yResolution (int wireGroup=1) const |
virtual | ~CSCLayerGeometry () |
Public Member Functions inherited from TrapezoidalPlaneBounds | |
virtual bool | inside (const Local2DPoint &p, const LocalError &err, float scale) const |
Determine if a 2D point is inside the bounds, taking error into account. More... | |
virtual float | length () const |
virtual const std::array < const float, 4 > | parameters () const |
virtual float | thickness () const |
TrapezoidalPlaneBounds (float be, float te, float a, float t) | |
virtual float | width () const |
virtual float | widthAtHalfLength () const |
virtual int | yAxisOrientation () const |
Public Member Functions inherited from Bounds | |
void | computeSpan (Surface const &plane) |
virtual bool | inside (const Local2DPoint &p, float tollerance) const |
Determine if a point is inside the bounds, taking a tollerance into account. More... | |
std::pair< float, float > const & | phiSpan () const |
std::pair< float, float > const & | rSpan () const |
std::pair< float, float > const & | zSpan () const |
virtual | ~Bounds () |
Private Attributes | |
float | apothem |
int | chamberType |
float | hBottomEdge |
float | hTopEdge |
const std::string | myName |
CSCStripTopology * | theStripTopology |
CSCWireTopology * | theWireTopology |
Friends | |
std::ostream & | operator<< (std::ostream &, const CSCLayerGeometry &) |
Encapsulates the geometrical details of a CSCLayer in a WireTopology for the wires and in a StripTopology for the strips. Note that it does not have the capability of calculating global values, so all values are in local coordinates.
Definition at line 25 of file CSCLayerGeometry.h.
CSCLayerGeometry::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 | ||
) |
Ctor from basic trapezoidal Chamber parameters.
geom | The pointer to the actual CSCGeometry we're building. |
iChamberType | The index 1-9 for station/ring combination. |
TrapezoidalPlaneBounds | describing geometry of face. |
nstrips | No. of strips in cathode plane of a Layer. |
stripOffset | Alternate strip planes are relatively shifted by +/-0.25 strip widths. |
stripPhiPitch | Delta-phi width of strips (they're fan-shaped) in radians |
whereStripsMeet | radial distance from projected intersection of strips to centre of strip plane |
extentOfStripPlane | height of strip plane (along its long symmetry axis) |
yCentreOfStripPlane | local y of symmetry centre of strip plane (before any offset rotation) |
wg | CSCWireGroupPackage encapsulating wire group info. |
wireAngleInDegrees | angle of wires w.r.t local x axis. |
yOfFirstWire | local y coordinate of first (lowest) wire in wire plane - nearest narrow edge. |
hThickness | half-thickness of chamber layer in cm (i.e. half the gas gap). |
Definition at line 22 of file CSCLayerGeometry.cc.
References apothem, funct::cos(), CSCGeometry::gangedStrips(), hBottomEdge, LogTrace, myName, CSCGeometry::realWireGeometry(), funct::sin(), theStripTopology, theWireTopology, and CSCWireGroupPackage::wireSpacing.
Referenced by clone().
CSCLayerGeometry::CSCLayerGeometry | ( | const CSCLayerGeometry & | melg | ) |
Definition at line 65 of file CSCLayerGeometry.cc.
References CSCStripTopology::clone(), theStripTopology, and theWireTopology.
|
virtual |
Definition at line 100 of file CSCLayerGeometry.cc.
References LogTrace, myName, theStripTopology, and theWireTopology.
|
inline |
Electronics channel corresponding to a given strip ...sometimes there will be more than one strip OR'ed into a channel
Definition at line 115 of file CSCLayerGeometry.h.
References OffsetRadialStripTopology::channel(), and theStripTopology.
Referenced by MuonTruth::analyze(), MuonTruth::associateCSCHitId(), MuonTruth::associateHitId(), and CSCStripElectronicsSim::readoutElement().
|
inlinevirtual |
Utility method to handle proper copying of the class
Reimplemented from TrapezoidalPlaneBounds.
Definition at line 306 of file CSCLayerGeometry.h.
References CSCLayerGeometry().
|
virtual |
Is a supplied LocalPoint inside the strip region?
This is a more reliable fiducial cut for CSCs than the 'Bounds' of the GeomDet(Unit) since those ranges are looser than the sensitive gas region. There are three versions, to parallel those of the TrapezoidalPlaneBounds which a naive user might otherwise employ.
Reimplemented from TrapezoidalPlaneBounds.
Definition at line 283 of file CSCLayerGeometry.cc.
References mathSSE::sqrt(), PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), PV3DBase< T, PVType, FrameType >::y(), LocalError::yy(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by CSCWireHitSim::getIonizationClusters(), CSCMake2DRecHit::hitFromStripAndWire(), inside(), CSCMake2DRecHit::isHitInFiducial(), and MuonSimHitProducer::produce().
|
virtual |
Determine if the point is inside the bounds.
Reimplemented from TrapezoidalPlaneBounds.
Definition at line 263 of file CSCLayerGeometry.cc.
References epsilon, numberOfStrips(), query::result, OffsetRadialStripTopology::strip(), theStripTopology, TrapezoidalPlaneBounds::thickness(), PV3DBase< T, PVType, FrameType >::y(), yLimitsOfStripPlane(), and PV3DBase< T, PVType, FrameType >::z().
|
virtual |
Reimplemented from TrapezoidalPlaneBounds.
Definition at line 278 of file CSCLayerGeometry.cc.
References inside(), PV2DBase< T, PVType, FrameType >::x(), and PV2DBase< T, PVType, FrameType >::y().
LocalPoint CSCLayerGeometry::intersectionOfStripAndWire | ( | float | s, |
int | w | ||
) | const |
Return 2-dim point at which a strip and a wire intersects.
Input arguments: a (float) strip number, and an (int) wire.
Output: LocalPoint which is at their intersection, or at extreme y of wire plane, as appropriate. (If y is adjusted, x is also adjusted to keep it on same strip.)
Definition at line 197 of file CSCLayerGeometry.cc.
References CSCStripTopology::equationOfStrip(), CSCWireTopology::equationOfWire(), CSCWireTopology::insideYOfWirePlane(), intersectionOfTwoLines(), CSCWireTopology::restrictToYOfWirePlane(), OffsetRadialStripTopology::stripAngle(), funct::tan(), theStripTopology, theWireTopology, x, PV3DBase< T, PVType, FrameType >::x(), detailsBasic3DVector::y, and PV3DBase< T, PVType, FrameType >::y().
Referenced by possibleRecHitPosition().
LocalPoint CSCLayerGeometry::intersectionOfTwoLines | ( | std::pair< float, float > | p1, |
std::pair< float, float > | p2 | ||
) | const |
Return the point of intersection of two straight lines (in 2-dim).
Input arguments are pair(m1,c1) and pair(m2,c2) where m=slope, c=intercept (y=mx+c).
BEWARE! Do not call with m1 = m2 ! No trapping !
Definition at line 215 of file CSCLayerGeometry.cc.
References alignmentValidation::c1, x, and detailsBasic3DVector::y.
Referenced by intersectionOfStripAndWire().
float CSCLayerGeometry::lengthOfWireGroup | ( | int | wireGroup | ) | const |
Length of a wire group (center wire, across chamber face)
Definition at line 175 of file CSCLayerGeometry.cc.
References middleWireOfGroup(), theWireTopology, w(), and CSCWireTopology::wireValues().
LocalPoint CSCLayerGeometry::localCenterOfWireGroup | ( | int | wireGroup | ) | const |
Local coordinates of center of a wire group. Used to be centerOfWireGroup in ORCA but that version now returns GlobalPoint.
Definition at line 157 of file CSCLayerGeometry.cc.
References middleWireOfGroup(), theWireTopology, w(), wireAngle(), CSCWireTopology::wireValues(), detailsBasic3DVector::y, and yOfWireGroup().
Referenced by ValidateGeometry::validateCSCLayerGeometry().
LocalError CSCLayerGeometry::localError | ( | int | strip, |
float | sigmaStrip, | ||
float | sigmaWire | ||
) | const |
Transform strip and wire errors to local x, y frame. Need to supply (central) strip of the hit. The sigma's are in distance units.
Definition at line 231 of file CSCLayerGeometry.cc.
References funct::cos(), funct::sin(), stripAngle(), and wireAngle().
Referenced by CSCMake2DRecHit::hitFromStripAndWire().
|
inline |
Middle of wire-group. This is the central wire no. for a group with an odd no. of wires. This is a pseudo-wire no. for a group with an even no. of wires. Accordingly, it is non-integer.
Definition at line 201 of file CSCLayerGeometry.h.
References CSCWireTopology::middleWireOfGroup(), and theWireTopology.
Referenced by CSCMake2DRecHit::hitFromStripAndWire(), lengthOfWireGroup(), localCenterOfWireGroup(), and stripWireGroupIntersection().
|
inline |
Strip nearest a given local point
Definition at line 94 of file CSCLayerGeometry.h.
References CSCRadialStripTopology::nearestStrip(), and theStripTopology.
Referenced by MuonCSCChamberResidual::addResidual(), CSCPairResidualsConstraint::calculatePhi(), CSCEfficiency::recHitSegment_Efficiencies(), and CSCStripHitSim::simulate().
|
inline |
Wire nearest a given local point
Definition at line 101 of file CSCLayerGeometry.h.
References CSCWireTopology::nearestWire(), and theWireTopology.
Referenced by CSCWireHitSim::simulate().
|
inline |
How many strips in layer
Definition at line 60 of file CSCLayerGeometry.h.
References CSCRadialStripTopology::nstrips(), and theStripTopology.
Referenced by CSCSectorReceiverLUT::calcGlobalPhiME(), CSCSectorReceiverLUT::getGlobalEtaValue(), CSCStripElectronicsSim::initParameters(), inside(), operator<<(), CSCCathodeLCTProcessor::run(), CSCStripHitSim::simulate(), and ValidateGeometry::validateCSCLayerGeometry().
|
inline |
How many wire groups in Layer
Definition at line 72 of file CSCLayerGeometry.h.
References CSCWireTopology::numberOfWireGroups(), and theWireTopology.
Referenced by CSCSectorReceiverLUT::getGlobalEtaValue(), CSCWireElectronicsSim::initParameters(), operator<<(), CSCAnodeLCTProcessor::run(), CSCWireElectronicsSim::timeOfFlightCalibration(), and ValidateGeometry::validateCSCLayerGeometry().
|
inline |
How many wires in layer
Definition at line 66 of file CSCLayerGeometry.h.
References CSCWireTopology::numberOfWires(), and theWireTopology.
Referenced by operator<<().
|
inline |
How many wires in a wiregroup
Definition at line 78 of file CSCLayerGeometry.h.
References CSCWireTopology::numberOfWiresPerGroup(), and theWireTopology.
Referenced by CSCMake2DRecHit::hitFromStripAndWire().
CSCLayerGeometry & CSCLayerGeometry::operator= | ( | const CSCLayerGeometry & | melg | ) |
Definition at line 78 of file CSCLayerGeometry.cc.
References apothem, CSCStripTopology::clone(), hBottomEdge, hTopEdge, theStripTopology, and theWireTopology.
std::pair< LocalPoint, float > CSCLayerGeometry::possibleRecHitPosition | ( | float | s, |
int | w1, | ||
int | w2 | ||
) | const |
Return estimate of the 2-dim point of intersection of a strip and a cluster of wires.
Input arguments: a (float) strip number, and the wires which delimit a cluster of wires. The wires are expected to be real wire numbers, and not wire-group numbers.
Returned: pair, with members:
first: LocalPoint which is midway along "the" strip between the wire limits,
or the chamber edges, as appropriate. <bf> second: length of the strip between the wires (or edges as appropriate).
Definition at line 182 of file CSCLayerGeometry.cc.
References intersectionOfStripAndWire(), TrapezoidalPlaneBounds::length(), mathSSE::sqrt(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().
void CSCLayerGeometry::setTopology | ( | CSCStripTopology * | topology | ) |
This class takes ownership of the pointer, and will destroy it
Definition at line 300 of file CSCLayerGeometry.cc.
References theStripTopology.
|
inline |
Return +1 or -1 for a stripOffset of +0.25 or -0.25 respectively. Requested by trigger people.
Definition at line 129 of file CSCLayerGeometry.h.
References stripOffset().
Referenced by CSCCathodeLCTProcessor::run().
|
inline |
Strip in which a given LocalPoint lies. This is a float which represents the fractional strip position within the detector.
Returns zero if the LocalPoint falls at the extreme low edge of the detector or BELOW, and float(nstrips) if it falls at the extreme high edge or ABOVE.
Definition at line 193 of file CSCLayerGeometry.h.
References OffsetRadialStripTopology::strip(), and theStripTopology.
Referenced by CSCRecHit2DValidation::plotResolution().
float CSCLayerGeometry::stripAngle | ( | int | strip | ) | const |
The angle (in radians) of a strip wrt local x-axis.
Definition at line 140 of file CSCLayerGeometry.cc.
References M_PI_2, OffsetRadialStripTopology::stripAngle(), and theStripTopology.
Referenced by MuonCSCChamberResidual::addResidual(), CSCPairResidualsConstraint::calculatePhi(), CSCMake2DRecHit::hitFromStripAndWire(), localError(), CSCEfficiency::recHitSegment_Efficiencies(), CSCStripHitSim::simulate(), and stripWireIntersection().
|
inline |
Offset of strips from symmetrical distribution about local y axis as a fraction of a strip (0 default, but usually +0.25 or -0.25)
Definition at line 123 of file CSCLayerGeometry.h.
References OffsetRadialStripTopology::stripOffset(), and theStripTopology.
Referenced by stagger().
|
inline |
The phi width of the strips (radians)
Definition at line 165 of file CSCLayerGeometry.h.
References CSCRadialStripTopology::phiPitch(), and theStripTopology.
|
inline |
The width of the strips (in middle)
Definition at line 171 of file CSCLayerGeometry.h.
Referenced by CSCMake2DRecHit::hitFromStripAndWire(), operator<<(), and CSCStripHitSim::simulate().
|
inline |
The width of the strip at a given local point
Definition at line 178 of file CSCLayerGeometry.h.
References CSCRadialStripTopology::localPitch(), and theStripTopology.
LocalPoint CSCLayerGeometry::stripWireGroupIntersection | ( | int | strip, |
int | wireGroup | ||
) | const |
Local point at which strip and centre of wire group intersect
Definition at line 133 of file CSCLayerGeometry.cc.
References middleWireOfGroup(), and stripWireIntersection().
Referenced by CSCSectorReceiverLUT::getGlobalEtaValue().
LocalPoint CSCLayerGeometry::stripWireIntersection | ( | int | strip, |
float | wire | ||
) | const |
Local point at which strip and wire intersect
Definition at line 111 of file CSCLayerGeometry.cc.
References stripAngle(), funct::tan(), wireAngle(), xOfStrip(), and yOfWire().
Referenced by CSCMake2DRecHit::hitFromStripAndWire(), and stripWireGroupIntersection().
|
inline |
'The' Topology (i.e. Strip Topology) owned by this MELG
Definition at line 287 of file CSCLayerGeometry.h.
References theStripTopology.
Referenced by FWRecoGeometryESProducer::addCSCGeometry(), CSCLayer::topology(), CSCChamberSpecs::topology(), and ValidateGeometry::validateCSCLayerGeometry().
|
inline |
The angle (in radians) of (any) wire wrt local x-axis.
Definition at line 139 of file CSCLayerGeometry.h.
References theWireTopology, and CSCWireTopology::wireAngle().
Referenced by CSCDriftSim::getWireHit(), localCenterOfWireGroup(), localError(), operator<<(), CSCStripHitSim::simulate(), and stripWireIntersection().
|
inline |
Wire group containing a given wire
Definition at line 107 of file CSCLayerGeometry.h.
References theWireTopology, and CSCWireTopology::wireGroup().
Referenced by CSCWireElectronicsSim::readoutElement(), and yResolution().
|
inline |
The distance (in cm) between anode wires
Definition at line 145 of file CSCLayerGeometry.h.
References theWireTopology, and CSCWireTopology::wirePitch().
Referenced by operator<<(), and CSCChamberSpecs::wireSpacing().
|
inline |
The Wire Topology owned by this MELG
Definition at line 299 of file CSCLayerGeometry.h.
References theWireTopology.
Referenced by FWRecoGeometryESProducer::addCSCGeometry(), TrackDetectorAssociator::getTAMuonChamberMatches(), and ValidateGeometry::validateCSCLayerGeometry().
|
inline |
The local x-position of the center of the strip.
Definition at line 184 of file CSCLayerGeometry.h.
References theStripTopology, CSCRadialStripTopology::xOfStrip(), and detailsBasic3DVector::y.
Referenced by CSCLayer::centerOfStrip(), CSCStripDigiValidation::plotResolution(), CSCStripHitSim::simulate(), stripWireIntersection(), and ValidateGeometry::validateCSCLayerGeometry().
|
inline |
Local y limits of the strip plane
Definition at line 231 of file CSCLayerGeometry.h.
References theStripTopology, and CSCStripTopology::yLimitsOfStripPlane().
Referenced by inside().
|
inline |
Local y of a given wire 'number' (float) at given x
Definition at line 207 of file CSCLayerGeometry.h.
References theWireTopology, x, and CSCWireTopology::yOfWire().
Referenced by CSCDriftSim::getWireHit(), CSCMake2DRecHit::hitFromStripAndWire(), CSCStripHitSim::simulate(), and stripWireIntersection().
|
inline |
Local y of a given wire group at given x
Definition at line 213 of file CSCLayerGeometry.h.
References theWireTopology, x, and CSCWireTopology::yOfWireGroup().
Referenced by CSCEfficiency::fillWG_info(), localCenterOfWireGroup(), and CSCWireDigiValidation::plotResolution().
|
inline |
The measurement resolution from wire groups (in cm.) This approximates the measurement resolution in the local y direction but may be too small by a factor of up to 1.26 due to stripAngle contributions which are neglected here. The last wiregroup may have more wires than others. The other wiregroups, including the first, are the same. One day the wiregroups will be matched to the hardware by using the DDD.
Definition at line 159 of file CSCLayerGeometry.h.
References theWireTopology, wireGroup(), and CSCWireTopology::yResolution().
Referenced by CSCMake2DRecHit::hitFromStripAndWire().
|
friend |
Output operator for members of class.
Definition at line 305 of file CSCLayerGeometry.cc.
|
private |
Definition at line 334 of file CSCLayerGeometry.h.
Referenced by CSCLayerGeometry(), operator<<(), and operator=().
|
private |
Definition at line 337 of file CSCLayerGeometry.h.
|
private |
Definition at line 332 of file CSCLayerGeometry.h.
Referenced by CSCLayerGeometry(), operator<<(), and operator=().
|
private |
Definition at line 333 of file CSCLayerGeometry.h.
Referenced by operator<<(), and operator=().
|
private |
Definition at line 336 of file CSCLayerGeometry.h.
Referenced by CSCLayerGeometry(), and ~CSCLayerGeometry().
|
private |
Definition at line 327 of file CSCLayerGeometry.h.
Referenced by channel(), CSCLayerGeometry(), inside(), intersectionOfStripAndWire(), nearestStrip(), numberOfStrips(), operator=(), setTopology(), strip(), stripAngle(), stripOffset(), stripPhiPitch(), stripPitch(), topology(), xOfStrip(), yLimitsOfStripPlane(), and ~CSCLayerGeometry().
|
private |
Definition at line 321 of file CSCLayerGeometry.h.
Referenced by CSCLayerGeometry(), intersectionOfStripAndWire(), lengthOfWireGroup(), localCenterOfWireGroup(), middleWireOfGroup(), nearestWire(), numberOfWireGroups(), numberOfWires(), numberOfWiresPerGroup(), operator=(), wireAngle(), wireGroup(), wirePitch(), wireTopology(), yOfWire(), yOfWireGroup(), yResolution(), and ~CSCLayerGeometry().