test
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 using namespace L1TMuon;
8 
9 typedef std::vector<std::vector<PhiMemoryImage>> ImageCollector;
10 typedef std::vector<std::vector<int>> Code;
11 typedef std::vector<std::vector<std::vector<int>>> BXHold;
12 
13 //
14 
15 
17 
18  public:
19 
20 
21  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){
22 
23  _ph = phi;_th = theta;_phit = ph_hit;_phzvl = phzvl;_sta = station;_sub = sub;_id = id;_qual = quality;_patt = pattern;
24  _wire = wire;_strip = strip;_zhit = -999;_bx = BX;
25 
26  };
27 
28  void SetNull(){
29 
30  _ph = -999;_th = -999;_phit = -999;_phzvl = -999;_sta = -999;_sub = -999;_id = -999;_qual = -999;_patt = 0;
31  _wire = -999;_strip = -999;_zhit = -999;
32  };
33 
34 
35  void SetId(int id){
36 
37  _id = id;
38  };
39 
40 
41  void SetStrip(int strip){
42 
43  _strip = strip;
44  };
45 
46  void SetZhit(int zhit){_zhit = zhit;};
47 
48  void SetTheta(int theta){_th = theta;};
49 
50  void SetTP(TriggerPrimitive tp){_tp = tp;};
51 
52  void SetSectorIndex(int sectorIndex){_sectorIndex = sectorIndex;};
53 
54  void SetZoneContribution(std::vector<int> zonecontribution){_zonecont = zonecontribution;};
55 
56  void SetNeighbor(int neighbor){_isNeighbor = neighbor;};
57 
58 
59  int Phi(){return _ph;};
60  int Theta(){return _th;};
61  int Ph_hit(){return _phit;};
62  int Phzvl(){return _phzvl;};
63  int Station(){return _sta;};
64  int Sub(){return _sub;};
65  int Id(){return _id;};
66  int Quality(){return _qual;};
67  int Pattern(){return _patt;};
68  int Wire(){return _wire;};
69  int Strip(){return _strip;};
70  int Zhit(){return _zhit;};
71  int BX(){return _bx;};
72  int SectorIndex(){return _sectorIndex;};
73  int IsNeighbor(){return _isNeighbor;};
74  TriggerPrimitive TP(){return _tp;};
75  std::vector<int> ZoneContribution(){return _zonecont;};
76 
77 
78  private:
79 
80  int _ph,_th,_phit,_phzvl,_sta,_sub,_id,_qual,_patt,_wire,_strip,_zhit,_bx, _sectorIndex, _isNeighbor;
82  std::vector<int> _zonecont;
83 
84 };
85 
86 struct ZonesOutput{
87 
88  std::vector<PhiMemoryImage> zone;
89  std::vector<ConvertedHit> convertedhits;
90 
91 };
92 
94 
95  Code rank, layer,straightness;
96 
97 
98 };
99 
100 
102 
104  std::vector<ConvertedHit> hits;
105 
106 };
107 
108 
109 struct Wier{
110 
111  int rank, strip;
112 };
113 
114 class Winner{
115 
116  public:
117 
118 
119  //Default Constructor: rank & strip = 0///
120  Winner(){_rank = 0;_strip = 0;};
121 
122  int Rank(){return _rank;}
123  int Strip(){return _strip;}
124 
125  void SetValues(int rank, int strip){
126 
127  _rank = rank;
128  _strip = strip;
129  }
130  void SetRank(int rank){
131 
132  _rank = rank;
133  }
134 
135  private:
136 
137 
138  int _rank, _strip;
139 
140 };
141 
143 
144  public:
145 
146  void SetHits(std::vector<ConvertedHit> hits){_hits = hits;};
147  void SetWinners(std::vector<std::vector<Winner>> winners){_winners = winners;};
148  void SetValues(std::vector<std::vector<Winner>> winners, std::vector<ConvertedHit> hits){_winners = winners;_hits = hits;};
149 
150  std::vector<ConvertedHit> Hits(){return _hits;};
151  std::vector<std::vector<Winner>> Winners(){return _winners;};
152 
153 
154  private:
155 
156  std::vector<ConvertedHit> _hits;
157  std::vector<std::vector<Winner>> _winners;
158 
159 };
160 
161 
162 typedef std::vector<std::vector<std::vector<std::vector<ConvertedHit>>>> ThOutput;
163 typedef std::vector<std::vector<std::vector<ConvertedHit>>> PhOutput;
165 
166  public:
167 
168  void SetHits(std::vector<ConvertedHit> hits){_hits = hits;};
169  void SetWinners(std::vector<std::vector<Winner>> winners){_winners = winners;};
170  void SetThOut(ThOutput th_output){_th_output = th_output;};
171  void SetPhOut(PhOutput ph_output){_ph_output = ph_output;};
172  void SetSegment(std::vector<int> segment){_segment = segment;};
173  void SetValues(ThOutput th_output,PhOutput ph_output,std::vector<ConvertedHit> hits,std::vector<std::vector<Winner>> winners,std::vector<int> segment){
174 
175  _th_output = th_output;
176  _ph_output = ph_output;
177  _hits = hits;
178  _winners = winners;
179  _segment = segment;
180  }
181 
182 
183 
184  std::vector<ConvertedHit> Hits(){return _hits;};
185  std::vector<std::vector<Winner>> Winners(){return _winners;};
186  ThOutput ThetaMatch(){return _th_output;};
187  PhOutput PhiMatch(){return _ph_output;};
188  std::vector<int> Segment(){return _segment;};
189 
190 
191  private:
192 
193  std::vector<ConvertedHit> _hits;
194  std::vector<std::vector<Winner>> _winners;
197  std::vector<int> _segment;
198 
199 
200 };
201 
202 
204 
205  public:
206  void SetNull(){_Phi = -999;_Theta = -999;};
207  void SetValues(MatchingOutput Mout, std::vector<std::vector<int>> Deltas, int Phi, int Theta, Winner winner){
208 
209  _Mout = Mout;_Deltas = Deltas;_Phi = Phi; _Theta = Theta;_winner = winner;
210  }
211 
212  MatchingOutput GetMatchOut(){return _Mout;};
213  std::vector<std::vector<int>> Deltas(){return _Deltas;};
214  int Phi(){return _Phi;};
215  int Theta(){return _Theta;};
216  Winner GetWinner(){return _winner;};
217 
218  private:
219 
220  MatchingOutput _Mout;
221  std::vector<std::vector<int>> _Deltas;
222  int _Phi, _Theta;
224 
225 
226 
227 
228 };
229 
230 struct BTrack{
231 
232  BTrack(): phi(0),theta(0),clctpattern(0){}
233 
235  int phi;
236  int theta;
238  std::vector<std::vector<int>> deltas;
239  std::vector<ConvertedHit> AHits;
240 };
241 
242 #endif
DeltaOutput Deltas(MatchingOutput Mout, int zone, int winner)
Definition: Deltas.h:12
MatchingOutput GetMatchOut()
void SetPhOut(PhOutput ph_output)
ThOutput ThetaMatch()
std::vector< std::vector< Winner > > Winners()
bool neighbor(int endcap, int sector, int SectIndex, int id, int sub, int station)
int Rank()
std::vector< std::vector< int > > Code
void SetZoneContribution(std::vector< int > zonecontribution)
void SetNeighbor(int neighbor)
Geom::Theta< T > theta() const
void SetSegment(std::vector< int > segment)
Winner winner
std::vector< int > _zonecont
TriggerPrimitive _tp
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
TriggerPrimitive TP()
void SetStrip(int strip)
std::vector< std::vector< std::vector< int > > > BXHold
std::vector< ConvertedHit > convertedhits
void SetRank(int rank)
std::vector< ConvertedHit > AHits
std::vector< std::vector< std::vector< std::vector< ConvertedHit > > > > ThOutput
std::vector< std::vector< int > > _Deltas
std::vector< int > _segment
void SetId(int id)
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()
std::vector< int > Segment()
int Strip()
Geom::Phi< T > phi() const
PhOutput PhiMatch()
void SetZhit(int zhit)
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
void SetWinners(std::vector< std::vector< Winner >> winners)
std::vector< std::vector< std::vector< ConvertedHit > > > PhOutput
void SetHits(std::vector< ConvertedHit > hits)
void SetThOut(ThOutput th_output)
std::vector< ConvertedHit > Hits()
QualityOutput detected
void SetTP(TriggerPrimitive tp)
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