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"))
27 LogTrace(
"Muon|RecoMuon|HLTMuonL2SelectorForL3IO")<<
"constructor called";
28 produces<reco::TrackCollection>();
52 for (
unsigned int il2=0; il2 != l2muonH->size(); ++il2){
54 bool re_do_this_L2=
true;
56 for (
unsigned int il3=0; il3 != l3muonH->size(); ++il3){
60 bool useThisLink =
false;
61 for (
unsigned int l(0);
l<links->size() && !useThisLink; ++
l){
66 float dR2 =
deltaR2(tk->eta(),tk->phi(),globalTrack.
eta(),globalTrack.
phi());
67 if (dR2 < 0.02*0.02 and
std::abs(tk->pt() - globalTrack.
pt()) < 0.001*tk->pt()) {
71 if (!useThisLink)
continue;
75 if (l2muRef==staTrack) re_do_this_L2=
false;
85 re_do_this_L2 =
false;
89 if (re_do_this_L2) result->push_back(*l2muRef);
99 desc.
add<
bool>(
"applyL3Filters",
true);
100 desc.
add<
int>(
"MinNhits",1);
101 desc.
add<
double>(
"MaxNormalizedChi2",20.0);
102 desc.
add<
int>(
"MinNmuonHits",0);
103 desc.
add<
double>(
"MaxPtDifference",999.0);
104 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
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
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_