32 if (trackerTrack.
isAvailable() && trackerTrack->numberOfValidHits())
34 if (fmsTrack != fmsMap.
end() && fmsTrack->
val->numberOfValidHits())
37 bool TKok = probTK > 0;
38 bool FMSok = probFMS > 0;
41 if (probFMS - probTK > cut)
58 if (combinedTrack->pt() < ptThreshold || trackerTrack->pt() < ptThreshold)
61 double delta = fabs(trackerTrack->qoverp() - combinedTrack->qoverp());
62 double threshold = nSigma * trackerTrack->qoverpError();
144 :
src(cfg.getParameter<edm::InputTag>(
"src")),
145 fromTrackerTrack(cfg.getParameter<bool>(
"fromTrackerTrack")),
146 fromGlobalTrack(cfg.getParameter<bool>(
"fromGlobalTrack")),
147 tevMuonTracks(cfg.getParameter<std::string>(
"tevMuonTracks")),
148 fromCocktail(cfg.getParameter<bool>(
"fromCocktail")),
149 fromTMR(cfg.getParameter<bool>(
"fromTMR")),
150 TMRcut(cfg.getParameter<double>(
"TMRcut")),
151 fromSigmaSwitch(cfg.getParameter<bool>(
"fromSigmaSwitch")),
152 nSigmaSwitch(cfg.getParameter<double>(
"nSigmaSwitch")),
153 ptThreshold(cfg.getParameter<double>(
"ptThreshold"))
156 produces<reco::MuonCollection>();
176 static const double muMass = 0.10566;
184 double p = newTrack.first->p();
185 p4.SetXYZT(newTrack.first->px(), newTrack.first->py(), newTrack.first->pz(),
186 sqrt(p*p + muMass*muMass));
202 event.getByLabel(
src, muons);
222 for (muon = muons->begin(); muon != muons->end(); muon++) {
226 if (!muon->isGlobalMuon())
continue;
244 trackMap->find(muon->combinedMuon());
252 if (tevTk.first.isNonnull())
260 cands->push_back(*muon->
clone());
266 if (muon->globalTrack().isTransient())
268 if (muon->innerTrack().isTransient())
270 if (muon->outerTrack().isTransient())
278 <<
" not present in the event; producing empty collection";
reco::Muon::MuonTrackTypePair sigmaSwitch(const reco::Muon &muon, const double nSigma, const double ptThreshold)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
virtual void produce(edm::Event &, const edm::EventSetup &)
virtual void setOuterTrack(const TrackRef &t)
set reference to Track
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)
virtual void setInnerTrack(const TrackRef &t)
set reference to Track
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
~MuonsFromRefitTracksProducer()
edm::Handle< reco::TrackToTrackMap > trackMapDefault
std::vector< Muon > MuonCollection
collection of Muon objects
std::string tevMuonTracks
edm::Handle< reco::TrackToTrackMap > trackMap
bool storeMatchMaps(const edm::Event &event)
edm::Handle< reco::TrackToTrackMap > trackMapFirstHit
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
Muon * clone() const
create a clone
MuonsFromRefitTracksProducer(const edm::ParameterSet &)
edm::Handle< reco::TrackToTrackMap > trackMapPicky
double trackProbability(const reco::TrackRef track)
virtual void setBestTrack(MuonTrackType muonType)
reco::Muon::MuonTrackTypePair tevOptimized(const reco::TrackRef &combinedTrack, const reco::TrackRef &trackerTrack, const reco::TrackRef &tpfmsTrack, const reco::TrackRef &pickyTrack, const double ptThreshold=200., const double tune1=4., const double tune2=6., const double dptcut=-1.)
std::pair< TrackRef, Muon::MuonTrackType > MuonTrackTypePair
virtual void setGlobalTrack(const TrackRef &t)
set reference to Track
math::XYZTLorentzVector LorentzVector
Lorentz vector.
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector