|
|
Go to the documentation of this file.
18 const Stub* innerFPGAStub,
19 const Stub* middleFPGAStub,
20 const Stub* outerFPGAStub,
40 : settings_(settings) {
86 for (
unsigned int i = 0;
i <
N_LAYER - 2;
i++) {
91 for (
unsigned int i = 0;
i <
N_DISK;
i++) {
96 for (
unsigned int i = 0;
i <
N_LAYER - 2;
i++) {
99 if (!layerprojs[
i].
valid())
105 for (
unsigned int i = 0;
i <
N_DISK;
i++) {
108 if (!diskprojs[
i].
valid())
121 set<int> tpsetstubinner;
122 set<int> tpsetstubouter;
125 for (
auto tp : tps) {
127 tpsetstubinner.insert(
tp);
128 tpset.insert(
abs(
tp));
133 for (
auto tp : tps) {
135 tpsetstubouter.insert(
tp);
136 tpset.insert(
abs(
tp));
140 for (
auto&
tp : tpset) {
141 if (tpsetstubinner.find(
tp) != tpsetstubinner.end() && tpsetstubinner.find(-
tp) != tpsetstubinner.end() &&
142 tpsetstubouter.find(
tp) != tpsetstubouter.end() && tpsetstubouter.find(-
tp) != tpsetstubouter.end()) {
152 set<int> tpsetstubinner;
153 set<int> tpsetstubouter;
155 vector<int> tps = stub->
tps();
156 for (
auto tp : tps) {
158 tpsetstub.insert(
tp);
159 tpset.insert(
abs(
tp));
163 for (
auto tp : tps) {
165 tpsetstubinner.insert(
tp);
166 tpset.insert(
abs(
tp));
170 for (
auto tp : tps) {
172 tpsetstubouter.insert(
tp);
173 tpset.insert(
abs(
tp));
177 for (
auto tp : tpset) {
178 if (tpsetstub.find(
tp) != tpsetstub.end() && tpsetstub.find(-
tp) != tpsetstub.end() &&
179 tpsetstubinner.find(
tp) != tpsetstubinner.end() && tpsetstubinner.find(-
tp) != tpsetstubinner.end() &&
180 tpsetstubouter.find(
tp) != tpsetstubouter.end() && tpsetstubouter.find(-
tp) != tpsetstubouter.end()) {
222 if (allstubindex >= (1 << 7)) {
223 edm::LogPrint(
"Tracklet") <<
"Warning projection number too large!";
224 index.set((1 << 7) - 1, 7,
true, __LINE__, __FILE__);
226 index.set(allstubindex, 7,
true, __LINE__, __FILE__);
238 int irinvvm = 16 + (tmp_irinv >> (nbits_irinv - 5));
241 edm::LogPrint(
"Tracklet") <<
"Warning irinvvm too large:" << irinvvm;
248 tmp.set(irinvvm, 5,
true, __LINE__, __FILE__);
251 "|" +
tmp.str() +
"|" + std::to_string(
PSseed());
257 if (allstubindex >= (1 << 7)) {
258 edm::LogPrint(
"Tracklet") <<
"Warning projection number too large!";
259 index.set((1 << 7) - 1, 7,
true, __LINE__, __FILE__);
261 index.set(allstubindex, 7,
true, __LINE__, __FILE__);
320 settings_,
layer, ideltaphi, ideltaz, stubid, dphi,
dz, dphiapprox, dzapprox,
rstub,
stubptr);
354 if (ilayerresid.valid()) {
366 if (idiskresid.valid()) {
412 std::vector<const L1TStub*>
tmp;
422 if (ilayerresid.valid())
423 tmp.push_back(ilayerresid.stubptr()->l1tstub());
427 if (idiskresid.valid())
428 tmp.push_back(idiskresid.stubptr()->l1tstub());
435 std::map<int, int> stubIDs;
600 double chisqrphifitexact,
601 double chisqrzfitexact,
610 const vector<const L1TStub*>& l1stubs) {
646 string stubid0 =
"111111111";
647 string stubid1 =
"111111111";
648 string stubid2 =
"111111111";
649 string stubid3 =
"111111111";
819 return (
l < 999 ?
l : 0);
832 return (
d < 999 ?
d : 0);
855 assert(iTC >= 0 && iTC <= 14);
861 int seedlayer =
layer();
862 int seeddisk =
disk();
864 if (seedlayer == 1 && seeddisk == 0)
866 if (seedlayer == 3 && seeddisk == 0)
868 if (seedlayer == 5 && seeddisk == 0)
870 if (seedlayer == 0 &&
abs(seeddisk) == 1)
872 if (seedlayer == 0 &&
abs(seeddisk) == 3)
874 if (seedlayer == 1 &&
abs(seeddisk) == 1)
876 if (seedlayer == 2 &&
abs(seeddisk) == 1)
878 if (seedlayer == 2 &&
abs(seeddisk) == 0)
890 if (l1 + l2 + l3 < 1998) {
898 throw cms::Exception(
"BadConfig") << __FILE__ <<
" " << __LINE__ <<
" seedlayer abs(seeddisk) : " << seedlayer
899 <<
" " <<
abs(seeddisk);
const FPGAWord & fpgafinezvm() const
std::string fullmatchstr(int layer)
bool stubtruthmatch(const L1TStub *stub)
std::vector< int > tps() const
double chisqrphifitexact_
unsigned int ntrackletmax() const
DiskProjection diskproj_[N_DISK]
unsigned int PSseed() const
std::string phiregionaddressstr() const
Settings const & settings_
double phi0fitexact() const
TrackPars< double > fitpars_
const FPGAWord & getBendIndex() const
unsigned int layer() const
const FPGAWord & fpgarprojder() const
alpha
zGenParticlesMatch = cms.InputTag(""),
const L1TStub * innerStub_
void init(Settings const &settings, int layer, int iphiresid, int izresid, int istubid, double phiresid, double zresid, double phiresidapprox, double zresidapprox, double rstub, const Stub *stubptr)
DiskResidual diskresid_[N_DISK]
const Stub * middleFPGAStub_
TrackPars< double > trackpars_
LayerProjection layerproj_[N_LAYER]
const FPGAWord & fpgaphiresid() const
void addMatch(int layer, int ideltaphi, int ideltaz, double dphi, double dz, double dphiapprox, double dzapprox, int stubid, double rstub, const trklet::Stub *stubptr)
LayerResidual layerresid_[N_LAYER]
void set(int value, int nbits, bool positive=true, int line=-1, const char *file=nullptr)
const FPGAWord & fpgafinervm() const
double d0fitexact() const
const FPGAWord & fpgarbin2projvm() const
const FPGAWord & itfit() const
double rinvapprox() const
double z0fitexact() const
std::string vmstrdisk(int disk, unsigned int allstubindex)
const FPGAWord & irinvfit() const
const FPGAWord & fpgaphiproj() const
const Stub * outerFPGAStub_
void addMatchDisk(int disk, int ideltaphi, int ideltar, double dphi, double dr, double dphiapprox, double drapprox, double alpha, int stubid, double zstub, const trklet::Stub *stubptr)
std::unique_ptr< Track > fpgatrack_
const Stub * middleFPGAStub()
unsigned int projdisks(unsigned int iSeed, unsigned int i) const
const FPGAWord & disk() const
std::string trackletprojstr(int layer) const
const FPGAWord & fpgaphiproj() const
const L1TStub * middleStub()
const trklet::Stub * stubptr(int layer) const
const FPGAWord & fpgastubid() const
const L1TStub * innerStub()
const FPGAWord & fpgaphiprojder() const
std::string trackletprojstrD(int disk) const
void init(Settings const &settings, int disk, int iphiresid, int irresid, int istubid, double phiresid, double rresid, double phiresidapprox, double rresidapprox, double zstub, double alpha, FPGAWord ialpha, const Stub *stubptr)
double phi0approx() const
std::string fullmatchdiskstr(int disk)
const FPGAWord & fpgazproj() const
unsigned int nbitsd0() const
unsigned int calcSeedIndex() const
const FPGAWord & fpgaphiprojder() const
constexpr unsigned int N_SEED
const FPGAWord & alphanew() const
double rinv(double phi1, double phi2, double r1, double r2)
const FPGAWord & iphi0fit() const
unsigned int projlayers(unsigned int iSeed, unsigned int i) const
const L1TStub * outerStub_
constexpr unsigned int N_PROJ
std::string trackletparstr()
double rinvfitexact() const
const FPGAWord & fpgarproj() const
std::map< int, int > getStubIDs()
const Stub * innerFPGAStub_
const L1TStub * outerStub()
const FPGAWord & fpgaphiresid() const
void init(T rinv, T phi0, T d0, T t, T z0)
void setTrackletIndex(int index)
const FPGAWord & id0fit() const
TrackPars< FPGAWord > fpgafitpars_
const FPGAWord & fpgastubid() const
const Stub * innerFPGAStub()
const FPGAWord & fpgarresid() const
unsigned int phiregionaddress() const
Track makeTrack(const std::vector< const L1TStub * > &l1stubs)
const FPGAWord & fpgazprojder() const
TrackPars< FPGAWord > fpgapars_
const Stub * outerFPGAStub()
void setFitPars(double rinvfit, double phi0fit, double d0fit, double tfit, double z0fit, double chisqrphifit, double chisqrzfit, double rinvfitexact, double phi0fitexact, double d0fitexact, double tfitexact, double z0fitexact, double chisqrphifitexact, double chisqrzfitexact, int irinvfit, int iphi0fit, int id0fit, int itfit, int iz0fit, int ichisqrphifit, int ichisqrzfit, int hitpattern, const std::vector< const L1TStub * > &l1stubs=std::vector< const L1TStub * >())
const FPGAWord & stubindex() const
std::string trackfitstr()
const FPGAWord & fpgazbin2projvm() const
Abs< T >::type abs(const T &t)
const FPGAWord & fpgazresid() const
const FPGAWord & layer() const
const FPGAWord & fpgarbin1projvm() const
TrackPars< double > trackparsapprox_
const L1TStub * middleStub_
std::vector< const L1TStub * > getL1Stubs()
static constexpr float d0
TrackPars< double > fitparsexact_
const FPGAWord & fpgazbin1projvm() const
static constexpr float d1
bool writeoutReal() const
std::string vmstrlayer(int layer, unsigned int allstubindex)
int projlayer_[N_LAYER - 2]
const FPGAWord & iz0fit() const