CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_6/src/Geometry/CSCGeometry/src/CSCStripTopology.cc

Go to the documentation of this file.
00001 #include "Geometry/CSCGeometry/interface/CSCStripTopology.h"
00002 #include <FWCore/MessageLogger/interface/MessageLogger.h>
00003 
00004 CSCStripTopology::CSCStripTopology(int ns, float aw, float dh, float r, float aoff, float ymid ) :
00005    OffsetRadialStripTopology( ns, aw, dh, r, aoff, ymid ) {}
00006 
00007 CSCStripTopology::~CSCStripTopology() {}
00008 
00009 std::pair<float, float> CSCStripTopology::equationOfStrip( float strip ) const {
00010   
00011   const float fprec = 1.E-06;
00012 
00013   // slope of strip
00014   float strangle = M_PI_2 - stripAngle( strip ); 
00015   float ms = 0;
00016   if ( fabs(strangle) > fprec ) ms = tan( strangle );
00017 
00018   // intercept of strip
00019   float cs = - originToIntersection();
00020 
00021   LogTrace("CSCStripTopology|CSC") << "CSCStripTopology: strip=" << strip <<
00022     ", strip angle = " << strangle <<
00023     ", intercept on y axis=" << cs;
00024 
00025   return std::pair<float,float>(ms, cs);
00026 }
00027 
00028 std::pair<float, float> CSCStripTopology::yLimitsOfStripPlane() const{
00029   // use functions from base class
00030   float ylow  = yCentreOfStripPlane() - yExtentOfStripPlane()/2. ;
00031   float yhigh = yCentreOfStripPlane() + yExtentOfStripPlane()/2. ;
00032   
00033   return std::pair<float, float>(ylow, yhigh);
00034 }
00035 
00036 
00037 // op<< is not a member
00038 
00039 #include <iostream>
00040 
00041 std::ostream& operator<<( std::ostream& os, const CSCStripTopology& st )
00042 {
00043   st.put( os ) << " isa " << static_cast<const OffsetRadialStripTopology&>( st );
00044   return os;
00045 }