28 static constexpr
float mu_mass = 0.105658369;
66 enum AlgoType { kTP = 1, kDynamicWindows = 2, kMantra = 3 };
76 double sigmaEtaTP(
const Muon&
mu)
const;
77 double sigmaPhiTP(
const Muon&
mu)
const;
102 : etaMin_((
float)iConfig.getParameter<double>(
"ETAMIN")),
103 etaMax_((
float)iConfig.getParameter<double>(
"ETAMAX")),
104 zMax_((
float)iConfig.getParameter<double>(
"ZMAX")),
105 chi2Max_((
float)iConfig.getParameter<double>(
"CHI2MAX")),
106 pTMinTra_((
float)iConfig.getParameter<double>(
"PTMINTRA")),
107 dRMax_((
float)iConfig.getParameter<double>(
"DRmax")),
108 nStubsmin_(iConfig.getParameter<
int>(
"nStubsmin")),
111 iConfig.getParameter<
edm::
InputTag>(
"L1TrackInputTag"))) {
116 produces<TkGlbMuonCollection>();
131 auto tkMuons = std::make_unique<TkGlbMuonCollection>();
148 for (
auto l1mu = l1mus.
begin(0); l1mu != l1mus.
end(0); ++l1mu) {
152 float l1mu_eta = l1mu->eta();
153 float l1mu_phi = l1mu->phi();
155 float l1mu_feta =
std::abs(l1mu_eta);
167 int nTracksMatch = 0;
169 for (
const auto& l1tk : l1tks) {
172 float l1tk_pt = l1tk.momentum().perp();
176 float l1tk_z = l1tk.POCA().z();
180 float l1tk_chi2 = l1tk.chi2();
184 int l1tk_nstubs = l1tk.getStubRefs().size();
188 float l1tk_eta = l1tk.momentum().
eta();
189 float l1tk_phi = l1tk.momentum().phi();
191 float dr2 =
reco::deltaR2(l1mu_eta, l1mu_phi, l1tk_eta, l1tk_phi);
204 if (dr2prop < drmin) {
211 LogDebug(
"L1TkGlbMuonProducer") <<
"matching index is " << match_idx;
212 if (match_idx >= 0) {
226 if (matchCondition) {
234 const auto& tkv3 = matchTk.
POCA();
237 float trkisol = -999;
239 TkGlbMuon l1tkmu(l1tkp4, l1muRef, l1tkPtr, trkisol);
256 desc.add<
double>(
"ETAMIN", 0);
257 desc.add<
double>(
"ETAMAX", 5.0);
258 desc.add<
double>(
"ZMAX", 25.0);
259 desc.add<
double>(
"CHI2MAX", 100.0);
260 desc.add<
double>(
"PTMINTRA", 2.0);
261 desc.add<
double>(
"DRmax", 0.5);
262 desc.add<
int>(
"nStubsmin", 4);
263 desc.add<
bool>(
"correctGMTPropForTkZ",
true);
264 desc.add<
bool>(
"use5ParameterFit",
false);
265 desc.add<
bool>(
"useTPMatchWindows",
true);
266 descriptions.
add(
"L1TkGlbMuons",
desc);
273 float tk_pt =
p3.perp();
274 float tk_p =
p3.mag();
275 float tk_eta =
p3.eta();
277 float tk_phi =
p3.phi();
278 float tk_q = tk.
rInv() > 0 ? 1. : -1.;
279 float tk_z = tk.
POCA().
z();
294 float dzCorrPhi = 1.;
296 float etaProp = tk_aeta;
305 dzCorrPhi = 1. +
delta;
309 deta = zOzs / (1. - zOzs);
311 deta = zOzs / (1. + zOzs);
312 deta = deta * tanh(tk_eta);
314 float resPhi = tk_phi - 1.464 * tk_q * cosh(1.7) / cosh(etaProp) / tk_pt * dzCorrPhi -
M_PI / 144.;
317 dest.eta = tk_eta + deta;
327 float l1mu_eta = l1mu.
eta();
double sigmaEtaTP(const Muon &mu) const
std::vector< TkGlbMuon > TkGlbMuonCollection
T getParameter(std::string const &) const
static constexpr float dr2_cutoff
constexpr T reduceRange(T x)
TTTrack< Ref_Phase2TrackerDigi_ > L1TTTrackType
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
static constexpr float scaling_to_2ndstation
#define DEFINE_FWK_MODULE(type)
const edm::EDGetTokenT< MuonBxCollection > muToken
T const * product() const
static constexpr float sigmaEtaTP_higheta
static constexpr float matching_factor_phi
~L1TkGlbMuonProducer() override
GlobalVector momentum() const
Track momentum.
const_iterator begin(int bx) const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
bool correctGMTPropForTkZ_
L1TkGlbMuonProducer(const edm::ParameterSet &)
static constexpr float sigmaEta_scaling
static constexpr float eta_boundary3
double sigmaPhiTP(const Muon &mu) const
static constexpr float deta_tkz_scaling
void setTrkzVtx(float TrkzVtx)
Abs< T >::type abs(const T &t)
static constexpr float min_mu_propagator_barrel_eta
double rInv() const
Track curvature.
void runOnMuonCollection_v1(const edm::Handle< MuonBxCollection > &, const edm::Handle< L1TTTrackCollectionType > &, TkGlbMuonCollection &tkMuons) const
static constexpr float min_mu_propagator_p
static constexpr float sigmaPhi_scaling
static constexpr float min_mu_propagator_barrel_pT
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static constexpr float matching_factor_eta
static constexpr float sigmaPhiTP_value
static constexpr float eta_boundary1
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
const edm::EDGetTokenT< std::vector< TTTrack< Ref_Phase2TrackerDigi_ > > > trackToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static constexpr float mu_mass
XYZPointD XYZPoint
point in space with cartesian internal representation
Class to store the L1 Track Trigger tracks.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void setNTracksMatched(int nTracksMatch)
static constexpr float eta_boundary2
const_iterator end(int bx) const
PropState propagateToGMT(const L1TTTrackType &l1tk) const
static constexpr float max_mu_propagator_eta
std::vector< L1TTTrackType > L1TTTrackCollectionType
GlobalPoint POCA() const
POCA.
static constexpr float sigmaEtaTP_mediumeta
static constexpr float sigmaEtaTP_loweta
double eta() const final
momentum pseudorapidity