31 : theSeedFinder(parameterSet),
32 theBeamSpotTag(parameterSet.getParameter<
edm::
InputTag>(
"beamSpotTag"))
38 const string metname =
"Muon|RecoMuon|SETMuonSeedSeed";
48 LogTrace(metname) <<
"constructor called" << endl;
63 produces<TrajectorySeedCollection>();
69 LogTrace(
"Muon|RecoMuon|SETMuonSeedProducer")
70 <<
"SETMuonSeedProducer destructor called" << endl;
80 const string metname =
"Muon|RecoMuon|SETMuonSeedSeed";
87 auto output = std::make_unique<TrajectorySeedCollection>();
98 beamSpot = *beamSpotHandle;
103 <<
"No beam spot available from EventSetup \n";
110 bool fwFitFailed =
true;
112 std::vector <SeedCandidate> seedCandidates_AllChosen;
113 std::vector< MuonRecHitContainer > MuonRecHitContainer_clusters;
119 for(
unsigned int cluster = 0; cluster < MuonRecHitContainer_clusters.size(); ++cluster) {
121 std::vector <SeedCandidate> seedCandidates_inCluster;
125 std::vector< MuonRecHitContainer > MuonRecHitContainer_perLayer =
theSeedFinder.
sortByLayer(MuonRecHitContainer_clusters[cluster]);
138 if(allValidSets.size()<500){
143 if(!seedCandidates_inCluster.empty()){
145 std::vector < SeedCandidate> bestSets_inCluster;
146 fwFitFailed = !(
filter()->
fwfit_SET(seedCandidates_inCluster, bestSets_inCluster));
153 for(
unsigned int iSet = 0; iSet<bestSets_inCluster.size();++iSet){
154 seedCandidates_AllChosen.push_back(bestSets_inCluster[iSet]);
159 for(
unsigned int iMuon = 0;iMuon<seedCandidates_AllChosen.size();++iMuon){
162 SeedCandidate * aFinalSet = &(seedCandidates_AllChosen[iMuon]);
178 if (
filter()->goodState()) {
181 bool conversionPassed =
false;
184 conversionPassed =
filter()->
transform(finalCandidate, hitContainer, firstTSOS);
190 if ( conversionPassed && !finalCandidate.empty() && !hitContainer.empty()) {
195 for(
unsigned int iHit = 0;iHit < hitContainer.size();++iHit){
196 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
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.
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)
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)
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
ParameterSet const & parameterSet(Provenance const &provenance)
virtual void setEvent(const edm::Event &event)
Pass the Event to the algo at each event.
double x0() const
x coordinate