Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:14:24

0001 #include "Geometry/CSCGeometry/interface/CSCStripTopology.h"
0002 #include <FWCore/MessageLogger/interface/MessageLogger.h>
0003 
0004 CSCStripTopology::CSCStripTopology(int ns, float aw, float dh, float r, float aoff, float ymid)
0005     : OffsetRadialStripTopology(ns, aw, dh, r, aoff, ymid) {}
0006 
0007 CSCStripTopology::~CSCStripTopology() {}
0008 
0009 std::pair<float, float> CSCStripTopology::equationOfStrip(float strip) const {
0010   const float fprec = 1.E-06;
0011 
0012   // slope of strip
0013   float strangle = M_PI_2 - stripAngle(strip);
0014   float ms = 0;
0015   if (fabs(strangle) > fprec)
0016     ms = tan(strangle);
0017 
0018   // intercept of strip
0019   float cs = -originToIntersection();
0020 
0021   LogTrace("CSCStripTopology|CSC") << "CSCStripTopology: strip=" << strip << ", strip angle = " << strangle
0022                                    << ", intercept on y axis=" << cs;
0023 
0024   return std::pair<float, float>(ms, cs);
0025 }
0026 
0027 std::pair<float, float> CSCStripTopology::yLimitsOfStripPlane() const {
0028   // use functions from base class
0029   float ylow = yCentreOfStripPlane() - yExtentOfStripPlane() / 2.;
0030   float yhigh = yCentreOfStripPlane() + yExtentOfStripPlane() / 2.;
0031 
0032   return std::pair<float, float>(ylow, yhigh);
0033 }
0034 
0035 // op<< is not a member
0036 
0037 #include <iostream>
0038 
0039 std::ostream& operator<<(std::ostream& os, const CSCStripTopology& st) {
0040   st.put(os) << " isa " << static_cast<const OffsetRadialStripTopology&>(st);
0041   return os;
0042 }