test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
40  // reserve the appropriate amount of space for vectors
41  _btitrig.reserve(2);
42  clear();
43 
44 }
45 
47  _tparent(tparent) {
48 
49  // reserve the appropriate amount of space for vectors
50  _btitrig.reserve(2);
51  clear();
52 
53  // data part of the trigger
54  _data.setStep(step);
55  _data.setParent(tparent->id());
56 
57 }
58 
61  _tparent(parent), _data(data) {
62 
63  // reserve the appropriate amount of space for vectors
64  _btitrig.reserve(2);
65 
66 }
67 
68 //--------------
69 // Destructor --
70 //--------------
72 }
73 
74 
75 bool
77  if(qdec()==7 && tt.qdec()==7)
78  return true;
79 
80  if ( !( isFirst() == tt.isFirst()) ||
81  !( pvK() == tt.pvK()) ||
82  ( (fmod(double(pvCode()),8.)==0) ^ (fmod(double(tt.pvCode()),8.)==0) ) ||
83  !( pvCorr() == tt.pvCorr()) ||
84  !( psiR() == tt.psiR()) ||
85  !( DeltaPsiR() == tt.DeltaPsiR()) ||
86  !( qdec() == tt.qdec()) ||
87  !( data().pvIO() == tt.data().pvIO())
88  ){
89 
90 
91  cout<<"fs:"<<isFirst() <<","<< tt.isFirst() <<endl;
92  cout<<"pvCode:"<<pvCode()<<","<<tt.pvCode()<<endl;
93  cout<<"pvK:"<< pvK() <<","<<tt.pvK()<<endl;
94  cout<<"pvCorr:"<<pvCorr()<<","<<tt.pvCorr()<<endl;
95  cout<<"psiR:"<<psiR()<<","<<tt.psiR()<<endl;
96  cout<<"DeltaPsiR:"<<DeltaPsiR()<<","<<tt.DeltaPsiR()<<endl;
97  cout<<"qdec:"<<qdec()<<","<<tt.qdec()<<endl;
98  cout<<"data().pvIO:"<<data().pvIO()<<","<<tt.data().pvIO()<<endl;
99 
100  return false;
101  }
102  return true;
103 }
void setParent(DTTracoId tracoid)
Set the parent TRACO Identifier.
DTTracoTrigData data() const
Return the data part.
Definition: DTTracoTrig.h:153
void clear()
Clear.
Definition: DTTracoTrig.h:132
DTTracoTrigData _data
Definition: DTTracoTrig.h:262
DTTracoTrig()
Constructors.
Definition: DTTracoTrig.cc:38
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:167
int pvCode() const
Return the preview code.
Definition: DTTracoTrig.h:203
void setStep(int step)
Set trigger step.
int pvCorr() const
Return the preview correaltion bit.
Definition: DTTracoTrig.h:213
int qdec() const
Return the trigger code in new format.
Definition: DTTracoTrig.h:243
int psiR() const
Return trigger X parameter converted to angle.
Definition: DTTracoTrig.h:233
int isFirst() const
Return non 0 if the track is a first track.
Definition: DTTracoTrig.h:198
int pvK() const
Return the preview K.
Definition: DTTracoTrig.h:208
std::vector< const DTBtiTrigData * > _btitrig
Definition: DTTracoTrig.h:265
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple cout
Definition: gather_cfg.py:145
bool operator==(const DTTracoTrig &) const
comparison operator
Definition: DTTracoTrig.cc:76
step
int pvIO() const
Return the preview i/o bit.
~DTTracoTrig()
Destructor.
Definition: DTTracoTrig.cc:71
int DeltaPsiR() const
Return DeltaPsiR.
Definition: DTTracoTrig.h:238
DTTracoId id() const
Return TRACO id.
Definition: DTTracoChip.h:100