CMS 3D CMS Logo

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

#include <DiskResidual.h>

Public Member Functions

double alpha () const
 
 DiskResidual ()
 
const FPGAWordfpgaphiresid () const
 
const FPGAWordfpgarresid () const
 
const FPGAWordfpgastubid () const
 
const FPGAWordialpha () const
 
void init (Settings const &settings, int disk, int iphiresid, int irresid, int istubid, double phiresid, double rresid, double phiresidapprox, double rresidapprox, double zstub, double alpha, FPGAWord ialpha, const Stub *stubptr)
 
double phiresid () const
 
double phiresidapprox () const
 
double rresid () const
 
double rresidapprox () const
 
const Stubstubptr () const
 
bool valid () const
 
double zstub () const
 
 ~DiskResidual ()=default
 

Protected Attributes

double alpha_
 
int disk_
 
FPGAWord fpgaphiresid_
 
FPGAWord fpgarresid_
 
FPGAWord fpgastubid_
 
FPGAWord ialpha_
 
double phiresid_
 
double phiresidapprox_
 
double rresid_
 
double rresidapprox_
 
const Stubstubptr_
 
bool valid_
 
double zstub_
 

Detailed Description

Definition at line 13 of file DiskResidual.h.

Constructor & Destructor Documentation

◆ DiskResidual()

trklet::DiskResidual::DiskResidual ( )
inline

Definition at line 15 of file DiskResidual.h.

15 { valid_ = false; }

References valid_.

◆ ~DiskResidual()

trklet::DiskResidual::~DiskResidual ( )
default

Member Function Documentation

◆ alpha()

double trklet::DiskResidual::alpha ( void  ) const
inline

Definition at line 75 of file DiskResidual.h.

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

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

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

◆ fpgaphiresid()

const FPGAWord& trklet::DiskResidual::fpgaphiresid ( ) const
inline

Definition at line 35 of file DiskResidual.h.

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

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

Referenced by trklet::Tracklet::fpgaphiresiddisk(), and trklet::Tracklet::fullmatchdiskstr().

◆ fpgarresid()

const FPGAWord& trklet::DiskResidual::fpgarresid ( ) const
inline

Definition at line 40 of file DiskResidual.h.

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

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

Referenced by trklet::Tracklet::fpgarresiddisk(), and trklet::Tracklet::fullmatchdiskstr().

◆ fpgastubid()

const FPGAWord& trklet::DiskResidual::fpgastubid ( ) const
inline

◆ ialpha()

const FPGAWord& trklet::DiskResidual::ialpha ( ) const
inline

Definition at line 80 of file DiskResidual.h.

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

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

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

◆ init()

void DiskResidual::init ( Settings const &  settings,
int  disk,
int  iphiresid,
int  irresid,
int  istubid,
double  phiresid,
double  rresid,
double  phiresidapprox,
double  rresidapprox,
double  zstub,
double  alpha,
FPGAWord  ialpha,
const Stub stubptr 
)

Definition at line 7 of file DiskResidual.cc.

19  {
20  assert(abs(disk) > 0);
21  assert(abs(disk) <= N_DISK);
22 
23  if (valid_ && (std::abs(iphiresid) > std::abs(fpgaphiresid_.value())))
24  return;
25 
26  valid_ = true;
27 
28  disk_ = disk;
29 
30  fpgaphiresid_.set(iphiresid, settings.phiresidbits(), false, __LINE__, __FILE__);
31  fpgarresid_.set(irresid, settings.rresidbits(), false, __LINE__, __FILE__);
32  assert(istubid >= 0);
33  unsigned int nbitsstubid = 10;
34  fpgastubid_.set(istubid, nbitsstubid, true, __LINE__, __FILE__);
36 
38  rresid_ = rresid;
39 
42 
43  zstub_ = zstub;
44  alpha_ = alpha;
45  ialpha_ = ialpha;
46  stubptr_ = stubptr;
47 }

References funct::abs(), alpha, cms::cuda::assert(), sistrip::disk_, trklet::N_DISK, trklet::Settings::phiresidbits(), trklet::Settings::rresidbits(), and sistrip::valid_.

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

◆ phiresid()

double trklet::DiskResidual::phiresid ( ) const
inline

Definition at line 50 of file DiskResidual.h.

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

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

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

◆ phiresidapprox()

double trklet::DiskResidual::phiresidapprox ( ) const
inline

Definition at line 60 of file DiskResidual.h.

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

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

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

◆ rresid()

double trklet::DiskResidual::rresid ( ) const
inline

Definition at line 55 of file DiskResidual.h.

55  {
56  assert(valid_);
57  return rresid_;
58  };

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

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

◆ rresidapprox()

double trklet::DiskResidual::rresidapprox ( ) const
inline

Definition at line 65 of file DiskResidual.h.

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

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

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

◆ stubptr()

