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