Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-02 03:45:49

0001 //-------------------------------------------------
0002 //
0003 //   Description: Parameters for Track Assembler
0004 //
0005 //
0006 //
0007 //   Author :
0008 //   N. Neumeister            CERN EP
0009 //
0010 //--------------------------------------------------
0011 
0012 #include "L1Trigger/DTTrackFinder/interface/L1MuDTTrackAssParam.h"
0013 #include <iostream>
0014 
0015 using namespace std;
0016 
0017 //
0018 // output stream operator for TrackClass
0019 //
0020 ostream& operator<<(ostream& s, TrackClass tc) {
0021   switch (tc) {
0022     case T1234:
0023       return s << "T1234 ";
0024     case T123:
0025       return s << "T123  ";
0026     case T124:
0027       return s << "T124  ";
0028     case T134:
0029       return s << "T134  ";
0030     case T234:
0031       return s << "T234  ";
0032     case T12:
0033       return s << "T12   ";
0034     case T14:
0035       return s << "T14   ";
0036     case T13:
0037       return s << "T13   ";
0038     case T24:
0039       return s << "T24   ";
0040     case T23:
0041       return s << "T23   ";
0042     case T34:
0043       return s << "T34   ";
0044     default:
0045       return s << "UNDEF ";
0046   }
0047 }
0048 
0049 //
0050 // convert TrackClass to bitmap
0051 //
0052 const unsigned int tc2bitmap(const TrackClass tc) {
0053   unsigned int value = 0;
0054 
0055   switch (tc) {
0056     case T1234: {
0057       value = 15;
0058       break;
0059     }
0060     case T123: {
0061       value = 7;
0062       break;
0063     }
0064     case T124: {
0065       value = 11;
0066       break;
0067     }
0068     case T134: {
0069       value = 13;
0070       break;
0071     }
0072     case T234: {
0073       value = 14;
0074       break;
0075     }
0076     case T12: {
0077       value = 3;
0078       break;
0079     }
0080     case T14: {
0081       value = 9;
0082       break;
0083     }
0084     case T13: {
0085       value = 5;
0086       break;
0087     }
0088     case T24: {
0089       value = 10;
0090       break;
0091     }
0092     case T23: {
0093       value = 6;
0094       break;
0095     }
0096     case T34: {
0097       value = 12;
0098       break;
0099     }
0100     default: {
0101       value = 0;
0102       break;
0103     }
0104   }
0105 
0106   return value;
0107 }
0108 
0109 //
0110 // convert TrackClass graphical format
0111 //
0112 const string tc2string(const TrackClass tc) {
0113   string str = "####";
0114 
0115   switch (tc) {
0116     case T1234: {
0117       str = "****";
0118       break;
0119     }
0120     case T123: {
0121       str = "***-";
0122       break;
0123     }
0124     case T124: {
0125       str = "**-*";
0126       break;
0127     }
0128     case T134: {
0129       str = "*-**";
0130       break;
0131     }
0132     case T234: {
0133       str = "-***";
0134       break;
0135     }
0136     case T12: {
0137       str = "**--";
0138       break;
0139     }
0140     case T14: {
0141       str = "*--*";
0142       break;
0143     }
0144     case T13: {
0145       str = "*-*-";
0146       break;
0147     }
0148     case T24: {
0149       str = "-*-*";
0150       break;
0151     }
0152     case T23: {
0153       str = "-**-";
0154       break;
0155     }
0156     case T34: {
0157       str = "--**";
0158       break;
0159     }
0160     default: {
0161       str = "UNDEF";
0162       break;
0163     }
0164   }
0165 
0166   return str;
0167 }