CMS 3D CMS Logo

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

#include <DiskProjection.h>

Public Member Functions

 DiskProjection ()
 
const FPGAWordfpgafinervm () const
 
const FPGAWordfpgaphiproj () const
 
const FPGAWordfpgaphiprojder () const
 
const FPGAWordfpgaphiprojvm () const
 
const FPGAWordfpgarbin1projvm () const
 
const FPGAWordfpgarbin2projvm () const
 
const FPGAWordfpgarproj () const
 
const FPGAWordfpgarprojder () const
 
const FPGAWordfpgarprojvm () const
 
const FPGAWordgetBendIndex () const
 
void init (Settings const &settings, int projdisk, double zproj, int iphiproj, int irproj, int iphider, int irder, double phiproj, double rproj, double phiprojder, double rprojder, double phiprojapprox, double rprojapprox, double phiprojderapprox, double rprojderapprox)
 
double phiproj () const
 
double phiprojapprox () const
 
double phiprojder () const
 
double phiprojderapprox () const
 
int projdisk () const
 
double rproj () const
 
double rprojapprox () const
 
double rprojder () const
 
double rprojderapprox () const
 
void setBendIndex (int bendindex)
 
bool valid () const
 
double zproj () const
 
 ~DiskProjection ()=default
 

Protected Attributes

FPGAWord fpgabendindex_
 
FPGAWord fpgafinervm_
 
FPGAWord fpgaphiproj_
 
FPGAWord fpgaphiprojder_
 
FPGAWord fpgaphiprojvm_
 
FPGAWord fpgarbin1projvm_
 
FPGAWord fpgarbin2projvm_
 
FPGAWord fpgarproj_
 
FPGAWord fpgarprojder_
 
FPGAWord fpgarprojvm_
 
double phiproj_
 
double phiprojapprox_
 
double phiprojder_
 
double phiprojderapprox_
 
int projdisk_
 
double rproj_
 
double rprojapprox_
 
double rprojder_
 
double rprojderapprox_
 
bool valid_
 
double zproj_
 

Detailed Description

Definition at line 12 of file DiskProjection.h.

Constructor & Destructor Documentation

◆ DiskProjection()

trklet::DiskProjection::DiskProjection ( )
inline

Definition at line 14 of file DiskProjection.h.

14 { valid_ = false; }

References valid_.

◆ ~DiskProjection()

trklet::DiskProjection::~DiskProjection ( )
default

Member Function Documentation

◆ fpgafinervm()

const FPGAWord& trklet::DiskProjection::fpgafinervm ( ) const
inline

Definition at line 91 of file DiskProjection.h.

91  {
92  assert(valid_);
93  return fpgafinervm_;
94  };

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

Referenced by trklet::Tracklet::finervm(), and trklet::Tracklet::vmstrdisk().

◆ fpgaphiproj()

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

Definition at line 46 of file DiskProjection.h.

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

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

Referenced by trklet::Tracklet::fpgaphiprojdisk(), and trklet::Tracklet::trackletprojstrD().

◆ fpgaphiprojder()

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

Definition at line 56 of file DiskProjection.h.

56  {
57  assert(valid_);
58  return fpgaphiprojder_;
59  };

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

Referenced by trklet::Tracklet::fpgaphiprojderdisk(), and trklet::Tracklet::trackletprojstrD().

◆ fpgaphiprojvm()

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

Definition at line 66 of file DiskProjection.h.

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

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

◆ fpgarbin1projvm()

const FPGAWord& trklet::DiskProjection::fpgarbin1projvm ( ) const
inline

Definition at line 81 of file DiskProjection.h.

81  {
82  assert(valid_);
83  return fpgarbin1projvm_;
84  };

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

Referenced by trklet::Tracklet::rbin1projvm(), and trklet::Tracklet::vmstrdisk().

◆ fpgarbin2projvm()

const FPGAWord& trklet::DiskProjection::fpgarbin2projvm ( ) const
inline

Definition at line 86 of file DiskProjection.h.

86  {
87  assert(valid_);
88  return fpgarbin2projvm_;
89  };

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

Referenced by trklet::Tracklet::rbin2projvm(), and trklet::Tracklet::vmstrdisk().

◆ fpgarproj()

const FPGAWord& trklet::DiskProjection::fpgarproj ( ) const
inline

Definition at line 51 of file DiskProjection.h.

51  {
52  assert(valid_);
53  return fpgarproj_;
54  };

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

Referenced by trklet::Tracklet::fpgarprojdisk(), and trklet::Tracklet::trackletprojstrD().

◆ fpgarprojder()

const FPGAWord& trklet::DiskProjection::fpgarprojder ( ) const
inline

Definition at line 61 of file DiskProjection.h.

