21 applyL3Filters_(iConfig.getParameter<
bool>(
"applyL3Filters")),
22 max_NormalizedChi2_(iConfig.getParameter<double>(
"MaxNormalizedChi2")),
23 max_PtDifference_(iConfig.getParameter<double>(
"MaxPtDifference")),
24 min_Nhits_(iConfig.getParameter<
int>(
"MinNhits")),
25 min_NmuonHits_(iConfig.getParameter<
int>(
"MinNmuonHits")) {
26 LogTrace(
"Muon|RecoMuon|HLTMuonL2SelectorForL3IO") <<
"constructor called";
27 produces<reco::TrackCollection>();
51 for (
unsigned int il2 = 0; il2 != l2muonH->size(); ++il2) {
53 bool re_do_this_L2 =
true;
55 for (
unsigned int il3 = 0; il3 != l3muonH->size(); ++il3) {
59 bool useThisLink =
false;
60 for (
unsigned int l(0);
l < links->size() && !useThisLink; ++
l) {
65 float dR2 =
deltaR2(tk->eta(), tk->phi(), globalTrack.
eta(), globalTrack.
phi());
66 if (dR2 < 0.02 * 0.02 and
std::abs(tk->pt() - globalTrack.
pt()) < 0.001 * tk->pt()) {
75 if (l2muRef == staTrack)
76 re_do_this_L2 =
false;
90 re_do_this_L2 =
false;
95 result->push_back(*l2muRef);
105 desc.
add<
bool>(
"applyL3Filters",
true);
106 desc.
add<
int>(
"MinNhits", 1);
107 desc.
add<
double>(
"MaxNormalizedChi2", 20.0);
108 desc.
add<
int>(
"MinNmuonHits", 0);
109 desc.
add<
double>(
"MaxPtDifference", 999.0);
110 descriptions.
add(
"HLTMuonL2SelectorForL3IO", desc);
const edm::EDGetTokenT< reco::RecoChargedCandidateCollection > l3OISrc_
HLTMuonL2SelectorForL3IO(const edm::ParameterSet &)
constructor with config
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const std::string metname
const bool applyL3Filters_
reco::TrackRef standAloneTrack() const
get the track built with the muon spectrometer alone
std::vector< Track > TrackCollection
collection of Tracks
double phi() const
azimuthal angle of momentum vector
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
default values
std::vector< MuonTrackLinks > MuonTrackLinksCollection
collection of MuonTrackLinks
const edm::EDGetTokenT< reco::MuonTrackLinksCollection > l3linkToken_
double eta() const
pseudorapidity of momentum vector
double pt() const
track transverse momentum
Abs< T >::type abs(const T &t)
const double max_PtDifference_
unsigned short numberOfValidHits() const
number of valid hits found
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< RecoChargedCandidate > RecoChargedCandidateCollection
collectin of RecoChargedCandidate objects
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
const edm::EDGetTokenT< reco::TrackCollection > l2Src_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void produce(edm::Event &, const edm::EventSetup &) override
select muons
~HLTMuonL2SelectorForL3IO() override
destructor
int numberOfValidMuonHits() const
reco::TrackRef globalTrack() const
get the combined track
const double max_NormalizedChi2_