Matcher of reconstructed objects to L1 Muons. More...
#include "MuonAnalysis/MuonAssociators/interface/L1MuonMatcherAlgo.h"
Public Member Functions | |
TrajectoryStateOnSurface | extrapolate (const reco::Track &tk) const |
Extrapolate reco::Track to the muon station 2, return an invalid TSOS if it fails. More... | |
TrajectoryStateOnSurface | extrapolate (const reco::Track &tk) const |
Extrapolate reco::Track to the muon station 2, return an invalid TSOS if it fails. More... | |
TrajectoryStateOnSurface | extrapolate (const reco::Candidate &tk) const |
Extrapolate reco::Candidate to the muon station 2, return an invalid TSOS if it fails. More... | |
TrajectoryStateOnSurface | extrapolate (const reco::Candidate &tk) const |
Extrapolate reco::Candidate to the muon station 2, return an invalid TSOS if it fails. More... | |
TrajectoryStateOnSurface | extrapolate (const FreeTrajectoryState &state) const |
Extrapolate a FreeTrajectoryState to the muon station 2, return an invalid TSOS if it fails. More... | |
TrajectoryStateOnSurface | extrapolate (const SimTrack &tk, const edm::SimVertexContainer &vtx) const |
Extrapolate a SimTrack to the muon station 2, return an invalid TSOS if it fails. Requires SimVertices to know where to start from. More... | |
TrajectoryStateOnSurface | extrapolate (const FreeTrajectoryState &state) const |
Extrapolate a FreeTrajectoryState to the muon station 2, return an invalid TSOS if it fails. More... | |
void | init (const edm::EventSetup &iSetup) |
Call this method at the beginning of each run, to initialize geometry, magnetic field and propagators. More... | |
void | init (const edm::EventSetup &iSetup) |
Call this method at the beginning of each run, to initialize geometry, magnetic field and propagators. More... | |
L1MuonMatcherAlgo (const edm::ParameterSet &iConfig) | |
L1MuonMatcherAlgo (const edm::ParameterSet &iConfig) | |
bool | match (const reco::Track &tk, const l1extra::L1MuonParticle &l1, float &deltaR, float &deltaPhi, TrajectoryStateOnSurface &propagated) const |
bool | match (const reco::Track &tk, const l1extra::L1MuonParticle &l1, float &deltaR, float &deltaPhi, TrajectoryStateOnSurface &propagated) const |
bool | match (const reco::Candidate &c, const l1extra::L1MuonParticle &l1, float &deltaR, float &deltaPhi, TrajectoryStateOnSurface &propagated) const |
bool | match (const reco::Candidate &c, const l1extra::L1MuonParticle &l1, float &deltaR, float &deltaPhi, TrajectoryStateOnSurface &propagated) const |
bool | match (TrajectoryStateOnSurface &propagated, const l1extra::L1MuonParticle &l1, float &deltaR, float &deltaPhi) const |
bool | match (const SimTrack &tk, const edm::SimVertexContainer &vtxs, const l1extra::L1MuonParticle &l1, float &deltaR, float &deltaPhi, TrajectoryStateOnSurface &propagated) const |
int | match (const reco::Track &tk, const std::vector< l1extra::L1MuonParticle > &l1, float &deltaR, float &deltaPhi, TrajectoryStateOnSurface &propagated) const |
bool | match (TrajectoryStateOnSurface &propagated, const l1extra::L1MuonParticle &l1, float &deltaR, float &deltaPhi) const |
int | match (const reco::Candidate &c, const std::vector< l1extra::L1MuonParticle > &l1, float &deltaR, float &deltaPhi, TrajectoryStateOnSurface &propagated) const |
int | match (const reco::Track &tk, const std::vector< l1extra::L1MuonParticle > &l1, float &deltaR, float &deltaPhi, TrajectoryStateOnSurface &propagated) const |
int | match (TrajectoryStateOnSurface &propagated, const std::vector< l1extra::L1MuonParticle > &l1, float &deltaR, float &deltaPhi) const |
int | match (const reco::Candidate &c, const std::vector< l1extra::L1MuonParticle > &l1, float &deltaR, float &deltaPhi, TrajectoryStateOnSurface &propagated) const |
int | match (const SimTrack &tk, const edm::SimVertexContainer &vtxs, const std::vector< l1extra::L1MuonParticle > &l1, float &deltaR, float &deltaPhi, TrajectoryStateOnSurface &propagated) const |
int | match (TrajectoryStateOnSurface &propagated, const std::vector< l1extra::L1MuonParticle > &l1, float &deltaR, float &deltaPhi) const |
template<typename Collection , typename Selector > | |
int | matchGeneric (const reco::Track &tk, const Collection &l1, const Selector &sel, float &deltaR, float &deltaPhi, TrajectoryStateOnSurface &propagated) const |
template<typename Collection , typename Selector > | |
int | matchGeneric (const reco::Candidate &c, const Collection &l1, const Selector &sel, float &deltaR, float &deltaPhi, TrajectoryStateOnSurface &propagated) const |
template<typename Collection , typename Selector > | |
int | matchGeneric (TrajectoryStateOnSurface &propagated, const Collection &l1, const Selector &sel, float &deltaR, float &deltaPhi) const |
template<typename Collection , typename Selector > | |
int | matchGeneric (const reco::Track &tk, const Collection &l1, const Selector &sel, float &deltaR, float &deltaPhi, TrajectoryStateOnSurface &propagated) const |
template<typename Collection , typename Selector > | |
int | matchGeneric (const reco::Candidate &c, const Collection &l1, const Selector &sel, float &deltaR, float &deltaPhi, TrajectoryStateOnSurface &propagated) const |
template<typename Collection , typename Selector > | |
int | matchGeneric (TrajectoryStateOnSurface &propagated, const Collection &l1, const Selector &sel, float &deltaR, float &deltaPhi) const |
PropagateToMuon & | propagatorToMuon () |
Return the propagator to second muon station (in case it's needed) More... | |
const PropagateToMuon & | propagatorToMuon () const |
Return the propagator to second muon station (in case it's needed) More... | |
PropagateToMuon & | propagatorToMuon () |
Return the propagator to second muon station (in case it's needed) More... | |
const PropagateToMuon & | propagatorToMuon () const |
Return the propagator to second muon station (in case it's needed) More... | |
void | setL1PhiOffset (double l1PhiOffset) |
Add this offset to the L1 phi before doing the match, to correct for different scales in L1 vs offline. More... | |
~L1MuonMatcherAlgo () | |
~L1MuonMatcherAlgo () | |
Private Types | |
typedef StringCutObjectSelector < l1extra::L1MuonParticle > | L1Selector |
typedef StringCutObjectSelector < l1extra::L1MuonParticle > | L1Selector |
enum | SortBy { SortByDeltaR, SortByDeltaPhi, SortByDeltaEta, SortByPt } |
Sort by deltaPhi or deltaEta instead of deltaR. More... | |
Private Attributes | |
double | deltaEta_ |
double | deltaPhi_ |
double | deltaR2_ |
Matching cuts. More... | |
double | l1PhiOffset_ |
offset to be added to the L1 phi before the match More... | |
L1Selector | preselectionCut_ |
Preselection cut to apply to L1 candidates before matching. More... | |
PropagateToMuon | prop_ |
SortBy | sortBy_ |
bool | sortByDeltaPhi_ |
Sort by deltaPhi instead of deltaR. More... | |
Matcher of reconstructed objects to L1 Muons.
Definition at line 26 of file L1MuonMatcherAlgo.h.
|
private |
Definition at line 119 of file L1MuonMatcherAlgo.h.
|
private |
Definition at line 143 of file L1MuonMatcherAlgo.h.
|
private |
Sort by deltaPhi or deltaEta instead of deltaR.
Enumerator | |
---|---|
SortByDeltaR | |
SortByDeltaPhi | |
SortByDeltaEta | |
SortByPt |
Definition at line 151 of file L1MuonMatcherAlgo.h.
|
explicit |
Definition at line 5 of file L1MuonMatcherAlgo.cc.
L1MuonMatcherAlgo::~L1MuonMatcherAlgo | ( | ) |
Definition at line 14 of file L1MuonMatcherAlgo.cc.
|
explicit |
L1MuonMatcherAlgo::~L1MuonMatcherAlgo | ( | ) |
|
inline |
Extrapolate reco::Track to the muon station 2, return an invalid TSOS if it fails.
Definition at line 35 of file L1MuonMatcherAlgo.h.
References PropagateToMuon::extrapolate(), and prop_.
Referenced by match(), and matchGeneric().
|
inline |
Extrapolate reco::Track to the muon station 2, return an invalid TSOS if it fails.
Definition at line 36 of file L1MuonMatcherAlgo.h.
References PropagateToMuon::extrapolate(), and prop_.
|
inline |
Extrapolate reco::Candidate to the muon station 2, return an invalid TSOS if it fails.
Definition at line 38 of file L1MuonMatcherAlgo.h.
References PropagateToMuon::extrapolate(), and prop_.
|
inline |
Extrapolate reco::Candidate to the muon station 2, return an invalid TSOS if it fails.
Definition at line 39 of file L1MuonMatcherAlgo.h.
References PropagateToMuon::extrapolate(), and prop_.
|
inline |
Extrapolate a FreeTrajectoryState to the muon station 2, return an invalid TSOS if it fails.
Definition at line 41 of file L1MuonMatcherAlgo.h.
References PropagateToMuon::extrapolate(), and prop_.
|
inline |
Extrapolate a SimTrack to the muon station 2, return an invalid TSOS if it fails. Requires SimVertices to know where to start from.
Definition at line 42 of file L1MuonMatcherAlgo.h.
References PropagateToMuon::extrapolate(), and prop_.
|
inline |
Extrapolate a FreeTrajectoryState to the muon station 2, return an invalid TSOS if it fails.
Definition at line 45 of file L1MuonMatcherAlgo.h.
References PropagateToMuon::extrapolate(), and prop_.
void L1MuonMatcherAlgo::init | ( | const edm::EventSetup & | iSetup | ) |
Call this method at the beginning of each run, to initialize geometry, magnetic field and propagators.
Definition at line 17 of file L1MuonMatcherAlgo.cc.
References PropagateToMuon::init(), and prop_.
Referenced by HLTMuonPlotter::beginRun().
void L1MuonMatcherAlgo::init | ( | const edm::EventSetup & | iSetup | ) |
Call this method at the beginning of each run, to initialize geometry, magnetic field and propagators.
|
inline |
Try to match one track to one L1. Return true if succeeded (and update deltaR, deltaPhi and propagated TSOS accordingly) The preselection cut on L1, if specified in the config, is applied before the match
Definition at line 50 of file L1MuonMatcherAlgo.h.
References extrapolate(), and TrajectoryStateOnSurface::isValid().
Referenced by match(), and matchGeneric().
|
inline |
Try to match one track to one L1. Return true if succeeded (and update deltaR, deltaPhi and propagated TSOS accordingly) The preselection cut on L1, if specified in the config, is applied before the match
Definition at line 54 of file L1MuonMatcherAlgo.h.
References extrapolate(), TrajectoryStateOnSurface::isValid(), and match().
|
inline |
Try to match one track to one L1. Return true if succeeded (and update deltaR, deltaPhi and propagated TSOS accordingly) The preselection cut on L1, if specified in the config, is applied before the match
Definition at line 57 of file L1MuonMatcherAlgo.h.
References extrapolate(), TrajectoryStateOnSurface::isValid(), and match().
|
inline |
Try to match one track to one L1. Return true if succeeded (and update deltaR, deltaPhi and propagated TSOS accordingly) The preselection cut on L1, if specified in the config, is applied before the match
Definition at line 61 of file L1MuonMatcherAlgo.h.
References extrapolate(), TrajectoryStateOnSurface::isValid(), and match().
bool L1MuonMatcherAlgo::match | ( | TrajectoryStateOnSurface & | propagated, |
const l1extra::L1MuonParticle & | l1, | ||
float & | deltaR, | ||
float & | deltaPhi | ||
) | const |
Try to match one track to one L1. Return true if succeeded (and update deltaR, deltaPhi accordingly) The preselection cut on L1, if specified in the config, is applied before the match
Definition at line 22 of file L1MuonMatcherAlgo.cc.
References SiPixelRawToDigiRegional_cfi::deltaPhi, deltaPhi_, reco::deltaR2(), deltaR2_, PV3DBase< T, PVType, FrameType >::eta(), reco::LeafCandidate::eta(), TrajectoryStateOnSurface::globalPosition(), PV3DBase< T, PVType, FrameType >::phi(), reco::LeafCandidate::phi(), preselectionCut_, and mathSSE::sqrt().
|
inline |
Try to match one simtrack to one L1. Return true if succeeded (and update deltaR, deltaPhi and propagated TSOS accordingly) The preselection cut on L1, if specified in the config, is applied before the match
Definition at line 68 of file L1MuonMatcherAlgo.h.
References extrapolate(), TrajectoryStateOnSurface::isValid(), and match().
|
inline |
Find the best match to L1, and return its index in the vector (and update deltaR, deltaPhi and propagated TSOS accordingly) Returns -1 if the match fails The preselection cut on L1, if specified in the config, is applied before the match
Definition at line 69 of file L1MuonMatcherAlgo.h.
References extrapolate(), TrajectoryStateOnSurface::isValid(), and match().
bool L1MuonMatcherAlgo::match | ( | TrajectoryStateOnSurface & | propagated, |
const l1extra::L1MuonParticle & | l1, | ||
float & | deltaR, | ||
float & | deltaPhi | ||
) | const |
Try to match one track to one L1. Return true if succeeded (and update deltaR, deltaPhi accordingly) The preselection cut on L1, if specified in the config, is applied before the match
|
inline |
Find the best match to L1, and return its index in the vector (and update deltaR, deltaPhi and propagated TSOS accordingly) Returns -1 if the match fails The preselection cut on L1, if specified in the config, is applied before the match
Definition at line 77 of file L1MuonMatcherAlgo.h.
References extrapolate(), TrajectoryStateOnSurface::isValid(), and match().
|
inline |
Find the best match to L1, and return its index in the vector (and update deltaR, deltaPhi and propagated TSOS accordingly) Returns -1 if the match fails The preselection cut on L1, if specified in the config, is applied before the match
Definition at line 81 of file L1MuonMatcherAlgo.h.
References extrapolate(), TrajectoryStateOnSurface::isValid(), and match().
int L1MuonMatcherAlgo::match | ( | TrajectoryStateOnSurface & | propagated, |
const std::vector< l1extra::L1MuonParticle > & | l1, | ||
float & | deltaR, | ||
float & | deltaPhi | ||
) | const |
Find the best match to L1, and return its index in the vector (and update deltaR, deltaPhi accordingly) Returns -1 if the match fails The preselection cut on L1, if specified in the config, is applied before the match
Definition at line 37 of file L1MuonMatcherAlgo.cc.
References matchGeneric(), and preselectionCut_.
|
inline |
Find the best match to L1, and return its index in the vector (and update deltaR, deltaPhi and propagated TSOS accordingly) Returns -1 if the match fails The preselection cut on L1, if specified in the config, is applied before the match
Definition at line 89 of file L1MuonMatcherAlgo.h.
References extrapolate(), TrajectoryStateOnSurface::isValid(), and match().
|
inline |
Find the best match to L1, and return its index in the vector (and update deltaR, deltaPhi and propagated TSOS accordingly) Returns -1 if the match fails The preselection cut on L1, if specified in the config, is applied before the match
Definition at line 97 of file L1MuonMatcherAlgo.h.
References extrapolate(), TrajectoryStateOnSurface::isValid(), and match().
int L1MuonMatcherAlgo::match | ( | TrajectoryStateOnSurface & | propagated, |
const std::vector< l1extra::L1MuonParticle > & | l1, | ||
float & | deltaR, | ||
float & | deltaPhi | ||
) | const |
Find the best match to L1, and return its index in the vector (and update deltaR, deltaPhi accordingly) Returns -1 if the match fails The preselection cut on L1, if specified in the config, is applied before the match
|
inline |
Find the best match to L1, and return its index in the vector (and update deltaR, deltaPhi and propagated TSOS accordingly) Returns -1 if the match fails Only the objects passing the selector will be allowed for the match. If you don't need a selector, just use an AnySelector (CommonTools/Utils) which accepts everything
Definition at line 93 of file L1MuonMatcherAlgo.h.
References extrapolate(), and TrajectoryStateOnSurface::isValid().
Referenced by match(), and matchGeneric().
|
inline |
Find the best match to L1, and return its index in the vector (and update deltaR, deltaPhi and propagated TSOS accordingly) Returns -1 if the match fails Only the objects passing the selector will be allowed for the match. If you don't need a selector, just use an AnySelector (CommonTools/Utils) which accepts everything
Definition at line 103 of file L1MuonMatcherAlgo.h.
References extrapolate(), TrajectoryStateOnSurface::isValid(), and matchGeneric().
int L1MuonMatcherAlgo::matchGeneric | ( | TrajectoryStateOnSurface & | propagated, |
const Collection & | l1, | ||
const Selector & | sel, | ||
float & | deltaR, | ||
float & | deltaPhi | ||
) | const |
Find the best match to L1, and return its index in the vector (and update deltaR, deltaPhi accordingly) Returns -1 if the match fails Only the objects passing the selector will be allowed for the match. The selector defaults to an AnySelector (CommonTools/Utils) which just accepts everything
Definition at line 132 of file L1MuonMatcherAlgo.h.
References SiPixelRawToDigiRegional_cfi::deltaPhi, deltaPhi_, reco::deltaR2(), deltaR2_, PV3DBase< T, PVType, FrameType >::eta(), TrajectoryStateOnSurface::globalPosition(), i, match(), benchmark_cfg::minDeltaPhi, gen::n, getGTfromDQMFile::obj, PV3DBase< T, PVType, FrameType >::phi(), EgammaValidation_Wenu_cff::sel, sortByDeltaPhi_, and mathSSE::sqrt().
|
inline |
Find the best match to L1, and return its index in the vector (and update deltaR, deltaPhi and propagated TSOS accordingly) Returns -1 if the match fails Only the objects passing the selector will be allowed for the match. If you don't need a selector, just use an AnySelector (CommonTools/Utils) which accepts everything
Definition at line 114 of file L1MuonMatcherAlgo.h.
References extrapolate(), TrajectoryStateOnSurface::isValid(), and matchGeneric().
|
inline |
Find the best match to L1, and return its index in the vector (and update deltaR, deltaPhi and propagated TSOS accordingly) Returns -1 if the match fails Only the objects passing the selector will be allowed for the match. If you don't need a selector, just use an AnySelector (CommonTools/Utils) which accepts everything
Definition at line 124 of file L1MuonMatcherAlgo.h.
References extrapolate(), TrajectoryStateOnSurface::isValid(), and matchGeneric().
int L1MuonMatcherAlgo::matchGeneric | ( | TrajectoryStateOnSurface & | propagated, |
const Collection & | l1, | ||
const Selector & | sel, | ||
float & | deltaR, | ||
float & | deltaPhi | ||
) | const |
Find the best match to L1, and return its index in the vector (and update deltaR, deltaPhi accordingly) Returns -1 if the match fails Only the objects passing the selector will be allowed for the match. The selector defaults to an AnySelector (CommonTools/Utils) which just accepts everything
|
inline |
Return the propagator to second muon station (in case it's needed)
Definition at line 44 of file L1MuonMatcherAlgo.h.
References prop_.
|
inline |
Return the propagator to second muon station (in case it's needed)
Definition at line 46 of file L1MuonMatcherAlgo.h.
References prop_.
|
inline |
Return the propagator to second muon station (in case it's needed)
Definition at line 48 of file L1MuonMatcherAlgo.h.
References prop_.
|
inline |
Return the propagator to second muon station (in case it's needed)
Definition at line 50 of file L1MuonMatcherAlgo.h.
References prop_.
|
inline |
Add this offset to the L1 phi before doing the match, to correct for different scales in L1 vs offline.
Definition at line 138 of file L1MuonMatcherAlgo.h.
References l1PhiOffset_.
|
private |
Definition at line 148 of file L1MuonMatcherAlgo.h.
|
private |
Definition at line 124 of file L1MuonMatcherAlgo.h.
Referenced by match(), and matchGeneric().
|
private |
Matching cuts.
Definition at line 124 of file L1MuonMatcherAlgo.h.
Referenced by match(), and matchGeneric().
|
private |
offset to be added to the L1 phi before the match
Definition at line 155 of file L1MuonMatcherAlgo.h.
Referenced by setL1PhiOffset().
|
private |
Preselection cut to apply to L1 candidates before matching.
Definition at line 121 of file L1MuonMatcherAlgo.h.
Referenced by match().
|
private |
Definition at line 117 of file L1MuonMatcherAlgo.h.
Referenced by extrapolate(), init(), and propagatorToMuon().
|
private |
Definition at line 152 of file L1MuonMatcherAlgo.h.
|
private |
Sort by deltaPhi instead of deltaR.
Definition at line 127 of file L1MuonMatcherAlgo.h.
Referenced by matchGeneric().