8 : nAFEBs_(header.nLCTChipRead()), nTimeBins_(header.NTBins()) {
27 static const unsigned short int layerParts[7] = {3, 3, 4, 6, 6, 8, 10};
28 static const unsigned short int wireGroups[7] = {32, 32, 48, 64, 64, 96, 112};
37 std::vector<CSCWireDigi> digis;
38 uint32_t tbinbits = 0;
39 uint32_t wireGroup = 0;
41 for (
int layerPart = 0; layerPart <
layerParts_; ++layerPart) {
46 for (
int tbin = 0; tbin <
nTimeBins_; ++tbin) {
48 if (frame.
data() != 0) {
50 tbinbits = tbinbits + (1 << tbin);
55 wireGroup = (layerPart * 12 +
j) + 1;
58 wireGroup = wireGroup | (wireGroupBX << 16);
60 LogTrace(
"CSCAnodeData|CSCRawToDigi") <<
"Layer " << layer <<
" " << digi;
61 digis.push_back(digi);
86 unsigned layerPart = (wireGroup - 1) / 12;
87 unsigned wireInPart = (wireGroup - 1) % 12;
90 for (std::vector<int>::const_iterator timeBinOn = timeBinsOn.begin(); timeBinOn != timeBinsOn.end(); ++timeBinOn) {
95 edm::LogError(
"CSCAnodeData|CSCRawToDigi") <<
"Bad Wire Number for this digi.";
99 if ((*timeBinOn) >= 0 && (*timeBinOn) <
nTimeBins_) {
105 LogTrace(
"CSCAnodeData|CSCRawToDigi")
106 <<
"warning: not saving anode data in bx " << *timeBinOn <<
": out of range ";
117 anodeData.
add(wireDigi, 1);
118 anodeData.
add(wireDigi, 6);
120 std::vector<CSCWireDigi> wires1 = anodeData.
wireDigis(1);
121 std::vector<CSCWireDigi> wires6 = anodeData.
wireDigis(6);
123 assert(wires1.size() == 1);
124 assert(wires6.size() == 1);
125 assert(wires1[0].getWireGroup() == wireGroup);
126 assert(wires6[0].getWireGroup() == wireGroup);
127 assert(wires1[0].getTimeBin() == timeBin);
128 assert(wires6[0].getTimeBin() == timeBin);
unsigned short int sizeInWords() const override
the amount of the input binary buffer read, in 16-bit words
void init(const CSCALCTHeader &)
CSCAnodeData2007(const CSCALCTHeader &)
a blank one, for Monte Carlo
bool isHit(unsigned wireGroup) const
given a wiregroup between 0 and 11, it tells whether this bit was on
std::vector< CSCWireDigi > wireDigis(int layer) const override
input layer is from 1 to 6
std::vector< int > getTimeBinsOn() const
return vector of time bins ON
int index(int tbin, int layer, int layerPart) const
unsigned short int nAFEBs_
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_