61  {
62  assert(valid_);
63  return fpgarprojder_;
64  };

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

Referenced by trklet::Tracklet::fpgarprojderdisk(), and trklet::Tracklet::trackletprojstrD().

◆ fpgarprojvm()

const FPGAWord& trklet::DiskProjection::fpgarprojvm ( ) const
inline

Definition at line 71 of file DiskProjection.h.

71  {
72  assert(valid_);
73  return fpgarprojvm_;
74  };

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

◆ getBendIndex()

const FPGAWord& trklet::DiskProjection::getBendIndex ( ) const
inline

Definition at line 133 of file DiskProjection.h.

133 { return fpgabendindex_; }

References fpgabendindex_.

Referenced by trklet::Tracklet::getBendIndex(), and trklet::Tracklet::vmstrdisk().

◆ init()

void DiskProjection::init ( Settings const &  settings,
int  projdisk,
double  zproj,
int  iphiproj,
int  irproj,
int  iphider,
int  irder,
double  phiproj,
double  rproj,
double  phiprojder,
double  rprojder,
double  phiprojapprox,
double  rprojapprox,
double  phiprojderapprox,
double  rprojderapprox 
)

Definition at line 12 of file DiskProjection.cc.

26  {
27  assert(abs(projdisk) >= 0);
29 
30  valid_ = true;
31 
32  zproj_ = zproj;
33 
35 
36  assert(iphiproj >= 0);
37 
38  fpgaphiproj_.set(iphiproj, settings.nphibitsstub(0), true, __LINE__, __FILE__);
39  int iphivm = (iphiproj >> (settings.nphibitsstub(0) - 5)) & 0x7;
40  if ((abs(projdisk_) % 2) == 1) {
41  iphivm ^= 4;
42  }
43  fpgaphiprojvm_.set(iphivm, 3, true, __LINE__, __FILE__);
44  fpgarproj_.set(irproj, settings.nrbitsstub(6), false, __LINE__, __FILE__);
45  int irvm = irproj >> (13 - 7) & 0xf;
46  fpgarprojvm_.set(irvm, 4, true, __LINE__, __FILE__);
47  fpgaphiprojder_.set(iphider, settings.nbitsphiprojderL123(), false, __LINE__, __FILE__);
48  fpgarprojder_.set(irder, settings.nrbitsprojderdisk(), false, __LINE__, __FILE__);
49 
50  //TODO the -3 and +3 should be evaluated and efficiency for matching hits checked.
51  //This code should be migrated in the ProjectionRouter
52  int rbin1 = 8.0 * (irproj * settings.krprojshiftdisk() - 3 - settings.rmindiskvm()) /
53  (settings.rmaxdisk() - settings.rmindiskvm());
54  int rbin2 = 8.0 * (irproj * settings.krprojshiftdisk() + 3 - settings.rmindiskvm()) /
55  (settings.rmaxdisk() - settings.rmindiskvm());
56 
57  if (irproj * settings.krprojshiftdisk() < 20.0) {
58  edm::LogPrint("Tracklet") << " WARNING : irproj = " << irproj << " " << irproj * settings.krprojshiftdisk() << " "
59  << projdisk_;
60  }
61 
62  if (rbin1 < 0)
63  rbin1 = 0;
64  rbin2 = clamp(rbin2, 0, 7);
65 
66  assert(rbin1 <= rbin2);
67  assert(rbin2 - rbin1 <= 1);
68 
69  int finer = 64 *
70  ((irproj * settings.krprojshiftdisk() - settings.rmindiskvm()) -
71  rbin1 * (settings.rmaxdisk() - settings.rmindiskvm()) / 8.0) /
72  (settings.rmaxdisk() - settings.rmindiskvm());
73 
74  finer = clamp(finer, 0, 15);
75 
76  int diff = rbin1 != rbin2;
77  if (irder < 0)
78  rbin1 += 8;
79 
80  fpgarbin1projvm_.set(rbin1, 4, true, __LINE__, __FILE__); // first r bin
81  fpgarbin2projvm_.set(diff, 1, true, __LINE__, __FILE__); // need to check adjacent r bin
82 
83  fpgafinervm_.set(finer, 4, true, __LINE__, __FILE__); // fine r postions starting at rbin1
84 
85  phiproj_ = phiproj;
86  rproj_ = rproj;
89 
94 }

References funct::abs(), cms::cuda::assert(), change_name::diff, trklet::Settings::krprojshiftdisk(), trklet::N_DISK, trklet::Settings::nbitsphiprojderL123(), trklet::Settings::nphibitsstub(), trklet::Settings::nrbitsprojderdisk(), trklet::Settings::nrbitsstub(), trklet::Settings::rmaxdisk(), trklet::Settings::rmindiskvm(), 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::DiskProjection::phiproj ( ) const
inline

