CMS 3D CMS Logo

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

#include <LayerResidual.h>

Public Member Functions

const FPGAWordfpgaphiresid () const
 
const FPGAWordfpgastubid () const
 
const FPGAWordfpgazresid () const
 
void init (Settings const &settings, int layer, int iphiresid, int izresid, int istubid, double phiresid, double zresid, double phiresidapprox, double zresidapprox, double rstub, const Stub *stubptr)
 
 LayerResidual ()
 
double phiresid () const
 
double phiresidapprox () const
 
double rstub () const
 
const Stubstubptr () const
 
bool valid () const
 
double zresid () const
 
double zresidapprox () const
 
 ~LayerResidual ()=default
 

Protected Attributes

FPGAWord fpgaphiresid_
 
FPGAWord fpgastubid_
 
FPGAWord fpgazresid_
 
int layer_
 
double phiresid_
 
double phiresidapprox_
 
double rstub_
 
const Stubstubptr_
 
bool valid_
 
double zresid_
 
double zresidapprox_
 

Detailed Description

Definition at line 13 of file LayerResidual.h.

Constructor & Destructor Documentation

◆ LayerResidual()

trklet::LayerResidual::LayerResidual ( )
inline

Definition at line 15 of file LayerResidual.h.

15 { valid_ = false; }

References valid_.

◆ ~LayerResidual()

trklet::LayerResidual::~LayerResidual ( )
default

Member Function Documentation

◆ fpgaphiresid()

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

Definition at line 33 of file LayerResidual.h.

33  {
34  assert(valid_);
35  return fpgaphiresid_;
36  };

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

Referenced by trklet::Tracklet::fpgaphiresid(), and trklet::Tracklet::fullmatchstr().

◆ fpgastubid()

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

Definition at line 43 of file LayerResidual.h.

43  {
44  assert(valid_);
45  return fpgastubid_;
46  };

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

Referenced by trklet::Tracklet::fullmatchstr(), trklet::Tracklet::getStubIDs(), and trklet::Tracklet::trackfitstr().

◆ fpgazresid()

const FPGAWord& trklet::LayerResidual::fpgazresid ( ) const
inline

Definition at line 38 of file LayerResidual.h.

38  {
39  assert(valid_);
40  return fpgazresid_;
41  };

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

Referenced by trklet::Tracklet::fpgazresid(), and trklet::Tracklet::fullmatchstr().

◆ init()

void LayerResidual::init ( Settings const &  settings,
int  layer,
int  iphiresid,
int  izresid,
int  istubid,
double  phiresid,
double  zresid,
double  phiresidapprox,
double  zresidapprox,
double  rstub,
const Stub stubptr 
)

Definition at line 7 of file LayerResidual.cc.

17  {
18  assert(layer > 0);
19  assert(layer <= N_LAYER);
20 
21  if (valid_ && (std::abs(iphiresid) > std::abs(fpgaphiresid_.value())))
22  return;
23 
24  valid_ = true;
25 
26  layer_ = layer;
27 
28  fpgaphiresid_.set(iphiresid, settings.phiresidbits(), false, __LINE__, __FILE__);
29  fpgazresid_.set(izresid, settings.zresidbits(), false, __LINE__, __FILE__);
30  int nbitsid = 10;
31  fpgastubid_.set(istubid, nbitsid, true, __LINE__, __FILE__);
33 
35  zresid_ = zresid;
36 
39 
40  rstub_ = rstub;
41  stubptr_ = stubptr;
42 }

References funct::abs(), cms::cuda::assert(), phase1PixelTopology::layer, sistrip::layer_, trklet::N_LAYER, trklet::Settings::phiresidbits(), sistrip::valid_, and trklet::Settings::zresidbits().

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

◆ phiresid()

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

Definition at line 48 of file LayerResidual.h.

48  {
49  assert(valid_);
50  return phiresid_;
51  };

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

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

◆ phiresidapprox()

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

Definition at line 58 of file LayerResidual.h.

58  {
59  assert(valid_);
60  return phiresidapprox_;
61  };

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

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

◆ rstub()

double trklet::LayerResidual::rstub ( ) const
inline

Definition at line 68 of file LayerResidual.h.

68  {
69  assert(valid_);
70  return rstub_;
71  }

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

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

◆ stubptr()

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

Definition at line 73 of file LayerResidual.h.

73  {
74  assert(valid_);
75  return stubptr_;
76  }

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

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

◆ valid()

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

Definition at line 31 of file LayerResidual.h.

31 { return valid_; }

References valid_.

