75 desc.
add(
"MuonTrackingRegionBuilder", descTRB);
94 vtx = pvHandle->front();
96 edm::LogInfo(category) <<
"No Primary Vertex available from EventSetup \n";
104 edm::LogInfo(category) <<
"No beam spot available from EventSetup \n";
117 (staCandIn).
second->innerMomentum().R() < 2.5)
124 LogDebug(category) <<
"Found " << regionalTkTracks.size() <<
" tracks within region of interest";
127 std::vector<TrackCand> trackerTracks =
trackMatcher()->
match(staCand, regionalTkTracks);
129 LogDebug(category) <<
"Found " << trackerTracks.size() <<
" matching tracker tracks within region of interest";
130 if (trackerTracks.empty())
135 LogDebug(category) <<
"turn tkMatchedTracks into MuonCandidates";
137 tkTrajs.reserve(trackerTracks.size());
138 for (std::vector<TrackCand>::const_iterator tkt = trackerTracks.begin(); tkt != trackerTracks.end(); tkt++) {
139 if ((*tkt).first !=
nullptr && (*tkt).first->isValid()) {
140 tkTrajs.emplace_back(std::make_unique<MuonCandidate>(
141 nullptr, staCand.second, (*tkt).second, std::make_unique<Trajectory>(*(*tkt).first)));
143 tkTrajs.emplace_back(std::make_unique<MuonCandidate>(
nullptr, staCand.second, (*tkt).second,
nullptr));
147 if (tkTrajs.empty()) {
148 LogDebug(category) <<
"tkTrajs empty";
153 LogDebug(category) <<
"Found " << result.size() <<
" L3Muons from one L2Cand";
156 if (staCandIn.first ==
nullptr)
157 delete staCand.first;
159 for (std::vector<TrackCand>::const_iterator is = regionalTkTracks.begin(); is != regionalTkTracks.end(); ++is) {
171 std::vector<TrackCand> tkCandColl;
172 std::vector<TrackCand> tkTrackCands;
179 tkCandColl.push_back(tkCand);
183 for (
auto&& tkCand : tkCandColl) {
184 auto& tk = tkCand.second;
185 bool canUseL3MTS =
false;
187 if (tk->seedRef().isNonnull()) {
189 canUseL3MTS =
a !=
nullptr;
196 if (staTrack == (staCand.second)) {
205 tkTrackCands.push_back(tkCand);
216 tkTrackCands.push_back(tkCand);
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
MuonCandidate::CandidateContainer CandidateContainer
GlobalMuonTrackMatcher * trackMatcher() const
MuonTrajectoryBuilder::CandidateContainer trajectories(const TrackCand &) override
return a container reconstructed muons starting from a given track
std::pair< const Trajectory *, reco::TrackRef > TrackCand
static const char category[]
std::vector< Track > TrackCollection
collection of Tracks
static void fillDescriptions(edm::ParameterSetDescription &descriptions)
Add default values for fillDescriptions.
const Point & position() const
position
U second(std::pair< T, U > const &p)
edm::Handle< reco::TrackCollection > allTrackerTracks
edm::Handle< reco::VertexCollection > pvHandle
void setEvent(const edm::Event &) override
Pass the Event to the algo at each event.
void setEvent(const edm::Event &) override
pass the Event to the algo at each event
edm::InputTag theTkCollName
ParameterDescriptionBase * add(U const &iLabel, T const &value)
double match(const TrackCand &sta, const TrackCand &track, int matchOption=0, int surfaceOption=1) const
Log< level::Info, false > LogInfo
std::vector< std::unique_ptr< MuonCandidate > > CandidateContainer
edm::EDGetTokenT< reco::TrackCollection > theTrackToken
T getParameter(std::string const &) const
MuonTrajectoryBuilder::CandidateContainer build(const TrackCand &, MuonTrajectoryBuilder::CandidateContainer &) const
build combined trajectory from sta Track and tracker RecHits
~L3MuonTrajectoryBuilder() override
Destructor.
edm::InputTag theBeamSpotInputTag
edm::Handle< reco::BeamSpot > beamSpotHandle
static int position[264][3]
const Point & position() const
position
std::unique_ptr< TrajectoryCleaner > theTrajectoryCleaner
std::vector< TrackCand > makeTkCandCollection(const TrackCand &) override
Make a TrackCand collection using tracker Track, Trajectory information.
L3MuonTrajectoryBuilder(const edm::ParameterSet &, const MuonServiceProxy *, edm::ConsumesCollector &)
Constructor with Parameter Set and MuonServiceProxy.
static void fillDescriptionsHLT(edm::ParameterSetDescription &descriptions)
edm::InputTag theVertexCollInputTag