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)
 
 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 79 of file LayerProjection.h.

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

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 44 of file LayerProjection.h.

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

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 64 of file LayerProjection.h.

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

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

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

◆ fpgazbin1projvm()

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

Definition at line 69 of file LayerProjection.h.

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

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 74 of file LayerProjection.h.

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

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 49 of file LayerProjection.h.

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

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 59 of file LayerProjection.h.

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

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 84 of file LayerProjection.h.

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

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 
)

Definition at line 9 of file LayerProjection.cc.

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

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(), 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 89 of file LayerProjection.h.

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

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

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

◆ phiprojapprox()

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

Definition at line 109 of file LayerProjection.h.

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

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

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

◆ phiprojder()

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

Definition at line 99 of file LayerProjection.h.

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

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

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

◆ phiprojderapprox()

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

Definition at line 119 of file LayerProjection.h.

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

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

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

◆ projlayer()

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

Definition at line 34 of file LayerProjection.h.

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

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

◆ rproj()

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

Definition at line 39 of file LayerProjection.h.

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

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

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

◆ valid()

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

Definition at line 32 of file LayerProjection.h.

32 { return valid_; }

References valid_.

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

◆ zproj()

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

Definition at line 94 of file LayerProjection.h.

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

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

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

◆ zprojapprox()

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

Definition at line 114 of file LayerProjection.h.

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

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

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

◆ zprojder()

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

Definition at line 104 of file LayerProjection.h.

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

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

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

◆ zprojderapprox()

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

Definition at line 124 of file LayerProjection.h.

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

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

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

Member Data Documentation

◆ fpgafinezvm_

FPGAWord trklet::LayerProjection::fpgafinezvm_
protected

Definition at line 146 of file LayerProjection.h.

Referenced by fpgafinezvm().

◆ fpgaphiproj_

FPGAWord trklet::LayerProjection::fpgaphiproj_
protected

Definition at line 136 of file LayerProjection.h.

Referenced by fpgaphiproj().

◆ fpgaphiprojder_

FPGAWord trklet::LayerProjection::fpgaphiprojder_
protected

Definition at line 138 of file LayerProjection.h.

Referenced by fpgaphiprojder().

◆ fpgaphiprojvm_

FPGAWord trklet::LayerProjection::fpgaphiprojvm_
protected

Definition at line 141 of file LayerProjection.h.

Referenced by fpgaphiprojvm().

◆ fpgazbin1projvm_

FPGAWord trklet::LayerProjection::fpgazbin1projvm_
protected

Definition at line 144 of file LayerProjection.h.

Referenced by fpgazbin1projvm().

◆ fpgazbin2projvm_

FPGAWord trklet::LayerProjection::fpgazbin2projvm_
protected

Definition at line 145 of file LayerProjection.h.

Referenced by fpgazbin2projvm().

◆ fpgazproj_

FPGAWord trklet::LayerProjection::fpgazproj_
protected

Definition at line 137 of file LayerProjection.h.

Referenced by fpgazproj().

◆ fpgazprojder_

FPGAWord trklet::LayerProjection::fpgazprojder_
protected

Definition at line 139 of file LayerProjection.h.

Referenced by fpgazprojder().

◆ fpgazprojvm_

FPGAWord trklet::LayerProjection::fpgazprojvm_
protected

Definition at line 142 of file LayerProjection.h.

Referenced by fpgazprojvm().

◆ phiproj_

double trklet::LayerProjection::phiproj_
protected

Definition at line 148 of file LayerProjection.h.

Referenced by phiproj().

◆ phiprojapprox_

double trklet::LayerProjection::phiprojapprox_
protected

Definition at line 156 of file LayerProjection.h.

Referenced by phiprojapprox().

◆ phiprojder_

double trklet::LayerProjection::phiprojder_
protected

Definition at line 150 of file LayerProjection.h.

Referenced by phiprojder().

◆ phiprojderapprox_

double trklet::LayerProjection::phiprojderapprox_
protected

Definition at line 158 of file LayerProjection.h.

Referenced by phiprojderapprox().

◆ projlayer_

int trklet::LayerProjection::projlayer_
protected

Definition at line 132 of file LayerProjection.h.

Referenced by projlayer().

◆ rproj_

double trklet::LayerProjection::rproj_
protected

Definition at line 134 of file LayerProjection.h.

Referenced by rproj().

◆ valid_

