32 : theSeedFinder(parameterSet), theBeamSpotTag(parameterSet.getParameter<edm::
InputTag>(
"beamSpotTag")) {
36 const string metname =
"Muon|RecoMuon|SETMuonSeedSeed";
46 LogTrace(metname) <<
"constructor called" << endl;
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>();
93 beamSpot = *beamSpotHandle;
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"
double z0() const
z coordinate
bool transformLight(Trajectory::DataContainer &measurements_segments, TransientTrackingRecHit::ConstRecHitContainer &hitContainer, TrajectoryStateOnSurface &firstTSOS)
transforms "segment trajectory" to "segment container"
edm::EDGetTokenT< reco::BeamSpot > beamspotToken
std::string dumpLayer(const DetLayer *layer) const
const std::string metname
bool buildTrajectoryMeasurements(SeedCandidate *validSegmentsSet, Trajectory::DataContainer &finalCandidate)
from SeedCandidate to DataContainer only
std::vector< MuonRecHitContainer > sortByLayer(MuonRecHitContainer &cluster) const
SETMuonSeedProducer(const edm::ParameterSet &)
Constructor with Parameter set.
~SETMuonSeedProducer() override
Destructor.
std::vector< const DetLayer * > layers() const
return the layer used for the refit
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
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
SETPatternRecognition * thePatternRecognition
void setServiceProxy(MuonServiceProxy *service)
bool useSegmentsInTrajectory
std::vector< ConstRecHitPointer > ConstRecHitContainer
void limitCombinatorics(std::vector< MuonRecHitContainer > &MuonRecHitContainer_perLayer)
Log< level::Info, false > LogInfo
void setEvent(const edm::Event &)
void addUntrackedParameter(std::string const &name, T const &value)
T getParameter(std::string const &) const
std::vector< MuonRecHitContainer > findAllValidSets(const std::vector< MuonRecHitContainer > &MuonRecHitContainer_perLayer)
MuonServiceProxy * theService
void validSetsPrePruning(std::vector< MuonRecHitContainer > &allValidSets)
double y0() const
y coordinate
std::vector< SeedCandidate > fillSeedCandidates(std::vector< MuonRecHitContainer > &allValidSets)
SETFilter * filter() const
pre-filter
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.
double x0() const
x coordinate