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();
64 return delta > threshold ? trackerTrack : combinedTrack;
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->p();
185 p4.SetXYZT(newTrack->px(), newTrack->py(), newTrack->pz(),
186 sqrt(p*p + muMass*muMass));
201 event.getByLabel(
src, muons);
221 for (muon = muons->begin(); muon != muons->end(); muon++) {
225 if (!muon->isGlobalMuon())
continue;
243 trackMap->find(muon->combinedMuon());
245 tevTk = tevTkRef->
val;
259 cands->push_back(*muon->
clone());
265 if (muon->globalTrack().isTransient())
267 if (muon->innerTrack().isTransient())
269 if (muon->outerTrack().isTransient())
277 <<
" not present in the event; producing empty collection";
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
const_iterator find(const key_type &k) const
find element with specified reference key
virtual void setP4(const LorentzVector &p4)
set 4-momentum
reco::TrackRef tevOptimized(const reco::TrackRef &combinedTrack, const reco::TrackRef &trackerTrack, const reco::TrackToTrackMap tevMap1, const reco::TrackToTrackMap tevMap2, const reco::TrackToTrackMap tevMap3)
~MuonsFromRefitTracksProducer()
edm::Handle< reco::TrackToTrackMap > trackMapDefault
std::vector< Muon > MuonCollection
collection of Muon objects
std::string tevMuonTracks
edm::Handle< reco::TrackToTrackMap > trackMap
bool isNonnull() const
Checks for non-null.
bool storeMatchMaps(const edm::Event &event)
edm::Handle< reco::TrackToTrackMap > trackMapFirstHit
math::XYZPoint Point
point in the space
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
reco::TrackRef tevOptimizedTMR(const reco::Muon &muon, const reco::TrackToTrackMap &fmsMap, const double cut)
virtual TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only
Muon * clone() const
create a clone
reco::Muon * cloneAndSwitchTrack(const reco::Muon &muon, const reco::TrackRef &newTrack) const
MuonsFromRefitTracksProducer(const edm::ParameterSet &)
edm::Handle< reco::TrackToTrackMap > trackMapPicky
reco::TrackRef sigmaSwitch(const reco::Muon &muon, const double nSigma, const double ptThreshold)
double trackProbability(const reco::TrackRef track)
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