CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/L1Trigger/DTTrackFinder/src/L1MuDTTrackAssParam.cc

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00003 //   Description: Parameters for Track Assembler
00004 //
00005 //
00006 //   $Date: 2007/02/27 11:44:00 $
00007 //   $Revision: 1.2 $
00008 //
00009 //   Author :
00010 //   N. Neumeister            CERN EP
00011 //
00012 //--------------------------------------------------
00013 
00014 #include "L1Trigger/DTTrackFinder/src/L1MuDTTrackAssParam.h"
00015 #include <iostream>
00016 
00017 using namespace std;
00018 
00019 //
00020 // output stream operator for TrackClass
00021 //
00022 ostream& operator<<( ostream& s, TrackClass tc) {
00023 
00024   switch ( tc ) {
00025     case T1234: return s << "T1234 ";
00026     case T123:  return s << "T123  ";
00027     case T124:  return s << "T124  ";
00028     case T134:  return s << "T134  ";
00029     case T234:  return s << "T234  ";
00030     case T12:   return s << "T12   ";
00031     case T14:   return s << "T14   ";
00032     case T13:   return s << "T13   ";
00033     case T24:   return s << "T24   ";
00034     case T23:   return s << "T23   ";
00035     case T34:   return s << "T34   ";
00036     default: return s << "UNDEF ";
00037   }
00038 
00039 }
00040 
00041 
00042 //
00043 // convert TrackClass to bitmap
00044 //
00045 const unsigned int tc2bitmap(const TrackClass tc) {
00046 
00047   unsigned int value = 0;
00048 
00049   switch ( tc ) {
00050     case T1234: { value = 15; break; }
00051     case T123:  { value =  7; break; }
00052     case T124:  { value = 11; break; } 
00053     case T134:  { value = 13; break; }
00054     case T234:  { value = 14; break; }
00055     case T12:   { value =  3; break; }
00056     case T14:   { value =  9; break; }
00057     case T13:   { value =  5; break; }
00058     case T24:   { value = 10; break; }
00059     case T23:   { value =  6; break; } 
00060     case T34:   { value = 12; break; }
00061     default:    { value =  0; break; }
00062   }
00063 
00064   return value;
00065 
00066 }
00067 
00068 
00069 //
00070 // convert TrackClass graphical format
00071 //
00072 const string tc2string(const TrackClass tc) {
00073 
00074   string str = "####";
00075 
00076   switch ( tc ) {
00077     case T1234: { str = "****"; break; }
00078     case T123:  { str = "***-"; break; }
00079     case T124:  { str = "**-*"; break; } 
00080     case T134:  { str = "*-**"; break; }
00081     case T234:  { str = "-***"; break; }
00082     case T12:   { str = "**--"; break; }
00083     case T14:   { str = "*--*"; break; }
00084     case T13:   { str = "*-*-"; break; }
00085     case T24:   { str = "-*-*"; break; }
00086     case T23:   { str = "-**-"; break; } 
00087     case T34:   { str = "--**"; break; }
00088     default:    { str = "UNDEF"; break; }
00089   }
00090 
00091   return str;
00092 
00093 }