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.

15 { valid_ = false; }

References valid_.

◆ ~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.

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 }

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().

◆ phiresid()

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

Definition at line 47 of file Residual.h.

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

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

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

◆ phiresidapprox()

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

Definition at line 57 of file Residual.h.

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

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

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

◆ rzresid()

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

Definition at line 52 of file Residual.h.

52  {
53  assert(valid_);
54  return rzresid_;
55  };

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

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

◆ rzresidapprox()

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

Definition at line 62 of file Residual.h.

62  {
63  assert(valid_);
64  return rzresidapprox_;
65  };

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

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

◆ stubptr()

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

◆ valid()

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

Definition at line 30 of file Residual.h.

30 { return valid_; }

References valid_.

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

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
trklet::Residual::stubptr_
const Stub * stubptr_
Definition: Residual.h:87
trklet::Residual::fpgarzresid_
FPGAWord fpgarzresid_
Definition: Residual.h:78
trklet::Residual::phiresidapprox
double phiresidapprox() const
Definition: Residual.h:57
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::Residual::rzresid_
double rzresid_
Definition: Residual.h:82
trklet::N_DISK
constexpr int N_DISK
Definition: Settings.h:22
trklet::Residual::phiresid
double phiresid() const
Definition: Residual.h:47
trklet::Residual::rzresid
double rzresid() const
Definition: Residual.h:52
trklet::N_LAYER
constexpr int N_LAYER
Definition: Settings.h:21
trklet::Residual::phiresidapprox_
double phiresidapprox_
Definition: Residual.h:84
trklet::Residual::rzresidapprox_
double rzresidapprox_
Definition: Residual.h:85
trklet::Residual::fpgaphiresid_
FPGAWord fpgaphiresid_
Definition: Residual.h:77
trklet::Residual::stubptr
const Stub * stubptr() const
Definition: Residual.h:67
trklet::FPGAWord::atExtreme
bool atExtreme() const
Definition: FPGAWord.cc:79
trklet::Residual::valid_
bool valid_
Definition: Residual.h:73
trklet::FPGAWord::value
int value() const
Definition: FPGAWord.h:24
trklet::Residual::layerdisk_
unsigned int layerdisk_
Definition: Residual.h:75
trklet::Residual::rzresidapprox
double rzresidapprox() const
Definition: Residual.h:62
trklet::Residual::phiresid_
double phiresid_
Definition: Residual.h:81
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
trklet::Residual::fpgastubid_
FPGAWord fpgastubid_
Definition: Residual.h:79