CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
TTTrack_TrackWord Class Reference

#include <TTTrack_TrackWord.h>

Inheritance diagram for TTTrack_TrackWord:
TTTrack< T >

Public Member Functions

unsigned int get_BendChi2Bits ()
 
unsigned int get_chi2XYBits ()
 
unsigned int get_chi2ZBits ()
 
unsigned int get_d0Bits ()
 
unsigned int get_hitPattern ()
 
float get_iBendChi2 ()
 
float get_ichi2XY ()
 
float get_ichi2Z ()
 
float get_id0 ()
 
float get_iphi ()
 
float get_iRinv ()
 
unsigned int get_ispare ()
 
float get_itanl ()
 
float get_iz0 ()
 
unsigned int get_phiBits ()
 
unsigned int get_RinvBits ()
 
unsigned int get_tanlBits ()
 
unsigned int get_z0Bits ()
 
TTTrack_TrackWordoperator= (const TTTrack_TrackWord &word)
 
void setTrackWord (const GlobalVector &Momentum, const GlobalPoint &POCA, double Rinv, double Chi2XY, double Chi2Z, double BendChi2, unsigned int HitPattern, unsigned int iSpare)
 
void setTrackWord (unsigned int Rinv, unsigned int phi0, unsigned int tanl, unsigned int z0, unsigned int d0, unsigned int Chi2XY, unsigned int Chi2Z, unsigned int BendChi2, unsigned int HitPattern, unsigned int iSpare)
 
 TTTrack_TrackWord ()
 
 TTTrack_TrackWord (const GlobalVector &Momentum, const GlobalPoint &POCA, double Rinv, double Chi2, double Chi2Z, double BendChi2, unsigned int HitPattern, unsigned int iSpare)
 
 TTTrack_TrackWord (const TTTrack_TrackWord &word)
 
 TTTrack_TrackWord (unsigned int Rinv, unsigned int phi0, unsigned int tanl, unsigned int z0, unsigned int d0, unsigned int Chi2XY, unsigned int Chi2Z, unsigned int BendChi2, unsigned int HitPattern, unsigned int iSpare)
 
unsigned int unpack_hitPattern ()
 
float unpack_iBendChi2 ()
 
float unpack_ichi2XY ()
 
float unpack_ichi2Z ()
 
float unpack_id0 ()
 
float unpack_iphi ()
 
float unpack_iRinv ()
 
unsigned int unpack_ispare ()
 
float unpack_itanl ()
 
float unpack_iz0 ()
 

Private Member Functions

unsigned int digitize_Signed (float var, unsigned int maxBit, unsigned int minBit, float lsb)
 
void initialize ()
 
float unpack_Signed (unsigned int bits, unsigned int nBits, float lsb)
 

Private Attributes

float Bchi2Bins [8]
 
float chi2Bins [16]
 
float chi2ZBins [16]
 
unsigned int iBendChi2
 
unsigned int ichi2XY
 
unsigned int ichi2Z
 
unsigned int id0
 
unsigned int iHitPattern
 
unsigned int iphi
 
unsigned int iRinv
 
unsigned int ispare
 
unsigned int itanl
 
unsigned int iz0
 
const unsigned int maskBendChi2 = 0x0001C000
 
const unsigned int maskChi2XY = 0x0000000F
 
const unsigned int maskChi2Z = 0x00003C00
 
const unsigned int maskD0 = 0x000FFF80
 
const unsigned int maskHitPat = 0x0000007F
 
const unsigned int maskPhi = 0xFFF00000
 
const unsigned int maskRinv = 0xFFFE0000
 
const unsigned int maskSpare = 0x000003FF
 
const unsigned int maskTanL = 0xFFFF0000
 
const unsigned int maskZ0 = 0x0000FFF0
 
const float maxCurv = 0.00855
 
const float maxD0 = 15.4
 
const float maxPhi = 1.026
 
const float maxTanl = 8.0
 
const float maxZ0 = 30.
 
unsigned int NBchi2
 
const unsigned int NBChi2Bits = 3
 
unsigned int Nchi2
 
const unsigned int NChi2Bits = 4
 
const unsigned int NCurvBits = 14
 
const unsigned int ND0Bits = 12
 
const unsigned int NHitsBits = 7
 
const unsigned int NPhiBits = 11
 
const unsigned int NSpareBits = 14
 
const unsigned int NTanlBits = 15
 
const unsigned int nWordBits = 32
 
const unsigned int NZ0Bits = 11
 
unsigned int TrackWord1
 
unsigned int TrackWord2
 
unsigned int TrackWord3
 
float valLSBCurv
 
float valLSBD0
 
float valLSBPhi
 
float valLSBTanl
 
float valLSBZ0
 

Detailed Description

Definition at line 19 of file TTTrack_TrackWord.h.

Constructor & Destructor Documentation

◆ TTTrack_TrackWord() [1/4]

TTTrack_TrackWord::TTTrack_TrackWord ( )
inline

Definition at line 23 of file TTTrack_TrackWord.h.

23 {}

◆ TTTrack_TrackWord() [2/4]

TTTrack_TrackWord::TTTrack_TrackWord ( const GlobalVector Momentum,
const GlobalPoint POCA,
double  Rinv,
double  Chi2,
double  Chi2Z,
double  BendChi2,
unsigned int  HitPattern,
unsigned int  iSpare 
)

Definition at line 18 of file TTTrack_TrackWord.cc.

25  {
26  setTrackWord(Momentum, POCA, theRinv, theChi2XY, theChi2Z, theBendChi2, theHitPattern, iSpare);
27 }

References setTrackWord().

◆ TTTrack_TrackWord() [3/4]

TTTrack_TrackWord::TTTrack_TrackWord ( unsigned int  Rinv,
unsigned int  phi0,
unsigned int  tanl,
unsigned int  z0,
unsigned int  d0,
unsigned int  Chi2XY,
unsigned int  Chi2Z,
unsigned int  BendChi2,
unsigned int  HitPattern,
unsigned int  iSpare 
)

