CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EmulatorClasses.h
Go to the documentation of this file.
1 #ifndef __EmulatorClasses_
2 #define __EmulatorClasses_
3 
6 
7 typedef std::vector<std::vector<PhiMemoryImage>> ImageCollector;
8 typedef std::vector<std::vector<int>> Code;
9 typedef std::vector<std::vector<std::vector<int>>> BXHold;
10 
11 //
12 
13 
15 
16  public:
17 
18  void SetValues(int phi,int theta,int ph_hit,int phzvl,int station,int sub,int id,int quality,int pattern,int wire,int strip,int BX){
19  _ph = phi;_th = theta;_phit = ph_hit;_phzvl = phzvl;_sta = station;_sub = sub;_id = id;_qual = quality;_patt = pattern;
20  _wire = wire;_strip = strip;_zhit = -999;_bx = BX;_th2 = -999;
21  };
22 
23  void SetNull(){
24  _ph = -999;_th = -999;_th2 = -999;_phit = -999;_phzvl = -999;_sta = -999;_sub = -999;_id = -999;_qual = -999;_patt = 0;
25  _wire = -999;_strip = -999;_zhit = -999;
26  };
27 
28  void SetId(int id){
29  _id = id;
30  };
31 
32  void SetStrip(int strip){
33  _strip = strip;
34  };
35 
36  void SetZhit(int zhit){_zhit = zhit;};
37  void SetTheta(int theta){_th = theta;};
38  void SetTheta2(int theta2){_th2 = theta2;};
40  void SetSectorIndex(int sectorIndex){_sectorIndex = sectorIndex;};
42  void AddTheta(int theta){_thetas.push_back(theta);};
43  void SetZoneWord(int zword){_ZoneWord = zword;};
44 
45  int Phi(){return _ph;};
46  int Theta(){return _th;};
47  int Theta2(){return _th2;};
48  int Ph_hit(){return _phit;};
49  int Phzvl(){return _phzvl;};
50  int Station(){return _sta;};
51  int Sub(){return _sub;};
52  int Id(){return _id;};
53  int Quality(){return _qual;};
54  int Pattern(){return _patt;};
55  int Wire(){return _wire;};
56  int Strip(){return _strip;};
57  int Zhit(){return _zhit;};
58  int BX(){return _bx;};
59  int SectorIndex(){return _sectorIndex;};
60  int IsNeighbor(){return _isNeighbor;};
62  std::vector<int> ZoneContribution(){return _zonecont;};
63  std::vector<int> AllThetas(){return _thetas;};
64  int ZoneWord(){return _ZoneWord;};
65 
66  private:
69  std::vector<int> _zonecont, _thetas;
70 
71 };
72 
73 struct ZonesOutput{
74  std::vector<PhiMemoryImage> zone;
75  std::vector<ConvertedHit> convertedhits;
76 };
77 
80 };
81 
84  std::vector<ConvertedHit> hits;
85  // int bxgroup;
86 };
87 
88 struct Wier{
89  int rank, strip;
90 };
91 
92 class Winner{
93 
94  public:
95  //Default Constructor: rank & strip = 0///
96  Winner(){_rank = 0;_strip = 0;};
97 
98  int Rank(){return _rank;}
99  int Strip(){return _strip;}
100  int BXGroup(){return _bxgroup;}
101 
102  void SetValues(int rank, int strip){
103  _rank = rank;
104  _strip = strip;
105  }
106  void SetRank(int rank){
107  _rank = rank;
108  }
109 
110  void SetBXGroup(int bxgroup){
111  _bxgroup = bxgroup;
112  }
113 
114  private:
116 
117 };
118 
120 
121  public:
122  void SetHits(std::vector<ConvertedHit> hits){_hits = hits;};
123  void SetWinners(std::vector<std::vector<Winner>> winners){_winners = winners;};
124  void SetValues(std::vector<std::vector<Winner>> winners, std::vector<ConvertedHit> hits){_winners = winners;_hits = hits;};
125 
126  std::vector<ConvertedHit> Hits(){return _hits;};
127  std::vector<std::vector<Winner>> Winners(){return _winners;};
128 
129  private:
130  std::vector<ConvertedHit> _hits;
131  std::vector<std::vector<Winner>> _winners;
132 
133 };
134 
135 typedef struct ThOutput { ConvertedHit x[4][3][4][2]; } ThOutput;
136 typedef struct ThOutput2 { int x[4][3][4][2]; } ThOutput2;
137 typedef struct PhOutput { ConvertedHit x[4][3][4]; } PhOutput;
139 
140  public:
141  void SetHits(std::vector<ConvertedHit> hits){_hits = hits;};
142  void SetWinners(std::vector<std::vector<Winner>> winners){_winners = winners;};
143  void SetThOut(ThOutput th_output){_th_output = th_output;};
144  void SetPhOut(PhOutput ph_output){_ph_output = ph_output;};
145  void SetSegment(std::vector<int> segment){_segment = segment;};
146  void SetValues(ThOutput th_output,PhOutput ph_output,std::vector<ConvertedHit> hits,std::vector<std::vector<Winner>> winners,std::vector<int> segment){
147  _th_output = th_output;
148  _ph_output = ph_output;
149  _hits = hits;
150  _winners = winners;
151  _segment = segment;
152  }
153 
155  _th_output2 = t2;
156  }
157 
158  std::vector<ConvertedHit> Hits(){return _hits;};
159  std::vector<std::vector<Winner>> Winners(){return _winners;};
163  std::vector<int> Segment(){return _segment;};
164 
165  private:
166  std::vector<ConvertedHit> _hits;
167  std::vector<std::vector<Winner>> _winners;
171  std::vector<int> _segment;
172 
173 };
174 
176 
177  public:
178  void SetNull(){_Phi = -999;_Theta = -999;};
179  void SetValues(MatchingOutput Mout, std::vector<std::vector<int>> Deltas, int Phi, int Theta, Winner winner){
180  _Mout = Mout;_Deltas = Deltas;_Phi = Phi; _Theta = Theta;_winner = winner;
181  }
182 
184  std::vector<std::vector<int>> Deltas(){return _Deltas;};
185  int Phi(){return _Phi;};
186  int Theta(){return _Theta;};
188 
189  private:
191  std::vector<std::vector<int>> _Deltas;
192  int _Phi, _Theta;
194 
195 };
196 // 3 BX, 4 zones, 3 winners
197 typedef struct DeltaOutArr2 { DeltaOutput x[4][3]; } DeltaOutArr2;
198 typedef struct DeltaOutArr3 { DeltaOutput x[3][4][3]; } DeltaOutArr3;
199 
200 struct BTrack{
201 
203 
205  int phi;
206  int theta;
208  std::vector<std::vector<int>> deltas;
209  std::vector<ConvertedHit> AHits;
210 };
211 
212 #endif
MatchingOutput GetMatchOut()
struct PhOutput PhOutput
void SetPhOut(PhOutput ph_output)
ThOutput ThetaMatch()
std::vector< std::vector< Winner > > Winners()
int Rank()
ConvertedHit x[4][3][4]
std::vector< std::vector< int > > Code
void SetNeighbor(int neighbor)
std::vector< int > _thetas
Geom::Theta< T > theta() const
MatchingOutput _Mout
DeltaOutput x[3][4][3]
int BXGroup()
void SetSegment(std::vector< int > segment)
Winner winner
void SetZoneWord(int zword)
void SetBXGroup(int bxgroup)
std::vector< int > _zonecont
bool neighbor(int endcap, int sector, int SectIndex, int id, int sub, int station)
ThOutput2 TMatch2()
std::vector< ConvertedHit > Hits()
std::vector< std::vector< Winner > > Winners()
std::vector< std::vector< int > > deltas
void SetTheta(int theta)
void SetValues(ThOutput th_output, PhOutput ph_output, std::vector< ConvertedHit > hits, std::vector< std::vector< Winner >> winners, std::vector< int > segment)
void SetValues(std::vector< std::vector< Winner >> winners, std::vector< ConvertedHit > hits)
std::vector< PhiMemoryImage > zone
void SetStrip(int strip)
struct ThOutput ThOutput
auto const T2 &decltype(t1.eta()) t2
Definition: deltaR.h:16
std::vector< std::vector< std::vector< int > > > BXHold
void SetTheta2(int theta2)
std::vector< ConvertedHit > convertedhits
void SetRank(int rank)
std::vector< ConvertedHit > AHits
void SetTP(L1TMuon::TriggerPrimitive tp)
std::vector< std::vector< int > > _Deltas
ThOutput2 _th_output2
std::vector< int > _segment
struct DeltaOutArr2 DeltaOutArr2
int rank
std::vector< int > AllThetas()
std::vector< ConvertedHit > _hits
L1TMuon::TriggerPrimitive TP()
void SetId(int id)
struct ThOutput2 ThOutput2
Winner GetWinner()
void SetValues(MatchingOutput Mout, std::vector< std::vector< int >> Deltas, int Phi, int Theta, Winner winner)
void SetHits(std::vector< ConvertedHit > hits)
void SetWinners(std::vector< std::vector< Winner >> winners)
std::vector< std::vector< Winner > > _winners
std::vector< int > ZoneContribution()
struct DeltaOutArr3 DeltaOutArr3
std::vector< int > Segment()
int Strip()
void setM2(ThOutput2 t2)
DeltaOutput x[4][3]
int x[4][3][4][2]
void AddTheta(int theta)
PhOutput PhiMatch()
void SetZhit(int zhit)
std::vector< ConvertedHit > _hits
void SetValues(int phi, int theta, int ph_hit, int phzvl, int station, int sub, int id, int quality, int pattern, int wire, int strip, int BX)
std::vector< std::vector< int > > Deltas()
int clctpattern
int strip
void SetWinners(std::vector< std::vector< Winner >> winners)
ConvertedHit x[4][3][4][2]
void SetHits(std::vector< ConvertedHit > hits)
L1TMuon::TriggerPrimitive _tp
void SetThOut(ThOutput th_output)
std::vector< ConvertedHit > Hits()
QualityOutput detected
std::vector< ConvertedHit > hits
std::vector< std::vector< Winner > > _winners
void SetSectorIndex(int sectorIndex)
void SetValues(int rank, int strip)
std::vector< std::vector< PhiMemoryImage > > ImageCollector