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