File indexing completed on 2023-03-17 11:19:06
0001 #include <RecoLocalMuon/CSCRecHitD/src/CSCWireHit.h>
0002 #include <iostream>
0003
0004 CSCWireHit::CSCWireHit()
0005 : theDetId(), theWireHitPosition(), theWgroups(), theWireHitTmax(), theDeadWG(), theTimeBinsOn(0) {
0006 theWgroupsHighBits.clear();
0007 for (int i = 0; i < (int)theWgroups.size(); i++)
0008 theWgroupsHighBits.push_back((theWgroups[i] >> 16) & 0x0000FFFF);
0009 theWgroupsLowBits.clear();
0010 for (int i = 0; i < (int)theWgroups.size(); i++)
0011 theWgroupsLowBits.push_back(theWgroups[i] & 0x0000FFFF);
0012 }
0013
0014 CSCWireHit::CSCWireHit(const CSCDetId& id,
0015 const float& wHitPos,
0016 ChannelContainer& wgroups,
0017 const int& tmax,
0018 const short int& deadWG,
0019 const std::vector<int>& timeBinsOn)
0020 : theDetId(id),
0021 theWireHitPosition(wHitPos),
0022 theWgroups(wgroups),
0023 theWireHitTmax(tmax),
0024 theDeadWG(deadWG),
0025 theTimeBinsOn(timeBinsOn) {
0026 theWgroupsHighBits.clear();
0027 for (int i = 0; i < (int)theWgroups.size(); i++)
0028 theWgroupsHighBits.push_back((theWgroups[i] >> 16) & 0x0000FFFF);
0029 theWgroupsLowBits.clear();
0030 for (int i = 0; i < (int)theWgroups.size(); i++)
0031 theWgroupsLowBits.push_back(theWgroups[i] & 0x0000FFFF);
0032 }
0033
0034 CSCWireHit::~CSCWireHit() {}
0035
0036
0037 void CSCWireHit::print() const {
0038 std::cout << " CSCWireHit in CSC Detector: " << std::dec << cscDetId() << std::endl;
0039 std::cout << " wHitPos: " << wHitPos() << std::endl;
0040 std::cout << " BX + WireGroups combined: ";
0041 for (int i = 0; i < (int)wgroupsBXandWire().size(); i++) {
0042 std::cout
0043 << "HEX: " << std::hex << wgroupsBXandWire()[i] << std::hex << " ";
0044 }
0045 std::cout << std::endl;
0046 std::cout << " WireGroups: ";
0047 for (int i = 0; i < (int)wgroups().size(); i++) {
0048 std::cout << std::dec << wgroups()[i] << " ("
0049 << "HEX: " << std::hex << wgroups()[i] << ")"
0050 << " ";
0051 }
0052 std::cout << " BX#: ";
0053 for (int i = 0; i < (int)wgroupsBX().size(); i++) {
0054 std::cout << std::dec << wgroupsBX()[i] << " ("
0055 << "HEX: " << std::hex << wgroupsBX()[i] << ")"
0056 << " ";
0057 }
0058
0059 std::cout << std::endl;
0060 std::cout << " TMAX: " << std::dec << tmax() << std::endl;
0061 std::cout << " Dead WG: " << deadWG() << std::endl;
0062 std::cout << " Time bins on: ";
0063 for (int i = 0; i < (int)timeBinsOn().size(); i++)
0064 std::cout << timeBinsOn()[i] << " ";
0065 std::cout << std::endl;
0066 }