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";
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());
213 output->push_back(seed);
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
virtual ~SETMuonSeedProducer()
Destructor.
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
std::vector< TrajectoryMeasurement > DataContainer
bool fwfit_SET(std::vector< SeedCandidate > &validSegmentsSet_in, std::vector< SeedCandidate > &validSegmentsSet_out)
Perform the SET inner-outward fitting.
std::vector< TrajectorySeed > TrajectorySeedCollection
edm::InputTag theBeamSpotTag
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
SETPatternRecognition * thePatternRecognition
void setServiceProxy(MuonServiceProxy *service)
bool useSegmentsInTrajectory
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
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
virtual void produce(const edm::Event &event, const edm::EventSetup &eSetup, std::vector< MuonRecHitContainer > &result)
void validSetsPrePruning(std::vector< MuonRecHitContainer > &allValidSets)
double y0() const
y coordinate
std::vector< SeedCandidate > fillSeedCandidates(std::vector< MuonRecHitContainer > &allValidSets)
SETFilter * filter() const
pre-filter
virtual void produce(edm::Event &, const edm::EventSetup &) 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