#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DataFormats/MuonReco/interface/Muon.h"
#include "DataFormats/MuonReco/interface/MuonFwd.h"
#include "DataFormats/MuonReco/interface/MuonCocktails.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/TrackReco/interface/TrackFwd.h"
#include "DataFormats/TrackReco/interface/TrackToTrackMap.h"
Go to the source code of this file.
Classes | |
class | MuonsFromRefitTracksProducer |
Functions | |
DEFINE_FWK_MODULE (MuonsFromRefitTracksProducer) | |
reco::Muon::MuonTrackTypePair | sigmaSwitch (const reco::Muon &muon, const double nSigma, const double ptThreshold) |
reco::Muon::MuonTrackTypePair | tevOptimizedTMR (const reco::Muon &muon, const reco::TrackToTrackMap &fmsMap, const double cut) |
DEFINE_FWK_MODULE | ( | MuonsFromRefitTracksProducer | ) |
reco::Muon::MuonTrackTypePair sigmaSwitch | ( | const reco::Muon & | muon, |
const double | nSigma, | ||
const double | ptThreshold | ||
) |
Definition at line 54 of file MuonsFromRefitTracksProducer.cc.
References reco::Muon::CombinedTrack, delta, reco::Muon::globalTrack(), reco::Muon::innerTrack(), reco::Muon::InnerTrack, and dtDQMClient_cfg::threshold.
Referenced by MuonIdProducer::makeMuon(), and MuonsFromRefitTracksProducer::produce().
{ const reco::TrackRef& combinedTrack = muon.globalTrack(); const reco::TrackRef& trackerTrack = muon.innerTrack(); if (combinedTrack->pt() < ptThreshold || trackerTrack->pt() < ptThreshold) return make_pair(trackerTrack,reco::Muon::InnerTrack); double delta = fabs(trackerTrack->qoverp() - combinedTrack->qoverp()); double threshold = nSigma * trackerTrack->qoverpError(); return delta > threshold ? make_pair(trackerTrack,reco::Muon::InnerTrack) : make_pair(combinedTrack,reco::Muon::CombinedTrack); }
reco::Muon::MuonTrackTypePair tevOptimizedTMR | ( | const reco::Muon & | muon, |
const reco::TrackToTrackMap & | fmsMap, | ||
const double | cut | ||
) |
Definition at line 22 of file MuonsFromRefitTracksProducer.cc.
References reco::Muon::CombinedTrack, edm::AssociationMap< Tag >::end(), edm::AssociationMap< Tag >::find(), reco::Muon::globalTrack(), reco::Muon::innerTrack(), reco::Muon::InnerTrack, edm::Ref< C, T, F >::isAvailable(), reco::Muon::TPFMS, and muon::trackProbability().
Referenced by MuonsFromRefitTracksProducer::produce().
{ const reco::TrackRef& combinedTrack = muon.globalTrack(); const reco::TrackRef& trackerTrack = muon.innerTrack(); reco::TrackToTrackMap::const_iterator fmsTrack = fmsMap.find(combinedTrack); double probTK = 0; double probFMS = 0; if (trackerTrack.isAvailable() && trackerTrack->numberOfValidHits()) probTK = muon::trackProbability(trackerTrack); if (fmsTrack != fmsMap.end() && fmsTrack->val->numberOfValidHits()) probFMS = muon::trackProbability(fmsTrack->val); bool TKok = probTK > 0; bool FMSok = probFMS > 0; if (TKok && FMSok) { if (probFMS - probTK > cut) return make_pair(trackerTrack,reco::Muon::InnerTrack); else return make_pair(fmsTrack->val,reco::Muon::TPFMS); } else if (FMSok) return make_pair(fmsTrack->val,reco::Muon::TPFMS); else if (TKok) return make_pair(trackerTrack,reco::Muon::InnerTrack); return make_pair(combinedTrack,reco::Muon::CombinedTrack); }