CMS 3D CMS Logo

Residual.cc
Go to the documentation of this file.
3 
4 using namespace std;
5 using namespace trklet;
6 
7 void Residual::init(Settings const& settings,
8  unsigned int layerdisk,
9  int iphiresid,
10  int irzresid,
11  int istubid,
12  double phiresid,
13  double rzresid,
14  double phiresidapprox,
15  double rzresidapprox,
16  const Stub* stubptr) {
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__);
35  assert(!fpgaphiresid_.atExtreme());
36 
37  phiresid_ = phiresid;
38  rzresid_ = rzresid;
39 
40  phiresidapprox_ = phiresidapprox;
41  rzresidapprox_ = rzresidapprox;
42 
43  stubptr_ = stubptr;
44 }
Settings.h
init
int init
Definition: HydjetWrapper.h:64
trklet::Settings::rresidbits
int rresidbits() const
Definition: Settings.h:369
trklet::Settings
Definition: Settings.h:52
cms::cuda::assert
assert(be >=bs)
trklet::N_DISK
constexpr int N_DISK
Definition: Settings.h:22
sistrip::valid_
static const uint16_t valid_
Definition: Constants.h:17
trklet::Stub
Definition: Stub.h:18
trklet::N_LAYER
constexpr int N_LAYER
Definition: Settings.h:21
trklet::Settings::zresidbits
int zresidbits() const
Definition: Settings.h:368
Residual.h
trklet
Definition: AllInnerStubsMemory.h:10
std
Definition: JetResolutionObject.h:76
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
trklet::Settings::phiresidbits
int phiresidbits() const
Definition: Settings.h:367