9 : nAFEBs_(header.nLCTChipRead()), nTimeBins_(header.NTBins()) {
17 : nAFEBs_(header.nLCTChipRead()), nTimeBins_(header.NTBins()) {
28 static const unsigned short int layerParts[7] = {3, 3, 4, 6, 6, 8, 10};
29 static const unsigned short int wireGroups[7] = {32, 32, 48, 64, 64, 96, 112};
38 std::vector<CSCWireDigi> digis;
39 uint32_t tbinbits = 0;
40 uint32_t wireGroup = 0;
42 for (
int layerPart = 0; layerPart <
layerParts_; ++layerPart) {
47 for (
int tbin = 0; tbin <
nTimeBins_; ++tbin) {
49 if (frame.
data() != 0) {
51 tbinbits = tbinbits + (1 << tbin);
56 wireGroup = (layerPart * 12 +
j) + 1;
59 wireGroup = wireGroup | (wireGroupBX << 16);
61 LogTrace(
"CSCAnodeData|CSCRawToDigi") <<
"Layer " << layer <<
" " << digi;
62 digis.push_back(digi);
87 unsigned layerPart = (wireGroup - 1) / 12;
88 unsigned wireInPart = (wireGroup - 1) % 12;
91 for (std::vector<int>::const_iterator timeBinOn = timeBinsOn.begin(); timeBinOn != timeBinsOn.end(); ++timeBinOn) {
96 edm::LogError(
"CSCAnodeData|CSCRawToDigi") <<
"Bad Wire Number for this digi.";
100 if ((*timeBinOn) >= 0 && (*timeBinOn) <
nTimeBins_) {
106 LogTrace(
"CSCAnodeData|CSCRawToDigi")
107 <<
"warning: not saving anode data in bx " << *timeBinOn <<
": out of range ";
118 anodeData.
add(wireDigi, 1);
119 anodeData.
add(wireDigi, 6);
121 std::vector<CSCWireDigi> wires1 = anodeData.
wireDigis(1);
122 std::vector<CSCWireDigi> wires6 = anodeData.
wireDigis(6);
124 assert(wires1.size() == 1);
125 assert(wires6.size() == 1);
126 assert(wires1[0].getWireGroup() == wireGroup);
127 assert(wires6[0].getWireGroup() == wireGroup);
128 assert(wires1[0].getTimeBin() == timeBin);
129 assert(wires6[0].getTimeBin() == timeBin);
std::vector< CSCWireDigi > wireDigis(int layer) const override
input layer is from 1 to 6
void init(const CSCALCTHeader &)
Log< level::Error, false > LogError
CSCAnodeData2007(const CSCALCTHeader &)
a blank one, for Monte Carlo
constexpr std::array< uint8_t, layerIndexSize > layer
bool isHit(unsigned wireGroup) const
given a wiregroup between 0 and 11, it tells whether this bit was on
unsigned short int sizeInWords() const override
the amount of the input binary buffer read, in 16-bit words
std::vector< int > getTimeBinsOn() const
return vector of time bins ON
int index(int tbin, int layer, int layerPart) const
CSCAnodeDataFrame2007 findFrame(int tbin, int layer, int layerPart) const
unsigned int alctBX_
number of wiregroups in the ALCT
int getWireGroup() const
default
unsigned short theDataFrames[MAXFRAMES]
unsigned short int sizeInWords2007_
unsigned short int maxWireGroups_
number of layer parts in the ALCT
void addHit(unsigned wireGroup)
unsigned short data() const
void add(const CSCWireDigi &, int layer) override
unsigned short int nTimeBins_
unsigned short int layerParts_