Definition at line 29 of file TTTrack_TrackWord.cc.

39  : iRinv(theRinv),
40  iphi(phi0),
41  itanl(tanl),
42  iz0(z0),
43  id0(d0),
44  ichi2XY(theChi2XY), //revert to other packing? Or will be unpacked wrong
45  ichi2Z(theChi2Z), //revert to other packing? Or will be unpacked wrong
46  iBendChi2(theBendChi2), // revert to ogher packing? Or will be unpacked wrong
47  ispare(iSpare),
48  iHitPattern(theHitPattern) {
49  initialize();
50 }

References initialize().

◆ TTTrack_TrackWord() [4/4]

TTTrack_TrackWord::TTTrack_TrackWord ( const TTTrack_TrackWord word)
inline

Definition at line 107 of file TTTrack_TrackWord.h.

107  {
108  initialize();
109 
110  iRinv = word.iRinv;
111  iphi = word.iphi;
112  itanl = word.itanl;
113  iz0 = word.iz0;
114  id0 = word.id0;
115  ichi2XY = word.ichi2XY;
116  ichi2Z = word.ichi2Z;
117  iBendChi2 = word.iBendChi2;
118  ispare = word.ispare;
119  iHitPattern = word.iHitPattern;
120 
121  // three 32-bit packed words
122  TrackWord1 = word.TrackWord1;
123  TrackWord2 = word.TrackWord2;
124  TrackWord3 = word.TrackWord3;
125  }

References iBendChi2, ichi2XY, ichi2Z, id0, iHitPattern, initialize(), iphi, iRinv, ispare, itanl, iz0, TrackWord1, TrackWord2, and TrackWord3.

Member Function Documentation

◆ digitize_Signed()

unsigned int TTTrack_TrackWord::digitize_Signed ( float  var,
unsigned int  maxBit,
unsigned int  minBit,
float  lsb 
)
private

Definition at line 321 of file TTTrack_TrackWord.cc.

321  {
322  unsigned int nBits = (maxBit - minBit + 1);
323  unsigned int myVar = std::floor(fabs(var) / lsb);
324  unsigned int maxVal = (1 << (nBits - 1)) - 1;
325  if (myVar > maxVal)
326  myVar = maxVal;
327  if (var < 0)
328  myVar = (1 << nBits) - myVar; // two's complement encoding
329  unsigned int seg = myVar;
330  return seg;
331 }

References hgcalVFEProducer_cfi::lsb, and trigObjTnPSource_cfi::var.

Referenced by setTrackWord().

◆ get_BendChi2Bits()

unsigned int TTTrack_TrackWord::get_BendChi2Bits ( )

Definition at line 298 of file TTTrack_TrackWord.cc.

298  {
299  unsigned int bits = (TrackWord3 & maskBendChi2) >> (nWordBits - (NCurvBits + NBChi2Bits + 1)); //14
300  return bits;
301 }

References maskBendChi2, NBChi2Bits, NCurvBits, nWordBits, and TrackWord3.

◆ get_chi2XYBits()

unsigned int TTTrack_TrackWord::get_chi2XYBits ( )

Definition at line 232 of file TTTrack_TrackWord.cc.

232  {
233  //unsigned int bits = (TrackWord1 & 0x0000000F);
234  return ichi2XY;
235 }

References ichi2XY.

◆ get_chi2ZBits()

unsigned int TTTrack_TrackWord::get_chi2ZBits ( )

◆ get_d0Bits()

unsigned int TTTrack_TrackWord::get_d0Bits ( )

Definition at line 264 of file TTTrack_TrackWord.cc.

264  {
265  // unsigned int bits = (TrackWord2 & 0x000FFF80) >> 7;
266  return id0;
267 }

References id0.

◆ get_hitPattern()

unsigned int TTTrack_TrackWord::get_hitPattern ( )

Definition at line 274 of file TTTrack_TrackWord.cc.

274 { return iHitPattern; }

References iHitPattern.

◆ get_iBendChi2()

float TTTrack_TrackWord::get_iBendChi2 ( )

Definition at line 293 of file TTTrack_TrackWord.cc.

293  {
294  float unpBChi2 = Bchi2Bins[iBendChi2];
295  return unpBChi2;
296 }

References Bchi2Bins, and iBendChi2.

◆ get_ichi2XY()

float TTTrack_TrackWord::get_ichi2XY ( )

Definition at line 227 of file TTTrack_TrackWord.cc.

227  {
228  float unpChi2 = chi2Bins[ichi2XY];
229  return unpChi2;
230 }

References chi2Bins, and ichi2XY.

◆ get_ichi2Z()

float TTTrack_TrackWord::get_ichi2Z ( )

Definition at line 309 of file TTTrack_TrackWord.cc.

309  {
310  float unpChi2Z = chi2ZBins[ichi2Z];
311  return unpChi2Z;
312 }

References chi2ZBins, and ichi2Z.

◆ get_id0()

float TTTrack_TrackWord::get_id0 ( )

Definition at line 259 of file TTTrack_TrackWord.cc.

259  {
260  float unpD0 = unpack_Signed(id0, ND0Bits, valLSBD0);
261  return unpD0;
262 }

References id0, ND0Bits, unpack_Signed(), and valLSBD0.

◆ get_iphi()

float TTTrack_TrackWord::get_iphi ( )

Definition at line 243 of file TTTrack_TrackWord.cc.

243  {
244  float unpPhi = unpack_Signed(iphi, NPhiBits, valLSBPhi);
245  return unpPhi;
246 }

References iphi, NPhiBits, unpack_Signed(), and valLSBPhi.

◆ get_iRinv()

float TTTrack_TrackWord::get_iRinv ( )

Definition at line 282 of file TTTrack_TrackWord.cc.