const Stub* trklet::DiskResidual::stubptr ( ) const
inline

Definition at line 85 of file DiskResidual.h.

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

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

◆ valid()

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

Definition at line 33 of file DiskResidual.h.

33 { return valid_; }

References valid_.

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

◆ zstub()

double trklet::DiskResidual::zstub ( ) const
inline

Definition at line 70 of file DiskResidual.h.

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

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

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

Member Data Documentation

◆ alpha_

double trklet::DiskResidual::alpha_
protected

Definition at line 106 of file DiskResidual.h.

Referenced by alpha().

◆ disk_

int trklet::DiskResidual::disk_
protected

Definition at line 93 of file DiskResidual.h.

◆ fpgaphiresid_

FPGAWord trklet::DiskResidual::fpgaphiresid_
protected

Definition at line 95 of file DiskResidual.h.

Referenced by fpgaphiresid().

◆ fpgarresid_

FPGAWord trklet::DiskResidual::fpgarresid_
protected

Definition at line 96 of file DiskResidual.h.

Referenced by fpgarresid().

◆ fpgastubid_

FPGAWord trklet::DiskResidual::fpgastubid_
protected

Definition at line 97 of file DiskResidual.h.

Referenced by fpgastubid().

◆ ialpha_

FPGAWord trklet::DiskResidual::ialpha_
protected

Definition at line 107 of file DiskResidual.h.

Referenced by ialpha().

◆ phiresid_

double trklet::DiskResidual::phiresid_
protected

Definition at line 99 of file DiskResidual.h.

Referenced by phiresid().

◆ phiresidapprox_

double trklet::DiskResidual::phiresidapprox_
protected

Definition at line 102 of file DiskResidual.h.

Referenced by phiresidapprox().

◆ rresid_

double trklet::DiskResidual::rresid_
protected

Definition at line 100 of file DiskResidual.h.

Referenced by rresid().

◆ rresidapprox_

double trklet::DiskResidual::rresidapprox_
protected

Definition at line 103 of file DiskResidual.h.

Referenced by rresidapprox().

◆ stubptr_

const Stub* trklet::DiskResidual::stubptr_
protected

Definition at line 108 of file DiskResidual.h.

Referenced by stubptr().

◆ valid_

bool trklet::DiskResidual::valid_
protected

◆ zstub_

double trklet::DiskResidual::zstub_
protected

Definition at line 105 of file DiskResidual.h.

Referenced by zstub().

trklet::DiskResidual::fpgaphiresid_
FPGAWord fpgaphiresid_
Definition: DiskResidual.h:95
trklet::DiskResidual::stubptr_
const Stub * stubptr_
Definition: DiskResidual.h:108
trklet::DiskResidual::rresidapprox
double rresidapprox() const
Definition: DiskResidual.h:65
trklet::DiskResidual::phiresidapprox
double phiresidapprox() const
Definition: DiskResidual.h:60
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::DiskResidual::alpha_
double alpha_
Definition: DiskResidual.h:106
trklet::N_DISK
constexpr int N_DISK
Definition: Settings.h:20
trklet::DiskResidual::phiresidapprox_
double phiresidapprox_
Definition: DiskResidual.h:102
trklet::DiskResidual::rresidapprox_
double rresidapprox_
Definition: DiskResidual.h:103
trklet::DiskResidual::fpgarresid_
FPGAWord fpgarresid_
Definition: DiskResidual.h:96
trklet::FPGAWord::atExtreme
bool atExtreme() const
Definition: FPGAWord.cc:79
trklet::DiskResidual::phiresid_
double phiresid_
Definition: DiskResidual.h:99
trklet::DiskResidual::fpgastubid_
FPGAWord fpgastubid_
Definition: DiskResidual.h:97
trklet::DiskResidual::zstub
double zstub() const
Definition: DiskResidual.h:70
trklet::DiskResidual::valid_
bool valid_
Definition: DiskResidual.h:88
trklet::DiskResidual::stubptr
const Stub * stubptr() const
Definition: DiskResidual.h:85
trklet::DiskResidual::ialpha_
FPGAWord ialpha_
Definition: DiskResidual.h:107
trklet::FPGAWord::value
int value() const
Definition: FPGAWord.h:24
trklet::DiskResidual::zstub_
double zstub_
Definition: DiskResidual.h:105
trklet::DiskResidual::rresid
double rresid() const
Definition: DiskResidual.h:55
trklet::DiskResidual::disk_
int disk_
Definition: DiskResidual.h:93
trklet::DiskResidual::rresid_
double rresid_
Definition: DiskResidual.h:100
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
trklet::DiskResidual::ialpha
const FPGAWord & ialpha() const
Definition: DiskResidual.h:80
trklet::DiskResidual::phiresid
double phiresid() const
Definition: DiskResidual.h:50
trklet::DiskResidual::alpha
double alpha() const
Definition: DiskResidual.h:75