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; }
gather_cfg.cout
cout
Definition: gather_cfg.py:144
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
DTLocalTrigger::print
void print() const
Print content of trigger.
Definition: DTLocalTrigger.cc:36
DTLocalTrigger
Definition: DTLocalTrigger.h:15
DTLocalTrigger::theBX
uint16_t theBX
Definition: DTLocalTrigger.h:38
DTLocalTrigger::theData
uint16_t theData
Definition: DTLocalTrigger.h:39
DTLocalTrigger::trTheta
uint16_t trTheta() const
Definition: DTLocalTrigger.cc:27
DTLocalTrigger::operator==
bool operator==(const DTLocalTrigger &trig) const
triggers are equal if they are in the same chamber and have same BX count (??)
Definition: DTLocalTrigger.cc:16
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
DTLocalTrigger::secondTrack
bool secondTrack() const
Definition: DTLocalTrigger.cc:29
DTLocalTrigger::bx
uint16_t bx() const
Definition: DTLocalTrigger.cc:24
DTLocalTrigger::DTLocalTrigger
DTLocalTrigger()
Default construction.
Definition: DTLocalTrigger.cc:13
DTLocalTrigger.h
DTLocalTrigger::theEventBX
uint16_t theEventBX
Definition: DTLocalTrigger.h:37
ClusterTask_cfi.trig
trig
Definition: ClusterTask_cfi.py:398
DTLocalTrigger::trOut
bool trOut() const
Definition: DTLocalTrigger.cc:30
std
Definition: JetResolutionObject.h:76
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
DTLocalTrigger::eventBx
uint16_t eventBx() const
Definition: DTLocalTrigger.cc:50
DTLocalTrigger::quality
uint16_t quality() const
Definition: DTLocalTrigger.cc:26