101 LogTrace(category) <<
" STA pt " << staCandIn.second->pt() <<
" rho " << staCandIn.second->innerMomentum().Rho() <<
" R " << staCandIn.second->innerMomentum().R() <<
" theCut " <<
thePtCut;
107 LogTrace(category) <<
" Found " << regionalTkTracks.size() <<
" tracks within region of interest";
110 vector<TrackCand> trackerTracks =
trackMatcher()->
match(staCand, regionalTkTracks);
111 LogTrace(category) <<
" Found " << trackerTracks.size() <<
" matching tracker tracks within region of interest";
113 if ( trackerTracks.empty() ) {
114 if ( staCandIn.first == 0)
delete staCand.first;
123 LogTrace(category) <<
" Turn tkMatchedTracks into MuonCandidates";
125 for (vector<TrackCand>::const_iterator tkt = trackerTracks.begin(); tkt != trackerTracks.end(); tkt++) {
128 tkTrajs.push_back(muonCand);
131 if ( tkTrajs.empty() ) {
132 LogTrace(category) <<
" tkTrajs empty";
133 if ( staCandIn.first == 0)
delete staCand.first;
139 LogTrace(category) <<
" Found "<< result.size() <<
" GLBMuons from one STACand";
142 if ( staCandIn.first == 0)
delete staCand.first;
144 for( CandidateContainer::const_iterator it = tkTrajs.begin(); it != tkTrajs.end(); ++it) {
145 if ( (*it)->trajectory() )
delete (*it)->trajectory();
146 if ( (*it)->trackerTrajectory() )
delete (*it)->trackerTrajectory();
147 if ( *it )
delete (*it);
161 const std::string category =
"Muon|RecoMuon|GlobalMuonTrajectoryBuilder|makeTkCandCollection";
163 vector<TrackCand> tkCandColl;
165 vector<TrackCand> tkTrackCands;
170 tkTrackCands.push_back(tkCand);
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::vector< TrackCand > makeTkCandCollection(const TrackCand &)
make a TrackCand collection using tracker Track, Trajectory information
T getParameter(std::string const &) const
MuonCandidate::CandidateContainer CandidateContainer
virtual void setEvent(const edm::Event &)
pass the Event to the algo at each event
GlobalMuonTrackMatcher * trackMatcher() const
virtual void setEvent(const edm::Event &)
pass the Event to the algo at each event
edm::InputTag theTkTrackLabel
std::pair< const Trajectory *, reco::TrackRef > TrackCand
~GlobalMuonTrajectoryBuilder()
destructor
std::vector< Track > TrackCollection
collection of Tracks
std::vector< TrackCand > chooseRegionalTrackerTracks(const TrackCand &, const std::vector< TrackCand > &)
choose tracker tracks within region of interest
edm::EDGetTokenT< reco::TrackCollection > allTrackerTracksToken
MuonTrajectoryBuilder::CandidateContainer trajectories(const TrackCand &)
reconstruct trajectories from standalone and tracker only Tracks
std::vector< MuonCandidate * > CandidateContainer
double match(const TrackCand &sta, const TrackCand &track, int matchOption=0, int surfaceOption=1) const
GlobalMuonTrajectoryBuilder(const edm::ParameterSet &, const MuonServiceProxy *, edm::ConsumesCollector &)
constructor with Parameter Set and MuonServiceProxy
edm::Handle< reco::TrackCollection > allTrackerTracks
MuonTrajectoryBuilder::CandidateContainer build(const TrackCand &, MuonTrajectoryBuilder::CandidateContainer &) const
build combined trajectory from sta Track and tracker RecHits
static int position[264][3]