CMS 3D CMS Logo

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

#include <Residual.h>

Public Member Functions

const FPGAWordfpgaphiresid () const
 
const FPGAWordfpgarzresid () const
 
const FPGAWordfpgastubid () const
 
void init (Settings const &settings, unsigned int layerdisk, int iphiresid, int irzresid, int istubid, double phiresid, double rzresid, double phiresidapprox, double rzresidapprox, const Stub *stubptr)
 
double phiresid () const
 
double phiresidapprox () const
 
 Residual ()
 
double rzresid () const
 
double rzresidapprox () const
 
const Stubstubptr () const
 
bool valid () const
 
 ~Residual ()=default
 

Protected Attributes

FPGAWord fpgaphiresid_
 
FPGAWord fpgarzresid_
 
FPGAWord fpgastubid_
 
unsigned int layerdisk_
 
double phiresid_
 
double phiresidapprox_
 
double rzresid_
 
double rzresidapprox_
 
const Stubstubptr_
 
bool valid_
 

Detailed Description

Definition at line 13 of file Residual.h.

Constructor & Destructor Documentation

◆ Residual()

trklet::Residual::Residual ( )
inline

Definition at line 15 of file Residual.h.

References valid_.

15 { valid_ = false; }

◆ ~Residual()

trklet::Residual::~Residual ( )
default

Member Function Documentation

◆ fpgaphiresid()

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

◆ fpgarzresid()

const FPGAWord& trklet::Residual::fpgarzresid ( ) const
inline

◆ fpgastubid()

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

◆ init()

void Residual::init ( Settings const &  settings,
unsigned int  layerdisk,
int  iphiresid,
int  irzresid,
int  istubid,
double  phiresid,
double  rzresid,
double  phiresidapprox,
double  rzresidapprox,
const Stub stubptr 
)

Definition at line 7 of file Residual.cc.

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

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

16  {
17  assert(layerdisk < N_LAYER + N_DISK);
18 
19  if (valid_ && (std::abs(iphiresid) > std::abs(fpgaphiresid_.value())))
20  return;
21 
22  valid_ = true;
23 
24  layerdisk_ = layerdisk;
25 
26  fpgaphiresid_.set(iphiresid, settings.phiresidbits(), false, __LINE__, __FILE__);
27  if (layerdisk < N_LAYER) {
28  fpgarzresid_.set(irzresid, settings.zresidbits(), false, __LINE__, __FILE__);
29  } else {
30  fpgarzresid_.set(irzresid, settings.rresidbits(), false, __LINE__, __FILE__);
31  }
32 
33  int nbitsid = 10;
34  fpgastubid_.set(istubid, nbitsid, true, __LINE__, __FILE__);
36 
38  rzresid_ = rzresid;
39 
42 
43  stubptr_ = stubptr;
44 }
double phiresid() const
Definition: Residual.h:47
double phiresid_
Definition: Residual.h:81
constexpr int N_DISK
Definition: Settings.h:22
double rzresid() const
Definition: Residual.h:52
FPGAWord fpgastubid_
Definition: Residual.h:79
const Stub * stubptr_
Definition: Residual.h:87
double phiresidapprox_
Definition: Residual.h:84
assert(be >=bs)
FPGAWord fpgaphiresid_
Definition: Residual.h:77
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int value() const
Definition: FPGAWord.h:24
FPGAWord fpgarzresid_
Definition: Residual.h:78
double phiresidapprox() const
Definition: Residual.h:57
double rzresidapprox() const
Definition: Residual.h:62
double rzresidapprox_
Definition: Residual.h:85
double rzresid_
Definition: Residual.h:82
void set(int value, int nbits, bool positive=true, int line=-1, const char *file=nullptr)
Definition: FPGAWord.cc:14
const Stub * stubptr() const
Definition: Residual.h:67
bool atExtreme() const
Definition: FPGAWord.cc:79
unsigned int layerdisk_
Definition: Residual.h:75
constexpr int N_LAYER
Definition: Settings.h:21

◆ phiresid()

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

Definition at line 47 of file Residual.h.

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

Referenced by trklet::FitTrack::trackFitChisq().

47  {
48  assert(valid_);
49  return phiresid_;
50  };
double phiresid_
Definition: Residual.h:81
assert(be >=bs)

◆ phiresidapprox()

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

Definition at line 57 of file Residual.h.

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

Referenced by trklet::FitTrack::trackFitChisq().

57  {
58  assert(valid_);
59  return phiresidapprox_;
60  };
double phiresidapprox_
Definition: Residual.h:84
assert(be >=bs)

◆ rzresid()

double trklet::Residual::rzresid ( ) const
inline

Definition at line 52 of file Residual.h.

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

Referenced by trklet::FitTrack::trackFitChisq().

52  {
53  assert(valid_);
54  return rzresid_;
55  };
assert(be >=bs)
double rzresid_
Definition: Residual.h:82

◆ rzresidapprox()

double trklet::Residual::rzresidapprox ( ) const
inline

Definition at line 62 of file Residual.h.

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

Referenced by trklet::FitTrack::trackFitChisq().

62  {
63  assert(valid_);
64  return rzresidapprox_;
65  };
assert(be >=bs)
double rzresidapprox_
Definition: Residual.h:85

◆ stubptr()

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

◆ valid()

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

Definition at line 30 of file Residual.h.

References valid_.

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

30 { return valid_; }

Member Data Documentation

◆ fpgaphiresid_

FPGAWord trklet::Residual::fpgaphiresid_
protected

Definition at line 77 of file Residual.h.

Referenced by fpgaphiresid().

◆ fpgarzresid_

FPGAWord trklet::Residual::fpgarzresid_
protected

Definition at line 78 of file Residual.h.

Referenced by fpgarzresid().

◆ fpgastubid_

FPGAWord trklet::Residual::fpgastubid_
protected

Definition at line 79 of file Residual.h.

Referenced by fpgastubid().

◆ layerdisk_

unsigned int trklet::Residual::layerdisk_
protected

Definition at line 75 of file Residual.h.

◆ phiresid_

double trklet::Residual::phiresid_
protected

Definition at line 81 of file Residual.h.

Referenced by phiresid().

◆ phiresidapprox_

double trklet::Residual::phiresidapprox_
protected

Definition at line 84 of file Residual.h.

Referenced by phiresidapprox().

◆ rzresid_

double trklet::Residual::rzresid_
protected

Definition at line 82 of file Residual.h.

Referenced by rzresid().

◆ rzresidapprox_

double trklet::Residual::rzresidapprox_
protected

Definition at line 85 of file Residual.h.

Referenced by rzresidapprox().

◆ stubptr_

const Stub* trklet::Residual::stubptr_
protected

Definition at line 87 of file Residual.h.

Referenced by stubptr().

◆ valid_

bool trklet::Residual::valid_
protected