36 const string metname =
"Muon|RecoMuon|SETMuonSeedSeed";
60 produces<TrajectorySeedCollection>();
64 LogTrace(
"Muon|RecoMuon|SETMuonSeedProducer") <<
"SETMuonSeedProducer destructor called" << endl;
76 const string metname =
"Muon|RecoMuon|SETMuonSeedSeed";
83 auto output = std::make_unique<TrajectorySeedCollection>();
96 edm::LogInfo(
"MuonSeedGenerator") <<
"No beam spot available from EventSetup \n";
103 bool fwFitFailed =
true;
105 std::vector<SeedCandidate> seedCandidates_AllChosen;
106 std::vector<MuonRecHitContainer> MuonRecHitContainer_clusters;
112 for (
unsigned int cluster = 0; cluster < MuonRecHitContainer_clusters.size(); ++cluster) {
114 std::vector<SeedCandidate> seedCandidates_inCluster;
118 std::vector<MuonRecHitContainer> MuonRecHitContainer_perLayer =
132 if (allValidSets.size() < 500) {
137 if (!seedCandidates_inCluster.empty()) {
139 std::vector<SeedCandidate> bestSets_inCluster;
140 fwFitFailed = !(
filter()->
fwfit_SET(seedCandidates_inCluster, bestSets_inCluster));
147 for (
unsigned int iSet = 0; iSet < bestSets_inCluster.size(); ++iSet) {
148 seedCandidates_AllChosen.push_back(bestSets_inCluster[iSet]);
153 for (
unsigned int iMuon = 0; iMuon < seedCandidates_AllChosen.size(); ++iMuon) {
156 SeedCandidate* aFinalSet = &(seedCandidates_AllChosen[iMuon]);
172 if (
filter()->goodState()) {
175 bool conversionPassed =
false;
178 conversionPassed =
filter()->
transform(finalCandidate, hitContainer, firstTSOS);
183 if (conversionPassed && !finalCandidate.empty() && !hitContainer.empty()) {
188 for (
unsigned int iHit = 0; iHit < hitContainer.size(); ++iHit) {
189 recHitsContainer.
push_back(hitContainer.at(iHit)->hit()->clone());
void setServiceProxy(MuonServiceProxy *service)
SETSeedFinder theSeedFinder
void setBeamSpot(const GlobalVector &gv)
bool transform(Trajectory::DataContainer &measurements_segments, TransientTrackingRecHit::ConstRecHitContainer &hitContainer, TrajectoryStateOnSurface &firstTSOS)
transforms "segment trajectory" to "rechit container"
T getParameter(std::string const &) const
bool transformLight(Trajectory::DataContainer &measurements_segments, TransientTrackingRecHit::ConstRecHitContainer &hitContainer, TrajectoryStateOnSurface &firstTSOS)
transforms "segment trajectory" to "segment container"
edm::EDGetTokenT< reco::BeamSpot > beamspotToken
const std::string metname
bool buildTrajectoryMeasurements(SeedCandidate *validSegmentsSet, Trajectory::DataContainer &finalCandidate)
from SeedCandidate to DataContainer only
SETFilter * filter() const
pre-filter
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
SETMuonSeedProducer(const edm::ParameterSet &)
Constructor with Parameter set.
std::vector< const DetLayer * > layers() const
return the layer used for the refit
~SETMuonSeedProducer() override
Destructor.
std::vector< TrajectoryMeasurement > DataContainer
bool fwfit_SET(std::vector< SeedCandidate > &validSegmentsSet_in, std::vector< SeedCandidate > &validSegmentsSet_out)
Perform the SET inner-outward fitting.
edm::InputTag theBeamSpotTag
SETPatternRecognition * thePatternRecognition
void setServiceProxy(MuonServiceProxy *service)
bool useSegmentsInTrajectory
std::vector< ConstRecHitPointer > ConstRecHitContainer
void limitCombinatorics(std::vector< MuonRecHitContainer > &MuonRecHitContainer_perLayer)
Log< level::Info, false > LogInfo
std::vector< MuonRecHitContainer > sortByLayer(MuonRecHitContainer &cluster) const
void setEvent(const edm::Event &)
void addUntrackedParameter(std::string const &name, T const &value)
std::vector< MuonRecHitContainer > findAllValidSets(const std::vector< MuonRecHitContainer > &MuonRecHitContainer_perLayer)
MuonServiceProxy * theService
void validSetsPrePruning(std::vector< MuonRecHitContainer > &allValidSets)
std::vector< SeedCandidate > fillSeedCandidates(std::vector< MuonRecHitContainer > &allValidSets)
void produce(edm::Event &, const edm::EventSetup &) override
void produce(const edm::Event &event, const edm::EventSetup &eSetup, std::vector< MuonRecHitContainer > &result) override
virtual void setEvent(const edm::Event &event)
Pass the Event to the algo at each event.