|
![CMS Logo](/cmsdoxygen/common/rightImage.jpg) |
Go to the documentation of this file.
15 Stub::Stub(
Settings const& settings) : settings_(settings) {}
18 const string& stubwordhex = stub.
stubword();
37 assert(nbendbits + nalphabits + nrbits + nzbits + nphibits == 36);
39 bitset<32> rbits(stubwordbin.substr(0, nrbits));
40 bitset<32> zbits(stubwordbin.substr(nrbits, nzbits));
41 bitset<32> phibits(stubwordbin.substr(nrbits + nzbits, nphibits));
42 bitset<32> alphabits(stubwordbin.substr(nphibits + nzbits + nrbits, nalphabits));
43 bitset<32> bendbits(stubwordbin.substr(nphibits + nzbits + nrbits + nalphabits, nbendbits));
45 int newbend = bendbits.to_ulong();
47 int newr = rbits.to_ulong();
49 if (newr >= (1 << (nrbits - 1)))
50 newr = newr - (1 << nrbits);
53 int newz = zbits.to_ulong();
54 if (newz >= (1 << (nzbits - 1)))
55 newz = newz - (1 << nzbits);
57 int newphi = phibits.to_ulong();
59 int newalpha = alphabits.to_ulong();
60 if (newalpha >= (1 << (nalphabits - 1)))
61 newalpha = newalpha - (1 << nalphabits);
65 bend_.
set(newbend, nbendbits,
true, __LINE__, __FILE__);
67 phi_.
set(newphi, nphibits,
true, __LINE__, __FILE__);
68 phicorr_.
set(newphi, nphibits,
true, __LINE__, __FILE__);
77 alpha_.
set(newalpha, nalphabits,
false, __LINE__, __FILE__);
81 disk_.
set(0, 4,
false, __LINE__, __FILE__);
84 r_.
set(newr, nrbits,
pos, __LINE__, __FILE__);
85 z_.
set(newz, nzbits,
false, __LINE__, __FILE__);
90 for (
unsigned int isimtrk = 0; isimtrk < nsimtrks; isimtrk++) {
99 << simtrk.
pt() * simtrk.
charge() <<
" " <<
bend <<
" " << newbend <<
" "
109 return FPGAWord(finephi, finebits,
true, __LINE__, __FILE__);
Stub(Settings const &settings)
std::string phiregionaddressstr() const
const FPGAWord & bend() const
std::string convertHexToBin(const std::string &stubwordhex)
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
unsigned int nrbitsstub(unsigned int layerdisk) const
double rDSSouter(unsigned int iBin) const
double benddecode(int ibend, int layerdisk, bool isPSmodule) const
const FPGAWord & disk() const
FPGAWord iphivmFineBins(int VMbits, int finebits) const
constexpr unsigned int N_BENDBITS_2S
unsigned int isPSmodule() const
double bendcut(int ibend, int layerdisk, bool isPSmodule) const
double zmean(unsigned int iDisk) const
unsigned int layerdisk() const
bool tpmatch2(int tp) const
double rinv(double phi1, double phi2, double r1, double r2)
unsigned int nzbitsstub(unsigned int layerdisk) const
unsigned int nsimtracks() const
unsigned int nphibitsstub(unsigned int layerdisk) const
void setAllStubIndex(int nstub)
double stripPitch(bool isPSmodule) const
constexpr unsigned int N_BITSMEMADDRESS
bool writeMonitorData(std::string module) const
unsigned int phiregionaddress() const
void setPhiCorr(int phiCorr)
const std::string & stubword() const
std::ofstream & ofstream(std::string fname)
bool debugTracklet() const
constexpr unsigned int N_BENDBITS_PS
Abs< T >::type abs(const T &t)
const L1SimTrack & simtrack(int i) const
Settings const & settings_
constexpr T reduceRange(T x)