CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuDTTrackAssParam.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Description: Parameters for Track Assembler
4 //
5 //
6 // $Date: 2007/02/27 11:44:00 $
7 // $Revision: 1.2 $
8 //
9 // Author :
10 // N. Neumeister CERN EP
11 //
12 //--------------------------------------------------
13 
15 #include <iostream>
16 
17 using namespace std;
18 
19 //
20 // output stream operator for TrackClass
21 //
22 ostream& operator<<( ostream& s, TrackClass tc) {
23 
24  switch ( tc ) {
25  case T1234: return s << "T1234 ";
26  case T123: return s << "T123 ";
27  case T124: return s << "T124 ";
28  case T134: return s << "T134 ";
29  case T234: return s << "T234 ";
30  case T12: return s << "T12 ";
31  case T14: return s << "T14 ";
32  case T13: return s << "T13 ";
33  case T24: return s << "T24 ";
34  case T23: return s << "T23 ";
35  case T34: return s << "T34 ";
36  default: return s << "UNDEF ";
37  }
38 
39 }
40 
41 
42 //
43 // convert TrackClass to bitmap
44 //
45 const unsigned int tc2bitmap(const TrackClass tc) {
46 
47  unsigned int value = 0;
48 
49  switch ( tc ) {
50  case T1234: { value = 15; break; }
51  case T123: { value = 7; break; }
52  case T124: { value = 11; break; }
53  case T134: { value = 13; break; }
54  case T234: { value = 14; break; }
55  case T12: { value = 3; break; }
56  case T14: { value = 9; break; }
57  case T13: { value = 5; break; }
58  case T24: { value = 10; break; }
59  case T23: { value = 6; break; }
60  case T34: { value = 12; break; }
61  default: { value = 0; break; }
62  }
63 
64  return value;
65 
66 }
67 
68 
69 //
70 // convert TrackClass graphical format
71 //
72 const string tc2string(const TrackClass tc) {
73 
74  string str = "####";
75 
76  switch ( tc ) {
77  case T1234: { str = "****"; break; }
78  case T123: { str = "***-"; break; }
79  case T124: { str = "**-*"; break; }
80  case T134: { str = "*-**"; break; }
81  case T234: { str = "-***"; break; }
82  case T12: { str = "**--"; break; }
83  case T14: { str = "*--*"; break; }
84  case T13: { str = "*-*-"; break; }
85  case T24: { str = "-*-*"; break; }
86  case T23: { str = "-**-"; break; }
87  case T34: { str = "--**"; break; }
88  default: { str = "UNDEF"; break; }
89  }
90 
91  return str;
92 
93 }
ostream & operator<<(std::ostream &o, vector< std::string > const &iValue)
Definition: refresh.cc:46
const unsigned int tc2bitmap(const TrackClass tc)
const string tc2string(const TrackClass tc)