00001 #include <DataFormats/CSCRecHit/interface/CSCRecHit2D.h> 00002 #include <iostream> 00003 00004 CSCRecHit2D::CSCRecHit2D() : 00005 theLocalPosition(0.,0.), 00006 theLocalError(0.,0.,0.), 00007 theStrips( ChannelContainer() ), 00008 theADCs( ADCContainer() ), 00009 theWireGroups( ChannelContainer() ), 00010 theTpeak( -999. ), 00011 thePositionWithinStrip(-999.), 00012 theErrorWithinStrip(-999.), 00013 theQuality( 0 ), theBadStrip( 0 ), theBadWireGroup( 0 ) 00014 {} 00015 00016 CSCRecHit2D::CSCRecHit2D( const CSCDetId& id, 00017 const LocalPoint& pos, 00018 const LocalError& err, 00019 const ChannelContainer& channels, 00020 const ADCContainer& adcs, 00021 const ChannelContainer& wgroups, 00022 float tpeak, 00023 float posInStrip, 00024 float errInStrip, 00025 int quality, short int badStrip, short int badWireGroup ): 00026 RecHit2DLocalPos( id ), 00027 theLocalPosition( pos ), 00028 theLocalError( err ), 00029 theStrips( channels ), 00030 theADCs( adcs ), 00031 theWireGroups( wgroups ), 00032 theTpeak( tpeak ), 00033 thePositionWithinStrip( posInStrip ), 00034 theErrorWithinStrip( errInStrip ), 00035 theQuality( quality ), theBadStrip( badStrip ), theBadWireGroup( badWireGroup ) 00036 {} 00037 00038 CSCRecHit2D::~CSCRecHit2D() {} 00039 00040 std::ostream& operator<<(std::ostream& os, const CSCRecHit2D& rh) { 00041 os << "CSCRecHit2D: local x = " << rh.localPosition().x() << " +/- " << sqrt( rh.localPositionError().xx() ) << 00042 " y = " << rh.localPosition().y() << " +/- " << sqrt( rh.localPositionError().yy() ) << 00043 " in strip X = " << rh.positionWithinStrip() << " +/- = " << rh.errorWithinStrip()<<" quality = "<<rh.quality(); 00044 return os; 00045 }