#include <CSCLayerGeometry.h>
Public Member Functions | |
int | channel (int strip) const |
Bounds * | clone () const override |
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 Local2DPoint &) const override |
bool | inside (const Local3DPoint &) const override |
Determine if the point is inside the bounds. More... | |
bool | inside (const Local3DPoint &, const LocalError &, float scale=1.f) const override |
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 |
~CSCLayerGeometry () override | |
Public Member Functions inherited from TrapezoidalPlaneBounds | |
virtual bool | inside (const Local2DPoint &p) const |
bool | inside (const Local2DPoint &p, const LocalError &err, float scale) const override |
Determine if a 2D point is inside the bounds, taking error into account. More... | |
virtual bool | inside (const Local2DPoint &p, const LocalError &err, float scale=1.f) const |
Determine if a 2D point is inside the bounds, taking error into account. More... | |
virtual bool | inside (const Local2DPoint &p, float tollerance) const |
Determine if a point is inside the bounds, taking a tollerance into account. More... | |
virtual bool | inside (const Local3DPoint &) const=0 |
Determine if the point is inside the bounds. More... | |
virtual bool | inside (const Local3DPoint &, const LocalError &, float scale=1.f) const=0 |
Determine if a point is inside the bounds, taking error into account. More... | |
float | length () const override |
virtual const std::array< const float, 4 > | parameters () const |
float | significanceInside (const Local3DPoint &, const LocalError &) const override |
float | thickness () const override |
TrapezoidalPlaneBounds (float be, float te, float a, float t) | |
float | width () const override |
float | widthAtHalfLength () const override |
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 23 of file CSCLayerGeometry.cc.
References apothem, angle_units::operators::convertDegToRad(), geant_units::operators::convertMmToCm(), funct::cos(), relativeConstraints::geom, hBottomEdge, LogTrace, myName, funct::sin(), stripOffset(), stripPhiPitch(), theStripTopology, theWireTopology, CSCWireGroupPackage::wireSpacing, and testProducerWithPsetDescEmpty_cfi::y2.
Referenced by clone().
CSCLayerGeometry::CSCLayerGeometry | ( | const CSCLayerGeometry & | melg | ) |
Definition at line 75 of file CSCLayerGeometry.cc.
References CSCStripTopology::clone(), theStripTopology, and theWireTopology.
|
override |
Definition at line 112 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 112 of file CSCLayerGeometry.h.
References OffsetRadialStripTopology::channel(), strip(), and theStripTopology.
Referenced by MuonTruth::analyze(), CSCHitAssociator::associateCSCHitId(), CSCHitAssociator::associateHitId(), and CSCStripElectronicsSim::readoutElement().
|
inlineoverridevirtual |
Utility method to handle proper copying of the class
Reimplemented from TrapezoidalPlaneBounds.
Definition at line 287 of file CSCLayerGeometry.h.
References CSCLayerGeometry().
|
overridevirtual |
Reimplemented from TrapezoidalPlaneBounds.
Definition at line 277 of file CSCLayerGeometry.cc.
References inside(), PV2DBase< T, PVType, FrameType >::x(), and PV2DBase< T, PVType, FrameType >::y().
|
overridevirtual |
Determine if the point is inside the bounds.
Reimplemented from TrapezoidalPlaneBounds.
Definition at line 262 of file CSCLayerGeometry.cc.
References geometryDiff::epsilon, numberOfStrips(), mps_fire::result, OffsetRadialStripTopology::strip(), theStripTopology, TrapezoidalPlaneBounds::thickness(), PV3DBase< T, PVType, FrameType >::y(), yLimitsOfStripPlane(), and PV3DBase< T, PVType, FrameType >::z().
|
overridevirtual |
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 282 of file CSCLayerGeometry.cc.
References HLT_FULL_cff::scale, 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().
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 199 of file CSCLayerGeometry.cc.
References CSCStripTopology::equationOfStrip(), CSCWireTopology::equationOfWire(), CSCWireTopology::insideYOfWirePlane(), intersectionOfTwoLines(), CSCWireTopology::restrictToYOfWirePlane(), alignCSCRings::s, OffsetRadialStripTopology::stripAngle(), funct::tan(), theStripTopology, theWireTopology, w, x, PV3DBase< T, PVType, FrameType >::x(), 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 216 of file CSCLayerGeometry.cc.
References alignmentValidation::c1, p1, p2, x, and y.
Referenced by intersectionOfStripAndWire().
float CSCLayerGeometry::lengthOfWireGroup | ( | int | wireGroup | ) | const |
Length of a wire group (center wire, across chamber face)
Definition at line 179 of file CSCLayerGeometry.cc.
References middleWireOfGroup(), theWireTopology, w, wireGroup(), and CSCWireTopology::wireValues().
LocalPoint CSCLayerGeometry::localCenterOfWireGroup | ( | int | wireGroup | ) | const |
Local coordinates of center of a wire group. \WARNING Used to be centerOfWireGroup in ORCA but that version now returns GlobalPoint.
Definition at line 163 of file CSCLayerGeometry.cc.
References middleWireOfGroup(), theWireTopology, w, wireAngle(), wireGroup(), CSCWireTopology::wireValues(), y, and yOfWireGroup().
Referenced by CSCAnodeLCTAnalyzer::getWGEta(), and 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 230 of file CSCLayerGeometry.cc.
References funct::cos(), PVValHelper::dxy, 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 191 of file CSCLayerGeometry.h.
References CSCWireTopology::middleWireOfGroup(), theWireTopology, and wireGroup().
Referenced by CSCTriggerPrimitivesReader::getGlobalPosition(), CSCMake2DRecHit::hitFromStripAndWire(), lengthOfWireGroup(), localCenterOfWireGroup(), and stripWireGroupIntersection().
|
inline |
Strip nearest a given local point
Definition at line 96 of file CSCLayerGeometry.h.
References CSCRadialStripTopology::nearestStrip(), and theStripTopology.
Referenced by MuonCSCChamberResidual::addResidual(), CSCPairResidualsConstraint::calculatePhi(), and CSCEfficiency::recHitSegment_Efficiencies().
|
inline |
Wire nearest a given local point
Definition at line 101 of file CSCLayerGeometry.h.
References CSCWireTopology::nearestWire(), and theWireTopology.
Referenced by CSCAnodeLCTAnalyzer::nearestWG().
|
inline |
How many strips in layer
Definition at line 66 of file CSCLayerGeometry.h.
References CSCRadialStripTopology::nstrips(), and theStripTopology.
Referenced by CSCRecoBadChannelsAnalyzer::analyze(), CSCSectorReceiverLUT::calcGlobalPhiME(), CSCSectorReceiverLUT::getGlobalEtaValue(), CSCStripElectronicsSim::initParameters(), inside(), operator<<(), CSCCathodeLCTProcessor::run(), CSCGeometryValidate::validateCSCLayerGeometry(), and ValidateGeometry::validateCSCLayerGeometry().
|
inline |
How many wire groups in Layer
Definition at line 76 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 71 of file CSCLayerGeometry.h.
References CSCWireTopology::numberOfWires(), and theWireTopology.
Referenced by operator<<(), and CSCGeometryValidate::validateCSCLayerGeometry().
|
inline |
How many wires in a wiregroup
Definition at line 81 of file CSCLayerGeometry.h.
References CSCWireTopology::numberOfWiresPerGroup(), theWireTopology, and wireGroup().
Referenced by CSCMake2DRecHit::hitFromStripAndWire().
CSCLayerGeometry & CSCLayerGeometry::operator= | ( | const CSCLayerGeometry & | melg | ) |
Definition at line 91 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 186 of file CSCLayerGeometry.cc.
References intersectionOfStripAndWire(), TrapezoidalPlaneBounds::length(), alignCSCRings::s, mathSSE::sqrt(), w2, PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().
Referenced by CSCMake2DRecHit::hitFromStripAndWire().
void CSCLayerGeometry::setTopology | ( | CSCStripTopology * | topology | ) |
This class takes ownership of the pointer, and will destroy it
Definition at line 299 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 124 of file CSCLayerGeometry.h.
References stripOffset().
Referenced by CSCCathodeLCTAnalyzer::preselectDigis(), and 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 183 of file CSCLayerGeometry.h.
References OffsetRadialStripTopology::strip(), and theStripTopology.
Referenced by channel(), CSCRecHit2DValidation::plotResolution(), stripAngle(), stripWireGroupIntersection(), stripWireIntersection(), and xOfStrip().
float CSCLayerGeometry::stripAngle | ( | int | strip | ) | const |
The angle (in radians) of a strip wrt local x-axis.
Definition at line 147 of file CSCLayerGeometry.cc.
References strip(), OffsetRadialStripTopology::stripAngle(), and theStripTopology.
Referenced by MuonCSCChamberResidual::addResidual(), CSCPairResidualsConstraint::calculatePhi(), CSCMake2DRecHit::hitFromStripAndWire(), localError(), CSCEfficiency::recHitSegment_Efficiencies(), 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 118 of file CSCLayerGeometry.h.
References OffsetRadialStripTopology::stripOffset(), and theStripTopology.
Referenced by CSCLayerGeometry(), stagger(), and CSCGeometryValidate::validateCSCLayerGeometry().
|
inline |
The phi width of the strips (radians)
Definition at line 157 of file CSCLayerGeometry.h.
References CSCRadialStripTopology::phiPitch(), and theStripTopology.
Referenced by CSCLayerGeometry().
|
inline |
The width of the strips (in middle)
Definition at line 162 of file CSCLayerGeometry.h.
Referenced by CSCMake2DRecHit::hitFromStripAndWire(), and operator<<().
|
inline |
The width of the strip at a given local point
Definition at line 170 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 141 of file CSCLayerGeometry.cc.
References middleWireOfGroup(), strip(), stripWireIntersection(), and wireGroup().
Referenced by CSCSectorReceiverLUT::getGlobalEtaValue().
LocalPoint CSCLayerGeometry::stripWireIntersection | ( | int | strip, |
float | wire | ||
) | const |
Local point at which strip and wire intersect
Definition at line 120 of file CSCLayerGeometry.cc.
References strip(), stripAngle(), funct::tan(), wireAngle(), hybridSuperClusters_cfi::xi, xOfStrip(), and yOfWire().
Referenced by stripWireGroupIntersection().
|
inline |
'The' Topology (i.e. Strip Topology) owned by this MELG
Definition at line 272 of file CSCLayerGeometry.h.
References theStripTopology.
Referenced by FWRecoGeometryESProducer::addCSCGeometry(), CSCCathodeLCTAnalyzer::getStripPhi(), CSCCathodeLCTAnalyzer::nearestHS(), CSCLayer::topology(), CSCChamberSpecs::topology(), CSCGeometryValidate::validateCSCLayerGeometry(), and ValidateGeometry::validateCSCLayerGeometry().
|
inline |
The angle (in radians) of (any) wire wrt local x-axis.
Definition at line 134 of file CSCLayerGeometry.h.
References theWireTopology, and CSCWireTopology::wireAngle().
Referenced by localCenterOfWireGroup(), localError(), operator<<(), and stripWireIntersection().
|
inline |
Wire group containing a given wire
Definition at line 106 of file CSCLayerGeometry.h.
References theWireTopology, and CSCWireTopology::wireGroup().
Referenced by lengthOfWireGroup(), localCenterOfWireGroup(), middleWireOfGroup(), CSCAnodeLCTAnalyzer::nearestWG(), numberOfWiresPerGroup(), CSCWireElectronicsSim::readoutElement(), stripWireGroupIntersection(), yOfWireGroup(), and yResolution().
|
inline |
The distance (in cm) between anode wires
Definition at line 139 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 282 of file CSCLayerGeometry.h.
References theWireTopology.
Referenced by FWRecoGeometryESProducer::addCSCGeometry(), TrackDetectorAssociator::getTAMuonChamberMatches(), CSCGeometryValidate::validateCSCLayerGeometry(), and ValidateGeometry::validateCSCLayerGeometry().
|
inline |
The local x-position of the center of the strip.
Definition at line 175 of file CSCLayerGeometry.h.
References strip(), theStripTopology, CSCRadialStripTopology::xOfStrip(), and y.
Referenced by CSCLayer::centerOfStrip(), MuonShowerDigiFiller::fill(), CSCStripDigiValidation::plotResolution(), stripWireIntersection(), and ValidateGeometry::validateCSCLayerGeometry().
|
inline |
Local y limits of the strip plane
Definition at line 218 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 196 of file CSCLayerGeometry.h.
References theWireTopology, x, and CSCWireTopology::yOfWire().
Referenced by stripWireIntersection().
|
inline |
Local y of a given wire group at given x
Definition at line 201 of file CSCLayerGeometry.h.
References theWireTopology, wireGroup(), 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 152 of file CSCLayerGeometry.h.
References theWireTopology, wireGroup(), and CSCWireTopology::yResolution().
Referenced by CSCMake2DRecHit::hitFromStripAndWire().
|
friend |
|
private |
Definition at line 312 of file CSCLayerGeometry.h.
Referenced by CSCLayerGeometry(), operator<<(), and operator=().
|
private |
Definition at line 315 of file CSCLayerGeometry.h.
|
private |
Definition at line 310 of file CSCLayerGeometry.h.
Referenced by CSCLayerGeometry(), operator<<(), and operator=().
|
private |
Definition at line 311 of file CSCLayerGeometry.h.
Referenced by operator<<(), and operator=().
|
private |
Definition at line 314 of file CSCLayerGeometry.h.
Referenced by CSCLayerGeometry(), and ~CSCLayerGeometry().
|
private |
Definition at line 305 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 299 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().