CMS 3D CMS Logo

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