Definition at line 76 of file DiskProjection.h.

76  {
77  assert(valid_);
78  return phiproj_;
79  };

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

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

◆ phiprojapprox()

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

Definition at line 111 of file DiskProjection.h.

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

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

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

◆ phiprojder()

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

Definition at line 101 of file DiskProjection.h.

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

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

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

◆ phiprojderapprox()

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

Definition at line 121 of file DiskProjection.h.

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

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

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

◆ projdisk()

int trklet::DiskProjection::projdisk ( ) const
inline

Definition at line 36 of file DiskProjection.h.

36  {
37  assert(valid_);
38  return projdisk_;
39  };

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

◆ rproj()

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

Definition at line 96 of file DiskProjection.h.

96  {
97  assert(valid_);
98  return rproj_;
99  };

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

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

◆ rprojapprox()

double trklet::DiskProjection::rprojapprox ( ) const
inline

Definition at line 116 of file DiskProjection.h.

116  {
117  assert(valid_);
118  return rprojapprox_;
119  };

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

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

◆ rprojder()

double trklet::DiskProjection::rprojder ( ) const
inline

Definition at line 106 of file DiskProjection.h.

106  {
107  assert(valid_);
108  return rprojder_;
109  };

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

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

◆ rprojderapprox()

double trklet::DiskProjection::rprojderapprox ( ) const
inline

Definition at line 126 of file DiskProjection.h.

126  {
127  assert(valid_);
128  return rprojderapprox_;
129  };

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

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

◆ setBendIndex()

void trklet::DiskProjection::setBendIndex ( int  bendindex)
inline

Definition at line 131 of file DiskProjection.h.

131 { fpgabendindex_.set(bendindex, 5, true, __LINE__, __FILE__); }

References fpgabendindex_, and trklet::FPGAWord::set().

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

◆ valid()

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

Definition at line 34 of file DiskProjection.h.

34 { return valid_; }

References valid_.

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

◆ zproj()

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

Definition at line 41 of file DiskProjection.h.

41  {
42  assert(valid_);
43  return zproj_;
44  };

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

Member Data Documentation

◆ fpgabendindex_

FPGAWord trklet::DiskProjection::fpgabendindex_
protected

Definition at line 154 of file DiskProjection.h.

Referenced by getBendIndex(), and setBendIndex().

◆ fpgafinervm_

FPGAWord trklet::DiskProjection::fpgafinervm_
protected

Definition at line 152 of file DiskProjection.h.

Referenced by fpgafinervm().

◆ fpgaphiproj_

FPGAWord trklet::DiskProjection::fpgaphiproj_
protected

Definition at line 142 of file DiskProjection.h.

Referenced by fpgaphiproj().

◆ fpgaphiprojder_

FPGAWord trklet::DiskProjection::fpgaphiprojder_
protected

Definition at line 144 of file DiskProjection.h.

Referenced by fpgaphiprojder().

◆ fpgaphiprojvm_

FPGAWord trklet::DiskProjection::fpgaphiprojvm_
protected

Definition at line 147 of file DiskProjection.h.

Referenced by fpgaphiprojvm().

◆ fpgarbin1projvm_

FPGAWord trklet::DiskProjection::fpgarbin1projvm_
protected

Definition at line 150 of file DiskProjection.h.

Referenced by fpgarbin1projvm().

◆ fpgarbin2projvm_

FPGAWord trklet::DiskProjection::fpgarbin2projvm_
protected

Definition at line 151 of file DiskProjection.h.

Referenced by fpgarbin2projvm().

◆ fpgarproj_

FPGAWord trklet::DiskProjection::fpgarproj_
protected

Definition at line 143 of file DiskProjection.h.

Referenced by fpgarproj().

◆ fpgarprojder_

FPGAWord trklet::DiskProjection::fpgarprojder_
protected

Definition at line 145 of file DiskProjection.h.

Referenced by fpgarprojder().

◆ fpgarprojvm_

FPGAWord trklet::DiskProjection::fpgarprojvm_
protected

Definition at line 148 of file DiskProjection.h.

Referenced by fpgarprojvm().

◆ phiproj_

double trklet::DiskProjection::phiproj_
protected

Definition at line 156 of file DiskProjection.h.

Referenced by phiproj().

◆ phiprojapprox_

double trklet::DiskProjection::phiprojapprox_
protected

Definition at line 161 of file DiskProjection.h.

Referenced by phiprojapprox().

◆ phiprojder_

double trklet::DiskProjection::phiprojder_
protected

Definition at line 158 of file DiskProjection.h.

Referenced by phiprojder().

◆ phiprojderapprox_

double trklet::DiskProjection::phiprojderapprox_
protected

Definition at line 163 of file DiskProjection.h.

