Go to the documentation of this file.00001 #include <RecoLocalMuon/CSCRecHitD/src/CSCWireHit.h>
00002 #include <iostream>
00003
00004 CSCWireHit::CSCWireHit() :
00005 theDetId(),
00006 theWireHitPosition(),
00007 theWgroups(),
00008 theWireHitTmax(),
00009 theDeadWG(),
00010 theTimeBinsOn(0)
00011 {
00012 theWgroupsHighBits.clear();
00013 for(int i=0; i<(int)theWgroups.size(); i++)
00014 theWgroupsHighBits.push_back((theWgroups[i] >> 16) & 0x0000FFFF);
00015 theWgroupsLowBits.clear();
00016 for(int i=0; i<(int)theWgroups.size(); i++)
00017 theWgroupsLowBits.push_back(theWgroups[i] & 0x0000FFFF);
00018 }
00019
00020 CSCWireHit::CSCWireHit( const CSCDetId& id,
00021 const float& wHitPos,
00022 ChannelContainer& wgroups,
00023 const int& tmax,
00024 const short int& deadWG,
00025 const std::vector <int>& timeBinsOn ) :
00026 theDetId( id ),
00027 theWireHitPosition( wHitPos ),
00028 theWgroups( wgroups ),
00029 theWireHitTmax ( tmax ),
00030 theDeadWG ( deadWG ),
00031 theTimeBinsOn( timeBinsOn )
00032 {
00033 theWgroupsHighBits.clear();
00034 for(int i=0; i<(int)theWgroups.size(); i++)
00035 theWgroupsHighBits.push_back((theWgroups[i] >> 16) & 0x0000FFFF);
00036 theWgroupsLowBits.clear();
00037 for(int i=0; i<(int)theWgroups.size(); i++)
00038 theWgroupsLowBits.push_back(theWgroups[i] & 0x0000FFFF);
00039 }
00040
00041 CSCWireHit::~CSCWireHit() {}
00042
00044 void
00045 CSCWireHit::print() const {
00046 std::cout << " CSCWireHit in CSC Detector: " << std::dec << cscDetId() << std::endl;
00047 std::cout << " wHitPos: " << wHitPos() << std::endl;
00048 std::cout << " BX + WireGroups combined: ";
00049 for (int i=0; i<(int)wgroupsBXandWire().size(); i++) {std::cout
00050 << "HEX: " << std::hex << wgroupsBXandWire()[i] << std::hex << " ";
00051 }
00052 std::cout << std::endl;
00053 std::cout << " WireGroups: ";
00054 for (int i=0; i<(int)wgroups().size(); i++) {std::cout << std::dec << wgroups()[i]
00055 << " (" << "HEX: " << std::hex << wgroups()[i] << ")" << " ";
00056 }
00057 std::cout << " BX#: ";
00058 for (int i=0; i<(int)wgroupsBX().size(); i++) {std::cout << std::dec << wgroupsBX()[i]
00059 << " (" << "HEX: " << std::hex << wgroupsBX()[i] << ")" << " ";
00060 }
00061
00062 std::cout << std::endl;
00063 std::cout << " TMAX: " << std::dec << tmax() << std::endl;
00064 std::cout << " Dead WG: " << deadWG() << std::endl;
00065 std::cout << " Time bins on: ";
00066 for (int i=0; i<(int) timeBinsOn().size(); i++) std::cout << timeBinsOn()[i] << " ";
00067 std::cout << std::endl;
00068 }