File indexing completed on 2024-04-06 12:04:02
0001
0002
0003
0004
0005
0006
0007 #include <DataFormats/DTDigi/interface/DTLocalTrigger.h>
0008
0009 using namespace std;
0010
0011 DTLocalTrigger::DTLocalTrigger(int eventBx, int bx, int data) : theEventBX(eventBx), theBX(bx), theData(data) {}
0012
0013 DTLocalTrigger::DTLocalTrigger() : theEventBX(0), theBX(0), theData(0) {}
0014
0015
0016 bool DTLocalTrigger::operator==(const DTLocalTrigger& trig) const {
0017 if (theBX != trig.bx() || this->quality() != trig.quality())
0018 return false;
0019 return true;
0020 }
0021
0022
0023
0024 uint16_t DTLocalTrigger::bx() const { return theBX; }
0025
0026 uint16_t DTLocalTrigger::quality() const { return ((theData & 0xE) >> 1); }
0027 uint16_t DTLocalTrigger::trTheta() const { return ((theData & 0x30) >> 4); }
0028
0029 bool DTLocalTrigger::secondTrack() const { return (theData & 0x1); }
0030 bool DTLocalTrigger::trOut() const { return ((theData & 0x40) >> 6); }
0031
0032
0033
0034
0035
0036 void DTLocalTrigger::print() const {
0037 cout << " trigger at BX " << bx() << ": " << theData;
0038 if (secondTrack())
0039 cout << " IT IS A SECOND TRACK !! ";
0040 cout << " Quality " << quality();
0041 if (trTheta() == 1)
0042 cout << " with a low Theta trigger ";
0043 if (trTheta() == 3)
0044 cout << " with a high Theta trigger ";
0045 if (trOut())
0046 cout << " Trigger Out set ";
0047 cout << endl;
0048 }
0049
0050 uint16_t DTLocalTrigger::eventBx() const { return theEventBX; }