CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
trklet::ProjectionRouterBendTable Class Reference

#include <ProjectionRouterBendTable.h>

Public Member Functions

int bendLoookup (int diskindex, int bendindex)
 
void init (Settings const &settings, Globals *globals, unsigned int nrbits, unsigned int nphiderbits)
 
 ProjectionRouterBendTable ()
 
 ~ProjectionRouterBendTable ()=default
 

Private Attributes

std::vector< int > bendtable_ [N_DISK]
 

Detailed Description

Definition at line 16 of file ProjectionRouterBendTable.h.

Constructor & Destructor Documentation

◆ ProjectionRouterBendTable()

trklet::ProjectionRouterBendTable::ProjectionRouterBendTable ( )
inline

Definition at line 18 of file ProjectionRouterBendTable.h.

18 {}

◆ ~ProjectionRouterBendTable()

trklet::ProjectionRouterBendTable::~ProjectionRouterBendTable ( )
default

Member Function Documentation

◆ bendLoookup()

int ProjectionRouterBendTable::bendLoookup ( int  diskindex,
int  bendindex 
)

Definition at line 54 of file ProjectionRouterBendTable.cc.

54 { return bendtable_[diskindex][bendindex]; }

References bendtable_.

Referenced by trklet::ProjectionRouter::execute(), and trklet::MatchProcessor::execute().

◆ init()

void ProjectionRouterBendTable::init ( Settings const &  settings,
Globals globals,
unsigned int  nrbits,
unsigned int  nphiderbits 
)

Definition at line 8 of file ProjectionRouterBendTable.cc.

11  {
12  for (unsigned int idisk = 0; idisk < N_DISK; idisk++) {
13  unsigned int nsignbins = 2;
14  unsigned int nrbins = 1 << (nrbits);
15  unsigned int nphiderbins = 1 << (nphiderbits);
16 
17  for (unsigned int isignbin = 0; isignbin < nsignbins; isignbin++) {
18  for (unsigned int irbin = 0; irbin < nrbins; irbin++) {
19  int ir = irbin;
20  if (ir > (1 << (nrbits - 1)))
21  ir -= (1 << nrbits);
22  ir = ir << (settings.nrbitsstub(N_LAYER) - nrbits);
23  for (unsigned int iphiderbin = 0; iphiderbin < nphiderbins; iphiderbin++) {
24  int iphider = iphiderbin;
25  if (iphider > (1 << (nphiderbits - 1)))
26  iphider -= (1 << nphiderbits);
27  iphider = iphider << (settings.nbitsphiprojderL123() - nphiderbits);
28 
29  double rproj = ir * settings.krprojshiftdisk();
30  double phider = iphider * globals->ITC_L1L2()->der_phiD_final.K();
31  double t = settings.zmean(idisk) / rproj;
32 
33  if (isignbin)
34  t = -t;
35 
36  double rinv = -phider * (2.0 * t);
37 
38  double stripPitch = (rproj < settings.rcrit()) ? settings.stripPitch(true) : settings.stripPitch(false);
39  double bendproj = 0.5 * bend(rproj, rinv, stripPitch);
40 
41  int ibendproj = 2.0 * bendproj + 15.5;
42  if (ibendproj < 0)
43  ibendproj = 0;
44  if (ibendproj > 31)
45  ibendproj = 31;
46 
47  bendtable_[idisk].push_back(ibendproj);
48  }
49  }
50  }
51  }
52 }

References trklet::bend(), bendtable_, trklet::IMATH_TrackletCalculator::der_phiD_final, trklet::Globals::ITC_L1L2(), trklet::VarBase::K(), trklet::Settings::krprojshiftdisk(), trklet::N_DISK, trklet::N_LAYER, trklet::Settings::nbitsphiprojderL123(), trklet::Settings::nrbitsstub(), trklet::Settings::rcrit(), trklet::rinv(), trklet::Settings::stripPitch(), submitPVValidationJobs::t, and trklet::Settings::zmean().

Member Data Documentation

◆ bendtable_

std::vector<int> trklet::ProjectionRouterBendTable::bendtable_[N_DISK]
private

Definition at line 27 of file ProjectionRouterBendTable.h.

Referenced by bendLoookup(), and init().

trklet::ProjectionRouterBendTable::bendtable_
std::vector< int > bendtable_[N_DISK]
Definition: ProjectionRouterBendTable.h:27
trklet::N_DISK
constexpr int N_DISK
Definition: Settings.h:20
trklet::N_LAYER
constexpr int N_LAYER
Definition: Settings.h:19
trklet::IMATH_TrackletCalculator::der_phiD_final
VarAdjustK der_phiD_final
Definition: IMATH_TrackletCalculator.h:339
trklet::rinv
double rinv(double phi1, double phi2, double r1, double r2)
Definition: Util.h:173
trklet::VarBase::K
double K() const
Definition: imath.h:246
trklet::Globals::ITC_L1L2
IMATH_TrackletCalculator * ITC_L1L2()
Definition: Globals.h:52
trklet::bend
double bend(double r, double rinv, double stripPitch)
Definition: Util.h:166
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644