|
|
Go to the documentation of this file.
12 Stub::Stub(
Settings const& settings) : settings_(settings) {}
17 double sbend = stub.
bend();
27 bend_.
set(ibend, bendbits,
true, __LINE__, __FILE__);
32 double stubphi = stub.
phi();
35 disk_.
set(0, 4,
false, __LINE__, __FILE__);
41 if (r < rmin || r > rmax) {
42 edm::LogProblem(
"Tracklet") <<
"Error r, rmin, rmeas, rmax :" <<
r <<
" " << rmin <<
" " << 0.5 * (rmin + rmax)
53 if (z < zmin || z >
zmax) {
59 int iz = lround((1 << izbits) *
z / (
zmax -
zmin));
61 if (z < zmin || z >
zmax) {
65 assert(phimaxsec - phiminsec > 0.0);
67 if (stubphi < phiminsec - (phimaxsec - phiminsec) / 6.0) {
70 assert((phimaxsec - phiminsec) > 0.0);
76 int iphi = (1 << iphibits) * deltaphi / (phimaxsec - phiminsec);
79 r_.
set(ir, irbits,
false, __LINE__, __FILE__);
80 z_.
set(iz, izbits,
false, __LINE__, __FILE__);
104 assert(phimaxsec - phiminsec > 0.0);
105 if (stubphi < phiminsec - (phimaxsec - phiminsec) / 6.0) {
109 assert(phimaxsec - phiminsec > 0.0);
110 if (stubphi < phiminsec - (phimaxsec - phiminsec) / 6.0) {
118 int iphi = (1 << iphibits) * deltaphi / (phimaxsec - phiminsec);
123 if (r < rmin || r > rmax) {
124 edm::LogProblem(
"Tracklet") <<
"Error disk r, rmin, rmax :" <<
r <<
" " << rmin <<
" " << rmax;
145 throw cms::Exception(
"BadConfig") << __FILE__ <<
" " << __LINE__ <<
" didn't find rDSS value! r = " <<
r
146 <<
" Check that correct geometry is used!";
154 r_.
set(irSS, 4,
true, __LINE__, __FILE__);
158 phi_.
set(
iphi, iphibits,
true, __LINE__, __FILE__);
165 int ialphanew = alphanorm * (1 << (settings.
nbitsalpha() - 1));
174 return FPGAWord(finephi, finebits,
true, __LINE__, __FILE__);
189 if (nstub >= (1 << 7)) {
192 nstub = (1 << 7) - 1;
Stub(Settings const &settings)
std::string phiregionaddressstr() const
unsigned int layer() const
int bendencode(double bend, bool isPS)
unsigned int nbitsallstubs(unsigned int layerdisk) const
void set(int value, int nbits, bool positive=true, int line=-1, const char *file=nullptr)
double rmean(unsigned int iLayer) const
double phiapprox(double phimin, double) const
double rDSSinner(unsigned int iBin) const
const FPGAWord & r() const
unsigned int nrbitsstub(unsigned int layerdisk) const
double rDSSouter(unsigned int iBin) const
const FPGAWord & disk() const
FPGAWord iphivmFineBins(int VMbits, int finebits) const
const FPGAWord & z() const
unsigned int isPSmodule() const
Log< level::Error, true > LogProblem
double zmean(unsigned int iDisk) const
unsigned int module() const
unsigned int layerdisk() const
constexpr unsigned int N_DSS_MOD
unsigned int nzbitsstub(unsigned int layerdisk) const
unsigned int nphibitsstub(unsigned int layerdisk) const
void setAllStubIndex(int nstub)
unsigned int phiregionaddress() const
void setPhiCorr(int phiCorr)
bool debugTracklet() const
Abs< T >::type abs(const T &t)
const FPGAWord & layer() const
Settings const & settings_
constexpr T reduceRange(T x)