13 HybridFit::HybridFit(
unsigned int iSector,
Settings const& settings,
Globals* globals) : settings_(settings) {
18 void HybridFit::Fit(
Tracklet* tracklet, std::vector<const Stub*>& trackstublist) {
20 vector<const L1TStub*> l1stubsFromFitTrack;
21 for (
unsigned int k = 0;
k < trackstublist.size();
k++) {
22 const L1TStub* L1stub = trackstublist[
k]->l1tstub();
23 l1stubsFromFitTrack.push_back(L1stub);
51 std::vector<tmtt::Stub*> TMTTstubs;
52 std::map<unsigned int, const L1TStub*> L1StubIndices;
53 unsigned int L1stubID = 0;
55 if (
globals_->tmttSettings() ==
nullptr) {
58 globals_->tmttSettings() = make_unique<tmtt::Settings>();
66 for (
unsigned int k = 0;
k < trackstublist.size();
k++) {
67 const L1TStub* L1stubptr = trackstublist[
k]->l1tstub();
69 double kfphi = L1stubptr->
phi();
70 double kfr = L1stubptr->
r();
71 double kfz = L1stubptr->
z();
72 double kfbend = L1stubptr->
bend();
74 unsigned int iphi = L1stubptr->
iphi();
76 bool isTilted = L1stubptr->
isTilted();
82 kflayer = L1stubptr->
layer() + 1;
86 kflayer =
abs(L1stubptr->
disk());
101 edm::LogVerbatim(
"L1track") << kfphi <<
" " << kfr <<
" " << kfz <<
" " << kfbend <<
" " << kflayer <<
" " 102 <<
isBarrel <<
" " << psmodule <<
" " << isTilted <<
" \n" 103 << stripPitch <<
" " << stripLength <<
" " <<
nStrips;
106 unsigned int uniqueStubIndex = 1000 * L1stubID + L1stubptr->
allStubIndex();
123 TMTTstubs.push_back(TMTTstubptr);
124 L1StubIndices[uniqueStubIndex] = L1stubptr;
129 edm::LogVerbatim(
"L1track") <<
"Made TMTTstubs: trackstublist.size() = " << trackstublist.size();
135 double kft = tracklet->
tapprox();
148 std::pair<float, float> helixrz(kfz0, kft);
151 double chargeOverPt = helixrphi.first;
152 int mBin = std::floor(TMTTsettings.
houghNbinsPt() / 2) +
155 std::pair<unsigned int, unsigned int> celllocation(mBin, 1);
159 const float chosenRofZ = TMTTsettings.
chosenRofZ();
161 float kfzRef = kfz0 + chosenRofZ * kft;
163 unsigned int kf_eta_reg = 0;
164 for (
unsigned int iEtaSec = 1; iEtaSec <
etaRegions.size() - 1; iEtaSec++) {
166 const float zRefMax = chosenRofZ /
tan(2. * atan(
exp(-
etaMax)));
167 if (kfzRef > zRefMax)
168 kf_eta_reg = iEtaSec;
172 &TMTTsettings, TMTTstubs, celllocation, helixrphi, helixrz, kfd0, kf_phi_sec, kf_eta_reg, 1,
false);
173 unsigned int seedType = tracklet->
getISeed();
174 unsigned int numPS = tracklet->
PSseed();
175 l1track3d.setSeedLayerType(seedType);
176 l1track3d.setSeedPS(numPS);
178 if (
globals_->tmttKFParamsComb() ==
nullptr) {
196 <<
", phi0 = " << trk.
phi0() <<
", eta = " << trk.
eta() <<
", z0 = " << trk.
z0()
197 <<
", chi2 = " << trk.
chi2() <<
", accepted = " << trk.
accepted();
199 double d0, chi2rphi,
phi0, qoverpt = -999;
221 int ichi2rphifit = chi2rphi / 16;
222 int ichi2rzfit = trk.
chi2rz() / 16;
224 const vector<const tmtt::Stub*>& stubsFromFit = trk.
stubs();
225 vector<const L1TStub*> l1stubsFromFit;
227 unsigned int IDf =
s->index();
229 l1stubsFromFit.push_back(
l1s);
Log< level::Info, true > LogVerbatim
double stripLength(bool isPSmodule) const
const FPGAWord & fpgarinv() const
const std::vector< const Stub * > & stubs() const
unsigned int layer() const
Settings const & settings_
unsigned int hitPattern() const
constexpr T reduceRange(T x)
double dphisectorHG() const
const FPGAWord & fpgaz0() const
const FPGAWord & fpgaphi0() const
L1fittedTrack fit(const L1track3D &l1track3D) override
bool printDebugKF() const
const FPGAWord & fpgat() const
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
double chosenRofZ() const
unsigned int isPSmodule() const
KFTrackletTrack returnKFTrackletTrack()
unsigned int houghNbinsPt() const
double phi0approx() const
double dphisector() const
double stripPitch(bool isPSmodule) const
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
unsigned int nStrips(bool isPSmodule) const
const FPGAWord & fpgad0() const
unsigned int allStubIndex() const
double alpha(double pitch) const
constexpr unsigned int N_SECTOR
double rinvapprox() const
static constexpr float d0
bool consistentSector() const
unsigned int nHelixPar() const
double houghMinPt() const
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 *>())
unsigned int iphi() const
unsigned int PSseed() const
const std::vector< double > & etaRegions() const
float chi2rphi_bcon() const
float qOverPt_bcon() const