CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
trklet::LayerProjection Class Reference

#include <LayerProjection.h>

Public Member Functions

const FPGAWordfpgafinezvm () const
 
const FPGAWordfpgaphiproj () const
 
const FPGAWordfpgaphiprojder () const
 
const FPGAWordfpgaphiprojvm () const
 
const FPGAWordfpgazbin1projvm () const
 
const FPGAWordfpgazbin2projvm () const
 
const FPGAWordfpgazproj () const
 
const FPGAWordfpgazprojder () const
 
const FPGAWordfpgazprojvm () const
 
void init (Settings const &settings, int projlayer, double rproj, int iphiproj, int izproj, int iphider, int izder, double phiproj, double zproj, double phiprojder, double zprojder, double phiprojapprox, double zprojapprox, double phiprojderapprox, double zprojderapprox, bool isPSseed=false)
 
 LayerProjection ()
 
double phiproj () const
 
double phiprojapprox () const
 
double phiprojder () const
 
double phiprojderapprox () const
 
int projlayer () const
 
double rproj () const
 
bool valid () const
 
double zproj () const
 
double zprojapprox () const
 
double zprojder () const
 
double zprojderapprox () const
 
 ~LayerProjection ()=default
 

Protected Attributes

FPGAWord fpgafinezvm_
 
FPGAWord fpgaphiproj_
 
FPGAWord fpgaphiprojder_
 
FPGAWord fpgaphiprojvm_
 
FPGAWord fpgazbin1projvm_
 
FPGAWord fpgazbin2projvm_
 
FPGAWord fpgazproj_
 
FPGAWord fpgazprojder_
 
FPGAWord fpgazprojvm_
 
double phiproj_
 
double phiprojapprox_
 
double phiprojder_
 
double phiprojderapprox_
 
int projlayer_
 
double rproj_
 
bool valid_
 
double zbin1_
 
double zbin2_
 
double zproj_
 
double zprojapprox_
 
double zprojder_
 
double zprojderapprox_
 

Detailed Description

Definition at line 10 of file LayerProjection.h.

Constructor & Destructor Documentation

◆ LayerProjection()

trklet::LayerProjection::LayerProjection ( )
inline

Definition at line 12 of file LayerProjection.h.

12 { valid_ = false; }

References valid_.

◆ ~LayerProjection()

trklet::LayerProjection::~LayerProjection ( )
default

Member Function Documentation

◆ fpgafinezvm()

const FPGAWord& trklet::LayerProjection::fpgafinezvm ( ) const
inline

Definition at line 80 of file LayerProjection.h.

80  {
81  assert(valid_);
82  return fpgafinezvm_;
83  };

References cms::cuda::assert(), fpgafinezvm_, and valid_.

Referenced by trklet::Tracklet::finezvm(), and trklet::Tracklet::vmstrlayer().

◆ fpgaphiproj()

const FPGAWord& trklet::LayerProjection::fpgaphiproj ( ) const
inline

Definition at line 45 of file LayerProjection.h.

45  {
46  assert(valid_);
47  return fpgaphiproj_;
48  };

References cms::cuda::assert(), fpgaphiproj_, and valid_.

Referenced by trklet::Tracklet::fpgaphiproj(), and trklet::Tracklet::trackletprojstr().

◆ fpgaphiprojder()

const FPGAWord& trklet::LayerProjection::fpgaphiprojder ( ) const
inline

◆ fpgaphiprojvm()

const FPGAWord& trklet::LayerProjection::fpgaphiprojvm ( ) const
inline

Definition at line 65 of file LayerProjection.h.

65  {
66  assert(valid_);
67  return fpgaphiprojvm_;
68  };

References cms::cuda::assert(), fpgaphiprojvm_, and valid_.

Referenced by trklet::Tracklet::phiprojvm().

◆ fpgazbin1projvm()

const FPGAWord& trklet::LayerProjection::fpgazbin1projvm ( ) const
inline

Definition at line 70 of file LayerProjection.h.

70  {
71  assert(valid_);
72  return fpgazbin1projvm_;
73  };

References cms::cuda::assert(), fpgazbin1projvm_, and valid_.

Referenced by trklet::Tracklet::vmstrlayer(), and trklet::Tracklet::zbin1projvm().

◆ fpgazbin2projvm()

const FPGAWord& trklet::LayerProjection::fpgazbin2projvm ( ) const
inline

Definition at line 75 of file LayerProjection.h.

75  {
76  assert(valid_);
77  return fpgazbin2projvm_;
78  };