282  {
283  float unpCurv = unpack_Signed(iRinv, NCurvBits, valLSBCurv);
284  return unpCurv;
285 }

References iRinv, NCurvBits, unpack_Signed(), and valLSBCurv.

◆ get_ispare()

unsigned int TTTrack_TrackWord::get_ispare ( )

Definition at line 319 of file TTTrack_TrackWord.cc.

319 { return ispare; }

References ispare.

◆ get_itanl()

float TTTrack_TrackWord::get_itanl ( )

Definition at line 195 of file TTTrack_TrackWord.cc.

195  {
196  float unpTanl = unpack_Signed(itanl, NTanlBits, valLSBTanl);
197  return unpTanl;
198 }

References itanl, NTanlBits, unpack_Signed(), and valLSBTanl.

◆ get_iz0()

float TTTrack_TrackWord::get_iz0 ( )

Definition at line 211 of file TTTrack_TrackWord.cc.

211  {
212  float unpZ0 = unpack_Signed(iz0, NZ0Bits, valLSBZ0);
213  return unpZ0;
214 }

References iz0, NZ0Bits, unpack_Signed(), and valLSBZ0.

◆ get_phiBits()

unsigned int TTTrack_TrackWord::get_phiBits ( )

Definition at line 248 of file TTTrack_TrackWord.cc.

248  {
249  //unsigned int bits = (TrackWord2 & 0xFFF00000) >> 20;
250  return iphi;
251 }

References iphi.

◆ get_RinvBits()

unsigned int TTTrack_TrackWord::get_RinvBits ( )

◆ get_tanlBits()

unsigned int TTTrack_TrackWord::get_tanlBits ( )

Definition at line 200 of file TTTrack_TrackWord.cc.

200  {
201  //unsigned int bits = (TrackWord1 & 0xFFFF0000) >> 16;
202  return itanl;
203 }

References itanl.

◆ get_z0Bits()

unsigned int TTTrack_TrackWord::get_z0Bits ( )

Definition at line 216 of file TTTrack_TrackWord.cc.

216  {
217  //unsigned int bits = (TrackWord1 & 0x0000FFF0) >> 4;
218  return iz0;
219 }

References iz0.

◆ initialize()

void TTTrack_TrackWord::initialize ( )
private

Definition at line 345 of file TTTrack_TrackWord.cc.

345  {
346  /* bits for packing, constants defined in TTTrack_TrackWord.h :
347 
348  signed quantities (one bit for sign):
349 
350  q/R = 14+1
351  phi = 11+1 (relative to sector center)
352  tanl = 15+1
353  z0 = 11+1
354  d0 = 12+1
355 
356  unsigned:
357 
358  chi2 = 4
359  BendChi2 = 3
360  hitPattern = 7
361  Spare = 10
362  chi2Z = 4
363 
364  */
365 
366  // define bits, 1<<N = 2^N
367 
368  unsigned int CurvBins = (1 << NCurvBits);
369  unsigned int phiBins = (1 << NPhiBits);
370  unsigned int tanlBins = (1 << NTanlBits);
371  unsigned int z0Bins = (1 << NZ0Bits);
372  unsigned int d0Bins = (1 << ND0Bits);
373 
374  Nchi2 = (1 << NChi2Bits);
375  NBchi2 = (1 << NBChi2Bits);
376 
377  valLSBCurv = maxCurv / float(CurvBins);
378  valLSBPhi = maxPhi / float(phiBins);
379  valLSBTanl = maxTanl / float(tanlBins);
380  valLSBZ0 = maxZ0 / float(z0Bins);
381  valLSBD0 = maxD0 / float(d0Bins);
382 
383  chi2Bins[0] = 0.25;
384  chi2Bins[1] = 0.5;
385  chi2Bins[2] = 1.0;
386  chi2Bins[3] = 2.;
387  chi2Bins[4] = 3.;
388  chi2Bins[5] = 5.;
389  chi2Bins[6] = 7.;
390  chi2Bins[7] = 10.;
391  chi2Bins[8] = 20.;
392  chi2Bins[9] = 40.;
393  chi2Bins[10] = 100.;
394  chi2Bins[11] = 200.;
395  chi2Bins[12] = 500.;
396  chi2Bins[13] = 1000.;
397  chi2Bins[14] = 3000.;
398 
399  chi2ZBins[0] = 0.25;
400  chi2ZBins[1] = 0.5;
401  chi2ZBins[2] = 1.0;
402  chi2ZBins[3] = 2.;
403  chi2ZBins[4] = 3.;
404  chi2ZBins[5] = 5.;
405  chi2ZBins[6] = 7.;
406  chi2ZBins[7] = 10.;
407  chi2ZBins[8] = 20.;
408  chi2ZBins[9] = 40.;
409  chi2ZBins[10] = 100.;
410  chi2ZBins[11] = 200.;
411  chi2ZBins[12] = 500.;
412  chi2ZBins[13] = 1000.;
413  chi2ZBins[14] = 3000.;
414 
415  Bchi2Bins[0] = 0.5;
416  Bchi2Bins[1] = 1.25;
417  Bchi2Bins[2] = 2.0;
418  Bchi2Bins[3] = 3.0;
419  Bchi2Bins[4] = 5.0;
420  Bchi2Bins[5] = 10.;
421  Bchi2Bins[6] = 50.;
422 };

References Bchi2Bins, chi2Bins, chi2ZBins, dqmMemoryStats::float, maxCurv, maxD0, maxPhi, maxTanl, maxZ0, NBchi2, NBChi2Bits, Nchi2, NChi2Bits, NCurvBits, ND0Bits, NPhiBits, NTanlBits, NZ0Bits, valLSBCurv, valLSBD0, valLSBPhi, valLSBTanl, and valLSBZ0.

Referenced by operator=(), setTrackWord(), and TTTrack_TrackWord().

◆ operator=()

TTTrack_TrackWord& TTTrack_TrackWord::operator= ( const TTTrack_TrackWord word)
inline

