CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
27 public:
28 
45  CSCLayerGeometry( const CSCGeometry* geom, int iChamberType,
46  const TrapezoidalPlaneBounds& bounds,
47  int nstrips, float stripOffset, float stripPhiPitch,
48  float whereStripsMeet, float extentOfStripPlane, float yCentreOfStripPlane,
49  const CSCWireGroupPackage& wg, float wireAngleInDegrees, double yOfFirstWire, float hThickness );
50 
52 
54 
55  virtual ~CSCLayerGeometry();
56 
60  int numberOfStrips() const {
61  return theStripTopology->nstrips(); }
62 
66  int numberOfWires() const {
67  return theWireTopology->numberOfWires(); }
68 
72  int numberOfWireGroups() const {
74 
78  int numberOfWiresPerGroup( int wireGroup ) const {
79  return theWireTopology->numberOfWiresPerGroup( wireGroup ); }
80 
84  LocalPoint stripWireIntersection( int strip, float wire) const;
85 
90 
94  int nearestStrip(const LocalPoint & lp) const {
95  return theStripTopology->nearestStrip(lp);
96  }
97 
101  int nearestWire(const LocalPoint & lp) const {
102  return theWireTopology->nearestWire( lp ); }
103 
107  int wireGroup(int wire) const {
108  return theWireTopology->wireGroup( wire );
109  }
110 
115  int channel(int strip) const {
116  return theStripTopology->channel(strip);
117  }
118 
123  float stripOffset( void ) const {return theStripTopology->stripOffset();}
124 
129  int stagger() const { return static_cast<int>( 4.1*stripOffset() ); }
130 
134  float stripAngle(int strip) const;
135 
139  float wireAngle() const {
140  return theWireTopology->wireAngle(); }
141 
145  float wirePitch() const {
146  return theWireTopology->wirePitch(); }
147 
159  float yResolution( int wireGroup = 1 ) const {
161 
165  float stripPhiPitch() const {
166  return theStripTopology->phiPitch(); }
167 
171  float stripPitch() const {
172  // return theStripTopology->pitch(); }
173  return stripPitch( LocalPoint(0.,0.) ); }
174 
178  float stripPitch(const LocalPoint & lp) const {
179  return theStripTopology->localPitch(lp); }
180 
184  float xOfStrip(int strip, float y=0.) const {
185  return theStripTopology->xOfStrip(strip, y); }
186 
193  float strip(const LocalPoint& lp) const { return theStripTopology->strip(lp); }
194 
201  float middleWireOfGroup( int wireGroup ) const {
202  return theWireTopology->middleWireOfGroup( wireGroup ); }
203 
207  float yOfWire(float wire, float x=0.) const {
208  return theWireTopology->yOfWire( wire, x ); }
209 
213  float yOfWireGroup(int wireGroup, float x=0.) const {
214  return theWireTopology->yOfWireGroup( wireGroup, x ); }
215 
222 
226  float lengthOfWireGroup( int wireGroup ) const;
227 
231  std::pair<float, float> yLimitsOfStripPlane() const {
233  }
234 
243  bool inside( const Local3DPoint&, const LocalError&, float scale=1.f ) const;
244  bool inside( const Local3DPoint& ) const;
245  bool inside( const Local2DPoint& ) const;
246 
258  std::pair<LocalPoint, float> possibleRecHitPosition( float s, int w1, int w2 ) const;
259 
267  LocalPoint intersectionOfStripAndWire( float s, int w) const;
268 
275  LocalPoint intersectionOfTwoLines( std::pair<float, float> p1, std::pair<float, float> p2 ) const;
276 
282  LocalError localError( int strip, float sigmaStrip, float sigmaWire ) const;
283 
287  const CSCStripTopology* topology() const {
288  return theStripTopology;
289  }
290 
295 
299  const CSCWireTopology* wireTopology() const {
300  return theWireTopology;
301  }
302 
306  virtual Bounds* clone() const {
307  return new CSCLayerGeometry(*this);
308  }
309 
313  friend std::ostream & operator<<(std::ostream &, const CSCLayerGeometry &);
314 
315 private:
316 
317  // The wire information is encapsulated in a CSCWireTopology
318  // This class is passed the pointer and takes ownership...
319  // e.g. it destroys it.
320 
322 
323  // The strip information is encapsulated in a CSCStripTopology
324  // This class owns the pointer... so that copying works with
325  // derived classes, need a clone() method which can be virtual.
326 
328 
329  // Cache the trapezoid dimensions even though they could
330  // be accessed from the TrapezoidalPlaneBounds
331 
332  float hBottomEdge;
333  float hTopEdge;
334  float apothem;
335 
336  const std::string myName;
338 };
339 #endif
int nearestWire(const LocalPoint &lp) const
LocalPoint stripWireGroupIntersection(int strip, int wireGroup) const
virtual int nstrips() const
std::pair< LocalPoint, float > possibleRecHitPosition(float s, int w1, int w2) const
const CSCWireTopology * wireTopology() const
common ppss p3p6s2 common epss epspn46 common const1 w2
Definition: inclppp.h:1
float lengthOfWireGroup(int wireGroup) const
int numberOfWiresPerGroup(int wireGroup) const
int numberOfWiresPerGroup(int wireGroup) const
float wirePitch() const
float stripOffset(void) const
virtual float phiPitch(void) const
int numberOfStrips() const
CSCStripTopology * theStripTopology
std::pair< float, float > yLimitsOfStripPlane() const
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
int numberOfWires() const
float xOfStrip(int strip, float y) 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
virtual Bounds * clone() const
LocalPoint intersectionOfStripAndWire(float s, int w) const
float wireAngle() const
float yOfWire(float wire, float x=0.) const
float middleWireOfGroup(int wireGroup) const
int nearestWire(const LocalPoint &lp) const
float yResolution(int wireGroup=1) const
float strip(const LocalPoint &lp) const
int numberOfWires() const
double f[11][100]
virtual ~CSCLayerGeometry()
CSCWireTopology * theWireTopology
float yOfWire(float wire, float x=0.) const
int wireGroup(int wire) const
double p2[4]
Definition: TauolaWrapper.h:90
const std::string myName
virtual int nearestStrip(const LocalPoint &) const
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 localPitch(const LocalPoint &) const
virtual float stripOffset(void) const
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
double p1[4]
Definition: TauolaWrapper.h:89
float stripPhiPitch() const
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
virtual int channel(int strip) const =0
float wirePitch() const
bool inside(const Local3DPoint &, const LocalError &, float scale=1.f) const
CSCLayerGeometry & operator=(const CSCLayerGeometry &)
Definition: Bounds.h:18
string s
Definition: asciidump.py:422
Definition: DDAxes.h:10
float stripAngle(int strip) const
float stripPitch(const LocalPoint &lp) const
void setTopology(CSCStripTopology *topology)
virtual float strip(const LocalPoint &) const