CMS 3D CMS Logo

DiskResidual.cc
Go to the documentation of this file.
3 
4 using namespace std;
5 using namespace trklet;
6 
7 void DiskResidual::init(Settings const& settings,
8  int disk,
9  int iphiresid,
10  int irresid,
11  int istubid,
12  double phiresid,
13  double rresid,
14  double phiresidapprox,
15  double rresidapprox,
16  double zstub,
17  double alpha,
18  FPGAWord ialpha,
19  const Stub* stubptr) {
20  assert(abs(disk) > 0);
21  assert(abs(disk) <= N_DISK);
22 
23  if (valid_ && (std::abs(iphiresid) > std::abs(fpgaphiresid_.value())))
24  return;
25 
26  valid_ = true;
27 
28  disk_ = disk;
29 
30  fpgaphiresid_.set(iphiresid, settings.phiresidbits(), false, __LINE__, __FILE__);
31  fpgarresid_.set(irresid, settings.rresidbits(), false, __LINE__, __FILE__);
32  assert(istubid >= 0);
33  unsigned int nbitsstubid = 10;
34  fpgastubid_.set(istubid, nbitsstubid, true, __LINE__, __FILE__);
35  assert(!fpgaphiresid_.atExtreme());
36 
37  phiresid_ = phiresid;
38  rresid_ = rresid;
39 
40  phiresidapprox_ = phiresidapprox;
41  rresidapprox_ = rresidapprox;
42 
43  zstub_ = zstub;
44  alpha_ = alpha;
45  ialpha_ = ialpha;
46  stubptr_ = stubptr;
47 }
Settings.h
init
int init
Definition: HydjetWrapper.h:64
sistrip::disk_
static const char disk_[]
Definition: ConstantsForGranularity.h:33
trklet::Settings::rresidbits
int rresidbits() const
Definition: Settings.h:312
zMuMuMuonUserData.alpha
alpha
zGenParticlesMatch = cms.InputTag(""),
Definition: zMuMuMuonUserData.py:9
trklet::Settings
Definition: Settings.h:26
cms::cuda::assert
assert(be >=bs)
trklet::N_DISK
constexpr int N_DISK
Definition: Settings.h:20
sistrip::valid_
static const uint16_t valid_
Definition: Constants.h:17
trklet::Stub
Definition: Stub.h:16
trklet::FPGAWord
Definition: FPGAWord.h:9
DiskResidual.h
trklet
Definition: AllProjectionsMemory.h:9
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:310