File indexing completed on 2023-10-25 09:54:19
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include "L1Trigger/DTTraco/interface/DTTracoTrigData.h"
0020
0021
0022
0023
0024
0025
0026
0027
0028 #include <iostream>
0029
0030 using namespace std;
0031
0032
0033
0034
0035 DTTracoTrigData::DTTracoTrigData(DTTracoId tracoid, int step) : _tracoid(tracoid), _step(step) { clear(); }
0036
0037
0038
0039
0040
0041 int DTTracoTrigData::qdec() const {
0042
0043 if (_codeIn == 8 && _codeOut == 8)
0044 return 6;
0045 if (_codeIn == 8 && _codeOut == 0)
0046 return 2;
0047 if (_codeIn == 0 && _codeOut == 8)
0048 return 3;
0049 if (_codeIn > 0 && _codeOut == 8)
0050 return 5;
0051 if (_codeIn == 8 && _codeOut > 0)
0052 return 5;
0053 if (_codeIn > 0 && _codeOut > 0)
0054 return 4;
0055 if (_codeIn > 0 && _codeOut == 0)
0056 return 0;
0057 if (_codeIn == 0 && _codeOut > 0)
0058 return 1;
0059 return 7;
0060 }
0061
0062 void DTTracoTrigData::print() const {
0063 cout << "TRACO Id="
0064 << " ( " << _tracoid.wheel();
0065 cout << " , " << _tracoid.station();
0066 cout << " , " << _tracoid.sector();
0067 cout << " # " << _tracoid.traco();
0068 cout << " ) "
0069 << " step: " << step();
0070
0071 cout << dec << " code=" << code() << " K=" << K() << " X=" << X();
0072 cout << dec << " PVcode=" << pvCode() << " PVk=" << pvK() << " qdec=" << qdec();
0073 cout << " qdec=" << qdec();
0074 cout << hex << " psiR=" << psiR() << " DeltaPsiR=" << DeltaPsiR() << dec << endl;
0075 if (isFirst())
0076 cout << " I trk";
0077 if (!isFirst())
0078 cout << " II trk";
0079 cout << " (";
0080 if (!pvCorr())
0081 cout << "NOT ";
0082 cout << "correlated)" << endl;
0083 }