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 //----------------
36  : _tracoid(tracoid), _step(step) {
37  clear();
38 }
39 
40 //--------------
41 // Operations --
42 //--------------
43 
44 int DTTracoTrigData::qdec() const {
45  // This is consistent with memo
46  if (_codeIn == 8 && _codeOut == 8)
47  return 6; // HH
48  if (_codeIn == 8 && _codeOut == 0)
49  return 2; // Hinner
50  if (_codeIn == 0 && _codeOut == 8)
51  return 3; // Houter
52  if (_codeIn > 0 && _codeOut == 8)
53  return 5; // LH
54  if (_codeIn == 8 && _codeOut > 0)
55  return 5; // HL
56  if (_codeIn > 0 && _codeOut > 0)
57  return 4; // LL
58  if (_codeIn > 0 && _codeOut == 0)
59  return 0; // Linner
60  if (_codeIn == 0 && _codeOut > 0)
61  return 1; // Louter
62  return 7; // null
63 }
64 
65 void DTTracoTrigData::print() const {
66  cout << "TRACO Id="
67  << " ( " << _tracoid.wheel();
68  cout << " , " << _tracoid.station();
69  cout << " , " << _tracoid.sector();
70  cout << " # " << _tracoid.traco();
71  cout << " ) "
72  << " step: " << step();
73 
74  cout << dec << " code=" << code() << " K=" << K() << " X=" << X();
75  cout << dec << " PVcode=" << pvCode() << " PVk=" << pvK()
76  << " qdec=" << qdec();
77  cout << " qdec=" << qdec();
78  cout << hex << " psiR=" << psiR() << " DeltaPsiR=" << DeltaPsiR() << dec
79  << endl;
80  if (isFirst())
81  cout << " I trk";
82  if (!isFirst())
83  cout << " II trk";
84  cout << " (";
85  if (!pvCorr())
86  cout << "NOT ";
87  cout << "correlated)" << endl;
88 }
DTTracoTrigData()
Constructor.
int psiR() const
Return trigger X parameter converted to angle.
int step() const
Return step.
int pvCorr() const
Return the preview correaltion bit.
int X() const
Return trigger X parameter.
int sector() const
Returns sector number.
Definition: DTTracoId.h:68
int traco() const
Returns the traco.
Definition: DTTracoId.h:70
void clear()
Clear.
void print() const override
print
int station() const
Returns station number.
Definition: DTTracoId.h:66
int isFirst() const
Return non 0 if the track is a first track.
int pvK() const
Return the preview K.
int DeltaPsiR() const
Return DeltaPsiR.
int wheel() const
Returns wheel number.
Definition: DTTracoId.h:64
int pvCode() const
Return the preview code.
int qdec() const
Return the trigger code in new format.
int code() const
Return trigger code.
int K() const
Return trigger K parameter.
step
Definition: StallMonitor.cc:94