Definition at line 127 of file TTTrack_TrackWord.h.

127  {
128  initialize();
129  iRinv = word.iRinv;
130  iphi = word.iphi;
131  itanl = word.itanl;
132  iz0 = word.iz0;
133  id0 = word.id0;
134  ichi2XY = word.ichi2XY;
135  ichi2Z = word.ichi2Z;
136  iBendChi2 = word.iBendChi2;
137  ispare = word.ispare;
138  iHitPattern = word.iHitPattern;
139 
140  // three 32-bit packed words
141  TrackWord1 = word.TrackWord1;
142  TrackWord2 = word.TrackWord2;
143  TrackWord3 = word.TrackWord3;
144 
145  return *this;
146  }

References iBendChi2, ichi2XY, ichi2Z, id0, iHitPattern, initialize(), iphi, iRinv, ispare, itanl, iz0, TrackWord1, TrackWord2, and TrackWord3.

◆ setTrackWord() [1/2]

void TTTrack_TrackWord::setTrackWord ( const GlobalVector Momentum,
const GlobalPoint POCA,
double  Rinv,
double  Chi2XY,
double  Chi2Z,
double  BendChi2,
unsigned int  HitPattern,
unsigned int  iSpare 
)

Definition at line 79 of file TTTrack_TrackWord.cc.

86  {
87  initialize();
88 
89  // first, derive quantities to be packed
90 
91  float rPhi = Momentum.phi(); // this needs to be phi relative to center of sector ****
92  float rTanl = Momentum.z() / Momentum.perp();
93  float rZ0 = POCA.z();
94  float rD0 = POCA.perp();
95 
96  // bin, convert to integers, and pack
97 
98  unsigned int seg1, seg2, seg3, seg4;
99 
100  //tanl
102 
103  //z0
104  iz0 = digitize_Signed(rZ0, NZ0Bits, 0, valLSBZ0);
105 
106  //chi2 has non-linear bins
107  ichi2XY = 0;
108  for (unsigned int ibin = 0; ibin < Nchi2; ++ibin) {
109  ichi2XY = ibin;
110  if (theChi2XY < chi2Bins[ibin])
111  break;
112  }
113 
114  //chi2Z has non-linear bins
115  ichi2Z = 0;
116  for (unsigned int ibin = 0; ibin < Nchi2; ++ibin) {
117  ichi2Z = ibin;
118  if (theChi2Z < chi2ZBins[ibin])
119  break;
120  }
121 
122  //phi
123  iphi = digitize_Signed(rPhi, NPhiBits, 0, valLSBPhi);
124 
125  //d0
126  id0 = digitize_Signed(rD0, ND0Bits, 0, valLSBD0);
127 
128  //Rinv
129  iRinv = digitize_Signed(theRinv, NCurvBits, 0, valLSBCurv);
130 
131  //bend chi2 - non-linear bins
132  iBendChi2 = 0;
133  for (unsigned int ibin = 0; ibin < NBchi2; ++ibin) {
134  iBendChi2 = ibin;
135  if (theBendChi2 < Bchi2Bins[ibin])
136  break;
137  }
138 
139  ispare = iSpare;
140 
141  // spare bits
142  if (ispare > 0x3FFF)
143  ispare = 0x3FFF;
144 
145  iHitPattern = theHitPattern;
146 
147  //set bits
148  /*
149  Current packing scheme. Any changes here ripple everywhere!
150 
151  uint word1 = 16 (tanl) + 12 (z0) + 4 (chi2) = 32 bits
152  uint word2 = 12 (phi) + 13 (d0) + 7 (hitPattern) = 32 bits
153  uint word3 = 15 (pT) + 3 (bend chi2) + 14 (spare/TMVA) = 32 bits
154  */
155 
156  //now pack bits; leave hardcoded for now as am example of how this could work
157 
158  seg1 = (itanl << (nWordBits - (NTanlBits + 1))); // extra bit or bits is for sign //16
159  seg2 = (iz0 << (nWordBits - (NTanlBits + NZ0Bits + 2))); //4
160  seg3 = ichi2XY;
161 
162  //set bits
163 
164  TrackWord1 = seg1 + seg2 + seg3;
165 
166  //second 32-bit word
167 
168  seg1 = (iphi << (nWordBits - (NPhiBits + 1))); //20
169  seg2 = (id0 << (nWordBits - (NPhiBits + ND0Bits + 2))); //7
170 
171  //HitMask
172  seg3 = theHitPattern;
173 
174  //set bits
175 
176  TrackWord2 = seg1 + seg2 + seg3;
177 
178  //third 32-bit word
179 
180  seg1 = (iRinv << (nWordBits - (NCurvBits + 1))); //17
181  seg2 = (iBendChi2 << (nWordBits - (NCurvBits + NBChi2Bits + 1))); //14
182  seg3 = (ichi2Z << (nWordBits - (NCurvBits + NBChi2Bits + NChi2Bits + 1))); //10
183  seg4 = ispare;
184 
185  TrackWord3 = seg1 + seg2 + seg3 + seg4;
186 }

References Bchi2Bins, chi2Bins, chi2ZBins, digitize_Signed(), iBendChi2, ichi2XY, ichi2Z, id0, iHitPattern, initialize(), iphi, iRinv, ispare, itanl, iz0, NBchi2, NBChi2Bits, Nchi2, NChi2Bits, NCurvBits, ND0Bits, NPhiBits, NTanlBits, nWordBits, NZ0Bits, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), TrackWord1, TrackWord2, TrackWord3, valLSBCurv, valLSBD0, valLSBPhi, valLSBTanl, valLSBZ0, and PV3DBase< T, PVType, FrameType >::z().

Referenced by TTTrack_TrackWord().

◆ setTrackWord() [2/2]

