46 LogTrace(
"Muon|RecoMuon|StandAloneMuonProducer") <<
"constructor called" << endl;
62 theService = std::make_unique<MuonServiceProxy>(serviceParameters, consumesCollector());
64 auto trackLoader = std::make_unique<MuonTrackLoader>(trackLoaderParameters, iC, theService.get());
65 std::unique_ptr<MuonTrajectoryBuilder> trajectoryBuilder;
67 string typeOfBuilder = parameterSet.
getParameter<
string>(
"MuonTrajectoryBuilder");
68 if (typeOfBuilder ==
"StandAloneMuonTrajectoryBuilder")
70 std::make_unique<StandAloneMuonTrajectoryBuilder>(trajectoryBuilderParameters, theService.get(), iC);
71 else if (typeOfBuilder ==
"DirectMuonTrajectoryBuilder")
73 std::make_unique<DirectMuonTrajectoryBuilder>(trajectoryBuilderParameters, theService.get(), iC);
74 else if (typeOfBuilder ==
"Exhaustive")
76 std::make_unique<ExhaustiveMuonTrajectoryBuilder>(trajectoryBuilderParameters, theService.get(), iC);
78 LogWarning(
"Muon|RecoMuon|StandAloneMuonProducer")
79 <<
"No Trajectory builder associated with " << typeOfBuilder
80 <<
". Falling down to the default (StandAloneMuonTrajectoryBuilder)";
82 std::make_unique<StandAloneMuonTrajectoryBuilder>(trajectoryBuilderParameters, theService.get(), iC);
84 theTrackFinder = std::make_unique<MuonTrackFinder>(
std::move(trajectoryBuilder),
std::move(trackLoader), iC);
88 produces<reco::TrackCollection>().setBranchAlias(theAlias +
"Tracks");
89 produces<reco::TrackCollection>(
"UpdatedAtVtx").setBranchAlias(theAlias +
"UpdatedAtVtxTracks");
90 produces<TrackingRecHitCollection>().setBranchAlias(theAlias +
"RecHits");
91 produces<reco::TrackExtraCollection>().setBranchAlias(theAlias +
"TrackExtras");
92 produces<reco::TrackToTrackMap>().setBranchAlias(theAlias +
"TrackToTrackMap");
94 produces<std::vector<Trajectory> >().setBranchAlias(theAlias +
"Trajectories");
95 produces<TrajTrackAssociationCollection>().setBranchAlias(theAlias +
"TrajToTrackMap");
97 seedToken = consumes<edm::View<TrajectorySeed> >(theSeedCollectionLabel);
102 LogTrace(
"Muon|RecoMuon|StandAloneMuonProducer") <<
"StandAloneMuonProducer destructor called" << endl;
109 LogTrace(metname) << endl << endl << endl;
110 LogTrace(metname) <<
"Stand Alone Muon Reconstruction Started" << endl;
113 LogTrace(metname) <<
"Taking the seeds: " << theSeedCollectionLabel.label() << endl;
115 event.getByToken(seedToken, seeds);
118 theService->update(eventSetup);
121 LogTrace(metname) <<
"Track Reconstruction" << endl;
122 theTrackFinder->reconstruct(seeds, event, eventSetup);
125 <<
"================================" << endl
const std::string metname
~StandAloneMuonProducer() override
destructor
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
StandAloneMuonProducer(const edm::ParameterSet &)
constructor with config
T getParameter(std::string const &) const
Log< level::Warning, false > LogWarning
void produce(edm::Event &, const edm::EventSetup &) override
reconstruct muons