13 HybridFit::HybridFit(
unsigned int iSector,
Settings const& settings,
Globals* globals) : settings_(settings) {
45 std::vector<tmtt::Stub*> TMTTstubs;
46 std::map<unsigned int, const L1TStub*> L1StubIndices;
47 unsigned int L1stubID = 0;
49 if (
globals_->tmttSettings() ==
nullptr) {
52 globals_->tmttSettings() = make_unique<tmtt::Settings>();
60 for (
unsigned int k = 0;
k < trackstublist.size();
k++) {
61 const L1TStub* L1stubptr = trackstublist[
k]->l1tstub();
63 double kfphi = L1stubptr->
phi();
64 double kfr = L1stubptr->
r();
65 double kfz = L1stubptr->
z();
66 double kfbend = L1stubptr->
bend();
68 unsigned int iphi = L1stubptr->
iphi();
70 bool isTilted = L1stubptr->
isTilted();
72 bool isBarrel = trackstublist[
k]->isBarrel();
76 kflayer = L1stubptr->
layer() + 1;
80 kflayer =
abs(L1stubptr->
disk());
95 edm::LogVerbatim(
"L1track") << kfphi <<
" " << kfr <<
" " << kfz <<
" " << kfbend <<
" " << kflayer <<
" "
96 <<
isBarrel <<
" " << psmodule <<
" " << isTilted <<
" \n"
97 << stripPitch <<
" " << stripLength <<
" " <<
nStrips;
100 unsigned int uniqueStubIndex = 1000 * L1stubID + L1stubptr->
allStubIndex();
117 TMTTstubs.push_back(TMTTstubptr);
118 L1StubIndices[uniqueStubIndex] = L1stubptr;
123 edm::LogVerbatim(
"L1track") <<
"Made TMTTstubs: trackstublist.size() = " << trackstublist.size();
129 double kft = tracklet->
tapprox();
142 std::pair<float, float> helixrz(kfz0, kft);
145 double chargeOverPt = helixrphi.first;
146 int mBin = std::floor(TMTTsettings.
houghNbinsPt() / 2) +
149 std::pair<unsigned int, unsigned int> celllocation(mBin, 1);
152 const vector<double> etaRegions = TMTTsettings.
etaRegions();
153 const float chosenRofZ = TMTTsettings.
chosenRofZ();
155 float kfzRef = kfz0 + chosenRofZ * kft;
157 unsigned int kf_eta_reg = 0;
158 for (
unsigned int iEtaSec = 1; iEtaSec < etaRegions.size() - 1; iEtaSec++) {
159 const float etaMax = etaRegions[iEtaSec];
160 const float zRefMax = chosenRofZ /
tan(2. * atan(
exp(-
etaMax)));
161 if (kfzRef > zRefMax)
162 kf_eta_reg = iEtaSec;
166 &TMTTsettings, TMTTstubs, celllocation, helixrphi, helixrz, kfd0, kf_phi_sec, kf_eta_reg, 1,
false);
167 unsigned int seedType = tracklet->
getISeed();
168 unsigned int numPS = tracklet->
PSseed();
169 l1track3d.setSeedLayerType(seedType);
170 l1track3d.setSeedPS(numPS);
172 if (
globals_->tmttKFParamsComb() ==
nullptr) {
189 <<
", phi0 = " << trk.
phi0() <<
", eta = " << trk.
eta() <<
", z0 = " << trk.
z0()
190 <<
", chi2 = " << trk.
chi2() <<
", accepted = " << trk.
accepted();
202 int ichi2rphifit = trk.
chi2rphi() / 16;
203 int ichi2rzfit = trk.
chi2rz() / 16;
205 const vector<const tmtt::Stub*>& stubsFromFit = trk.
stubs();
206 vector<const L1TStub*> l1stubsFromFit;
208 unsigned int IDf =
s->index();
210 l1stubsFromFit.push_back(
l1s);
214 edm::LogVerbatim(
"L1track") <<
"#stubs before/after KF fit = " << TMTTstubs.size() <<
"/"
215 << l1stubsFromFit.size();