|
|
Go to the documentation of this file.
59 string seedPosition = par.
getParameter<
string>(
"SeedPosition");
61 if (seedPosition ==
"in")
63 else if (seedPosition ==
"out")
67 <<
"Wrong seed position chosen in StandAloneMuonFilter::StandAloneMuonFilter ParameterSet"
69 <<
"Possible choices are:"
71 <<
"SeedPosition = in or SeedPosition = out";
114 LogTrace(
"Muon|RecoMuon|StandAloneMuonTrajectoryBuilder")
115 <<
"StandAloneMuonTrajectoryBuilder destructor called" << endl;
139 Resetter fwReset(
filter());
158 vector<Trajectory> seedTrajectories;
162 if (!seedTrajectories.empty()) {
164 lastTSOS = lastTM.updatedState();
165 lastDetId = lastTM.recHit()->geographicalId();
171 lastDetId =
seed.startingState().detId();
174 LogTrace(
metname) <<
"Trajectory State on Surface before the extrapolation" << endl;
186 filter()->
refit(inputFromSeed.second, inputFromSeed.first, trajectoryFW);
189 if (trajectoryFW.
empty()) {
190 LogTrace(
metname) <<
"Forward trajectory EMPTY! No trajectory will be loaded!" << endl;
191 return trajectoryContainer;
198 LogTrace(
metname) <<
"StandAloneMuonTrajectoryBuilder filter output " << endl;
222 if (
filter()->goodState()) {
224 }
else if (
filter()->isCompatibilitySatisfied()) {
225 int foundValidRh = trajectoryFW.
foundHits();
226 LogTrace(
metname) <<
"Compatibility satisfied after Forward filter, but too few valid RecHits (" << foundValidRh
228 <<
"A trajectory with only invalid RecHits will be loaded!" << endl;
230 trajectoryContainer.push_back(std::make_unique<Trajectory>(trajectoryFW));
231 return trajectoryContainer;
235 trajectoryContainer.push_back(std::make_unique<Trajectory>(defaultTraj));
236 return trajectoryContainer;
238 LogTrace(
metname) <<
"Compatibility NOT satisfied after Forward filter! No trajectory will be loaded!" << endl;
245 return trajectoryContainer;
255 LogTrace(
metname) <<
"Only forward refit requested. No backward refit will be performed!" << endl;
260 pair<bool, Trajectory> refitResult =
refitter()->
refit(trajectoryFW);
261 if (refitResult.first) {
262 trajectoryContainer.push_back(std::make_unique<Trajectory>(refitResult.second));
263 LogTrace(
metname) <<
"StandAloneMuonTrajectoryBuilder refit output " << endl;
266 trajectoryContainer.push_back(std::make_unique<Trajectory>(trajectoryFW));
268 trajectoryContainer.push_back(std::make_unique<Trajectory>(trajectoryFW));
271 return trajectoryContainer;
294 Trajectory trajectoryBW(seedForBW, bwDirection);
302 LogTrace(
metname) <<
"StandAloneMuonTrajectoryBuilder BW filter output " << endl;
360 }
else if (
bwfilter()->isCompatibilitySatisfied()) {
361 LogTrace(
metname) <<
"Compatibility satisfied after Backward filter, but too few valid RecHits ("
362 << trajectoryBW.
foundHits() <<
")." << endl
363 <<
"The (good) result of FW filter will be loaded!" << endl;
364 trajectoryContainer.push_back(std::make_unique<Trajectory>(trajectoryFW));
365 return trajectoryContainer;
367 LogTrace(
metname) <<
"Compatibility NOT satisfied after Backward filter!" << endl
368 <<
"The Forward trajectory will be invalidated and then loaded!" << endl;
371 trajectoryContainer.push_back(std::make_unique<Trajectory>(defaultTraj));
372 return trajectoryContainer;
377 pair<bool, Trajectory> refitResult =
refitter()->
refit(trajectoryBW);
378 if (refitResult.first) {
379 trajectoryContainer.push_back(std::make_unique<Trajectory>(refitResult.second));
380 LogTrace(
metname) <<
"StandAloneMuonTrajectoryBuilder Refit output " << endl;
383 trajectoryContainer.push_back(std::make_unique<Trajectory>(trajectoryBW));
385 trajectoryContainer.push_back(std::make_unique<Trajectory>(trajectoryBW));
389 return trajectoryContainer;
397 DetId seedDetId(aDetId);
413 LogTrace(
metname) <<
"TrajectoryStateOnSurface before propagation:" << endl;
419 vector<const DetLayer*> detLayers;
423 theService->muonNavigationSchool()->compatibleLayers(*initialLayer, *initialState.
freeState(), detLayerOrder);
430 LogTrace(
metname) <<
"There are " << detLayers.size() <<
" compatible layers" << endl;
434 if (!detLayers.empty()) {
436 for (vector<const DetLayer*>::const_iterator layer = detLayers.begin(); layer != detLayers.end(); layer++) {
441 const DetLayer* finalLayer = detLayers.back();
453 if (propagatedState.
isValid()) {
456 LogTrace(
metname) <<
"Trajectory State on Surface after the extrapolation" << endl;
460 LogTrace(
metname) <<
"Extrapolation failed. Keep the original seed state" << endl;
462 LogTrace(
metname) <<
"No compatible layers. Keep the original seed state" << endl;
const MuonServiceProxy * theService
GlobalVector momentum() const
int getDTChamberUsed() const
StandAloneMuonFilter * filter() const
pre-filter
int getCSCCompatibleChambers() const
StandAloneMuonFilter * theBWFilter
void refit(const TrajectoryStateOnSurface &initialState, const DetLayer *, Trajectory &trajectory)
Perform the inner-outward fitting.
int getGEMChamberUsed() const
int getRPCChamberUsed() const
TrajectoryStateOnSurface lastUpdatedTSOS() const
the Trajectory state on the last surface of the fitting
int getGEMCompatibleChambers() const
Log< level::Warning, false > LogWarning
virtual void setEvent(const edm::Event &event)
Pass the Event to the algo at each event.
StandAloneMuonTrajectoryBuilder(const edm::ParameterSet &, const MuonServiceProxy *, edm::ConsumesCollector &iC)
Constructor with Parameter set and MuonServiceProxy.
int getRPCCompatibleChambers() const
FreeTrajectoryState const * freeState(bool withErrors=true) const
TrajectoryContainer trajectories(const TrajectorySeed &) override
return a container of the reconstructed trajectories compatible with a given seed
DetLayerWithState propagateTheSeedTSOS(TrajectoryStateOnSurface &aTSOS, DetId &aDetId)
std::pair< const DetLayer *, TrajectoryStateOnSurface > DetLayerWithState
StandAloneMuonRefitter * theRefitter
SeedTransformer * theSeedTransformer
std::string theBWSeedType
void setEvent(const edm::Event &event) override
Pass the Event to the algo at each event.
TrajectoryMeasurement const & lastMeasurement() const
void addParameter(std::string const &name, T const &value)
int getCSCChamberUsed() const
StandAloneMuonRefitter * refitter() const
refitter of the hits container
std::vector< const DetLayer * > compatibleLayers(const FreeTrajectoryState &fts, PropagationDirection timeDirection) const
recoMuon::SeedPosition theSeedPosition
Log< level::Error, false > LogError
void createDefaultTrajectory(const Trajectory &, Trajectory &)
ConstRecHitPointer const & recHit() const
int getDTCompatibleChambers() const
MuonCandidate::TrajectoryContainer TrajectoryContainer
StandAloneMuonFilter * bwfilter() const
actual filter
std::string theNavigationType
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
TrajectoryStateOnSurface lastCompatibleTSOS() const
the Trajectory state on the last compatible surface
T getParameter(std::string const &) const
int getME0ChamberUsed() const
RefitResult refit(const Trajectory &)
StandAloneMuonFilter * theFilter
~StandAloneMuonTrajectoryBuilder() override
Destructor.
int getME0CompatibleChambers() const
int getTotalCompatibleChambers() const
std::string theSeedPropagatorName
Propagator for the seed extrapolation.
const std::string metname
bool empty() const
True if trajectory has no measurements.