Referenced by phiprojderapprox().

◆ projdisk_

int trklet::DiskProjection::projdisk_
protected

Definition at line 138 of file DiskProjection.h.

Referenced by projdisk().

◆ rproj_

double trklet::DiskProjection::rproj_
protected

Definition at line 157 of file DiskProjection.h.

Referenced by rproj().

◆ rprojapprox_

double trklet::DiskProjection::rprojapprox_
protected

Definition at line 162 of file DiskProjection.h.

Referenced by rprojapprox().

◆ rprojder_

double trklet::DiskProjection::rprojder_
protected

Definition at line 159 of file DiskProjection.h.

Referenced by rprojder().

◆ rprojderapprox_

double trklet::DiskProjection::rprojderapprox_
protected

Definition at line 164 of file DiskProjection.h.

Referenced by rprojderapprox().

◆ valid_

bool trklet::DiskProjection::valid_
protected

◆ zproj_

double trklet::DiskProjection::zproj_
protected

Definition at line 140 of file DiskProjection.h.

Referenced by zproj().

change_name.diff
diff
Definition: change_name.py:13
trklet::DiskProjection::fpgaphiprojder_
FPGAWord fpgaphiprojder_
Definition: DiskProjection.h:144
trklet::DiskProjection::phiprojapprox
double phiprojapprox() const
Definition: DiskProjection.h:111
trklet::DiskProjection::fpgabendindex_
FPGAWord fpgabendindex_
Definition: DiskProjection.h:154
trklet::DiskProjection::rprojder
double rprojder() const
Definition: DiskProjection.h:106
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::DiskProjection::rproj_
double rproj_
Definition: DiskProjection.h:157
trklet::N_DISK
constexpr int N_DISK
Definition: Settings.h:20
trklet::DiskProjection::fpgafinervm_
FPGAWord fpgafinervm_
Definition: DiskProjection.h:152
trklet::DiskProjection::phiprojderapprox
double phiprojderapprox() const
Definition: DiskProjection.h:121
trklet::DiskProjection::phiproj_
double phiproj_
Definition: DiskProjection.h:156
trklet::DiskProjection::fpgarbin2projvm_
FPGAWord fpgarbin2projvm_
Definition: DiskProjection.h:151
trklet::DiskProjection::fpgaphiprojvm_
FPGAWord fpgaphiprojvm_
Definition: DiskProjection.h:147
trklet::DiskProjection::projdisk
int projdisk() const
Definition: DiskProjection.h:36
trklet::DiskProjection::zproj_
double zproj_
Definition: DiskProjection.h:140
trklet::DiskProjection::rprojapprox_
double rprojapprox_
Definition: DiskProjection.h:162
trklet::DiskProjection::rprojapprox
double rprojapprox() const
Definition: DiskProjection.h:116
trklet::DiskProjection::phiprojder_
double phiprojder_
Definition: DiskProjection.h:158
edm::LogPrint
Definition: MessageLogger.h:342
trklet::DiskProjection::phiprojapprox_
double phiprojapprox_
Definition: DiskProjection.h:161
trklet::DiskProjection::fpgarprojvm_
FPGAWord fpgarprojvm_
Definition: DiskProjection.h:148
trklet::DiskProjection::valid_
bool valid_
Definition: DiskProjection.h:136
trklet::DiskProjection::rprojder_
double rprojder_
Definition: DiskProjection.h:159
trklet::DiskProjection::rproj
double rproj() const
Definition: DiskProjection.h:96
trklet::DiskProjection::fpgaphiproj_
FPGAWord fpgaphiproj_
Definition: DiskProjection.h:142
trklet::DiskProjection::phiprojderapprox_
double phiprojderapprox_
Definition: DiskProjection.h:163
trklet::DiskProjection::phiproj
double phiproj() const
Definition: DiskProjection.h:76
trklet::DiskProjection::fpgarbin1projvm_
FPGAWord fpgarbin1projvm_
Definition: DiskProjection.h:150
trklet::DiskProjection::phiprojder
double phiprojder() const
Definition: DiskProjection.h:101
trklet::DiskProjection::fpgarproj_
FPGAWord fpgarproj_
Definition: DiskProjection.h:143
trklet::DiskProjection::zproj
double zproj() const
Definition: DiskProjection.h:41
trklet::DiskProjection::rprojderapprox
double rprojderapprox() const
Definition: DiskProjection.h:126
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
trklet::DiskProjection::projdisk_
int projdisk_
Definition: DiskProjection.h:138
trklet::DiskProjection::fpgarprojder_
FPGAWord fpgarprojder_
Definition: DiskProjection.h:145
trklet::DiskProjection::rprojderapprox_
double rprojderapprox_
Definition: DiskProjection.h:164