void TTTrack_TrackWord::setTrackWord ( unsigned int  Rinv,
unsigned int  phi0,
unsigned int  tanl,
unsigned int  z0,
unsigned int  d0,
unsigned int  Chi2XY,
unsigned int  Chi2Z,
unsigned int  BendChi2,
unsigned int  HitPattern,
unsigned int  iSpare 
)

Definition at line 54 of file TTTrack_TrackWord.cc.

63  {
64  iRinv = theRinv;
65  iphi = phi0;
66  itanl = tanl;
67  iz0 = z0;
68  id0 = d0;
69  ichi2XY = theChi2XY; //revert to other packing? Or will be unpacked wrong
70  ichi2Z = theChi2Z; //revert to other packing? Or will be unpacked wrong
71  iBendChi2 = theBendChi2; // revert to ogher packing? Or will be unpacked wrong
72  ispare = iSpare;
73  iHitPattern = theHitPattern;
74 
75  initialize();
76 }

References d0, iBendChi2, ichi2XY, ichi2Z, id0, iHitPattern, initialize(), iphi, iRinv, ispare, itanl, iz0, and HLTMuonOfflineAnalyzer_cfi::z0.

◆ unpack_hitPattern()

unsigned int TTTrack_TrackWord::unpack_hitPattern ( )

Definition at line 269 of file TTTrack_TrackWord.cc.

269  {
270  unsigned int bits = (TrackWord2 & maskHitPat);
271  return bits;
272 }

References maskHitPat, and TrackWord2.

◆ unpack_iBendChi2()

float TTTrack_TrackWord::unpack_iBendChi2 ( )

Definition at line 287 of file TTTrack_TrackWord.cc.

287  {
288  unsigned int bits = (TrackWord3 & maskBendChi2) >> (nWordBits - (NCurvBits + NBChi2Bits + 1)); //14
289  float unpBChi2 = Bchi2Bins[bits];
290  return unpBChi2;
291 }

References Bchi2Bins, maskBendChi2, NBChi2Bits, NCurvBits, nWordBits, and TrackWord3.

◆ unpack_ichi2XY()

float TTTrack_TrackWord::unpack_ichi2XY ( )

Definition at line 221 of file TTTrack_TrackWord.cc.

221  {
222  unsigned int bits = (TrackWord1 & maskChi2XY);
223  float unpChi2 = chi2Bins[bits];
224  return unpChi2;
225 }

References chi2Bins, maskChi2XY, and TrackWord1.

◆ unpack_ichi2Z()

float TTTrack_TrackWord::unpack_ichi2Z ( )

Definition at line 303 of file TTTrack_TrackWord.cc.

303  {
304  unsigned int bits = (TrackWord3 & maskChi2Z) >> (nWordBits - (NCurvBits + NBChi2Bits + NChi2Bits + 1)); //10
305  float unpChi2Z = chi2ZBins[bits];
306  return unpChi2Z;
307 }

References chi2ZBins, maskChi2Z, NBChi2Bits, NChi2Bits, NCurvBits, nWordBits, and TrackWord3.

◆ unpack_id0()

float TTTrack_TrackWord::unpack_id0 ( )

Definition at line 253 of file TTTrack_TrackWord.cc.

253  {
254  unsigned int bits = (TrackWord2 & maskD0) >> (nWordBits - (NPhiBits + ND0Bits + 2)); //7
255  float unpD0 = unpack_Signed(bits, ND0Bits, valLSBD0);
256  return unpD0;
257 }

References maskD0, ND0Bits, NPhiBits, nWordBits, TrackWord2, unpack_Signed(), and valLSBD0.

◆ unpack_iphi()

float TTTrack_TrackWord::unpack_iphi ( )

Definition at line 237 of file TTTrack_TrackWord.cc.

237  {
238  unsigned int bits = (TrackWord2 & maskPhi) >> (nWordBits - (NPhiBits + 1)); //20
239  float unpPhi = unpack_Signed(bits, NPhiBits, valLSBPhi);
240  return unpPhi;
241 }

References maskPhi, NPhiBits, nWordBits, TrackWord2, unpack_Signed(), and valLSBPhi.

◆ unpack_iRinv()

float TTTrack_TrackWord::unpack_iRinv ( )

Definition at line 276 of file TTTrack_TrackWord.cc.

276  {
277  unsigned int bits = (TrackWord3 & maskRinv) >> (nWordBits - (NCurvBits + 1)); //17
278  float unpCurv = unpack_Signed(bits, NCurvBits, valLSBCurv);
279  return unpCurv;
280 }

References maskRinv, NCurvBits, nWordBits, TrackWord3, unpack_Signed(), and valLSBCurv.

◆ unpack_ispare()

unsigned int TTTrack_TrackWord::unpack_ispare ( )

Definition at line 314 of file TTTrack_TrackWord.cc.

314  {
315  unsigned int bits = (TrackWord3 & maskSpare);
316  return bits;
317 }

References maskSpare, and TrackWord3.

◆ unpack_itanl()

float TTTrack_TrackWord::unpack_itanl ( )

Definition at line 189 of file TTTrack_TrackWord.cc.

189  {
190  unsigned int bits = (TrackWord1 & maskTanL) >> (nWordBits - (NTanlBits + 1)); //16
191  float unpTanl = unpack_Signed(bits, NTanlBits, valLSBTanl);
192  return unpTanl;
193 }

References maskTanL, NTanlBits, nWordBits, TrackWord1, unpack_Signed(), and valLSBTanl.

◆ unpack_iz0()

float TTTrack_TrackWord::unpack_iz0 ( )

Definition at line 205 of file TTTrack_TrackWord.cc.

205  {
206  unsigned int bits = (TrackWord1 & maskZ0) >> (nWordBits - (NTanlBits + NZ0Bits + 2)); //4
207  float unpZ0 = unpack_Signed(bits, NZ0Bits, valLSBZ0);
208  return unpZ0;
209 }

References maskZ0, NTanlBits, nWordBits, NZ0Bits, TrackWord1, unpack_Signed(), and valLSBZ0.

