CMS 3D CMS Logo

DTTracoTrigData.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: DTTracoTrigData
4 //
5 // Description: TRACO Trigger Data
6 //
7 //
8 // Author List:
9 // C. Grandi
10 // Modifications:
11 // 22/VI/04 SV: last trigger code update
12 //
13 //
14 //--------------------------------------------------
15 
16 //-----------------------
17 // This Class's Header --
18 //-----------------------
20 
21 //-------------------------------
22 // Collaborating Class Headers --
23 //-------------------------------
24 
25 //---------------
26 // C++ Headers --
27 //---------------
28 #include <iostream>
29 
30 using namespace std;
31 
32 //----------------
33 // Constructors --
34 //----------------
35 DTTracoTrigData::DTTracoTrigData(DTTracoId tracoid, int step) : _tracoid(tracoid), _step(step) { clear(); }
36 
37 //--------------
38 // Operations --
39 //--------------
40 
41 int DTTracoTrigData::qdec() const {
42  // This is consistent with memo
43  if (_codeIn == 8 && _codeOut == 8)
44  return 6; // HH
45  if (_codeIn == 8 && _codeOut == 0)
46  return 2; // Hinner
47  if (_codeIn == 0 && _codeOut == 8)
48  return 3; // Houter
49  if (_codeIn > 0 && _codeOut == 8)
50  return 5; // LH
51  if (_codeIn == 8 && _codeOut > 0)
52  return 5; // HL
53  if (_codeIn > 0 && _codeOut > 0)
54  return 4; // LL
55  if (_codeIn > 0 && _codeOut == 0)
56  return 0; // Linner
57  if (_codeIn == 0 && _codeOut > 0)
58  return 1; // Louter
59  return 7; // null
60 }
61 
62 void DTTracoTrigData::print() const {
63  cout << "TRACO Id="
64  << " ( " << _tracoid.wheel();
65  cout << " , " << _tracoid.station();
66  cout << " , " << _tracoid.sector();
67  cout << " # " << _tracoid.traco();
68  cout << " ) "
69  << " step: " << step();
70 
71  cout << dec << " code=" << code() << " K=" << K() << " X=" << X();
72  cout << dec << " PVcode=" << pvCode() << " PVk=" << pvK() << " qdec=" << qdec();
73  cout << " qdec=" << qdec();
74  cout << hex << " psiR=" << psiR() << " DeltaPsiR=" << DeltaPsiR() << dec << endl;
75  if (isFirst())
76  cout << " I trk";
77  if (!isFirst())
78  cout << " II trk";
79  cout << " (";
80  if (!pvCorr())
81  cout << "NOT ";
82  cout << "correlated)" << endl;
83 }
DTTracoTrigData()
Constructor.
int pvCode() const
Return the preview code.
int wheel() const
Returns wheel number.
Definition: DTTracoId.h:53
int K() const
Return trigger K parameter.
int qdec() const
Return the trigger code in new format.
int station() const
Returns station number.
Definition: DTTracoId.h:55
int X() const
Return trigger X parameter.
int isFirst() const
Return non 0 if the track is a first track.
int step() const
Return step.
void clear()
Clear.
int psiR() const
Return trigger X parameter converted to angle.
int sector() const
Returns sector number.
Definition: DTTracoId.h:57
int pvCorr() const
Return the preview correaltion bit.
int traco() const
Returns the traco.
Definition: DTTracoId.h:59
void print() const override
print
int DeltaPsiR() const
Return DeltaPsiR.
int pvK() const
Return the preview K.
step
Definition: StallMonitor.cc:83
int code() const
Return trigger code.