Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:54:19

0001 //-------------------------------------------------
0002 //
0003 //   Class: DTTracoTrigData
0004 //
0005 //   Description: TRACO Trigger Data
0006 //
0007 //
0008 //   Author List:
0009 //   C. Grandi
0010 //   Modifications:
0011 //   22/VI/04 SV: last trigger code update
0012 //
0013 //
0014 //--------------------------------------------------
0015 
0016 //-----------------------
0017 // This Class's Header --
0018 //-----------------------
0019 #include "L1Trigger/DTTraco/interface/DTTracoTrigData.h"
0020 
0021 //-------------------------------
0022 // Collaborating Class Headers --
0023 //-------------------------------
0024 
0025 //---------------
0026 // C++ Headers --
0027 //---------------
0028 #include <iostream>
0029 
0030 using namespace std;
0031 
0032 //----------------
0033 // Constructors --
0034 //----------------
0035 DTTracoTrigData::DTTracoTrigData(DTTracoId tracoid, int step) : _tracoid(tracoid), _step(step) { clear(); }
0036 
0037 //--------------
0038 // Operations --
0039 //--------------
0040 
0041 int DTTracoTrigData::qdec() const {
0042   // This is consistent with memo
0043   if (_codeIn == 8 && _codeOut == 8)
0044     return 6;  // HH
0045   if (_codeIn == 8 && _codeOut == 0)
0046     return 2;  // Hinner
0047   if (_codeIn == 0 && _codeOut == 8)
0048     return 3;  // Houter
0049   if (_codeIn > 0 && _codeOut == 8)
0050     return 5;  // LH
0051   if (_codeIn == 8 && _codeOut > 0)
0052     return 5;  // HL
0053   if (_codeIn > 0 && _codeOut > 0)
0054     return 4;  // LL
0055   if (_codeIn > 0 && _codeOut == 0)
0056     return 0;  // Linner
0057   if (_codeIn == 0 && _codeOut > 0)
0058     return 1;  // Louter
0059   return 7;    // null
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 }