References cms::cuda::assert(), fpgazbin2projvm_, and valid_.

Referenced by trklet::Tracklet::vmstrlayer(), and trklet::Tracklet::zbin2projvm().

◆ fpgazproj()

const FPGAWord& trklet::LayerProjection::fpgazproj ( ) const
inline

Definition at line 50 of file LayerProjection.h.

50  {
51  assert(valid_);
52  return fpgazproj_;
53  };

References cms::cuda::assert(), fpgazproj_, and valid_.

Referenced by trklet::Tracklet::fpgazproj(), and trklet::Tracklet::trackletprojstr().

◆ fpgazprojder()

const FPGAWord& trklet::LayerProjection::fpgazprojder ( ) const
inline

Definition at line 60 of file LayerProjection.h.

60  {
61  assert(valid_);
62  return fpgazprojder_;
63  };

References cms::cuda::assert(), fpgazprojder_, and valid_.

Referenced by trklet::Tracklet::fpgazprojder(), and trklet::Tracklet::trackletprojstr().

◆ fpgazprojvm()

const FPGAWord& trklet::LayerProjection::fpgazprojvm ( ) const
inline

Definition at line 85 of file LayerProjection.h.

85  {
86  assert(valid_);
87  return fpgazprojvm_;
88  };

References cms::cuda::assert(), fpgazprojvm_, and valid_.

Referenced by trklet::Tracklet::zprojvm().

◆ init()

void LayerProjection::init ( Settings const &  settings,
int  projlayer,
double  rproj,
int  iphiproj,
int  izproj,
int  iphider,
int  izder,
double  phiproj,
double  zproj,
double  phiprojder,
double  zprojder,
double  phiprojapprox,
double  zprojapprox,
double  phiprojderapprox,
double  zprojderapprox,
bool  isPSseed = false 
)

Definition at line 9 of file LayerProjection.cc.

24  {
25  assert(projlayer > 0);
27 
28  valid_ = true;
29 
30  rproj_ = rproj;
31 
33 
34  assert(iphiproj >= 0);
35 
36  if (rproj < settings.rPS2S()) {
37  fpgaphiproj_.set(iphiproj, settings.nphibitsstub(0), true, __LINE__, __FILE__);
38  int iphivm = (iphiproj >> (settings.nphibitsstub(0) - 5)) & 0x7;
39  if ((projlayer_ % 2) == 1) {
40  iphivm ^= 4;
41  }
42  fpgaphiprojvm_.set(iphivm, 3, true, __LINE__, __FILE__);
43  fpgazproj_.set(izproj, settings.nzbitsstub(0), false, __LINE__, __FILE__);
44  int izvm = izproj >> (12 - 7) & 0xf;
45  fpgazprojvm_.set(izvm, 4, true, __LINE__, __FILE__);
46  fpgaphiprojder_.set(iphider, settings.nbitsphiprojderL123(), false, __LINE__, __FILE__);
47  fpgazprojder_.set(izder, settings.nbitszprojderL123(), false, __LINE__, __FILE__);
48  } else {
49  fpgaphiproj_.set(iphiproj, settings.nphibitsstub(5), true, __LINE__, __FILE__);
50  int iphivm = (iphiproj >> (settings.nphibitsstub(5) - 5)) & 0x7;
51  if ((projlayer_ % 2) == 1) {
52  iphivm ^= 4;
53  }
54  fpgaphiprojvm_.set(iphivm, 3, true, __LINE__, __FILE__);
55  fpgazproj_.set(izproj, settings.nzbitsstub(5), false, __LINE__, __FILE__);
56  int izvm = izproj >> (8 - 7) & 0xf;
57  fpgazprojvm_.set(izvm, 4, true, __LINE__, __FILE__);
58  fpgaphiprojder_.set(iphider, settings.nbitsphiprojderL456(), false, __LINE__, __FILE__);
59  fpgazprojder_.set(izder, settings.nbitszprojderL456(), false, __LINE__, __FILE__);
60  }
61 
66  int offset = 4;
67  if (isPSseed) {
68  offset = 1;
69  }
70  unsigned int zbin1 = (1 << (settings.MEBinsBits() - 1)) +
71  (((fpgazproj_.value() >> (fpgazproj_.nbits() - settings.MEBinsBits() - 3)) - offset) >> 3);
72  unsigned int zbin2 = (1 << (settings.MEBinsBits() - 1)) +
73  (((fpgazproj_.value() >> (fpgazproj_.nbits() - settings.MEBinsBits() - 3)) + offset) >> 3);
74  if (zbin1 >= settings.MEBins()) {
75  zbin1 = 0; //note that zbin1 is unsigned
76  }
77  if (zbin2 >= settings.MEBins())
78  zbin2 = settings.MEBins() - 1;
79  assert(zbin1 <= zbin2);
80  assert(zbin2 - zbin1 <= 1);
81  fpgazbin1projvm_.set(zbin1, settings.MEBinsBits(), true, __LINE__, __FILE__); // first z bin
82  if (zbin1 == zbin2)
83  fpgazbin2projvm_.set(0, 1, true, __LINE__, __FILE__); // don't need to check adjacent z bin
84  else
85  fpgazbin2projvm_.set(1, 1, true, __LINE__, __FILE__); // do need to check next z bin
86 
87  //fine vm z bits. Use 4 bits for fine position. starting at zbin 1
88  int finez = ((1 << (settings.MEBinsBits() + 2)) +
89  (fpgazproj_.value() >> (fpgazproj_.nbits() - (settings.MEBinsBits() + 3)))) -
90  (zbin1 << 3);
91 
92  fpgafinezvm_.set(finez, 4, true, __LINE__, __FILE__); // fine z postions starting at zbin1 //FIXME using 3 bits
93 
94  phiproj_ = phiproj;
95  zproj_ = zproj;
98 
103 }

