CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes | Friends
CSCLayerGeometry Class Reference

#include <CSCLayerGeometry.h>

Inheritance diagram for CSCLayerGeometry:
TrapezoidalPlaneBounds Bounds

Public Member Functions

int channel (int strip) const
 
virtual Boundsclone () 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
 
CSCLayerGeometryoperator= (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 CSCStripTopologytopology () const
 
float wireAngle () const
 
int wireGroup (int wire) const
 
float wirePitch () const
 
const CSCWireTopologywireTopology () 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
 
CSCStripTopologytheStripTopology
 
CSCWireTopologytheWireTopology
 

Friends

std::ostream & operator<< (std::ostream &, const CSCLayerGeometry &)
 

Detailed Description

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.

Author
Tim Cox

Definition at line 25 of file CSCLayerGeometry.h.

Constructor & Destructor Documentation

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.

Parameters
geomThe pointer to the actual CSCGeometry we're building.
iChamberTypeThe index 1-9 for station/ring combination.
TrapezoidalPlaneBoundsdescribing geometry of face.
nstripsNo. of strips in cathode plane of a Layer.
stripOffsetAlternate strip planes are relatively shifted by +/-0.25 strip widths.
stripPhiPitchDelta-phi width of strips (they're fan-shaped) in radians
whereStripsMeetradial distance from projected intersection of strips to centre of strip plane
extentOfStripPlaneheight of strip plane (along its long symmetry axis)
yCentreOfStripPlanelocal y of symmetry centre of strip plane (before any offset rotation)
wgCSCWireGroupPackage encapsulating wire group info.
wireAngleInDegreesangle of wires w.r.t local x axis.
yOfFirstWirelocal y coordinate of first (lowest) wire in wire plane - nearest narrow edge.
hThicknesshalf-thickness of chamber layer in cm (i.e. half the gas gap).

Definition at line 22 of file CSCLayerGeometry.cc.

CSCLayerGeometry::CSCLayerGeometry ( const CSCLayerGeometry melg)

Definition at line 65 of file CSCLayerGeometry.cc.

CSCLayerGeometry::~CSCLayerGeometry ( )
virtual

Definition at line 100 of file CSCLayerGeometry.cc.

Member Function Documentation

int CSCLayerGeometry::channel ( int  strip) const
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.

Referenced by CSCHitAssociator::associateCSCHitId(), and CSCHitAssociator::associateHitId().

virtual Bounds* CSCLayerGeometry::clone ( void  ) const
inlinevirtual

Utility method to handle proper copying of the class

Reimplemented from TrapezoidalPlaneBounds.

Definition at line 306 of file CSCLayerGeometry.h.

bool CSCLayerGeometry::inside ( const Local3DPoint lp,
const LocalError le,
float  scale = 1.f 
) const
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.

Referenced by CSCWireHitSim::getIonizationClusters().

bool CSCLayerGeometry::inside ( const Local3DPoint ) const
virtual

Determine if the point is inside the bounds.

Reimplemented from TrapezoidalPlaneBounds.

Definition at line 263 of file CSCLayerGeometry.cc.

bool CSCLayerGeometry::inside ( const Local2DPoint lp) const
virtual

Reimplemented from TrapezoidalPlaneBounds.

Definition at line 278 of file CSCLayerGeometry.cc.

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.

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.

float CSCLayerGeometry::lengthOfWireGroup ( int  wireGroup) const

Length of a wire group (center wire, across chamber face)

Definition at line 175 of file CSCLayerGeometry.cc.

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.

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.

float CSCLayerGeometry::middleWireOfGroup ( int  wireGroup) const
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.

int CSCLayerGeometry::nearestStrip ( const LocalPoint lp) const
inline

Strip nearest a given local point

Definition at line 94 of file CSCLayerGeometry.h.

Referenced by MuonCSCChamberResidual::addResidual(), and CSCStripHitSim::simulate().

int CSCLayerGeometry::nearestWire ( const LocalPoint lp) const
inline

Wire nearest a given local point

Definition at line 101 of file CSCLayerGeometry.h.

Referenced by CSCWireHitSim::simulate().

int CSCLayerGeometry::numberOfStrips ( ) const
inline

How many strips in layer

Definition at line 60 of file CSCLayerGeometry.h.

Referenced by CSCRecoBadChannelsAnalyzer::analyze(), and CSCStripHitSim::simulate().

int CSCLayerGeometry::numberOfWireGroups ( ) const
inline

How many wire groups in Layer

Definition at line 72 of file CSCLayerGeometry.h.

int CSCLayerGeometry::numberOfWires ( ) const
inline

How many wires in layer

Definition at line 66 of file CSCLayerGeometry.h.

int CSCLayerGeometry::numberOfWiresPerGroup ( int  wireGroup) const
inline

How many wires in a wiregroup

Definition at line 78 of file CSCLayerGeometry.h.

CSCLayerGeometry & CSCLayerGeometry::operator= ( const CSCLayerGeometry melg)

Definition at line 78 of file CSCLayerGeometry.cc.

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.

void CSCLayerGeometry::setTopology ( CSCStripTopology topology)

This class takes ownership of the pointer, and will destroy it

Definition at line 300 of file CSCLayerGeometry.cc.

int CSCLayerGeometry::stagger ( ) const
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.

float CSCLayerGeometry::strip ( const LocalPoint lp) const
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.

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.

Referenced by MuonCSCChamberResidual::addResidual(), and CSCStripHitSim::simulate().

float CSCLayerGeometry::stripOffset ( void  ) const
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.

float CSCLayerGeometry::stripPhiPitch ( ) const
inline

The phi width of the strips (radians)

Definition at line 165 of file CSCLayerGeometry.h.

float CSCLayerGeometry::stripPitch ( ) const
inline

The width of the strips (in middle)

Definition at line 171 of file CSCLayerGeometry.h.

Referenced by CSCStripHitSim::simulate().

float CSCLayerGeometry::stripPitch ( const LocalPoint lp) const
inline

The width of the strip at a given local point

Definition at line 178 of file CSCLayerGeometry.h.

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.

LocalPoint CSCLayerGeometry::stripWireIntersection ( int  strip,
float  wire 
) const

Local point at which strip and wire intersect

Definition at line 111 of file CSCLayerGeometry.cc.

const CSCStripTopology* CSCLayerGeometry::topology ( ) const
inline

'The' Topology (i.e. Strip Topology) owned by this MELG

Definition at line 287 of file CSCLayerGeometry.h.

Referenced by CSCLayer::topology().

float CSCLayerGeometry::wireAngle ( ) const
inline

The angle (in radians) of (any) wire wrt local x-axis.

Definition at line 139 of file CSCLayerGeometry.h.

Referenced by CSCStripHitSim::simulate().

int CSCLayerGeometry::wireGroup ( int  wire) const
inline

Wire group containing a given wire

Definition at line 107 of file CSCLayerGeometry.h.

float CSCLayerGeometry::wirePitch ( ) const
inline

The distance (in cm) between anode wires

Definition at line 145 of file CSCLayerGeometry.h.

const CSCWireTopology* CSCLayerGeometry::wireTopology ( ) const
inline

The Wire Topology owned by this MELG

Definition at line 299 of file CSCLayerGeometry.h.

float CSCLayerGeometry::xOfStrip ( int  strip,
float  y = 0. 
) const
inline

The local x-position of the center of the strip.

Definition at line 184 of file CSCLayerGeometry.h.

Referenced by CSCLayer::centerOfStrip(), CSCStripDigiValidation::plotResolution(), and CSCStripHitSim::simulate().

std::pair<float, float> CSCLayerGeometry::yLimitsOfStripPlane ( ) const
inline

Local y limits of the strip plane

Definition at line 231 of file CSCLayerGeometry.h.

float CSCLayerGeometry::yOfWire ( float  wire,
float  x = 0. 
) const
inline

Local y of a given wire 'number' (float) at given x

Definition at line 207 of file CSCLayerGeometry.h.

Referenced by CSCStripHitSim::simulate().

float CSCLayerGeometry::yOfWireGroup ( int  wireGroup,
float  x = 0. 
) const
inline

Local y of a given wire group at given x

Definition at line 213 of file CSCLayerGeometry.h.

Referenced by CSCWireDigiValidation::plotResolution().

float CSCLayerGeometry::yResolution ( int  wireGroup = 1) const
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.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const CSCLayerGeometry lg 
)
friend

Output operator for members of class.

Definition at line 305 of file CSCLayerGeometry.cc.

Member Data Documentation

float CSCLayerGeometry::apothem
private

Definition at line 334 of file CSCLayerGeometry.h.

int CSCLayerGeometry::chamberType
private

Definition at line 337 of file CSCLayerGeometry.h.

float CSCLayerGeometry::hBottomEdge
private

Definition at line 332 of file CSCLayerGeometry.h.

float CSCLayerGeometry::hTopEdge
private

Definition at line 333 of file CSCLayerGeometry.h.

const std::string CSCLayerGeometry::myName
private

Definition at line 336 of file CSCLayerGeometry.h.

CSCStripTopology* CSCLayerGeometry::theStripTopology
private

Definition at line 327 of file CSCLayerGeometry.h.

CSCWireTopology* CSCLayerGeometry::theWireTopology
private

Definition at line 321 of file CSCLayerGeometry.h.