CMS 3D CMS Logo

DTLocalTrigger.cc
Go to the documentation of this file.
1 
8 
9 using namespace std;
10 
11 DTLocalTrigger::DTLocalTrigger(int eventBx, int bx, int data) : theEventBX(eventBx), theBX(bx), theData(data) {}
12 
13 DTLocalTrigger::DTLocalTrigger() : theEventBX(0), theBX(0), theData(0) {}
14 
15 // Comparison
17  if (theBX != trig.bx() || this->quality() != trig.quality())
18  return false;
19  return true;
20 }
21 
22 // Getters
23 
24 uint16_t DTLocalTrigger::bx() const { return theBX; }
25 
26 uint16_t DTLocalTrigger::quality() const { return ((theData & 0xE) >> 1); }
27 uint16_t DTLocalTrigger::trTheta() const { return ((theData & 0x30) >> 4); }
28 
29 bool DTLocalTrigger::secondTrack() const { return (theData & 0x1); }
30 bool DTLocalTrigger::trOut() const { return ((theData & 0x40) >> 6); }
31 
32 // Setters ??
33 
34 // Debug
35 
36 void DTLocalTrigger::print() const {
37  cout << " trigger at BX " << bx() << ": " << theData;
38  if (secondTrack())
39  cout << " IT IS A SECOND TRACK !! ";
40  cout << " Quality " << quality();
41  if (trTheta() == 1)
42  cout << " with a low Theta trigger ";
43  if (trTheta() == 3)
44  cout << " with a high Theta trigger ";
45  if (trOut())
46  cout << " Trigger Out set ";
47  cout << endl;
48 }
49 
50 uint16_t DTLocalTrigger::eventBx() const { return theEventBX; }
bool trOut() const
uint16_t theData
uint16_t quality() const
bool secondTrack() const
uint16_t theEventBX
void print() const
Print content of trigger.
bool operator==(const DTLocalTrigger &trig) const
triggers are equal if they are in the same chamber and have same BX count (??)
DTLocalTrigger()
Default construction.
uint16_t eventBx() const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
uint16_t trTheta() const
uint16_t bx() const