CMS 3D CMS Logo

DTTracoTrig.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: DTTracoTrig
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 // #include "Utilities/Configuration/interface/Architecture.h"
17 
18 //-----------------------
19 // This Class's Header --
20 //-----------------------
22 
23 //-------------------------------
24 // Collaborating Class Headers --
25 //-------------------------------
28 
29 //---------------
30 // C++ Headers --
31 //---------------
32 
33 using namespace std;
34 
35 //----------------
36 // Constructors --
37 //----------------
39  // reserve the appropriate amount of space for vectors
40  _btitrig.reserve(2);
41  clear();
42 }
43 
44 DTTracoTrig::DTTracoTrig(DTTracoChip *tparent, int step) : _tparent(tparent) {
45  // reserve the appropriate amount of space for vectors
46  _btitrig.reserve(2);
47  clear();
48 
49  // data part of the trigger
50  _data.setStep(step);
51  _data.setParent(tparent->id());
52 }
53 
55  // reserve the appropriate amount of space for vectors
56  _btitrig.reserve(2);
57 }
58 
59 //--------------
60 // Destructor --
61 //--------------
63 
65  if (qdec() == 7 && tt.qdec() == 7)
66  return true;
67 
68  if (!(isFirst() == tt.isFirst()) || !(pvK() == tt.pvK()) ||
69  ((fmod(double(pvCode()), 8.) == 0) ^ (fmod(double(tt.pvCode()), 8.) == 0)) || !(pvCorr() == tt.pvCorr()) ||
70  !(psiR() == tt.psiR()) || !(DeltaPsiR() == tt.DeltaPsiR()) || !(qdec() == tt.qdec()) ||
71  !(data().pvIO() == tt.data().pvIO())) {
72  cout << "fs:" << isFirst() << "," << tt.isFirst() << endl;
73  cout << "pvCode:" << pvCode() << "," << tt.pvCode() << endl;
74  cout << "pvK:" << pvK() << "," << tt.pvK() << endl;
75  cout << "pvCorr:" << pvCorr() << "," << tt.pvCorr() << endl;
76  cout << "psiR:" << psiR() << "," << tt.psiR() << endl;
77  cout << "DeltaPsiR:" << DeltaPsiR() << "," << tt.DeltaPsiR() << endl;
78  cout << "qdec:" << qdec() << "," << tt.qdec() << endl;
79  cout << "data().pvIO:" << data().pvIO() << "," << tt.data().pvIO() << endl;
80 
81  return false;
82  }
83  return true;
84 }
void setParent(DTTracoId tracoid)
Set the parent TRACO Identifier.
DTTracoTrigData data() const
Return the data part.
Definition: DTTracoTrig.h:115
void clear()
Clear.
Definition: DTTracoTrig.h:100
std::vector< const DTBtiTrigData * > _btitrig
Definition: DTTracoTrig.h:185
DTTracoTrigData _data
Definition: DTTracoTrig.h:182
DTTracoTrig()
Constructors.
Definition: DTTracoTrig.cc:38
DTTracoChip * _tparent
Definition: DTTracoTrig.h:179
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:151
int pvCode() const
Return the preview code.
Definition: DTTracoTrig.h:145
void setStep(int step)
Set trigger step.
int pvCorr() const
Return the preview correaltion bit.
Definition: DTTracoTrig.h:151
int qdec() const
Return the trigger code in new format.
Definition: DTTracoTrig.h:169
int psiR() const
Return trigger X parameter converted to angle.
Definition: DTTracoTrig.h:163
int isFirst() const
Return non 0 if the track is a first track.
Definition: DTTracoTrig.h:142
int pvK() const
Return the preview K.
Definition: DTTracoTrig.h:148
bool operator==(const DTTracoTrig &) const
comparison operator
Definition: DTTracoTrig.cc:64
step
Definition: StallMonitor.cc:94
int pvIO() const
Return the preview i/o bit.
~DTTracoTrig() override
Destructor.
Definition: DTTracoTrig.cc:62
int DeltaPsiR() const
Return DeltaPsiR.
Definition: DTTracoTrig.h:166
DTTracoId id() const
Return TRACO id.
Definition: DTTracoChip.h:98