CMS 3D CMS Logo

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