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 SetZoneContribution(std::vector<int> zonecontribution){_zonecont = zonecontribution;};
53 
54 
55  int Phi(){return _ph;};
56  int Theta(){return _th;};
57  int Ph_hit(){return _phit;};
58  int Phzvl(){return _phzvl;};
59  int Station(){return _sta;};
60  int Sub(){return _sub;};
61  int Id(){return _id;};
62  int Quality(){return _qual;};
63  int Pattern(){return _patt;};
64  int Wire(){return _wire;};
65  int Strip(){return _strip;};
66  int Zhit(){return _zhit;};
67  int BX(){return _bx;};
68  TriggerPrimitive TP(){return _tp;};
69  std::vector<int> ZoneContribution(){return _zonecont;};
70 
71 
72  private:
73 
74  int _ph,_th,_phit,_phzvl,_sta,_sub,_id,_qual,_patt,_wire,_strip,_zhit,_bx;
76  std::vector<int> _zonecont;
77 
78 };
79 
80 struct ZonesOutput{
81 
82  std::vector<PhiMemoryImage> zone;
83  std::vector<ConvertedHit> convertedhits;
84 
85 };
86 
88 
89  Code rank, layer,straightness;
90 
91 
92 };
93 
94 
96 
98  std::vector<ConvertedHit> hits;
99 
100 };
101 
102 
103 struct Wier{
104 
105  int rank, strip;
106 };
107 
108 class Winner{
109 
110  public:
111 
112 
113  //Default Constructor: rank & strip = 0///
114  Winner(){_rank = 0;_strip = 0;};
115 
116  int Rank(){return _rank;}
117  int Strip(){return _strip;}
118 
119  void SetValues(int rank, int strip){
120 
121  _rank = rank;
122  _strip = strip;
123  }
124  void SetRank(int rank){
125 
126  _rank = rank;
127  }
128 
129  private:
130 
131 
132  int _rank, _strip;
133 
134 };
135 
137 
138  public:
139 
140  void SetHits(std::vector<ConvertedHit> hits){_hits = hits;};
141  void SetWinners(std::vector<std::vector<Winner>> winners){_winners = winners;};
142  void SetValues(std::vector<std::vector<Winner>> winners, std::vector<ConvertedHit> hits){_winners = winners;_hits = hits;};
143 
144  std::vector<ConvertedHit> Hits(){return _hits;};
145  std::vector<std::vector<Winner>> Winners(){return _winners;};
146 
147 
148  private:
149 
150  std::vector<ConvertedHit> _hits;
151  std::vector<std::vector<Winner>> _winners;
152 
153 };
154 
155 
156 typedef std::vector<std::vector<std::vector<std::vector<ConvertedHit>>>> ThOutput;
157 typedef std::vector<std::vector<std::vector<ConvertedHit>>> PhOutput;
159 
160  public:
161 
162  void SetHits(std::vector<ConvertedHit> hits){_hits = hits;};
163  void SetWinners(std::vector<std::vector<Winner>> winners){_winners = winners;};
164  void SetThOut(ThOutput th_output){_th_output = th_output;};
165  void SetPhOut(PhOutput ph_output){_ph_output = ph_output;};
166  void SetSegment(std::vector<int> segment){_segment = segment;};
167  void SetValues(ThOutput th_output,PhOutput ph_output,std::vector<ConvertedHit> hits,std::vector<std::vector<Winner>> winners,std::vector<int> segment){
168 
169  _th_output = th_output;
170  _ph_output = ph_output;
171  _hits = hits;
172  _winners = winners;
173  _segment = segment;
174  }
175 
176 
177 
178  std::vector<ConvertedHit> Hits(){return _hits;};
179  std::vector<std::vector<Winner>> Winners(){return _winners;};
180  ThOutput ThetaMatch(){return _th_output;};
181  PhOutput PhiMatch(){return _ph_output;};
182  std::vector<int> Segment(){return _segment;};
183 
184 
185  private:
186 
187  std::vector<ConvertedHit> _hits;
188  std::vector<std::vector<Winner>> _winners;
191  std::vector<int> _segment;
192 
193 
194 };
195 
196 
198 
199  public:
200  void SetNull(){_Phi = -999;_Theta = -999;};
201  void SetValues(MatchingOutput Mout, std::vector<std::vector<int>> Deltas, int Phi, int Theta, Winner winner){
202 
203  _Mout = Mout;_Deltas = Deltas;_Phi = Phi; _Theta = Theta;_winner = winner;
204  }
205 
206  MatchingOutput GetMatchOut(){return _Mout;};
207  std::vector<std::vector<int>> Deltas(){return _Deltas;};
208  int Phi(){return _Phi;};
209  int Theta(){return _Theta;};
210  Winner GetWinner(){return _winner;};
211 
212  private:
213 
214  MatchingOutput _Mout;
215  std::vector<std::vector<int>> _Deltas;
216  int _Phi, _Theta;
218 
219 
220 
221 
222 };
223 
224 struct BTrack{
225 
226  BTrack(): phi(0),theta(0),clctpattern(0){}
227 
229  int phi;
230  int theta;
232  std::vector<std::vector<int>> deltas;
233  std::vector<ConvertedHit> AHits;
234 };
235 
236 #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()
int Rank()
std::vector< std::vector< int > > Code
void SetZoneContribution(std::vector< int > zonecontribution)
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 SetValues(int rank, int strip)
std::vector< std::vector< PhiMemoryImage > > ImageCollector