31 if (trackerTrack.
isAvailable() && trackerTrack->numberOfValidHits())
33 if (fmsTrack != fmsMap.
end() && fmsTrack->val->numberOfValidHits())
36 bool TKok = probTK > 0;
37 bool FMSok = probFMS > 0;
40 if (probFMS - probTK > cut)
57 if (combinedTrack->pt() < ptThreshold || trackerTrack->pt() < ptThreshold)
60 double delta = fabs(trackerTrack->qoverp() - combinedTrack->qoverp());
61 double threshold = nSigma * trackerTrack->qoverpError();
155 :
src(cfg.getParameter<edm::InputTag>(
"src")),
156 fromTrackerTrack(cfg.getParameter<bool>(
"fromTrackerTrack")),
157 fromGlobalTrack(cfg.getParameter<bool>(
"fromGlobalTrack")),
158 tevMuonTracks(cfg.getParameter<std::
string>(
"tevMuonTracks")),
159 fromCocktail(cfg.getParameter<bool>(
"fromCocktail")),
160 fromTMR(cfg.getParameter<bool>(
"fromTMR")),
161 TMRcut(cfg.getParameter<double>(
"TMRcut")),
162 fromSigmaSwitch(cfg.getParameter<bool>(
"fromSigmaSwitch")),
163 nSigmaSwitch(cfg.getParameter<double>(
"nSigmaSwitch")),
164 ptThreshold(cfg.getParameter<double>(
"ptThreshold"))
178 produces<reco::MuonCollection>();
198 static const double muMass = 0.10566;
206 double p = newTrack.first->p();
207 p4.SetXYZT(newTrack.first->px(), newTrack.first->py(), newTrack.first->pz(),
208 sqrt(p*p + muMass*muMass));
244 for (muon = muons->begin(); muon != muons->end(); muon++) {
248 if (!muon->isGlobalMuon())
continue;
265 trackMap->find(muon->combinedMuon());
273 if (tevTk.first.isNonnull())
281 cands->push_back(*muon->
clone());
287 if (muon->globalTrack().isTransient())
289 if (muon->innerTrack().isTransient())
291 if (muon->outerTrack().isTransient())
299 <<
" not present in the event; producing empty collection";
reco::Muon::MuonTrackTypePair sigmaSwitch(const reco::Muon &muon, const double nSigma, const double ptThreshold)
virtual void beginJob() override
edm::EDGetTokenT< reco::TrackToTrackMap > trackMapPickyToken_
friend struct const_iterator
const_iterator end() const
last iterator over the map (read only)
virtual TrackRef innerTrack() const
virtual void setCharge(Charge q)
set electric charge
#define DEFINE_FWK_MODULE(type)
reco::Muon * cloneAndSwitchTrack(const reco::Muon &muon, const reco::Muon::MuonTrackTypePair &newTrack) const
const_iterator find(const key_type &k) const
find element with specified reference key
virtual void setP4(const LorentzVector &p4)
set 4-momentum
edm::EDGetTokenT< reco::TrackToTrackMap > trackMapToken_
~MuonsFromRefitTracksProducer()
edm::Handle< reco::TrackToTrackMap > trackMapDefault
std::vector< Muon > MuonCollection
collection of Muon objects
edm::EDGetTokenT< reco::TrackToTrackMap > trackMapDefaultToken_
std::string tevMuonTracks
edm::Handle< reco::TrackToTrackMap > trackMap
virtual void setInnerTrack(const TrackRef &t)
set reference to Track
bool storeMatchMaps(const edm::Event &event)
reco::Muon::MuonTrackTypePair tevOptimized(const reco::TrackRef &combinedTrack, const reco::TrackRef &trackerTrack, const reco::TrackRef &tpfmsTrack, const reco::TrackRef &pickyTrack, const reco::TrackRef &dytTrack, const double ptThreshold=200., const double tune1=17., const double tune2=40., const double dptcut=0.25)
virtual void produce(edm::Event &, const edm::EventSetup &) override
edm::Handle< reco::TrackToTrackMap > trackMapFirstHit
virtual void endJob() override
math::XYZPoint Point
point in the space
reco::Muon::MuonTrackTypePair tevOptimizedTMR(const reco::Muon &muon, const reco::TrackToTrackMap &fmsMap, const double cut)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual void setVertex(const Point &vertex)
set vertex
virtual TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only
MuonsFromRefitTracksProducer(const edm::ParameterSet &)
edm::Handle< reco::TrackToTrackMap > trackMapPicky
edm::EDGetTokenT< edm::View< reco::Muon > > srcToken_
virtual void setOuterTrack(const TrackRef &t)
set reference to Track
double trackProbability(const reco::TrackRef track)
virtual void setBestTrack(MuonTrackType muonType)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
std::pair< TrackRef, Muon::MuonTrackType > MuonTrackTypePair
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Muon * clone() const
create a clone
virtual void setGlobalTrack(const TrackRef &t)
set reference to Track
edm::EDGetTokenT< reco::TrackToTrackMap > trackMapFirstHitToken_
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector