10 unsigned packedChip = ((
chip & 1) + 2 * (
chip > 1));
15 : nAFEBs_(
header.nLCTChipRead()), nTimeBins_(
header.NTBins()) {
19 for (
int afeb = 0; afeb <
nAFEBs_; ++afeb) {
20 for (
int tbin = 0; tbin <
nTimeBins_; ++tbin) {
22 for (
int halfLayer = 0; halfLayer < 2; ++halfLayer) {
34 : nAFEBs_(
header.nLCTChipRead()), nTimeBins_(
header.NTBins()) {
46 std::vector<CSCWireDigi> digis;
47 uint32_t tbinbits = 0;
48 uint16_t wireGroup = 0;
49 for (
int afeb = 0; afeb <
nAFEBs_; ++afeb) {
50 for (
int halfLayer = 0; halfLayer < 2; ++halfLayer) {
51 for (
int j = 0;
j < 8; ++
j) {
52 for (
int tbin = 0; tbin <
nTimeBins_; ++tbin) {
55 if (
frame.data() != 0) {
57 tbinbits = tbinbits + (1 << tbin);
62 wireGroup = (afeb * 16 + halfLayer * 8 +
j) + 1;
64 wireGroup = wireGroup | (wireGroupBX << 16);
66 LogTrace(
"CSCAnodeData|CSCRawToDigi") <<
"Layer " <<
layer <<
" " << digi;
67 digis.push_back(digi);
80 int alctBoard = (wireGroup - 1) / 16;
81 int localGroup = (wireGroup - 1) % 16;
87 edm::LogError(
"CSCAnodeData|CSCRawToDigi") <<
"Bad Wire Number for this digi.";
93 unsigned halfLayer = (localGroup > 7);
98 LogTrace(
"CSCAnodeData|CSCRawToDigi") <<
"warning: not saving anode data in bx " << bxn <<
": out of range ";
105 frame.addHit(wireBit);
133 anodeData.
add(wireDigi, 1);
134 anodeData.
add(wireDigi, 6);
136 std::vector<CSCWireDigi> wires1 = anodeData.
wireDigis(1);
137 std::vector<CSCWireDigi> wires6 = anodeData.
wireDigis(6);
139 assert(wires1.size() == 1);
140 assert(wires6.size() == 1);
141 assert(wires1[0].getWireGroup() == 10);
142 assert(wires6[0].getWireGroup() == 10);
int index(int afeb, int tbin, int layer) const
the index into theDataFrames
unsigned short frame() const
unsigned short theDataFrames[2700]
we don't know the size at first. Max should be 7 boards * 32 bins * 6 layers * 2
Log< level::Error, false > LogError
unsigned tbin() const
time bin
constexpr std::array< uint8_t, layerIndexSize > layer
unsigned short data() const
CSCAnodeDataFrame2006 rawHit(int afeb, int tbin, int layer, int halfLayer) const
CSCAnodeData2006(const CSCALCTHeader &)
a blank one, for Monte Carlo
int nAFEBs_
in 2007 format the max number of frames is 1860
void add(const CSCWireDigi &, int layer) override
char data[epos_bytes_allocation]
void addHit(int afeb, int tbin, int layer, int halfLayer, unsigned wireBit)
unsigned short int sizeInWords() const override
the amount of the input binary buffer read, in 16-bit words
std::vector< CSCWireDigi > wireDigis(int layer) const override
input layer is from 1 to 6
int getBeamCrossingTag() const
return tbin number, (obsolete, use getTimeBin() instead)
int getWireGroup() const
default