◆ unpack_Signed()

float TTTrack_TrackWord::unpack_Signed ( unsigned int  bits,
unsigned int  nBits,
float  lsb 
)
private

Definition at line 333 of file TTTrack_TrackWord.cc.

333  {
334  int isign = 1;
335  unsigned int maxVal = (1 << nBits) - 1;
336  if (bits & (1 << nBits)) { //check sign
337  isign = -1;
338  bits = (1 << (nBits + 1)) - bits; // if negative, flip everything for two's complement encoding
339  }
340  float unpacked = (float(bits & maxVal) + 0.5) * lsb;
341  unpacked = isign * unpacked;
342  return unpacked;
343 }

References dqmMemoryStats::float, and hgcalVFEProducer_cfi::lsb.

Referenced by get_id0(), get_iphi(), get_iRinv(), get_itanl(), get_iz0(), unpack_id0(), unpack_iphi(), unpack_iRinv(), unpack_itanl(), and unpack_iz0().

Member Data Documentation

◆ Bchi2Bins

float TTTrack_TrackWord::Bchi2Bins[8]
private

Definition at line 183 of file TTTrack_TrackWord.h.

Referenced by get_iBendChi2(), initialize(), setTrackWord(), and unpack_iBendChi2().

◆ chi2Bins

float TTTrack_TrackWord::chi2Bins[16]
private

Definition at line 181 of file TTTrack_TrackWord.h.

Referenced by get_ichi2XY(), initialize(), setTrackWord(), and unpack_ichi2XY().

◆ chi2ZBins

float TTTrack_TrackWord::chi2ZBins[16]
private

Definition at line 182 of file TTTrack_TrackWord.h.

Referenced by get_ichi2Z(), initialize(), setTrackWord(), and unpack_ichi2Z().

◆ iBendChi2

unsigned int TTTrack_TrackWord::iBendChi2
private

Definition at line 163 of file TTTrack_TrackWord.h.

Referenced by get_iBendChi2(), operator=(), setTrackWord(), and TTTrack_TrackWord().

◆ ichi2XY

unsigned int TTTrack_TrackWord::ichi2XY
private

◆ ichi2Z

unsigned int TTTrack_TrackWord::ichi2Z
private

Definition at line 162 of file TTTrack_TrackWord.h.

Referenced by get_ichi2Z(), operator=(), setTrackWord(), and TTTrack_TrackWord().

◆ id0

unsigned int TTTrack_TrackWord::id0
private

Definition at line 160 of file TTTrack_TrackWord.h.

Referenced by get_d0Bits(), get_id0(), operator=(), setTrackWord(), and TTTrack_TrackWord().

◆ iHitPattern

unsigned int TTTrack_TrackWord::iHitPattern
private

Definition at line 165 of file TTTrack_TrackWord.h.

Referenced by get_hitPattern(), operator=(), setTrackWord(), and TTTrack_TrackWord().

◆ iphi

unsigned int TTTrack_TrackWord::iphi
private

◆ iRinv

unsigned int TTTrack_TrackWord::iRinv
private

Definition at line 156 of file TTTrack_TrackWord.h.

Referenced by get_iRinv(), operator=(), setTrackWord(), and TTTrack_TrackWord().

◆ ispare

unsigned int TTTrack_TrackWord::ispare
private

Definition at line 164 of file TTTrack_TrackWord.h.

Referenced by get_ispare(), operator=(), setTrackWord(), and TTTrack_TrackWord().

◆ itanl

unsigned int TTTrack_TrackWord::itanl
private

◆ iz0

unsigned int TTTrack_TrackWord::iz0
private

Definition at line 159 of file TTTrack_TrackWord.h.

Referenced by get_iz0(), get_z0Bits(), operator=(), setTrackWord(), and TTTrack_TrackWord().

◆ maskBendChi2

const unsigned int TTTrack_TrackWord::maskBendChi2 = 0x0001C000
private

Definition at line 236 of file TTTrack_TrackWord.h.

Referenced by get_BendChi2Bits(), and unpack_iBendChi2().

◆ maskChi2XY

const unsigned int TTTrack_TrackWord::maskChi2XY = 0x0000000F
private

Definition at line 234 of file TTTrack_TrackWord.h.

Referenced by unpack_ichi2XY().

◆ maskChi2Z

const unsigned int TTTrack_TrackWord::maskChi2Z = 0x00003C00
private

Definition at line 235 of file TTTrack_TrackWord.h.

Referenced by unpack_ichi2Z().

◆ maskD0

const unsigned int TTTrack_TrackWord::maskD0 = 0x000FFF80
private

Definition at line 232 of file TTTrack_TrackWord.h.

Referenced by unpack_id0().

◆ maskHitPat

const unsigned int TTTrack_TrackWord::maskHitPat = 0x0000007F
private

Definition at line 237 of file TTTrack_TrackWord.h.

Referenced by unpack_hitPattern().

◆ maskPhi

const unsigned int TTTrack_TrackWord::maskPhi = 0xFFF00000
private

Definition at line 230 of file TTTrack_TrackWord.h.

Referenced by unpack_iphi().

◆ maskRinv

const unsigned int TTTrack_TrackWord::maskRinv = 0xFFFE0000
private

Definition at line 229 of file TTTrack_TrackWord.h.

Referenced by unpack_iRinv().

◆ maskSpare

const unsigned int TTTrack_TrackWord::maskSpare = 0x000003FF
private

Definition at line 238 of file TTTrack_TrackWord.h.

Referenced by unpack_ispare().

◆ maskTanL

const unsigned int TTTrack_TrackWord::maskTanL = 0xFFFF0000
private

Definition at line 231 of file TTTrack_TrackWord.h.

Referenced by unpack_itanl().

◆ maskZ0

const unsigned int TTTrack_TrackWord::maskZ0 = 0x0000FFF0
private