References cms::cuda::assert(), trklet::Settings::MEBins(), trklet::Settings::MEBinsBits(), trklet::N_LAYER, trklet::Settings::nbitsphiprojderL123(), trklet::Settings::nbitsphiprojderL456(), trklet::Settings::nbitszprojderL123(), trklet::Settings::nbitszprojderL456(), trklet::Settings::nphibitsstub(), trklet::Settings::nzbitsstub(), hltrates_dqm_sourceclient-live_cfg::offset, trklet::Settings::rPS2S(), and sistrip::valid_.

Referenced by trklet::TrackletCalculatorBase::barrelSeeding(), trklet::TrackletCalculatorDisplaced::DDLSeeding(), trklet::TrackletCalculatorBase::diskSeeding(), trklet::TrackletCalculatorDisplaced::LLDSeeding(), trklet::TrackletCalculatorDisplaced::LLLSeeding(), and trklet::TrackletCalculatorBase::overlapSeeding().

◆ phiproj()

double trklet::LayerProjection::phiproj ( ) const
inline

Definition at line 90 of file LayerProjection.h.

90  {
91  assert(valid_);
92  return phiproj_;
93  };

References cms::cuda::assert(), phiproj_, and valid_.

Referenced by trklet::Tracklet::phiproj().

◆ phiprojapprox()

double trklet::LayerProjection::phiprojapprox ( ) const
inline

Definition at line 110 of file LayerProjection.h.

110  {
111  assert(valid_);
112  return phiprojapprox_;
113  };

References cms::cuda::assert(), phiprojapprox_, and valid_.

Referenced by trklet::Tracklet::phiprojapprox().

◆ phiprojder()

double trklet::LayerProjection::phiprojder ( ) const
inline

Definition at line 100 of file LayerProjection.h.

100  {
101  assert(valid_);
102  return phiprojder_;
103  };

References cms::cuda::assert(), phiprojder_, and valid_.

Referenced by trklet::Tracklet::phiprojder().

◆ phiprojderapprox()

double trklet::LayerProjection::phiprojderapprox ( ) const
inline

Definition at line 120 of file LayerProjection.h.

120  {
121  assert(valid_);
122  return phiprojderapprox_;
123  };

References cms::cuda::assert(), phiprojderapprox_, and valid_.

Referenced by trklet::Tracklet::phiprojderapprox().

◆ projlayer()

int trklet::LayerProjection::projlayer ( ) const
inline

Definition at line 35 of file LayerProjection.h.

35  {
36  assert(valid_);
37  return projlayer_;
38  };

References cms::cuda::assert(), projlayer_, and valid_.

◆ rproj()

double trklet::LayerProjection::rproj ( ) const
inline

Definition at line 40 of file LayerProjection.h.

40  {
41  assert(valid_);
42  return rproj_;
43  };

References cms::cuda::assert(), rproj_, and valid_.

Referenced by trklet::Tracklet::rproj().

◆ valid()

bool trklet::LayerProjection::valid ( ) const
inline

Definition at line 33 of file LayerProjection.h.

33 { return valid_; }

References valid_.

