8 : nAFEBs_(header.nLCTChipRead()), nTimeBins_(header.NTBins())
18 const unsigned short *buf)
19 : nAFEBs_(header.nLCTChipRead()), nTimeBins_(header.NTBins())
32 static unsigned short int layerParts[7] = { 3, 3, 4, 6, 6, 8,10};
33 static unsigned short int wireGroups[7] = {32,32,48,64,64,96,112};
43 std::vector<CSCWireDigi> digis;
47 for(
int layerPart = 0; layerPart <
layerParts_; ++layerPart) {
54 if(frame.
data() != 0) {
56 tbinbits=tbinbits + (1<<tbin);
61 wireGroup = (layerPart*12+
j)+1;
64 wireGroup = wireGroup | (wireGroupBX << 16);
66 LogTrace (
"CSCAnodeData|CSCRawToDigi") <<
"Layer " << layer <<
" " << digi;
67 digis.push_back(digi);
97 unsigned layerPart = (wireGroup-1) / 12;
98 unsigned wireInPart = (wireGroup-1) % 12;
101 for(std::vector<int>::const_iterator timeBinOn = timeBinsOn.begin();
102 timeBinOn != timeBinsOn.end(); ++timeBinOn)
109 edm::LogError(
"CSCAnodeData|CSCRawToDigi") <<
"Bad Wire Number for this digi.";
113 if((*timeBinOn) >= 0 && (*timeBinOn) <
nTimeBins_)
122 LogTrace(
"CSCAnodeData|CSCRawToDigi")<<
"warning: not saving anode data in bx " << *timeBinOn
123 <<
": out of range ";
135 anodeData.
add(wireDigi, 1);
136 anodeData.
add(wireDigi, 6);
138 std::vector<CSCWireDigi> wires1 = anodeData.
wireDigis(1);
139 std::vector<CSCWireDigi> wires6 = anodeData.
wireDigis(6);
141 assert(wires1.size() == 1);
142 assert(wires6.size() == 1);
143 assert(wires1[0].getWireGroup() == wireGroup);
144 assert(wires6[0].getWireGroup() == wireGroup);
145 assert(wires1[0].getTimeBin() == timeBin);
146 assert(wires6[0].getTimeBin() == timeBin);
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< 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]
virtual unsigned short int sizeInWords() const
the amount of the input binary buffer read, in 16-bit words
unsigned short int sizeInWords2007_
virtual void add(const CSCWireDigi &, int layer)
unsigned short int maxWireGroups_
number of layer parts in the ALCT
void addHit(unsigned wireGroup)
unsigned short data() const
unsigned short int nTimeBins_
unsigned short int layerParts_
virtual std::vector< CSCWireDigi > wireDigis(int layer) const
input layer is from 1 to 6