32 : thePatternRecognition(parameterSet),
33 theSeedFinder(parameterSet),
34 theBeamSpotTag(parameterSet.getParameter<edm::
InputTag>(
"beamSpotTag"))
36 const string metname =
"Muon|RecoMuon|SETMuonSeedSeed";
46 LogTrace(metname) <<
"constructor called" << endl;
59 produces<TrajectorySeedCollection>();
65 LogTrace(
"Muon|RecoMuon|SETMuonSeedProducer")
66 <<
"SETMuonSeedProducer destructor called" << endl;
74 const string metname =
"Muon|RecoMuon|SETMuonSeedSeed";
92 beamSpot = *beamSpotHandle;
97 <<
"No beam spot available from EventSetup \n";
104 bool fwFitFailed =
true;
106 std::vector <SeedCandidate> seedCandidates_AllChosen;
107 std::vector< MuonRecHitContainer > MuonRecHitContainer_clusters;
113 for(
unsigned int cluster = 0; cluster < MuonRecHitContainer_clusters.size(); ++cluster) {
115 std::vector <SeedCandidate> seedCandidates_inCluster;
119 std::vector< MuonRecHitContainer > MuonRecHitContainer_perLayer =
theSeedFinder.
sortByLayer(MuonRecHitContainer_clusters[cluster]);
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);
184 if ( conversionPassed && !finalCandidate.empty() && !hitContainer.empty()) {
189 for(
unsigned int iHit = 0;iHit < hitContainer.size();++iHit){
190 recHitsContainer.
push_back(hitContainer.at(iHit)->hit()->clone());
207 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"
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
SETPatternRecognition thePatternRecognition
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
virtual void produce(edm::Event &, const edm::EventSetup &)
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 setEvent(const edm::Event &event)
Pass the Event to the algo at each event.
double x0() const
x coordinate