Analysis-level muon class. More...
#include <DataFormats/PatCandidates/interface/Muon.h>
Public Types | |
typedef enum pat::Muon::IPTYPE | IpType |
enum | IPTYPE { None = 0, PV2D = 1, PV3D = 2, BS2D = 3, BS3D = 4 } |
Public Member Functions | |
float | caloIso () const |
reco::MuonMETCorrectionData | caloMETMuonCorrs () const |
muon MET corrections for caloMET; returns the muon correction struct if embedded during pat tuple production or an empty element | |
virtual Muon * | clone () const |
required reimplementation of the Candidate's clone method | |
reco::TrackRef | combinedMuon () const |
reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon) | |
double | dB (IpType type=None) const |
reco::TrackRef | dytTrack () const |
reference to Track reconstructed using DYT algorithm | |
float | ecalIso () const |
double | edB (IpType type=None) const |
void | embedCaloMETMuonCorrs (const reco::MuonMETCorrectionData &t) |
embed the MuonMETCorrectionData for muon corrected caloMET | |
void | embedCombinedMuon () |
set reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon) | |
void | embedDytMuon () |
embed reference to the above dyt Track | |
void | embedMuonBestTrack () |
set reference to Track selected to be the best measurement of the muon parameters (reimplemented from reco::Muon) | |
void | embedPFCandidate () |
embed the IsolatedPFCandidate pointed to by pfCandidateRef_ | |
void | embedPickyMuon () |
embed reference to the above picky Track | |
void | embedStandAloneMuon () |
set reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon) | |
void | embedTcMETMuonCorrs (const reco::MuonMETCorrectionData &t) |
embed the MuonMETCorrectionData for tcMET | |
void | embedTpfmsMuon () |
embed reference to the above tpfms Track | |
void | embedTrack () |
set reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) | |
reco::TrackRef | globalTrack () const |
reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon) | |
float | hcalIso () const |
void | initImpactParameters (void) |
reco::TrackRef | innerTrack () const |
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) | |
bool | isGood (const std::string &name) const |
bool | isHighPtMuon (const reco::Vertex &) const |
bool | isLooseMuon () const |
bool | isSoftMuon (const reco::Vertex &) const |
bool | isTightMuon (const reco::Vertex &) const |
Muon (const edm::Ptr< reco::Muon > &aMuonRef) | |
constructor from a Ptr to a reco muon | |
Muon (const reco::Muon &aMuon) | |
constructor from a reco muon | |
Muon (const edm::RefToBase< reco::Muon > &aMuonRef) | |
constructor from a RefToBase to a reco muon (to be superseded by Ptr counterpart) | |
Muon () | |
default constructor | |
bool | muonID (const std::string &name) const |
double | normChi2 () const |
Norm chi2 gives the normalized chi2 of the global track. | |
size_t | numberOfSourceCandidatePtrs () const |
get the number of non-null PF candidates | |
unsigned int | numberOfValidHits () const |
numberOfValidHits returns the number of valid hits on the global track. | |
reco::TrackRef | outerTrack () const |
reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon) | |
reco::PFCandidateRef | pfCandidateRef () const |
reference to the source IsolatedPFCandidates | |
reco::TrackRef | pickyMuon () const |
Deprecated accessors to call the corresponding above two functions; no dytMuon since this naming is deprecated. | |
reco::TrackRef | pickyTrack () const |
reference to Track reconstructed using hits in the tracker + "good" muon hits (reimplemented from reco::Muon) | |
double | segmentCompatibility (reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration) const |
Returns the segment compatibility, using muon::segmentCompatibility (DataFormats/MuonReco/interface/MuonSelectors.h) | |
void | setDB (double dB, double edB, IpType type=None) |
void | setNormChi2 (double normChi2) |
void | setNumberOfValidHits (unsigned int numberOfValidHits) |
void | setPFCandidateRef (const reco::PFCandidateRef &ref) |
add a reference to the source IsolatedPFCandidate | |
reco::CandidatePtr | sourceCandidatePtr (size_type i) const |
get the candidate pointer with index i | |
reco::TrackRef | standAloneMuon () const |
reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon) | |
reco::MuonMETCorrectionData | tcMETMuonCorrs () const |
muon MET corrections for tcMET; returns the muon correction struct if embedded during pat tuple production or an empty element | |
reco::TrackRef | tpfmsMuon () const |
reco::TrackRef | tpfmsTrack () const |
reference to Track reconstructed using hits in the tracker + info from the first muon station that has hits (reimplemented from reco::Muon) | |
reco::TrackRef | track () const |
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) | |
float | trackIso () const |
virtual | ~Muon () |
destructor | |
Protected Attributes | |
bool | cachedDB_ |
has the normalized chi2 been cached? | |
std::vector< bool > | cachedIP_ |
bool | cachedNormChi2_ |
bool | cachedNumberOfValidHits_ |
has the dB been cached? | |
std::vector < reco::MuonMETCorrectionData > | caloMETMuonCorrs_ |
std::vector< reco::Track > | combinedMuon_ |
double | dB_ |
globalTrack->chi2() / globalTrack->ndof() | |
std::vector< reco::Track > | dytMuon_ |
double | edB_ |
dB and edB are the impact parameter at the primary vertex, | |
std::vector< double > | eip_ |
bool | embeddedCaloMETMuonCorrs_ |
muon MET corrections for caloMET | |
bool | embeddedCombinedMuon_ |
track of combined fit | |
bool | embeddedDytMuon_ |
bool | embeddedMuonBestTrack_ |
best muon track | |
bool | embeddedPFCandidate_ |
true if the IsolatedPFCandidate is embedded | |
bool | embeddedPickyMuon_ |
bool | embeddedStandAloneMuon_ |
track of muon system | |
bool | embeddedTCMETMuonCorrs_ |
muon MET corrections for tcMET | |
bool | embeddedTpfmsMuon_ |
bool | embeddedTrack_ |
track of inner track detector | |
std::vector< double > | ip_ |
std::vector< reco::Track > | muonBestTrack_ |
double | normChi2_ |
has the numberOfValidHits been cached? | |
unsigned int | numberOfValidHits_ |
reco::PFCandidateCollection | pfCandidate_ |
reco::PFCandidateRef | pfCandidateRef_ |
std::vector< reco::Track > | pickyMuon_ |
std::vector< reco::Track > | standAloneMuon_ |
std::vector < reco::MuonMETCorrectionData > | tcMETMuonCorrs_ |
std::vector< reco::Track > | tpfmsMuon_ |
std::vector< reco::Track > | track_ |
Friends | |
std::ostream & | reco::operator<< (std::ostream &out, const Muon &obj) |
pipe operator (introduced to use pat::Muon with PFTopProjectors) |
Analysis-level muon class.
pat::Muon implements the analysis-level muon class within the 'pat' namespace.
Please post comments and questions to the Physics Tools hypernews: https://hypernews.cern.ch/HyperNews/CMS/get/physTools.html
typedef enum pat::Muon::IPTYPE pat::Muon::IpType |
enum pat::Muon::IPTYPE |
Muon::Muon | ( | ) |
default constructor
Reimplemented from reco::Muon.
Definition at line 16 of file Muon.cc.
References initImpactParameters().
Referenced by clone().
: Lepton<reco::Muon>(), embeddedTrack_(false), embeddedStandAloneMuon_(false), embeddedCombinedMuon_(false), embeddedTCMETMuonCorrs_(false), embeddedCaloMETMuonCorrs_(false), embeddedPickyMuon_(false), embeddedTpfmsMuon_(false), embeddedDytMuon_(false), embeddedPFCandidate_(false), pfCandidateRef_(), cachedNormChi2_(false), cachedDB_(false), cachedNumberOfValidHits_(0), normChi2_(0.0), dB_(0.0), edB_(0.0), numberOfValidHits_(0) { initImpactParameters(); }
Muon::Muon | ( | const reco::Muon & | aMuon | ) |
constructor from a reco muon
constructor from reco::Muon
Definition at line 40 of file Muon.cc.
References initImpactParameters().
: Lepton<reco::Muon>(aMuon), embeddedTrack_(false), embeddedStandAloneMuon_(false), embeddedCombinedMuon_(false), embeddedTCMETMuonCorrs_(false), embeddedCaloMETMuonCorrs_(false), embeddedPickyMuon_(false), embeddedTpfmsMuon_(false), embeddedDytMuon_(false), embeddedPFCandidate_(false), pfCandidateRef_(), cachedNormChi2_(false), cachedDB_(false), cachedNumberOfValidHits_(0), normChi2_(0.0), dB_(0.0), edB_(0.0), numberOfValidHits_(0) { initImpactParameters(); }
Muon::Muon | ( | const edm::RefToBase< reco::Muon > & | aMuonRef | ) |
constructor from a RefToBase to a reco muon (to be superseded by Ptr counterpart)
constructor from ref to reco::Muon
Definition at line 64 of file Muon.cc.
References initImpactParameters().
: Lepton<reco::Muon>(aMuonRef), embeddedTrack_(false), embeddedStandAloneMuon_(false), embeddedCombinedMuon_(false), embeddedTCMETMuonCorrs_(false), embeddedCaloMETMuonCorrs_(false), embeddedPickyMuon_(false), embeddedTpfmsMuon_(false), embeddedDytMuon_(false), embeddedPFCandidate_(false), pfCandidateRef_(), cachedNormChi2_(false), cachedDB_(false), cachedNumberOfValidHits_(0), normChi2_(0.0), dB_(0.0), edB_(0.0), numberOfValidHits_(0) { initImpactParameters(); }
Muon::Muon | ( | const edm::Ptr< reco::Muon > & | aMuonRef | ) |
constructor from a Ptr to a reco muon
constructor from ref to reco::Muon
Definition at line 88 of file Muon.cc.
References initImpactParameters().
: Lepton<reco::Muon>(aMuonRef), embeddedTrack_(false), embeddedStandAloneMuon_(false), embeddedCombinedMuon_(false), embeddedTCMETMuonCorrs_(false), embeddedCaloMETMuonCorrs_(false), embeddedPickyMuon_(false), embeddedTpfmsMuon_(false), embeddedDytMuon_(false), embeddedPFCandidate_(false), pfCandidateRef_(), cachedNormChi2_(false), cachedDB_(false), cachedNumberOfValidHits_(0), normChi2_(0.0), dB_(0.0), edB_(0.0), numberOfValidHits_(0) { initImpactParameters(); }
float pat::Muon::caloIso | ( | ) | const [inline] |
Overload of pat::Lepton::trackIso(); returns the sum of ecalIso() and hcalIso
Reimplemented from pat::Lepton< reco::Muon >.
reco::MuonMETCorrectionData pat::Muon::caloMETMuonCorrs | ( | ) | const [inline] |
muon MET corrections for caloMET; returns the muon correction struct if embedded during pat tuple production or an empty element
Definition at line 95 of file Muon.h.
References caloMETMuonCorrs_, and embeddedCaloMETMuonCorrs_.
{ return (embeddedCaloMETMuonCorrs_ ? caloMETMuonCorrs_.front() : reco::MuonMETCorrectionData());};
virtual Muon* pat::Muon::clone | ( | void | ) | const [inline, virtual] |
required reimplementation of the Candidate's clone method
Reimplemented from pat::Lepton< reco::Muon >.
Definition at line 67 of file Muon.h.
References Muon().
{ return new Muon(*this); }
reco::TrackRef Muon::combinedMuon | ( | ) | const [virtual] |
reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon)
Reimplemented from reco::Muon.
Definition at line 163 of file Muon.cc.
References combinedMuon_, embeddedCombinedMuon_, and globalTrack().
Referenced by globalTrack().
{ if (embeddedCombinedMuon_) { return reco::TrackRef(&combinedMuon_, 0); } else { return reco::Muon::globalTrack(); } }
double Muon::dB | ( | IpType | type = None | ) | const |
Definition at line 345 of file Muon.cc.
References cachedDB_, cachedIP_, dB_, ip_, max(), None, and reco::Muon::type_.
Referenced by GlbMuQualityCutsAnalysis::analyze(), MuonVPlusJetsIDSelectionFunctor::fall10Cuts(), MuonVPlusJetsIDSelectionFunctor::firstDataCuts(), MuonVPlusJetsIDSelectionFunctor::kitQCDCuts(), setDB(), MuonVPlusJetsIDSelectionFunctor::spring10Cuts(), PFMuonSelector::spring11Cuts(), and MuonVPlusJetsIDSelectionFunctor::summer08Cuts().
{ // preserve old functionality exactly if (type_ == None){ if ( cachedDB_ ) { return dB_; } else { return std::numeric_limits<double>::max(); } } // more IP types (new) else if ( cachedIP_[type_] ) { return ip_[type_]; } else { return std::numeric_limits<double>::max(); } }
reco::TrackRef Muon::dytTrack | ( | ) | const [virtual] |
reference to Track reconstructed using DYT algorithm
reference to Track reconstructed using hits in the tracker + info from the first muon station that has hits
Reimplemented from reco::Muon.
Definition at line 190 of file Muon.cc.
References dytMuon_, and embeddedDytMuon_.
Referenced by embedDytMuon().
{ if (embeddedDytMuon_) { return reco::TrackRef(&dytMuon_, 0); } else { return reco::Muon::dytTrack(); } }
float pat::Muon::ecalIso | ( | ) | const [inline] |
Overload of pat::Lepton::trackIso(); returns the value of the summed Et of all recHits in the ecal in a cone of deltaR<0.3
Reimplemented from pat::Lepton< reco::Muon >.
Definition at line 162 of file Muon.h.
References reco::Muon::isolationR03().
Referenced by caloIso(), MuonVPlusJetsIDSelectionFunctor::fall10Cuts(), MuonVPlusJetsIDSelectionFunctor::firstDataCuts(), MuonVPlusJetsIDSelectionFunctor::kitQCDCuts(), MuonVPlusJetsIDSelectionFunctor::spring10Cuts(), and MuonVPlusJetsIDSelectionFunctor::summer08Cuts().
{ return isolationR03().emEt; }
double Muon::edB | ( | IpType | type = None | ) | const |
Definition at line 370 of file Muon.cc.
References cachedDB_, cachedIP_, edB_, eip_, max(), None, and reco::Muon::type_.
Referenced by MuonVPlusJetsIDSelectionFunctor::fall10Cuts(), MuonVPlusJetsIDSelectionFunctor::firstDataCuts(), MuonVPlusJetsIDSelectionFunctor::kitQCDCuts(), setDB(), and MuonVPlusJetsIDSelectionFunctor::spring10Cuts().
{ // preserve old functionality exactly if (type_ == None){ if ( cachedDB_ ) { return edB_; } else { return std::numeric_limits<double>::max(); } } // more IP types (new) else if ( cachedIP_[type_] ) { return eip_[type_]; } else { return std::numeric_limits<double>::max(); } }
void Muon::embedCaloMETMuonCorrs | ( | const reco::MuonMETCorrectionData & | t | ) |
embed the MuonMETCorrectionData for muon corrected caloMET
Definition at line 257 of file Muon.cc.
References caloMETMuonCorrs_, and embeddedCaloMETMuonCorrs_.
Referenced by pat::PATMuonProducer::produce().
{ caloMETMuonCorrs_.clear(); caloMETMuonCorrs_.push_back(t); embeddedCaloMETMuonCorrs_ = true; }
void Muon::embedCombinedMuon | ( | ) |
set reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon)
embed the Track reconstructed in both tracked and muon detector
Definition at line 248 of file Muon.cc.
References combinedMuon_, embeddedCombinedMuon_, and reco::Muon::globalTrack().
Referenced by pat::PATMuonProducer::fillMuon().
{ combinedMuon_.clear(); if (reco::Muon::globalTrack().isNonnull()) { combinedMuon_.push_back(*reco::Muon::globalTrack()); embeddedCombinedMuon_ = true; } }
void Muon::embedDytMuon | ( | ) |
embed reference to the above dyt Track
embed the dyt Track
Definition at line 291 of file Muon.cc.
References dytMuon_, dytTrack(), embeddedDytMuon_, and edm::Ref< C, T, F >::isNonnull().
Referenced by pat::PATMuonProducer::fillMuon().
{ dytMuon_.clear(); reco::TrackRef tk = reco::Muon::dytTrack(); if (tk.isNonnull()) { dytMuon_.push_back(*tk); embeddedDytMuon_ = true; } }
void Muon::embedMuonBestTrack | ( | ) |
set reference to Track selected to be the best measurement of the muon parameters (reimplemented from reco::Muon)
embed the Track selected to be the best measurement of the muon parameters
Definition at line 217 of file Muon.cc.
References embeddedMuonBestTrack_, reco::Muon::muonBestTrack(), and muonBestTrack_.
Referenced by pat::PATMuonProducer::fillMuon().
{ muonBestTrack_.clear(); if (reco::Muon::muonBestTrack().isNonnull()) { muonBestTrack_.push_back(*reco::Muon::muonBestTrack()); embeddedMuonBestTrack_ = true; } }
void Muon::embedPFCandidate | ( | ) |
embed the IsolatedPFCandidate pointed to by pfCandidateRef_
Definition at line 301 of file Muon.cc.
References embeddedPFCandidate_, edm::Ref< C, T, F >::isAvailable(), edm::Ref< C, T, F >::isNonnull(), pfCandidate_, and pfCandidateRef_.
Referenced by pat::PATMuonProducer::produce().
{ pfCandidate_.clear(); if ( pfCandidateRef_.isAvailable() && pfCandidateRef_.isNonnull()) { pfCandidate_.push_back( *pfCandidateRef_ ); embeddedPFCandidate_ = true; } }
void Muon::embedPickyMuon | ( | ) |
embed reference to the above picky Track
embed the picky Track
Definition at line 271 of file Muon.cc.
References embeddedPickyMuon_, edm::Ref< C, T, F >::isNonnull(), pickyMuon_, and pickyTrack().
Referenced by pat::PATMuonProducer::fillMuon().
{ pickyMuon_.clear(); reco::TrackRef tk = reco::Muon::pickyTrack(); if (tk.isNonnull()) { pickyMuon_.push_back(*tk); embeddedPickyMuon_ = true; } }
void Muon::embedStandAloneMuon | ( | ) |
set reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon)
embed the Track reconstructed in the muon detector only
Definition at line 238 of file Muon.cc.
References embeddedStandAloneMuon_, reco::Muon::outerTrack(), and standAloneMuon_.
Referenced by pat::PATMuonProducer::fillMuon().
{ standAloneMuon_.clear(); if (reco::Muon::outerTrack().isNonnull()) { standAloneMuon_.push_back(*reco::Muon::outerTrack()); embeddedStandAloneMuon_ = true; } }
void Muon::embedTcMETMuonCorrs | ( | const reco::MuonMETCorrectionData & | t | ) |
embed the MuonMETCorrectionData for tcMET
Definition at line 264 of file Muon.cc.
References embeddedTCMETMuonCorrs_, and tcMETMuonCorrs_.
Referenced by pat::PATMuonProducer::produce().
{ tcMETMuonCorrs_.clear(); tcMETMuonCorrs_.push_back(t); embeddedTCMETMuonCorrs_ = true; }
void Muon::embedTpfmsMuon | ( | ) |
embed reference to the above tpfms Track
embed the tpfms Track
Definition at line 281 of file Muon.cc.
References embeddedTpfmsMuon_, edm::Ref< C, T, F >::isNonnull(), tpfmsMuon_, and tpfmsTrack().
Referenced by pat::PATMuonProducer::fillMuon().
{ tpfmsMuon_.clear(); reco::TrackRef tk = reco::Muon::tpfmsTrack(); if (tk.isNonnull()) { tpfmsMuon_.push_back(*tk); embeddedTpfmsMuon_ = true; } }
void Muon::embedTrack | ( | ) |
set reference to Track reconstructed in the tracker only (reimplemented from reco::Muon)
embed the Track reconstructed in the tracker only
Definition at line 228 of file Muon.cc.
References embeddedTrack_, reco::Muon::innerTrack(), and track_.
Referenced by pat::PATMuonProducer::fillMuon().
{ track_.clear(); if (reco::Muon::innerTrack().isNonnull()) { track_.push_back(*reco::Muon::innerTrack()); embeddedTrack_ = true; } }
reco::TrackRef pat::Muon::globalTrack | ( | ) | const [inline, virtual] |
reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon)
Reimplemented from reco::Muon.
Definition at line 82 of file Muon.h.
References combinedMuon().
Referenced by combinedMuon(), MuonVPlusJetsIDSelectionFunctor::fall10Cuts(), isHighPtMuon(), MuonVPlusJetsIDSelectionFunctor::kitQCDCuts(), normChi2(), ZMuMuMuonUserData::produce(), MuScleFit::selGlobalMuon(), MuScleFitMuonSelector::selGlobalMuon(), MuonVPlusJetsIDSelectionFunctor::spring10Cuts(), and PFMuonSelector::spring11Cuts().
{ return combinedMuon(); }
float pat::Muon::hcalIso | ( | ) | const [inline] |
Overload of pat::Lepton::trackIso(); returns the value of the summed Et of all caloTowers in the hcal in a cone of deltaR<0.4
Reimplemented from pat::Lepton< reco::Muon >.
Definition at line 166 of file Muon.h.
References reco::Muon::isolationR03().
Referenced by caloIso(), MuonVPlusJetsIDSelectionFunctor::fall10Cuts(), MuonVPlusJetsIDSelectionFunctor::firstDataCuts(), MuonVPlusJetsIDSelectionFunctor::kitQCDCuts(), MuonVPlusJetsIDSelectionFunctor::spring10Cuts(), and MuonVPlusJetsIDSelectionFunctor::summer08Cuts().
{ return isolationR03().hadEt; }
void Muon::initImpactParameters | ( | void | ) |
reco::TrackRef pat::Muon::innerTrack | ( | ) | const [inline, virtual] |
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon)
Reimplemented from reco::Muon.
Definition at line 74 of file Muon.h.
References track().
Referenced by GlbMuQualityCutsAnalysis::analyze(), MuonVPlusJetsIDSelectionFunctor::fall10Cuts(), isHighPtMuon(), isSoftMuon(), MuonVPlusJetsIDSelectionFunctor::kitQCDCuts(), numberOfValidHits(), ZToLLEdmNtupleDumper::produce(), ZMuMuMuonUserData::produce(), MuScleFitMuonSelector::selectMuons(), MuScleFit::selGlobalMuon(), MuScleFitMuonSelector::selGlobalMuon(), MuScleFitMuonSelector::selTrackerMuon(), MuScleFit::selTrackerMuon(), MuonVPlusJetsIDSelectionFunctor::spring10Cuts(), PFMuonSelector::spring11Cuts(), and track().
{ return track(); }
bool pat::Muon::isGood | ( | const std::string & | name | ) | const [inline] |
bool Muon::isHighPtMuon | ( | const reco::Vertex & | vtx | ) | const |
Definition at line 424 of file Muon.cc.
References reco::Muon::bestTrack(), globalTrack(), innerTrack(), reco::Muon::isGlobalMuon(), reco::Muon::muonBestTrack(), reco::Muon::numberOfMatchedStations(), and reco::Vertex::position().
{ bool muID = isGlobalMuon() && globalTrack()->hitPattern().numberOfValidMuonHits() >0 && (numberOfMatchedStations() > 1); if(!muID) return false; bool hits = innerTrack()->hitPattern().trackerLayersWithMeasurement() > 8 && innerTrack()->hitPattern().numberOfValidPixelHits() > 0; bool ip = fabs(muonBestTrack()->dxy(vtx.position())) < 0.2 && fabs(bestTrack()->dz(vtx.position())) < 0.5; return muID && hits && ip; }
bool Muon::isLooseMuon | ( | ) | const |
Definition at line 402 of file Muon.cc.
References reco::Muon::isGlobalMuon(), reco::Muon::isPFMuon(), and reco::Muon::isTrackerMuon().
{ return isPFMuon() && (isGlobalMuon() || isTrackerMuon()); }
bool Muon::isSoftMuon | ( | const reco::Vertex & | vtx | ) | const |
Definition at line 407 of file Muon.cc.
References innerTrack(), muon::isGoodMuon(), reco::Vertex::position(), and muon::TMOneStationTight.
{ bool muID = muon::isGoodMuon(*this,muon::TMOneStationTight); if(!muID) return false; bool layers = innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 && innerTrack()->hitPattern().pixelLayersWithMeasurement() > 1; bool chi2 = innerTrack()->normalizedChi2() < 1.8; bool ip = fabs(innerTrack()->dxy(vtx.position())) < 3. && fabs(innerTrack()->dz(vtx.position())) < 30.; return muID && layers && ip && chi2 ; }
bool Muon::isTightMuon | ( | const reco::Vertex & | vtx | ) | const |
if muon id results are ever extracted from muon id value maps then the isMuonIDAvailable method will be defined Muon Selectors as specified in https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideMuonId
Definition at line 396 of file Muon.cc.
{ return muon::isTightMuon(*this,vtx); }
bool Muon::muonID | ( | const std::string & | name | ) | const |
accessor for the various muon id algorithms currently defined in DataFormats/MuonReco/interface/MuonSelectors.h e.g. bool result = patmuon.muonID("TMLastStationLoose")
Definition at line 309 of file Muon.cc.
References muon::isGoodMuon(), and muon::selectionTypeFromString().
Referenced by isGood(), MuScleFit::selGlobalMuon(), MuScleFitMuonSelector::selGlobalMuon(), MuScleFitMuonSelector::selTrackerMuon(), and MuScleFit::selTrackerMuon().
{ muon::SelectionType st = muon::selectionTypeFromString(name); return muon::isGoodMuon(*this, st); }
double Muon::normChi2 | ( | ) | const |
Norm chi2 gives the normalized chi2 of the global track.
Norm chi2 gives the normalized chi2 of the global track. The user can choose to cache this info so they can drop the global track, or they can use the track itself if it is present in the event.
Definition at line 319 of file Muon.cc.
References cachedNormChi2_, globalTrack(), normChi2_, and lumiQTWidget::t.
Referenced by GlbMuQualityCutsAnalysis::analyze(), MuonVPlusJetsIDSelectionFunctor::fall10Cuts(), MuonVPlusJetsIDSelectionFunctor::firstDataCuts(), MuonVPlusJetsIDSelectionFunctor::kitQCDCuts(), ZToLLEdmNtupleDumper::produce(), setNormChi2(), MuonVPlusJetsIDSelectionFunctor::spring10Cuts(), PFMuonSelector::spring11Cuts(), and MuonVPlusJetsIDSelectionFunctor::summer08Cuts().
{ if ( cachedNormChi2_ ) { return normChi2_; } else { reco::TrackRef t = globalTrack(); return t->chi2() / t->ndof(); } }
size_t pat::Muon::numberOfSourceCandidatePtrs | ( | ) | const [inline, virtual] |
get the number of non-null PF candidates
Reimplemented from reco::LeafCandidate.
Definition at line 130 of file Muon.h.
References edm::Ref< C, T, F >::isNonnull(), and pfCandidateRef_.
{ return pfCandidateRef_.isNonnull() ? 1 : 0; }
unsigned int Muon::numberOfValidHits | ( | ) | const |
numberOfValidHits returns the number of valid hits on the global track.
numberOfValidHits returns the number of valid hits on the global track. The user can choose to cache this info so they can drop the global track, or they can use the track itself if it is present in the event.
Definition at line 332 of file Muon.cc.
References cachedNumberOfValidHits_, innerTrack(), numberOfValidHits_, and lumiQTWidget::t.
Referenced by GlbMuQualityCutsAnalysis::analyze(), MuonVPlusJetsIDSelectionFunctor::fall10Cuts(), MuonVPlusJetsIDSelectionFunctor::firstDataCuts(), MuonVPlusJetsIDSelectionFunctor::kitQCDCuts(), ZToLLEdmNtupleDumper::produce(), setNumberOfValidHits(), MuonVPlusJetsIDSelectionFunctor::spring10Cuts(), PFMuonSelector::spring11Cuts(), and MuonVPlusJetsIDSelectionFunctor::summer08Cuts().
{ if ( cachedNumberOfValidHits_ ) { return numberOfValidHits_; } else { reco::TrackRef t = innerTrack(); return t->numberOfValidHits(); } }
reco::TrackRef pat::Muon::outerTrack | ( | ) | const [inline, virtual] |
reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon)
Reimplemented from reco::Muon.
Definition at line 78 of file Muon.h.
References standAloneMuon().
Referenced by GlbMuQualityCutsAnalysis::analyze(), ZToLLEdmNtupleDumper::produce(), ZMuMuMuonUserData::produce(), and standAloneMuon().
{ return standAloneMuon(); }
reco::PFCandidateRef Muon::pfCandidateRef | ( | ) | const |
reference to the source IsolatedPFCandidates
reference to the source IsolatedPFCandidates null if this has been built from a standard muon
Definition at line 199 of file Muon.cc.
References embeddedPFCandidate_, pfCandidate_, and pfCandidateRef_.
Referenced by pat::PATMuonProducer::fillMuon().
{ if (embeddedPFCandidate_) { return reco::PFCandidateRef(&pfCandidate_, 0); } else { return pfCandidateRef_; } }
reco::TrackRef pat::Muon::pickyMuon | ( | ) | const [inline] |
Deprecated accessors to call the corresponding above two functions; no dytMuon since this naming is deprecated.
Definition at line 110 of file Muon.h.
References pickyTrack().
{ return pickyTrack(); } // JMTBAD gcc deprecated attribute?
reco::TrackRef Muon::pickyTrack | ( | ) | const [virtual] |
reference to Track reconstructed using hits in the tracker + "good" muon hits (reimplemented from reco::Muon)
reference to Track reconstructed using hits in the tracker + "good" muon hits
Reimplemented from reco::Muon.
Definition at line 172 of file Muon.cc.
References embeddedPickyMuon_, and pickyMuon_.
Referenced by embedPickyMuon(), and pickyMuon().
{ if (embeddedPickyMuon_) { return reco::TrackRef(&pickyMuon_, 0); } else { return reco::Muon::pickyTrack(); } }
double Muon::segmentCompatibility | ( | reco::Muon::ArbitrationType | arbitrationType = reco::Muon::SegmentAndTrackArbitration | ) | const |
Returns the segment compatibility, using muon::segmentCompatibility (DataFormats/MuonReco/interface/MuonSelectors.h)
Definition at line 391 of file Muon.cc.
{ return muon::segmentCompatibility(*this, arbitrationType); }
void pat::Muon::setDB | ( | double | dB, |
double | edB, | ||
IpType | type = None |
||
) | [inline] |
Definition at line 204 of file Muon.h.
References cachedDB_, cachedIP_, dB(), dB_, edB(), edB_, eip_, ip_, None, and reco::Muon::type().
Referenced by pat::PATMuonProducer::embedHighLevel(), and pat::PATMuonProducer::produce().
void pat::Muon::setNormChi2 | ( | double | normChi2 | ) | [inline] |
Definition at line 219 of file Muon.h.
References cachedNormChi2_, normChi2(), and normChi2_.
Referenced by pat::PATMuonProducer::produce().
{ normChi2_ = normChi2; cachedNormChi2_ = true; }
void pat::Muon::setNumberOfValidHits | ( | unsigned int | numberOfValidHits | ) | [inline] |
Definition at line 214 of file Muon.h.
References cachedNumberOfValidHits_, numberOfValidHits(), and numberOfValidHits_.
Referenced by pat::PATMuonProducer::produce().
{ numberOfValidHits_ = numberOfValidHits; cachedNumberOfValidHits_ = true; }
void pat::Muon::setPFCandidateRef | ( | const reco::PFCandidateRef & | ref | ) | [inline] |
add a reference to the source IsolatedPFCandidate
Definition at line 124 of file Muon.h.
References pfCandidateRef_.
Referenced by pat::PATMuonProducer::produce().
{ pfCandidateRef_ = ref; }
reco::CandidatePtr Muon::sourceCandidatePtr | ( | size_type | i | ) | const [virtual] |
get the candidate pointer with index i
reference to the parent PF candidate for use in TopProjector
Reimplemented from reco::LeafCandidate.
Definition at line 208 of file Muon.cc.
References embeddedPFCandidate_, edm::Ref< C, T, F >::get(), edm::Ref< C, T, F >::id(), edm::Ref< C, T, F >::key(), and pfCandidateRef_.
{ if (embeddedPFCandidate_) { return reco::CandidatePtr( pfCandidateRef_.id(), pfCandidateRef_.get(), pfCandidateRef_.key() ); } else { return reco::CandidatePtr(); } }
reco::TrackRef Muon::standAloneMuon | ( | ) | const [virtual] |
reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon)
Reimplemented from reco::Muon.
Definition at line 153 of file Muon.cc.
References embeddedStandAloneMuon_, outerTrack(), and standAloneMuon_.
Referenced by outerTrack().
{ if (embeddedStandAloneMuon_) { return reco::TrackRef(&standAloneMuon_, 0); } else { return reco::Muon::outerTrack(); } }
reco::MuonMETCorrectionData pat::Muon::tcMETMuonCorrs | ( | ) | const [inline] |
muon MET corrections for tcMET; returns the muon correction struct if embedded during pat tuple production or an empty element
Definition at line 98 of file Muon.h.
References embeddedTCMETMuonCorrs_, and tcMETMuonCorrs_.
{return (embeddedTCMETMuonCorrs_ ? tcMETMuonCorrs_.front() : reco::MuonMETCorrectionData());};
reco::TrackRef pat::Muon::tpfmsMuon | ( | ) | const [inline] |
Definition at line 111 of file Muon.h.
References tpfmsTrack().
{ return tpfmsTrack(); } // JMTBAD gcc deprecated attribute?
reco::TrackRef Muon::tpfmsTrack | ( | ) | const [virtual] |
reference to Track reconstructed using hits in the tracker + info from the first muon station that has hits (reimplemented from reco::Muon)
reference to Track reconstructed using hits in the tracker + info from the first muon station that has hits
Reimplemented from reco::Muon.
Definition at line 181 of file Muon.cc.
References embeddedTpfmsMuon_, and tpfmsMuon_.
Referenced by embedTpfmsMuon(), and tpfmsMuon().
{ if (embeddedTpfmsMuon_) { return reco::TrackRef(&tpfmsMuon_, 0); } else { return reco::Muon::tpfmsTrack(); } }
reco::TrackRef Muon::track | ( | void | ) | const [virtual] |
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon)
Reimplemented from reco::Muon.
Definition at line 143 of file Muon.cc.
References embeddedTrack_, innerTrack(), and track_.
Referenced by ZMuMu_vtxAnalyzer::analyze(), GenPurposeSkimmerData::analyze(), pat::CaloIsolationEnergy::calculate(), pat::LeptonVertexSignificance::calculate(), pat::TrackerIsolationPt::calculate(), and innerTrack().
{ if (embeddedTrack_) { return reco::TrackRef(&track_, 0); } else { return reco::Muon::innerTrack(); } }
float pat::Muon::trackIso | ( | ) | const [inline] |
Overload of pat::Lepton::trackIso(); returns the value of the summed track pt in a cone of deltaR<0.3
Reimplemented from pat::Lepton< reco::Muon >.
Definition at line 158 of file Muon.h.
References reco::Muon::isolationR03().
Referenced by DimuonStatistics::analyze(), ZMuMu_efficiencyAnalyzer::analyze(), ZMuMu_vtxAnalyzer::analyze(), MuonVPlusJetsIDSelectionFunctor::fall10Cuts(), MuonVPlusJetsIDSelectionFunctor::firstDataCuts(), MuonVPlusJetsIDSelectionFunctor::kitQCDCuts(), MuonVPlusJetsIDSelectionFunctor::spring10Cuts(), and MuonVPlusJetsIDSelectionFunctor::summer08Cuts().
{ return isolationR03().sumPt; }
std::ostream& reco::operator<< | ( | std::ostream & | out, |
const Muon & | obj | ||
) | [friend] |
pipe operator (introduced to use pat::Muon with PFTopProjectors)
bool pat::Muon::cachedDB_ [protected] |
std::vector<bool> pat::Muon::cachedIP_ [protected] |
bool pat::Muon::cachedNormChi2_ [protected] |
Definition at line 271 of file Muon.h.
Referenced by normChi2(), and setNormChi2().
bool pat::Muon::cachedNumberOfValidHits_ [protected] |
has the dB been cached?
Definition at line 274 of file Muon.h.
Referenced by numberOfValidHits(), and setNumberOfValidHits().
std::vector<reco::MuonMETCorrectionData> pat::Muon::caloMETMuonCorrs_ [protected] |
Definition at line 250 of file Muon.h.
Referenced by caloMETMuonCorrs(), and embedCaloMETMuonCorrs().
std::vector<reco::Track> pat::Muon::combinedMuon_ [protected] |
Definition at line 243 of file Muon.h.
Referenced by combinedMuon(), and embedCombinedMuon().
double pat::Muon::dB_ [protected] |
std::vector<reco::Track> pat::Muon::dytMuon_ [protected] |
Definition at line 258 of file Muon.h.
Referenced by dytTrack(), and embedDytMuon().
double pat::Muon::edB_ [protected] |
std::vector<double> pat::Muon::eip_ [protected] |
Definition at line 282 of file Muon.h.
Referenced by edB(), initImpactParameters(), and setDB().
bool pat::Muon::embeddedCaloMETMuonCorrs_ [protected] |
muon MET corrections for caloMET
Definition at line 249 of file Muon.h.
Referenced by caloMETMuonCorrs(), and embedCaloMETMuonCorrs().
bool pat::Muon::embeddedCombinedMuon_ [protected] |
track of combined fit
Definition at line 242 of file Muon.h.
Referenced by combinedMuon(), and embedCombinedMuon().
bool pat::Muon::embeddedDytMuon_ [protected] |
Definition at line 255 of file Muon.h.
Referenced by dytTrack(), and embedDytMuon().
bool pat::Muon::embeddedMuonBestTrack_ [protected] |
bool pat::Muon::embeddedPFCandidate_ [protected] |
true if the IsolatedPFCandidate is embedded
Definition at line 262 of file Muon.h.
Referenced by embedPFCandidate(), pfCandidateRef(), and sourceCandidatePtr().
bool pat::Muon::embeddedPickyMuon_ [protected] |
Definition at line 253 of file Muon.h.
Referenced by embedPickyMuon(), and pickyTrack().
bool pat::Muon::embeddedStandAloneMuon_ [protected] |
track of muon system
Definition at line 239 of file Muon.h.
Referenced by embedStandAloneMuon(), and standAloneMuon().
bool pat::Muon::embeddedTCMETMuonCorrs_ [protected] |
muon MET corrections for tcMET
Definition at line 246 of file Muon.h.
Referenced by embedTcMETMuonCorrs(), and tcMETMuonCorrs().
bool pat::Muon::embeddedTpfmsMuon_ [protected] |
Definition at line 254 of file Muon.h.
Referenced by embedTpfmsMuon(), and tpfmsTrack().
bool pat::Muon::embeddedTrack_ [protected] |
track of inner track detector
Definition at line 236 of file Muon.h.
Referenced by embedTrack(), and track().
std::vector<double> pat::Muon::ip_ [protected] |
Definition at line 281 of file Muon.h.
Referenced by dB(), initImpactParameters(), and setDB().
std::vector<reco::Track> pat::Muon::muonBestTrack_ [protected] |
Definition at line 234 of file Muon.h.
Referenced by embedMuonBestTrack().
double pat::Muon::normChi2_ [protected] |
has the numberOfValidHits been cached?
Definition at line 275 of file Muon.h.
Referenced by normChi2(), and setNormChi2().
unsigned int pat::Muon::numberOfValidHits_ [protected] |
Definition at line 284 of file Muon.h.
Referenced by numberOfValidHits(), and setNumberOfValidHits().
reco::PFCandidateCollection pat::Muon::pfCandidate_ [protected] |
if embeddedPFCandidate_, a copy of the source IsolatedPFCandidate is stored in this vector
Definition at line 265 of file Muon.h.
Referenced by embedPFCandidate(), and pfCandidateRef().
reco::PFCandidateRef pat::Muon::pfCandidateRef_ [protected] |
reference to the IsolatedPFCandidate this has been built from null if this has been built from a standard muon
Definition at line 268 of file Muon.h.
Referenced by embedPFCandidate(), numberOfSourceCandidatePtrs(), pfCandidateRef(), setPFCandidateRef(), and sourceCandidatePtr().
std::vector<reco::Track> pat::Muon::pickyMuon_ [protected] |
Definition at line 256 of file Muon.h.
Referenced by embedPickyMuon(), and pickyTrack().
std::vector<reco::Track> pat::Muon::standAloneMuon_ [protected] |
Definition at line 240 of file Muon.h.
Referenced by embedStandAloneMuon(), and standAloneMuon().
std::vector<reco::MuonMETCorrectionData> pat::Muon::tcMETMuonCorrs_ [protected] |
Definition at line 247 of file Muon.h.
Referenced by embedTcMETMuonCorrs(), and tcMETMuonCorrs().
std::vector<reco::Track> pat::Muon::tpfmsMuon_ [protected] |
Definition at line 257 of file Muon.h.
Referenced by embedTpfmsMuon(), and tpfmsTrack().
std::vector<reco::Track> pat::Muon::track_ [protected] |
Definition at line 237 of file Muon.h.
Referenced by embedTrack(), and track().