Referenced by trklet::Tracklet::getStubIDs(), trklet::Tracklet::match(), and trklet::Tracklet::validResid().

◆ zresid()

double trklet::LayerResidual::zresid ( ) const
inline

Definition at line 53 of file LayerResidual.h.

53  {
54  assert(valid_);
55  return zresid_;
56  };

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

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

◆ zresidapprox()

double trklet::LayerResidual::zresidapprox ( ) const
inline

Definition at line 63 of file LayerResidual.h.

63  {
64  assert(valid_);
65  return zresidapprox_;
66  };

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

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

Member Data Documentation

◆ fpgaphiresid_

FPGAWord trklet::LayerResidual::fpgaphiresid_
protected

Definition at line 83 of file LayerResidual.h.

Referenced by fpgaphiresid().

◆ fpgastubid_

FPGAWord trklet::LayerResidual::fpgastubid_
protected

Definition at line 85 of file LayerResidual.h.

Referenced by fpgastubid().

◆ fpgazresid_

FPGAWord trklet::LayerResidual::fpgazresid_
protected

Definition at line 84 of file LayerResidual.h.

Referenced by fpgazresid().

◆ layer_

int trklet::LayerResidual::layer_
protected

Definition at line 81 of file LayerResidual.h.

◆ phiresid_

double trklet::LayerResidual::phiresid_
protected

Definition at line 87 of file LayerResidual.h.

Referenced by phiresid().

◆ phiresidapprox_

double trklet::LayerResidual::phiresidapprox_
protected

Definition at line 90 of file LayerResidual.h.

Referenced by phiresidapprox().

◆ rstub_

double trklet::LayerResidual::rstub_
protected

Definition at line 93 of file LayerResidual.h.

Referenced by rstub().

◆ stubptr_

const Stub* trklet::LayerResidual::stubptr_
protected

Definition at line 94 of file LayerResidual.h.

Referenced by stubptr().

◆ valid_

bool trklet::LayerResidual::valid_
protected

◆ zresid_

double trklet::LayerResidual::zresid_
protected

Definition at line 88 of file LayerResidual.h.

Referenced by zresid().

◆ zresidapprox_

double trklet::LayerResidual::zresidapprox_
protected

Definition at line 91 of file LayerResidual.h.

Referenced by zresidapprox().

trklet::LayerResidual::fpgastubid_
FPGAWord fpgastubid_
Definition: LayerResidual.h:85
trklet::LayerResidual::stubptr_
const Stub * stubptr_
Definition: LayerResidual.h:94
trklet::LayerResidual::zresidapprox
double zresidapprox() const
Definition: LayerResidual.h:63
trklet::LayerResidual::rstub_
double rstub_
Definition: LayerResidual.h:93
trklet::LayerResidual::phiresidapprox_
double phiresidapprox_
Definition: LayerResidual.h:90
trklet::LayerResidual::zresidapprox_
double zresidapprox_
Definition: LayerResidual.h:91
cms::cuda::assert
assert(be >=bs)
trklet::LayerResidual::zresid
double zresid() const
Definition: LayerResidual.h:53
trklet::FPGAWord::set
void set(int value, int nbits, bool positive=true, int line=-1, const char *file=nullptr)
Definition: FPGAWord.cc:14
trklet::LayerResidual::phiresid
double phiresid() const
Definition: LayerResidual.h:48
trklet::LayerResidual::stubptr
const Stub * stubptr() const
Definition: LayerResidual.h:73
trklet::LayerResidual::zresid_
double zresid_
Definition: LayerResidual.h:88
trklet::LayerResidual::fpgazresid_
FPGAWord fpgazresid_
Definition: LayerResidual.h:84
trklet::N_LAYER
constexpr int N_LAYER
Definition: Settings.h:19
trklet::LayerResidual::phiresid_
double phiresid_
Definition: LayerResidual.h:87
trklet::LayerResidual::phiresidapprox
double phiresidapprox() const
Definition: LayerResidual.h:58
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
trklet::FPGAWord::atExtreme
bool atExtreme() const
Definition: FPGAWord.cc:79
trklet::LayerResidual::rstub
double rstub() const
Definition: LayerResidual.h:68
trklet::LayerResidual::valid_
bool valid_
Definition: LayerResidual.h:79
trklet::FPGAWord::value
int value() const
Definition: FPGAWord.h:24
trklet::LayerResidual::layer_
int layer_
Definition: LayerResidual.h:81
trklet::LayerResidual::fpgaphiresid_
FPGAWord fpgaphiresid_
Definition: LayerResidual.h:83
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22