Definition at line 233 of file TTTrack_TrackWord.h.

Referenced by unpack_iz0().

◆ maxCurv

const float TTTrack_TrackWord::maxCurv = 0.00855
private

Definition at line 220 of file TTTrack_TrackWord.h.

Referenced by initialize().

◆ maxD0

const float TTTrack_TrackWord::maxD0 = 15.4
private

Definition at line 224 of file TTTrack_TrackWord.h.

Referenced by initialize().

◆ maxPhi

const float TTTrack_TrackWord::maxPhi = 1.026
private

Definition at line 221 of file TTTrack_TrackWord.h.

Referenced by initialize().

◆ maxTanl

const float TTTrack_TrackWord::maxTanl = 8.0
private

Definition at line 222 of file TTTrack_TrackWord.h.

Referenced by initialize().

◆ maxZ0

const float TTTrack_TrackWord::maxZ0 = 30.
private

Definition at line 223 of file TTTrack_TrackWord.h.

Referenced by initialize().

◆ NBchi2

unsigned int TTTrack_TrackWord::NBchi2
private

Definition at line 186 of file TTTrack_TrackWord.h.

Referenced by initialize(), and setTrackWord().

◆ NBChi2Bits

const unsigned int TTTrack_TrackWord::NBChi2Bits = 3
private

◆ Nchi2

unsigned int TTTrack_TrackWord::Nchi2
private

Definition at line 185 of file TTTrack_TrackWord.h.

Referenced by initialize(), and setTrackWord().

◆ NChi2Bits

const unsigned int TTTrack_TrackWord::NChi2Bits = 4
private

Definition at line 214 of file TTTrack_TrackWord.h.

Referenced by initialize(), setTrackWord(), and unpack_ichi2Z().

◆ NCurvBits

const unsigned int TTTrack_TrackWord::NCurvBits = 14
private

◆ ND0Bits

const unsigned int TTTrack_TrackWord::ND0Bits = 12
private

Definition at line 211 of file TTTrack_TrackWord.h.

Referenced by get_id0(), initialize(), setTrackWord(), and unpack_id0().

◆ NHitsBits

const unsigned int TTTrack_TrackWord::NHitsBits = 7
private

Definition at line 216 of file TTTrack_TrackWord.h.

◆ NPhiBits

const unsigned int TTTrack_TrackWord::NPhiBits = 11
private

Definition at line 208 of file TTTrack_TrackWord.h.

Referenced by get_iphi(), initialize(), setTrackWord(), unpack_id0(), and unpack_iphi().

◆ NSpareBits

const unsigned int TTTrack_TrackWord::NSpareBits = 14
private

Definition at line 217 of file TTTrack_TrackWord.h.

◆ NTanlBits

const unsigned int TTTrack_TrackWord::NTanlBits = 15
private

Definition at line 209 of file TTTrack_TrackWord.h.

Referenced by get_itanl(), initialize(), setTrackWord(), unpack_itanl(), and unpack_iz0().

◆ nWordBits

const unsigned int TTTrack_TrackWord::nWordBits = 32
private

◆ NZ0Bits

const unsigned int TTTrack_TrackWord::NZ0Bits = 11
private

Definition at line 210 of file TTTrack_TrackWord.h.

Referenced by get_iz0(), initialize(), setTrackWord(), and unpack_iz0().

◆ TrackWord1

unsigned int TTTrack_TrackWord::TrackWord1
private

◆ TrackWord2

unsigned int TTTrack_TrackWord::TrackWord2
private

◆ TrackWord3

unsigned int TTTrack_TrackWord::TrackWord3
private

◆ valLSBCurv

float TTTrack_TrackWord::valLSBCurv
private

Definition at line 175 of file TTTrack_TrackWord.h.

Referenced by get_iRinv(), initialize(), setTrackWord(), and unpack_iRinv().

◆ valLSBD0

float TTTrack_TrackWord::valLSBD0
private

Definition at line 179 of file TTTrack_TrackWord.h.

Referenced by get_id0(), initialize(), setTrackWord(), and unpack_id0().

◆ valLSBPhi

float TTTrack_TrackWord::valLSBPhi
private

Definition at line 176 of file TTTrack_TrackWord.h.

Referenced by get_iphi(), initialize(), setTrackWord(), and unpack_iphi().

◆ valLSBTanl

float TTTrack_TrackWord::valLSBTanl
private

Definition at line 177 of file TTTrack_TrackWord.h.

Referenced by get_itanl(), initialize(), setTrackWord(), and unpack_itanl().

◆ valLSBZ0

float TTTrack_TrackWord::valLSBZ0
private

Definition at line 178 of file TTTrack_TrackWord.h.

Referenced by get_iz0(), initialize(), setTrackWord(), and unpack_iz0().

