CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/L1Trigger/DTTraco/src/DTTracoTrigData.cc

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00003 //   Class: DTTracoTrigData
00004 //
00005 //   Description: TRACO Trigger Data
00006 //
00007 //
00008 //   Author List:
00009 //   C. Grandi
00010 //   Modifications: 
00011 //   22/VI/04 SV: last trigger code update
00012 //
00013 //
00014 //--------------------------------------------------
00015 
00016 //-----------------------
00017 // This Class's Header --
00018 //-----------------------
00019 #include "L1Trigger/DTTraco/interface/DTTracoTrigData.h"
00020 
00021 //-------------------------------
00022 // Collaborating Class Headers --
00023 //-------------------------------
00024 
00025 //---------------
00026 // C++ Headers --
00027 //---------------
00028 #include <iostream>
00029 
00030 using namespace std;
00031 
00032 //----------------
00033 // Constructors --
00034 //----------------
00035 DTTracoTrigData::DTTracoTrigData(DTTracoId tracoid, int step)
00036                                              : _tracoid(tracoid), _step(step) {
00037   clear();
00038 }
00039 
00040 
00041 //--------------
00042 // Operations --
00043 //--------------
00044 
00045 int
00046 DTTracoTrigData::qdec() const {
00047   // This is consistent with memo
00048   if (_codeIn==8 && _codeOut==8) return 6; // HH
00049   if (_codeIn==8 && _codeOut==0) return 2; // Hinner
00050   if (_codeIn==0 && _codeOut==8) return 3; // Houter
00051   if (_codeIn >0 && _codeOut==8) return 5; // LH
00052   if (_codeIn==8 && _codeOut> 0) return 5; // HL
00053   if (_codeIn> 0 && _codeOut> 0) return 4; // LL
00054   if (_codeIn> 0 && _codeOut==0) return 0; // Linner
00055   if (_codeIn==0 && _codeOut> 0) return 1; // Louter
00056   return 7;                                // null
00057 }
00058 
00059 void
00060 DTTracoTrigData::print() const {
00061   cout << "TRACO Id=" << " ( " << _tracoid.wheel()   ;
00062   cout                << " , " << _tracoid.station() ;
00063   cout                << " , " << _tracoid.sector()  ;
00064   cout                << " # " << _tracoid.traco()   ;
00065   cout                << " ) " << " step: " << step();
00066 
00067   cout << dec << " code=" << code() << " K=" << K() << " X=" << X();
00068   cout << dec << " PVcode=" << pvCode() << " PVk=" << pvK() << " qdec=" << qdec();
00069   cout << " qdec=" << qdec();
00070   cout << hex << " psiR=" << psiR() << "  DeltaPsiR=" << DeltaPsiR() << dec << endl;
00071   if(isFirst())
00072     cout << " I trk"; 
00073   if(!isFirst())
00074     cout << " II trk"; 
00075   cout << " (";
00076   if(!pvCorr()) cout << "NOT ";
00077   cout << "correlated)" << endl;
00078 }