CMS 3D CMS Logo

CSCLayerGeometry.h
Go to the documentation of this file.
1 #ifndef Geometry_CSCGeometry_CSCLayerGeometry_H
2 #define Geometry_CSCGeometry_CSCLayerGeometry_H
3 
19 
20 #include <utility> // for std::pair
21 
22 class CSCGeometry;
24 
26 public:
44  int iChamberType,
45  const TrapezoidalPlaneBounds& bounds,
46  int nstrips,
47  float stripOffset,
48  float stripPhiPitch,
49  float whereStripsMeet,
50  float extentOfStripPlane,
51  float yCentreOfStripPlane,
52  const CSCWireGroupPackage& wg,
53  float wireAngleInDegrees,
54  double yOfFirstWire,
55  float hThickness);
56 
58 
60 
61  ~CSCLayerGeometry() override;
62 
66  int numberOfStrips() const { return theStripTopology->nstrips(); }
67 
71  int numberOfWires() const { return theWireTopology->numberOfWires(); }
72 
77 
82 
86  LocalPoint stripWireIntersection(int strip, float wire) const;
87 
92 
96  int nearestStrip(const LocalPoint& lp) const { return theStripTopology->nearestStrip(lp); }
97 
101  int nearestWire(const LocalPoint& lp) const { return theWireTopology->nearestWire(lp); }
102 
106  int wireGroup(int wire) const { return theWireTopology->wireGroup(wire); }
107 
112  int channel(int strip) const { return theStripTopology->channel(strip); }
113 
118  float stripOffset(void) const { return theStripTopology->stripOffset(); }
119 
124  int stagger() const { return static_cast<int>(4.1 * stripOffset()); }
125 
129  float stripAngle(int strip) const;
130 
134  float wireAngle() const { return theWireTopology->wireAngle(); }
135 
139  float wirePitch() const { return theWireTopology->wirePitch(); }
140 
152  float yResolution(int wireGroup = 1) const { return theWireTopology->yResolution(wireGroup); }
153 
157  float stripPhiPitch() const { return theStripTopology->phiPitch(); }
158 
162  float stripPitch() const {
163  // return theStripTopology->pitch(); }
164  return stripPitch(LocalPoint(0., 0.));
165  }
166 
170  float stripPitch(const LocalPoint& lp) const { return theStripTopology->localPitch(lp); }
171 
175  float xOfStrip(int strip, float y = 0.) const { return theStripTopology->xOfStrip(strip, y); }
176 
183  float strip(const LocalPoint& lp) const { return theStripTopology->strip(lp); }
184 
192 
196  float yOfWire(float wire, float x = 0.) const { return theWireTopology->yOfWire(wire, x); }
197 
201  float yOfWireGroup(int wireGroup, float x = 0.) const { return theWireTopology->yOfWireGroup(wireGroup, x); }
202 
209 
213  float lengthOfWireGroup(int wireGroup) const;
214 
218  std::pair<float, float> yLimitsOfStripPlane() const { return theStripTopology->yLimitsOfStripPlane(); }
219 
228  bool inside(const Local3DPoint&, const LocalError&, float scale = 1.f) const override;
229  bool inside(const Local3DPoint&) const override;
230  bool inside(const Local2DPoint&) const override;
231 
243  std::pair<LocalPoint, float> possibleRecHitPosition(float s, int w1, int w2) const;
244 
252  LocalPoint intersectionOfStripAndWire(float s, int w) const;
253 
260  LocalPoint intersectionOfTwoLines(std::pair<float, float> p1, std::pair<float, float> p2) const;
261 
267  LocalError localError(int strip, float sigmaStrip, float sigmaWire) const;
268 
272  const CSCStripTopology* topology() const { return theStripTopology; }
273 
278 
282  const CSCWireTopology* wireTopology() const { return theWireTopology; }
283 
287  Bounds* clone() const override { return new CSCLayerGeometry(*this); }
288 
292  friend std::ostream& operator<<(std::ostream&, const CSCLayerGeometry&);
293 
294 private:
295  // The wire information is encapsulated in a CSCWireTopology
296  // This class is passed the pointer and takes ownership...
297  // e.g. it destroys it.
298 
300 
301  // The strip information is encapsulated in a CSCStripTopology
302  // This class owns the pointer... so that copying works with
303  // derived classes, need a clone() method which can be virtual.
304 
306 
307  // Cache the trapezoid dimensions even though they could
308  // be accessed from the TrapezoidalPlaneBounds
309 
310  float hBottomEdge;
311  float hTopEdge;
312  float apothem;
313 
316 };
317 #endif
CSCLayerGeometry::nearestWire
int nearestWire(const LocalPoint &lp) const
Definition: CSCLayerGeometry.h:101
Point2DBase< float, LocalTag >
DDAxes::y
w2
common ppss p3p6s2 common epss epspn46 common const1 w2
Definition: inclppp.h:1
CSCLayerGeometry::myName
const std::string myName
Definition: CSCLayerGeometry.h:314
CSCLayerGeometry::yLimitsOfStripPlane
std::pair< float, float > yLimitsOfStripPlane() const
Definition: CSCLayerGeometry.h:218
CSCLayerGeometry::stripPitch
float stripPitch() const
Definition: CSCLayerGeometry.h:162
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
CSCWireTopology::wireAngle
float wireAngle() const override
Definition: CSCWireTopology.h:70
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
CSCLayerGeometry::stripPhiPitch
float stripPhiPitch() const
Definition: CSCLayerGeometry.h:157
CSCLayerGeometry::numberOfWires
int numberOfWires() const
Definition: CSCLayerGeometry.h:71
CSCWireTopology::yOfWireGroup
float yOfWireGroup(int wireGroup, float x=0.) const
Definition: CSCWireTopology.cc:114
CSCRadialStripTopology::phiPitch
float phiPitch(void) const override
Definition: CSCRadialStripTopology.h:164
CSCLayerGeometry::theWireTopology
CSCWireTopology * theWireTopology
Definition: CSCLayerGeometry.h:299
Bounds
Definition: Bounds.h:18
CSCLayerGeometry::wireGroup
int wireGroup(int wire) const
Definition: CSCLayerGeometry.h:106
CSCWireTopology::nearestWire
int nearestWire(const LocalPoint &lp) const override
Definition: CSCWireTopology.h:76
DDAxes::x
CSCLayerGeometry::localError
LocalError localError(int strip, float sigmaStrip, float sigmaWire) const
Definition: CSCLayerGeometry.cc:230
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
CSCLayerGeometry::stripWireIntersection
LocalPoint stripWireIntersection(int strip, float wire) const
Definition: CSCLayerGeometry.cc:120
CSCLayerGeometry::operator<<
friend std::ostream & operator<<(std::ostream &, const CSCLayerGeometry &)
Definition: CSCLayerGeometry.cc:304
CSCLayerGeometry::hTopEdge
float hTopEdge
Definition: CSCLayerGeometry.h:311
CSCWireTopology::numberOfWires
int numberOfWires() const override
Definition: CSCWireTopology.h:108
CSCStripTopology::yLimitsOfStripPlane
std::pair< float, float > yLimitsOfStripPlane() const
Definition: CSCStripTopology.cc:27
CSCLayerGeometry::wirePitch
float wirePitch() const
Definition: CSCLayerGeometry.h:139
OffsetRadialStripTopology::channel
virtual int channel(int strip) const =0
CSCGeometry
Definition: CSCGeometry.h:24
alignCSCRings.s
s
Definition: alignCSCRings.py:92
CSCLayerGeometry::intersectionOfStripAndWire
LocalPoint intersectionOfStripAndWire(float s, int w) const
Definition: CSCLayerGeometry.cc:199
CSCLayerGeometry::numberOfWiresPerGroup
int numberOfWiresPerGroup(int wireGroup) const
Definition: CSCLayerGeometry.h:81
CSCLayerGeometry::stripWireGroupIntersection
LocalPoint stripWireGroupIntersection(int strip, int wireGroup) const
Definition: CSCLayerGeometry.cc:141
CSCLayerGeometry::localCenterOfWireGroup
LocalPoint localCenterOfWireGroup(int wireGroup) const
Definition: CSCLayerGeometry.cc:163
LocalError.h
TrapezoidalPlaneBounds.h
CSCWireTopology::middleWireOfGroup
float middleWireOfGroup(int wireGroup) const
Definition: CSCWireTopology.h:131
CSCWireTopology::yResolution
float yResolution(int wireGroup=1) const
Definition: CSCWireTopology.cc:119
w
const double w
Definition: UKUtility.cc:23
CSCLayerGeometry::lengthOfWireGroup
float lengthOfWireGroup(int wireGroup) const
Definition: CSCLayerGeometry.cc:179
CSCLayerGeometry::stripPitch
float stripPitch(const LocalPoint &lp) const
Definition: CSCLayerGeometry.h:170
CSCLayerGeometry::xOfStrip
float xOfStrip(int strip, float y=0.) const
Definition: CSCLayerGeometry.h:175
CSCLayerGeometry
Definition: CSCLayerGeometry.h:25
CSCLayerGeometry::topology
const CSCStripTopology * topology() const
Definition: CSCLayerGeometry.h:272
CSCLayerGeometry::wireAngle
float wireAngle() const
Definition: CSCLayerGeometry.h:134
CSCLayerGeometry::chamberType
int chamberType
Definition: CSCLayerGeometry.h:315
p2
double p2[4]
Definition: TauolaWrapper.h:90
CSCLayerGeometry::middleWireOfGroup
float middleWireOfGroup(int wireGroup) const
Definition: CSCLayerGeometry.h:191
CSCLayerGeometry::yOfWire
float yOfWire(float wire, float x=0.) const
Definition: CSCLayerGeometry.h:196
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
CSCRadialStripTopology::xOfStrip
float xOfStrip(int strip, float y) const override
Definition: CSCRadialStripTopology.cc:45
Point3DBase< float, LocalTag >
CSCLayerGeometry::operator=
CSCLayerGeometry & operator=(const CSCLayerGeometry &)
Definition: CSCLayerGeometry.cc:91
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CSCLayerGeometry::nearestStrip
int nearestStrip(const LocalPoint &lp) const
Definition: CSCLayerGeometry.h:96
CSCLayerGeometry::setTopology
void setTopology(CSCStripTopology *topology)
Definition: CSCLayerGeometry.cc:299
CSCLayerGeometry::inside
bool inside(const Local3DPoint &, const LocalError &, float scale=1.f) const override
Definition: CSCLayerGeometry.cc:282
CSCWireTopology.h
LocalError
Definition: LocalError.h:12
CSCWireTopology::wirePitch
float wirePitch() const override
Definition: CSCWireTopology.h:65
CSCLayerGeometry::intersectionOfTwoLines
LocalPoint intersectionOfTwoLines(std::pair< float, float > p1, std::pair< float, float > p2) const
Definition: CSCLayerGeometry.cc:216
CSCRadialStripTopology::localPitch
float localPitch(const LocalPoint &) const override
Definition: CSCRadialStripTopology.cc:118
p1
double p1[4]
Definition: TauolaWrapper.h:89
CSCLayerGeometry::stagger
int stagger() const
Definition: CSCLayerGeometry.h:124
CSCLayerGeometry::hBottomEdge
float hBottomEdge
Definition: CSCLayerGeometry.h:310
CSCLayerGeometry::stripAngle
float stripAngle(int strip) const
Definition: CSCLayerGeometry.cc:147
CSCWireGroupPackage
Definition: CSCWireGroupPackage.h:18
TrapezoidalPlaneBounds
Definition: TrapezoidalPlaneBounds.h:15
CSCRadialStripTopology::nstrips
int nstrips() const override
Definition: CSCRadialStripTopology.h:122
CSCStripTopology
Definition: CSCStripTopology.h:28
CSCLayerGeometry::~CSCLayerGeometry
~CSCLayerGeometry() override
Definition: CSCLayerGeometry.cc:112
OffsetRadialStripTopology::stripOffset
virtual float stripOffset(void) const
Definition: OffsetRadialStripTopology.h:35
CSCWireTopology::wireGroup
int wireGroup(int wire) const
Definition: CSCWireTopology.h:123
CSCLayerGeometry::clone
Bounds * clone() const override
Definition: CSCLayerGeometry.h:287
CSCLayerGeometry::wireTopology
const CSCWireTopology * wireTopology() const
Definition: CSCLayerGeometry.h:282
CSCLayerGeometry::strip
float strip(const LocalPoint &lp) const
Definition: CSCLayerGeometry.h:183
CSCStripTopology.h
CSCLayerGeometry::yResolution
float yResolution(int wireGroup=1) const
Definition: CSCLayerGeometry.h:152
CSCWireTopology::yOfWire
float yOfWire(float wire, float x=0.) const
Definition: CSCWireTopology.h:81
LocalPoint.h
CSCLayerGeometry::stripOffset
float stripOffset(void) const
Definition: CSCLayerGeometry.h:118
OffsetRadialStripTopology::strip
float strip(const LocalPoint &) const override
Definition: OffsetRadialStripTopology.cc:73
CSCRadialStripTopology::nearestStrip
int nearestStrip(const LocalPoint &) const override
Definition: CSCRadialStripTopology.cc:29
CSCWireTopology
Definition: CSCWireTopology.h:18
CSCLayerGeometry::apothem
float apothem
Definition: CSCLayerGeometry.h:312
CSCLayerGeometry::channel
int channel(int strip) const
Definition: CSCLayerGeometry.h:112
CSCLayerGeometry::yOfWireGroup
float yOfWireGroup(int wireGroup, float x=0.) const
Definition: CSCLayerGeometry.h:201
CSCLayerGeometry::theStripTopology
CSCStripTopology * theStripTopology
Definition: CSCLayerGeometry.h:305
CSCLayerGeometry::numberOfStrips
int numberOfStrips() const
Definition: CSCLayerGeometry.h:66
CSCWireTopology::numberOfWiresPerGroup
int numberOfWiresPerGroup(int wireGroup) const
Definition: CSCWireTopology.h:118
CSCLayerGeometry::numberOfWireGroups
int numberOfWireGroups() const
Definition: CSCLayerGeometry.h:76
CSCWireTopology::numberOfWireGroups
int numberOfWireGroups() const
Definition: CSCWireTopology.h:113
CSCLayerGeometry::possibleRecHitPosition
std::pair< LocalPoint, float > possibleRecHitPosition(float s, int w1, int w2) const
Definition: CSCLayerGeometry.cc:186
CSCLayerGeometry::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)
Definition: CSCLayerGeometry.cc:23