CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCALCTHeader2006.cc
Go to the documentation of this file.
3 
4 constexpr int activeFEBsForChamberType[11] = {0,7,7,0xf,7,0x7f, 0xf,0x3f,0xf,0x3f,0xf};
5 constexpr int nTBinsForChamberType[11] = {7,7,7,7,7,7,7,7,7,7,7};
6 
7 
8 CSCALCTHeader2006::CSCALCTHeader2006(int chamberType) { //constructor for digi->raw packing based on header2006
9  // we count from 1 to 10, ME11, ME12, ME13, ME1A, ME21, ME22, ....
10  init();
11  flag_0 = 0xC;
12  flag_1 = 0;
13  reserved_1 = 0;
14  fifoMode = 1;
15  // examiner demands this
16  l1aMatch = 1;
19  nTBins = nTBinsForChamberType[chamberType];
21  //memcpy(theOriginalBuffer, &header2006, header2006.sizeForPacking());
22 
23 }
24 
25 
27 {
28  l1Acc = dmb.l1a();
29  cscID = dmb.dmbID();
30  nTBins = 16;
31  bxnCount = dmb.bxn();
32 }
33 
34 
35 unsigned short CSCALCTHeader2006::nLCTChipRead() const {
36  int count = 0;
37  for(int i=0; i<7; ++i) {
38  if( (lctChipRead>>i) & 1) ++count;
39  }
40  return count;
41 }
42 
43 
44 
45 std::vector<CSCALCTDigi> CSCALCTs2006::ALCTDigis() const
46 {
47  std::vector<CSCALCTDigi> result;
48  result.reserve(2);
49 
56  result.push_back(digi0); result.push_back(digi1);
57  return result;
58 }
59 
60 
61 void CSCALCTs2006::add(const std::vector<CSCALCTDigi> & digis)
62 {
63  //FIXME doesn't do any sorting
64  if(digis.size() > 0) addALCT0(digis[0]);
65  if(digis.size() > 1) addALCT1(digis[1]);
66 }
67 
69 {
70  alct0_valid = digi.isValid();
71  alct0_quality = digi.getQuality();
72  alct0_accel = digi.getAccelerator();
74  alct0_key_wire = digi.getKeyWG();
75  // probably not right
76  alct0_bxn_low = digi.getBX();
77 }
78 
79 
81 {
82  alct1_valid = digi.isValid();
83  alct1_quality = digi.getQuality();
84  alct1_accel = digi.getAccelerator();
86  alct1_key_wire = digi.getKeyWG();
87  // probably not right
88  alct1_bxn_low = digi.getBX();
89 }
90 
unsigned alct0_pattern
int i
Definition: DBlmapReader.cc:9
unsigned bxnCount
full bunch crossing number
unsigned fifoMode
see the FIFO_MODE enum
unsigned l1a() const
Definition: CSCDMBHeader.cc:74
unsigned alct0_valid
unsigned alct1_pattern
bool isValid() const
check ALCT validity (1 - valid ALCT)
Definition: CSCALCTDigi.h:30
unsigned alct1_key_wire
void addALCT0(const CSCALCTDigi &digi)
void setEventInformation(const CSCDMBHeader &)
unsigned alct1_bxn_high
unsigned alct1_accel
unsigned alct1_valid
2nd LCT lower 15 bits
constexpr int activeFEBsForChamberType[11]
constexpr int nTBinsForChamberType[11]
unsigned flag_1
DDU+LCT special word flags.
void addALCT1(const CSCALCTDigi &digi)
tuple result
Definition: query.py:137
unsigned nTBins
of 25 ns time bins in the raw dump
int getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
Definition: CSCALCTDigi.h:48
unsigned alct0_key_wire
unsigned bxn() const
Definition: CSCDMBHeader.cc:61
unsigned reserved_1
reserved, set to 0
unsigned alct0_bxn_high
int getQuality() const
return quality of a pattern
Definition: CSCALCTDigi.h:33
int getAccelerator() const
Definition: CSCALCTDigi.h:37
std::vector< CSCALCTDigi > ALCTDigis() const
unsigned alct0_quality
void add(const std::vector< CSCALCTDigi > &digis)
should try to sort, but doesn&#39;t for now
unsigned l1Acc
l1 accept counter
unsigned dmbID() const
Definition: CSCDMBHeader.cc:56
unsigned alct1_quality
unsigned lctChipRead
LCT chips read out in raw hit dump.
unsigned activeFEBs
LCT chips with ADB hits.
unsigned alct0_accel
unsigned cscID
chamber ID number
unsigned alct1_bxn_low
unsigned l1aMatch
exteran L1A arrived in L1A window
unsigned alct0_bxn_low
int getKeyWG() const
return key wire group
Definition: CSCALCTDigi.h:45
int getCollisionB() const
Definition: CSCALCTDigi.h:42
#define constexpr
unsigned flag_0
should be &#39;01100&#39;, so it&#39;ll be a 6xxx in the ASCII dump
unsigned short nLCTChipRead() const
CSCALCTHeader2006()
this struct contains all 2006 ALCT Header words except ALCTs