CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
191  float middleWireOfGroup(int wireGroup) const { return theWireTopology->middleWireOfGroup(wireGroup); }
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
int nearestWire(const LocalPoint &lp) const
LocalPoint stripWireGroupIntersection(int strip, int wireGroup) const
int nearestStrip(const LocalPoint &) const override
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
std::pair< LocalPoint, float > possibleRecHitPosition(float s, int w1, int w2) const
const CSCWireTopology * wireTopology() const
~CSCLayerGeometry() override
common ppss p3p6s2 common epss epspn46 common const1 w2
Definition: inclppp.h:1
float lengthOfWireGroup(int wireGroup) const
const double w
Definition: UKUtility.cc:23
const TString p2
Definition: fwPaths.cc:13
Bounds * clone() const override
int numberOfWiresPerGroup(int wireGroup) const
int numberOfWiresPerGroup(int wireGroup) const
float stripOffset(void) const
int numberOfStrips() const
CSCStripTopology * theStripTopology
std::pair< float, float > yLimitsOfStripPlane() const
float strip(const LocalPoint &) const override
float stripPitch() const
float yOfWireGroup(int wireGroup, float x=0.) 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
float wireAngle() const
LocalPoint intersectionOfTwoLines(std::pair< float, float > p1, std::pair< float, float > p2) const
float xOfStrip(int strip, float y=0.) const
int wireGroup(int wire) const
float wireAngle() const override
LocalPoint intersectionOfStripAndWire(float s, int w) const
float yOfWire(float wire, float x=0.) const
float phiPitch(void) const override
float middleWireOfGroup(int wireGroup) const
float yResolution(int wireGroup=1) const
const TString p1
Definition: fwPaths.cc:12
float strip(const LocalPoint &lp) const
int numberOfWires() const
CSCWireTopology * theWireTopology
float yOfWire(float wire, float x=0.) const
int wireGroup(int wire) const
const std::string myName
int channel(int strip) const
float middleWireOfGroup(int wireGroup) const
int nearestStrip(const LocalPoint &lp) const
LocalPoint localCenterOfWireGroup(int wireGroup) const
const CSCStripTopology * topology() const
int stagger() const
virtual float stripOffset(void) const
float xOfStrip(int strip, float y) const override
float yResolution(int wireGroup=1) const
friend std::ostream & operator<<(std::ostream &, const CSCLayerGeometry &)
int numberOfWireGroups() const
std::pair< float, float > yLimitsOfStripPlane() const
LocalPoint stripWireIntersection(int strip, float wire) const
float stripPhiPitch() const
int nearestWire(const LocalPoint &lp) const override
virtual int channel(int strip) const =0
float wirePitch() const override
float wirePitch() const
CSCLayerGeometry & operator=(const CSCLayerGeometry &)
Definition: Bounds.h:18
bool inside(const Local3DPoint &, const LocalError &, float scale=1.f) const override
float stripAngle(int strip) const
float stripPitch(const LocalPoint &lp) const
int nstrips() const override
void setTopology(CSCStripTopology *topology)
int numberOfWires() const override
float localPitch(const LocalPoint &) const override