TTTrack_TrackWord::TrackWord3
unsigned int TrackWord3
Definition: TTTrack_TrackWord.h:171
TTTrack_TrackWord::TrackWord1
unsigned int TrackWord1
Definition: TTTrack_TrackWord.h:169
TTTrack_TrackWord::TrackWord2
unsigned int TrackWord2
Definition: TTTrack_TrackWord.h:170
TTTrack_TrackWord::NCurvBits
const unsigned int NCurvBits
Definition: TTTrack_TrackWord.h:207
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
TTTrack_TrackWord::NBchi2
unsigned int NBchi2
Definition: TTTrack_TrackWord.h:186
TTTrack_TrackWord::valLSBPhi
float valLSBPhi
Definition: TTTrack_TrackWord.h:176
TTTrack_TrackWord::unpack_Signed
float unpack_Signed(unsigned int bits, unsigned int nBits, float lsb)
Definition: TTTrack_TrackWord.cc:333
TTTrack_TrackWord::valLSBCurv
float valLSBCurv
Definition: TTTrack_TrackWord.h:175
TTTrack_TrackWord::valLSBTanl
float valLSBTanl
Definition: TTTrack_TrackWord.h:177
TTTrack_TrackWord::maskBendChi2
const unsigned int maskBendChi2
Definition: TTTrack_TrackWord.h:236
TTTrack_TrackWord::initialize
void initialize()
Definition: TTTrack_TrackWord.cc:345
TTTrack_TrackWord::valLSBD0
float valLSBD0
Definition: TTTrack_TrackWord.h:179
TTTrack_TrackWord::setTrackWord
void setTrackWord(const GlobalVector &Momentum, const GlobalPoint &POCA, double Rinv, double Chi2XY, double Chi2Z, double BendChi2, unsigned int HitPattern, unsigned int iSpare)
Definition: TTTrack_TrackWord.cc:79
TTTrack_TrackWord::maxD0
const float maxD0
Definition: TTTrack_TrackWord.h:224
hgcalVFEProducer_cfi.lsb
lsb
Definition: hgcalVFEProducer_cfi.py:80
TTTrack_TrackWord::ichi2Z
unsigned int ichi2Z
Definition: TTTrack_TrackWord.h:162
TTTrack_TrackWord::maxTanl
const float maxTanl
Definition: TTTrack_TrackWord.h:222
TTTrack_TrackWord::valLSBZ0
float valLSBZ0
Definition: TTTrack_TrackWord.h:178
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
word
uint64_t word
Definition: CTPPSTotemDataFormatter.cc:29
trigObjTnPSource_cfi.var
var
Definition: trigObjTnPSource_cfi.py:21
TTTrack_TrackWord::maskChi2Z
const unsigned int maskChi2Z
Definition: TTTrack_TrackWord.h:235
TTTrack_TrackWord::maxCurv
const float maxCurv
Definition: TTTrack_TrackWord.h:220
TTTrack_TrackWord::id0
unsigned int id0
Definition: TTTrack_TrackWord.h:160
TTTrack_TrackWord::NTanlBits
const unsigned int NTanlBits
Definition: TTTrack_TrackWord.h:209
TTTrack_TrackWord::nWordBits
const unsigned int nWordBits
Definition: TTTrack_TrackWord.h:240
TTTrack_TrackWord::NChi2Bits
const unsigned int NChi2Bits
Definition: TTTrack_TrackWord.h:214
TTTrack_TrackWord::iBendChi2
unsigned int iBendChi2
Definition: TTTrack_TrackWord.h:163
TTTrack_TrackWord::chi2Bins
float chi2Bins[16]
Definition: TTTrack_TrackWord.h:181
TTTrack_TrackWord::NZ0Bits
const unsigned int NZ0Bits
Definition: TTTrack_TrackWord.h:210
TTTrack_TrackWord::iz0
unsigned int iz0
Definition: TTTrack_TrackWord.h:159
TTTrack_TrackWord::maskZ0
const unsigned int maskZ0
Definition: TTTrack_TrackWord.h:233
HLTMuonOfflineAnalyzer_cfi.z0
z0
Definition: HLTMuonOfflineAnalyzer_cfi.py:98
TTTrack_TrackWord::maxPhi
const float maxPhi
Definition: TTTrack_TrackWord.h:221
TTTrack_TrackWord::NPhiBits
const unsigned int NPhiBits
Definition: TTTrack_TrackWord.h:208
TTTrack_TrackWord::maskSpare
const unsigned int maskSpare
Definition: TTTrack_TrackWord.h:238
TTTrack_TrackWord::Bchi2Bins
float Bchi2Bins[8]
Definition: TTTrack_TrackWord.h:183
TTTrack_TrackWord::maskTanL
const unsigned int maskTanL
Definition: TTTrack_TrackWord.h:231
TTTrack_TrackWord::NBChi2Bits
const unsigned int NBChi2Bits
Definition: TTTrack_TrackWord.h:215
TTTrack_TrackWord::iHitPattern
unsigned int iHitPattern
Definition: TTTrack_TrackWord.h:165
TTTrack_TrackWord::maskPhi
const unsigned int maskPhi
Definition: TTTrack_TrackWord.h:230
TTTrack_TrackWord::digitize_Signed
unsigned int digitize_Signed(float var, unsigned int maxBit, unsigned int minBit, float lsb)
Definition: TTTrack_TrackWord.cc:321
TTTrack_TrackWord::iphi
unsigned int iphi
Definition: TTTrack_TrackWord.h:157
TTTrack_TrackWord::maxZ0
const float maxZ0
Definition: TTTrack_TrackWord.h:223
TTTrack_TrackWord::Nchi2
unsigned int Nchi2
Definition: TTTrack_TrackWord.h:185
TTTrack_TrackWord::maskRinv
const unsigned int maskRinv
Definition: TTTrack_TrackWord.h:229
TTTrack_TrackWord::ispare
unsigned int ispare
Definition: TTTrack_TrackWord.h:164
TTTrack_TrackWord::maskChi2XY
const unsigned int maskChi2XY
Definition: TTTrack_TrackWord.h:234
TTTrack_TrackWord::iRinv
unsigned int iRinv
Definition: TTTrack_TrackWord.h:156
d0
static constexpr float d0
Definition: L1EGammaCrystalsEmulatorProducer.cc:85
TTTrack_TrackWord::chi2ZBins
float chi2ZBins[16]
Definition: TTTrack_TrackWord.h:182
TTTrack_TrackWord::maskD0
const unsigned int maskD0
Definition: TTTrack_TrackWord.h:232
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
TTTrack_TrackWord::maskHitPat
const unsigned int maskHitPat
Definition: TTTrack_TrackWord.h:237
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
TTTrack_TrackWord::itanl
unsigned int itanl
Definition: TTTrack_TrackWord.h:158
TTTrack_TrackWord::ND0Bits
const unsigned int ND0Bits
Definition: TTTrack_TrackWord.h:211
TTTrack_TrackWord::ichi2XY
unsigned int ichi2XY
Definition: TTTrack_TrackWord.h:161