Referenced by trklet::Tracklet::validProj().

◆ zproj()

double trklet::LayerProjection::zproj ( ) const
inline

Definition at line 95 of file LayerProjection.h.

95  {
96  assert(valid_);
97  return zproj_;
98  };

References cms::cuda::assert(), valid_, and zproj_.

Referenced by trklet::Tracklet::zproj().

◆ zprojapprox()

double trklet::LayerProjection::zprojapprox ( ) const
inline

Definition at line 115 of file LayerProjection.h.

115  {
116  assert(valid_);
117  return zprojapprox_;
118  };

References cms::cuda::assert(), valid_, and zprojapprox_.

Referenced by trklet::Tracklet::zprojapprox().

◆ zprojder()

double trklet::LayerProjection::zprojder ( ) const
inline

Definition at line 105 of file LayerProjection.h.

105  {
106  assert(valid_);
107  return zprojder_;
108  };

References cms::cuda::assert(), valid_, and zprojder_.

Referenced by trklet::Tracklet::zprojder().

◆ zprojderapprox()

double trklet::LayerProjection::zprojderapprox ( ) const
inline

Definition at line 125 of file LayerProjection.h.

125  {
126  assert(valid_);
127  return zprojderapprox_;
128  };

References cms::cuda::assert(), valid_, and zprojderapprox_.

Referenced by trklet::Tracklet::zprojderapprox().

Member Data Documentation

◆ fpgafinezvm_

FPGAWord trklet::LayerProjection::fpgafinezvm_
protected

Definition at line 147 of file LayerProjection.h.

Referenced by fpgafinezvm().

◆ fpgaphiproj_

FPGAWord trklet::LayerProjection::fpgaphiproj_
protected

Definition at line 137 of file LayerProjection.h.

Referenced by fpgaphiproj().

◆ fpgaphiprojder_

FPGAWord trklet::LayerProjection::fpgaphiprojder_
protected

Definition at line 139 of file LayerProjection.h.

Referenced by fpgaphiprojder().

◆ fpgaphiprojvm_

FPGAWord trklet::LayerProjection::fpgaphiprojvm_
protected

Definition at line 142 of file LayerProjection.h.

Referenced by fpgaphiprojvm().

◆ fpgazbin1projvm_

FPGAWord trklet::LayerProjection::fpgazbin1projvm_
protected

Definition at line 145 of file LayerProjection.h.

Referenced by fpgazbin1projvm().

◆ fpgazbin2projvm_

FPGAWord trklet::LayerProjection::fpgazbin2projvm_
protected

Definition at line 146 of file LayerProjection.h.

Referenced by fpgazbin2projvm().

◆ fpgazproj_

FPGAWord trklet::LayerProjection::fpgazproj_
protected

Definition at line 138 of file LayerProjection.h.

Referenced by fpgazproj().

◆ fpgazprojder_

FPGAWord trklet::LayerProjection::fpgazprojder_
protected

Definition at line 140 of file LayerProjection.h.

Referenced by fpgazprojder().

◆ fpgazprojvm_

FPGAWord trklet::LayerProjection::fpgazprojvm_
protected

Definition at line 143 of file LayerProjection.h.

Referenced by fpgazprojvm().

◆ phiproj_

double trklet::LayerProjection::phiproj_
protected

Definition at line 149 of file LayerProjection.h.

Referenced by phiproj().

◆ phiprojapprox_

double trklet::LayerProjection::phiprojapprox_
protected

Definition at line 157 of file LayerProjection.h.

Referenced by phiprojapprox().

◆ phiprojder_

double trklet::LayerProjection::phiprojder_
protected

Definition at line 151 of file LayerProjection.h.

Referenced by phiprojder().

◆ phiprojderapprox_

double trklet::LayerProjection::phiprojderapprox_
protected

Definition at line 159 of file LayerProjection.h.

Referenced by phiprojderapprox().

◆ projlayer_

int trklet::LayerProjection::projlayer_
protected

Definition at line 133 of file LayerProjection.h.

Referenced by projlayer().

◆ rproj_

double trklet::LayerProjection::rproj_
protected

Definition at line 135 of file LayerProjection.h.

Referenced by rproj().

◆ valid_

bool trklet::LayerProjection::valid_
protected

◆ zbin1_

double trklet::LayerProjection::zbin1_
protected

Definition at line 154 of file LayerProjection.h.

◆ zbin2_

double trklet::LayerProjection::zbin2_
protected

Definition at line 155 of file LayerProjection.h.

