15 DigitalStub::DigitalStub(
const Settings* settings,
double r,
double phi,
double z,
unsigned int iPhiSec)
16 : phiSBits_(settings->phiSBits()),
17 phiSRange_(settings->phiSRange()),
18 rtBits_(settings->rtBits()),
19 rtRange_(settings->rtRange()),
20 zBits_(settings->zBits()),
21 zRange_(settings->
zRange()),
22 phiSMult_(
pow(2, phiSBits_) / phiSRange_),
23 rtMult_(
pow(2, rtBits_) / rtRange_),
24 zMult_(
pow(2, zBits_) / zRange_),
25 numPhiSectors_(settings->numPhiSectors()),
27 phiSectorWidth_(2. *
M_PI / double(numPhiSectors_)),
28 chosenRofPhi_(settings->chosenRofPhi()) {
57 unsigned int mbin_min_orig,
58 unsigned int mbin_max_orig,
60 unsigned int iPhiSec) {
217 throw cms::Exception(
"BadConfig") <<
"DigitalStub: Stub rT is out of assumed digitization range."
220 throw cms::Exception(
"BadConfig") <<
"DigitalStub: Stub z is out of assumed digitization range."
223 throw cms::Exception(
"BadConfig") <<
"DigitalStub: Stub bend is out of assumed digitization range."
243 constexpr
double smallTA = 0.001, smallTB = 0.3, smallTC = 0.25, smallTD = 0.01;
245 throw cms::Exception(
"LogicError") <<
"WARNING: DigitalStub lost precision: " << TA <<
" " << TB <<
" " << TC
constexpr double deltaPhi(double phi1, double phi2)
unsigned int phiSBits() const
unsigned int houghNbinsPt() const
unsigned int iNonant(unsigned int iPhiSec) const
void digitize(unsigned int iPhiSec)
unsigned int mbin_max_orig() const
unsigned int numPhiNonants() const
void setCfgParams(const Settings *settings)
unsigned int mbin_min_orig_
unsigned int iPhiSec_done_
unsigned int numPhiNonants_
double chosenRofPhi() const
Abs< T >::type abs(const T &t)
unsigned int bendBits() const
DigitalStub(const Settings *settings, double r, double phi, double z, unsigned int iPhiSec)
void undigitize(unsigned int iPhiSec)
unsigned int phiNBits() const
unsigned int rtBits() const
unsigned int mbin_max_orig_
unsigned int phiSectorBits_
unsigned int zBits() const
unsigned int mbin_min_orig() const
void checkAccuracy() const
unsigned int numPhiSectors() const
unsigned int numPhiSectors_
Power< A, B >::type pow(const A &a, const B &b)
void checkInRange() const
bool changePhiSec(unsigned int iPhiSec)
unsigned int phiSectorBits() const