bool trklet::LayerProjection::valid_
protected

◆ zbin1_

double trklet::LayerProjection::zbin1_
protected

Definition at line 153 of file LayerProjection.h.

◆ zbin2_

double trklet::LayerProjection::zbin2_
protected

Definition at line 154 of file LayerProjection.h.

◆ zproj_

double trklet::LayerProjection::zproj_
protected

Definition at line 149 of file LayerProjection.h.

Referenced by zproj().

◆ zprojapprox_

double trklet::LayerProjection::zprojapprox_
protected

Definition at line 157 of file LayerProjection.h.

Referenced by zprojapprox().

◆ zprojder_

double trklet::LayerProjection::zprojder_
protected

Definition at line 151 of file LayerProjection.h.

Referenced by zprojder().

◆ zprojderapprox_

double trklet::LayerProjection::zprojderapprox_
protected

Definition at line 159 of file LayerProjection.h.

Referenced by zprojderapprox().

trklet::LayerProjection::zprojderapprox_
double zprojderapprox_
Definition: LayerProjection.h:159
trklet::LayerProjection::phiproj_
double phiproj_
Definition: LayerProjection.h:148
trklet::LayerProjection::zprojder_
double zprojder_
Definition: LayerProjection.h:151
trklet::LayerProjection::rproj
double rproj() const
Definition: LayerProjection.h:39
trklet::LayerProjection::fpgazbin2projvm_
FPGAWord fpgazbin2projvm_
Definition: LayerProjection.h:145
trklet::LayerProjection::zproj
double zproj() const
Definition: LayerProjection.h:94
trklet::LayerProjection::phiprojapprox_
double phiprojapprox_
Definition: LayerProjection.h:156
trklet::LayerProjection::phiproj
double phiproj() const
Definition: LayerProjection.h:89
trklet::LayerProjection::fpgazbin1projvm_
FPGAWord fpgazbin1projvm_
Definition: LayerProjection.h:144
trklet::LayerProjection::zprojapprox
double zprojapprox() const
Definition: LayerProjection.h:114
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:158
trklet::LayerProjection::projlayer
int projlayer() const
Definition: LayerProjection.h:34
trklet::N_LAYER
constexpr int N_LAYER
Definition: Settings.h:19
trklet::LayerProjection::zproj_
double zproj_
Definition: LayerProjection.h:149
trklet::LayerProjection::zprojderapprox
double zprojderapprox() const
Definition: LayerProjection.h:124
trklet::LayerProjection::zprojder
double zprojder() const
Definition: LayerProjection.h:104
trklet::LayerProjection::fpgazproj_
FPGAWord fpgazproj_
Definition: LayerProjection.h:137
trklet::LayerProjection::phiprojder_
double phiprojder_
Definition: LayerProjection.h:150
trklet::LayerProjection::valid_
bool valid_
Definition: LayerProjection.h:127
trklet::LayerProjection::zprojapprox_
double zprojapprox_
Definition: LayerProjection.h:157
trklet::FPGAWord::value
int value() const
Definition: FPGAWord.h:24
trklet::LayerProjection::projlayer_
int projlayer_
Definition: LayerProjection.h:132
trklet::LayerProjection::fpgaphiprojder_
FPGAWord fpgaphiprojder_
Definition: LayerProjection.h:138
trklet::LayerProjection::fpgaphiproj_
FPGAWord fpgaphiproj_
Definition: LayerProjection.h:136
trklet::LayerProjection::phiprojder
double phiprojder() const
Definition: LayerProjection.h:99
trklet::LayerProjection::fpgafinezvm_
FPGAWord fpgafinezvm_
Definition: LayerProjection.h:146
trklet::LayerProjection::phiprojapprox
double phiprojapprox() const
Definition: LayerProjection.h:109
trklet::LayerProjection::fpgazprojvm_
FPGAWord fpgazprojvm_
Definition: LayerProjection.h:142
trklet::LayerProjection::phiprojderapprox
double phiprojderapprox() const
Definition: LayerProjection.h:119
trklet::LayerProjection::rproj_
double rproj_
Definition: LayerProjection.h:134
trklet::LayerProjection::fpgazprojder_
FPGAWord fpgazprojder_
Definition: LayerProjection.h:139
trklet::LayerProjection::fpgaphiprojvm_
FPGAWord fpgaphiprojvm_
Definition: LayerProjection.h:141