CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

trklet::Residual::Residual ( )
inline

Definition at line 15 of file Residual.h.

References valid_.

15 { valid_ = false; }
trklet::Residual::~Residual ( )
default

Member Function Documentation

const FPGAWord& trklet::Residual::fpgaphiresid ( ) const
inline
const FPGAWord& trklet::Residual::fpgarzresid ( ) const
inline
const FPGAWord& trklet::Residual::fpgastubid ( ) const
inline
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_
Definition: Residual.h:81
constexpr int N_DISK
Definition: Settings.h:22
double phiresidapprox() const
Definition: Residual.h:57
const Stub * stubptr() const
Definition: Residual.h:67
double rzresidapprox() const
Definition: Residual.h:62
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
bool atExtreme() const
Definition: FPGAWord.cc:79
int value() const
Definition: FPGAWord.h:24
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
FPGAWord fpgarzresid_
Definition: Residual.h:78
double phiresid() const
Definition: Residual.h:47
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
unsigned int layerdisk_
Definition: Residual.h:75
constexpr int N_LAYER
Definition: Settings.h:21
double rzresid() const
Definition: Residual.h:52
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)
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)
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
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
const Stub* trklet::Residual::stubptr ( ) const
inline
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

FPGAWord trklet::Residual::fpgaphiresid_
protected

Definition at line 77 of file Residual.h.

Referenced by fpgaphiresid().

FPGAWord trklet::Residual::fpgarzresid_
protected

Definition at line 78 of file Residual.h.

Referenced by fpgarzresid().

FPGAWord trklet::Residual::fpgastubid_
protected

Definition at line 79 of file Residual.h.

Referenced by fpgastubid().

unsigned int trklet::Residual::layerdisk_
protected

Definition at line 75 of file Residual.h.

double trklet::Residual::phiresid_
protected

Definition at line 81 of file Residual.h.

Referenced by phiresid().

double trklet::Residual::phiresidapprox_
protected

Definition at line 84 of file Residual.h.

Referenced by phiresidapprox().

double trklet::Residual::rzresid_
protected

Definition at line 82 of file Residual.h.

Referenced by rzresid().

double trklet::Residual::rzresidapprox_
protected

Definition at line 85 of file Residual.h.

Referenced by rzresidapprox().

const Stub* trklet::Residual::stubptr_
protected

Definition at line 87 of file Residual.h.

Referenced by stubptr().

bool trklet::Residual::valid_
protected