CMS 3D CMS Logo

LayerResidual.cc
Go to the documentation of this file.
3 
4 using namespace std;
5 using namespace trklet;
6 
7 void LayerResidual::init(Settings const& settings,
8  int layer,
9  int iphiresid,
10  int izresid,
11  int istubid,
12  double phiresid,
13  double zresid,
14  double phiresidapprox,
15  double zresidapprox,
16  double rstub,
17  const Stub* stubptr) {
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__);
32  assert(!fpgaphiresid_.atExtreme());
33 
34  phiresid_ = phiresid;
35  zresid_ = zresid;
36 
37  phiresidapprox_ = phiresidapprox;
38  zresidapprox_ = zresidapprox;
39 
40  rstub_ = rstub;
41  stubptr_ = stubptr;
42 }
Settings.h
init
int init
Definition: HydjetWrapper.h:64
trklet::Settings
Definition: Settings.h:26
cms::cuda::assert
assert(be >=bs)
sistrip::valid_
static const uint16_t valid_
Definition: Constants.h:17
trklet::Stub
Definition: Stub.h:16
trklet::N_LAYER
constexpr int N_LAYER
Definition: Settings.h:19
LayerResidual.h
trklet::Settings::zresidbits
int zresidbits() const
Definition: Settings.h:311
trklet
Definition: AllProjectionsMemory.h:9
std
Definition: JetResolutionObject.h:76
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
sistrip::layer_
static const char layer_[]
Definition: ConstantsForGranularity.h:30
trklet::Settings::phiresidbits
int phiresidbits() const
Definition: Settings.h:310