◆ zproj_

double trklet::LayerProjection::zproj_
protected

Definition at line 150 of file LayerProjection.h.

Referenced by zproj().

◆ zprojapprox_

double trklet::LayerProjection::zprojapprox_
protected

Definition at line 158 of file LayerProjection.h.

Referenced by zprojapprox().

◆ zprojder_

double trklet::LayerProjection::zprojder_
protected

Definition at line 152 of file LayerProjection.h.

Referenced by zprojder().

◆ zprojderapprox_

double trklet::LayerProjection::zprojderapprox_
protected

Definition at line 160 of file LayerProjection.h.

Referenced by zprojderapprox().

trklet::LayerProjection::zprojderapprox_
double zprojderapprox_
Definition: LayerProjection.h:160
trklet::LayerProjection::phiproj_
double phiproj_
Definition: LayerProjection.h:149
trklet::LayerProjection::zprojder_
double zprojder_
Definition: LayerProjection.h:152
trklet::LayerProjection::rproj
double rproj() const
Definition: LayerProjection.h:40
trklet::LayerProjection::fpgazbin2projvm_
FPGAWord fpgazbin2projvm_
Definition: LayerProjection.h:146
trklet::LayerProjection::zproj
double zproj() const
Definition: LayerProjection.h:95
trklet::LayerProjection::phiprojapprox_
double phiprojapprox_
Definition: LayerProjection.h:157
trklet::LayerProjection::phiproj
double phiproj() const
Definition: LayerProjection.h:90
trklet::LayerProjection::fpgazbin1projvm_
FPGAWord fpgazbin1projvm_
Definition: LayerProjection.h:145
trklet::LayerProjection::zprojapprox
double zprojapprox() const
Definition: LayerProjection.h:115
cms::cuda::assert
assert(be >=bs)
trklet::FPGAWord::set
void set(int value, int nbits, bool positive=true, int line=-1, const char *file=nullptr)
Definition: FPGAWord.cc:14
trklet::FPGAWord::nbits
int nbits() const
Definition: FPGAWord.h:25
trklet::LayerProjection::phiprojderapprox_
double phiprojderapprox_
Definition: LayerProjection.h:159
trklet::LayerProjection::projlayer
int projlayer() const
Definition: LayerProjection.h:35
trklet::N_LAYER
constexpr int N_LAYER
Definition: Settings.h:19
trklet::LayerProjection::zproj_
double zproj_
Definition: LayerProjection.h:150
trklet::LayerProjection::zprojderapprox
double zprojderapprox() const
Definition: LayerProjection.h:125
trklet::LayerProjection::zprojder
double zprojder() const
Definition: LayerProjection.h:105
trklet::LayerProjection::fpgazproj_
FPGAWord fpgazproj_
Definition: LayerProjection.h:138
trklet::LayerProjection::phiprojder_
double phiprojder_
Definition: LayerProjection.h:151
trklet::LayerProjection::valid_
bool valid_
Definition: LayerProjection.h:128
trklet::LayerProjection::zprojapprox_
double zprojapprox_
Definition: LayerProjection.h:158
trklet::FPGAWord::value
int value() const
Definition: FPGAWord.h:24
trklet::LayerProjection::projlayer_
int projlayer_
Definition: LayerProjection.h:133
trklet::LayerProjection::fpgaphiprojder_
FPGAWord fpgaphiprojder_
Definition: LayerProjection.h:139
trklet::LayerProjection::fpgaphiproj_
FPGAWord fpgaphiproj_
Definition: LayerProjection.h:137
trklet::LayerProjection::phiprojder
double phiprojder() const
Definition: LayerProjection.h:100
trklet::LayerProjection::fpgafinezvm_
FPGAWord fpgafinezvm_
Definition: LayerProjection.h:147
trklet::LayerProjection::phiprojapprox
double phiprojapprox() const
Definition: LayerProjection.h:110
trklet::LayerProjection::fpgazprojvm_
FPGAWord fpgazprojvm_
Definition: LayerProjection.h:143
trklet::LayerProjection::phiprojderapprox
double phiprojderapprox() const
Definition: LayerProjection.h:120
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
trklet::LayerProjection::rproj_
double rproj_
Definition: LayerProjection.h:135
trklet::LayerProjection::fpgazprojder_
FPGAWord fpgazprojder_
Definition: LayerProjection.h:140
trklet::LayerProjection::fpgaphiprojvm_
FPGAWord fpgaphiprojvm_
Definition: LayerProjection.h:142