CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CSCWireHit.cc
Go to the documentation of this file.
2 #include <iostream>
3 
5  : theDetId(), theWireHitPosition(), theWgroups(), theWireHitTmax(), theDeadWG(), theTimeBinsOn(0) {
6  theWgroupsHighBits.clear();
7  for (int i = 0; i < (int)theWgroups.size(); i++)
8  theWgroupsHighBits.push_back((theWgroups[i] >> 16) & 0x0000FFFF);
9  theWgroupsLowBits.clear();
10  for (int i = 0; i < (int)theWgroups.size(); i++)
11  theWgroupsLowBits.push_back(theWgroups[i] & 0x0000FFFF);
12 }
13 
15  const float& wHitPos,
16  ChannelContainer& wgroups,
17  const int& tmax,
18  const short int& deadWG,
19  const std::vector<int>& timeBinsOn)
20  : theDetId(id),
21  theWireHitPosition(wHitPos),
22  theWgroups(wgroups),
23  theWireHitTmax(tmax),
24  theDeadWG(deadWG),
25  theTimeBinsOn(timeBinsOn) {
26  theWgroupsHighBits.clear();
27  for (int i = 0; i < (int)theWgroups.size(); i++)
28  theWgroupsHighBits.push_back((theWgroups[i] >> 16) & 0x0000FFFF);
29  theWgroupsLowBits.clear();
30  for (int i = 0; i < (int)theWgroups.size(); i++)
31  theWgroupsLowBits.push_back(theWgroups[i] & 0x0000FFFF);
32 }
33 
35 
37 void CSCWireHit::print() const {
38  std::cout << " CSCWireHit in CSC Detector: " << std::dec << cscDetId() << std::endl;
39  std::cout << " wHitPos: " << wHitPos() << std::endl;
40  std::cout << " BX + WireGroups combined: ";
41  for (int i = 0; i < (int)wgroupsBXandWire().size(); i++) {
42  std::cout //std::dec << wgroups()[i]
43  << "HEX: " << std::hex << wgroupsBXandWire()[i] << std::hex << " ";
44  }
45  std::cout << std::endl;
46  std::cout << " WireGroups: ";
47  for (int i = 0; i < (int)wgroups().size(); i++) {
48  std::cout << std::dec << wgroups()[i] << " ("
49  << "HEX: " << std::hex << wgroups()[i] << ")"
50  << " ";
51  }
52  std::cout << " BX#: ";
53  for (int i = 0; i < (int)wgroupsBX().size(); i++) {
54  std::cout << std::dec << wgroupsBX()[i] << " ("
55  << "HEX: " << std::hex << wgroupsBX()[i] << ")"
56  << " ";
57  }
58 
59  std::cout << std::endl;
60  std::cout << " TMAX: " << std::dec << tmax() << std::endl;
61  std::cout << " Dead WG: " << deadWG() << std::endl;
62  std::cout << " Time bins on: ";
63  for (int i = 0; i < (int)timeBinsOn().size(); i++)
64  std::cout << timeBinsOn()[i] << " ";
65  std::cout << std::endl;
66 }
CSCDetId cscDetId() const
Position of the wire hit in CSC.
Definition: CSCWireHit.h:35
ChannelContainer wgroups() const
The wire groups used for forming the cluster.
Definition: CSCWireHit.h:42
ChannelContainer wgroupsBX() const
The BX number.
Definition: CSCWireHit.h:45
std::vector< int > timeBinsOn() const
Vector of time bins ON for central wire digi, lower of center pair if even number.
Definition: CSCWireHit.h:57
float wHitPos() const
The wire hit position expressed in terms of wire #.
Definition: CSCWireHit.h:38
ChannelContainer theWgroupsLowBits
to extract BX
Definition: CSCWireHit.h:67
ChannelContainer theWgroups
Definition: CSCWireHit.h:65
ChannelContainer wgroupsBXandWire() const
The BX + wire group number.
Definition: CSCWireHit.h:48
int tmax() const
The timing for the wire hit.
Definition: CSCWireHit.h:51
std::vector< int > ChannelContainer
Definition: CSCWireHit.h:19
ChannelContainer theWgroupsHighBits
BX and wire group number combined.
Definition: CSCWireHit.h:66
static const double tmax[3]
void print() const
Print content of the wirehit.
Definition: CSCWireHit.cc:37
tuple cout
Definition: gather_cfg.py:144
short int deadWG() const
a dead WG in the cluster?
Definition: CSCWireHit.h:54