1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#ifndef CSCWireDigi_CSCWireDigi_h
#define CSCWireDigi_CSCWireDigi_h
/**\class CSCWireDigi
*
* Digi for CSC anode wires.
*
*/
#include <vector>
#include <iosfwd>
#include <cstdint>
class CSCWireDigi {
public:
/// Constructors
CSCWireDigi(int wire, unsigned int tbinb); /// wiregroup#, tbin bit word
CSCWireDigi(); /// default
/// return wiregroup number. counts from 1.
int getWireGroup() const { return wire_; }
/// return BX assigned for the wire group (16 upper bits from the wire group number)
int getWireGroupBX() const { return wireBX_; }
/// return BX-wiregroup number combined
/// (16 upper bits - BX + 16 lower bits - wire group number)
int getBXandWireGroup() const { return wireBXandWires_; }
/// return the word with time bins bits
unsigned int getTimeBinWord() const { return tbinb_; }
/// return tbin number, (obsolete, use getTimeBin() instead)
int getBeamCrossingTag() const;
/// return first tbin ON number
int getTimeBin() const;
/// return vector of time bins ON
std::vector<int> getTimeBinsOn() const;
/// Print content of digi
void print() const;
/// set wiregroup number
void setWireGroup(unsigned int wiregroup) { wire_ = wiregroup; }
private:
int wire_;
uint32_t tbinb_;
/// BX in the wire digis (16 upper bits from the wire group number)
int wireBXandWires_;
int wireBX_;
};
std::ostream& operator<<(std::ostream& o, const CSCWireDigi& digi);
#endif
|