43 const std::string
metname =
"Muon|RecoMuon|StandAloneMuonTrajectoryBuilder";
45 LogTrace(metname) <<
"constructor called" << endl;
57 string seedPosition = par.
getParameter<
string>(
"SeedPosition");
63 <<
"Wrong seed position chosen in StandAloneMuonFilter::StandAloneMuonFilter ParameterSet"
65 <<
"Possible choices are:"
67 <<
"SeedPosition = in or SeedPosition = out";
111 LogTrace(
"Muon|RecoMuon|StandAloneMuonTrajectoryBuilder")
112 <<
"StandAloneMuonTrajectoryBuilder destructor called" << endl;
124 const std::string
metname =
"Muon|RecoMuon|StandAloneMuonTrajectoryBuilder";
140 vector<Trajectory> seedTrajectories;
144 if(!seedTrajectories.empty()) {
146 lastTSOS = lastTM.updatedState();
147 lastDetId = lastTM.recHit()->geographicalId();
161 filter()->
refit(inputFromSeed.second,inputFromSeed.first,trajectoryFW);
164 if( trajectoryFW.
empty() ) {
165 LogTrace(metname) <<
"Forward trajectory EMPTY! No trajectory will be loaded!" << endl;
166 return trajectoryContainer;
173 LogTrace(metname) <<
"StandAloneMuonTrajectoryBuilder filter output " << endl;
198 if(
filter()->goodState() ) {
201 else if(
filter()->isCompatibilitySatisfied() ) {
202 int foundValidRh = trajectoryFW.
foundHits();
203 LogTrace(metname) <<
"Compatibility satisfied after Forward filter, but too few valid RecHits ("
204 << foundValidRh <<
")." << endl
205 <<
"A trajectory with only invalid RecHits will be loaded!" << endl;
207 trajectoryContainer.push_back(
new Trajectory(trajectoryFW));
208 return trajectoryContainer;
212 trajectoryContainer.push_back(
new Trajectory(defaultTraj));
213 return trajectoryContainer;
216 LogTrace(metname) <<
"Compatibility NOT satisfied after Forward filter! No trajectory will be loaded!" << endl;
220 return trajectoryContainer;
224 LogTrace(metname) <<
"Number of DT/CSC/RPC chamber used (fw): "
232 LogTrace(metname) <<
"Only forward refit requested. No backward refit will be performed!"<<endl;
237 pair<bool,Trajectory> refitResult =
refitter()->
refit(trajectoryFW);
238 if(refitResult.first) {
239 trajectoryContainer.push_back(
new Trajectory(refitResult.second));
240 LogTrace(metname) <<
"StandAloneMuonTrajectoryBuilder refit output " << endl ;
241 LogTrace(metname) << debug.
dumpTSOS(refitResult.second.lastMeasurement().updatedState());
244 trajectoryContainer.push_back(
new Trajectory(trajectoryFW));
247 trajectoryContainer.push_back(
new Trajectory(trajectoryFW));
249 LogTrace(metname) <<
"Trajectory saved" << endl;
250 return trajectoryContainer;
260 seedForBW = seedVoid;
279 LogWarning(metname) <<
"Wrong seed type for the backward filter!";
282 Trajectory trajectoryBW(seedForBW,bwDirection);
290 LogTrace(metname) <<
"StandAloneMuonTrajectoryBuilder BW filter output " << endl ;
294 <<
"Number of RecHits: " << trajectoryBW.
foundHits() <<
"\n"
295 <<
"Number of DT/CSC/RPC chamber used (bw): "
351 else if(
bwfilter()->isCompatibilitySatisfied() ) {
352 LogTrace(metname) <<
"Compatibility satisfied after Backward filter, but too few valid RecHits ("
353 << trajectoryBW.
foundHits() <<
")." << endl
354 <<
"The (good) result of FW filter will be loaded!" << endl;
355 trajectoryContainer.push_back(
new Trajectory(trajectoryFW));
356 return trajectoryContainer;
359 LogTrace(metname) <<
"Compatibility NOT satisfied after Backward filter!" << endl
360 <<
"The Forward trajectory will be invalidated and then loaded!" << endl;
363 trajectoryContainer.push_back(
new Trajectory(defaultTraj));
364 return trajectoryContainer;
369 pair<bool,Trajectory> refitResult =
refitter()->
refit(trajectoryBW);
370 if(refitResult.first) {
371 trajectoryContainer.push_back(
new Trajectory(refitResult.second));
372 LogTrace(metname) <<
"StandAloneMuonTrajectoryBuilder Refit output " << endl;
373 LogTrace(metname) << debug.
dumpTSOS(refitResult.second.lastMeasurement().updatedState());
376 trajectoryContainer.push_back(
new Trajectory(trajectoryBW));
379 trajectoryContainer.push_back(
new Trajectory(trajectoryBW));
381 LogTrace(metname) <<
"Trajectory saved" << endl;
383 return trajectoryContainer;
390 const std::string
metname =
"Muon|RecoMuon|StandAloneMuonTrajectoryBuilder";
393 DetId seedDetId(aDetId);
400 LogTrace(metname)<<
"Seed's id: "<< endl ;
404 const DetLayer *initialLayer =
theService->detLayerGeometry()->idToLayer( seedDetId );
406 LogTrace(metname)<<
"Seed's detLayer: "<< endl ;
409 LogTrace(metname)<<
"TrajectoryStateOnSurface before propagation:" << endl;
416 vector<const DetLayer*> detLayers;
425 edm::LogError(metname) <<
"No Properly Navigation Selected!!"<<endl;
428 LogTrace(metname) <<
"There are "<< detLayers.size() <<
" compatible layers"<<endl;
432 if(detLayers.size()){
434 LogTrace(metname) <<
"Compatible layers:"<<endl;
435 for( vector<const DetLayer*>::const_iterator layer = detLayers.begin();
436 layer != detLayers.end(); layer++){
437 LogTrace(metname) << debug.
dumpMuonId((*layer)->basicComponents().front()->geographicalId());
441 const DetLayer* finalLayer = detLayers.back();
444 else LogTrace(metname) <<
"Most external one:"<<endl;
455 LogTrace(metname) <<
"Trajectory State on Surface after the extrapolation"<<endl;
460 LogTrace(metname)<<
"Extrapolation failed. Keep the original seed state" <<endl;
463 LogTrace(metname)<<
"No compatible layers. Keep the original seed state" <<endl;
bool empty() const
True if trajectory has no measurements.
T getParameter(std::string const &) const
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
SeedTransformer * theSeedTransformer
void createDefaultTrajectory(const Trajectory &, Trajectory &)
std::string dumpLayer(const DetLayer *layer) const
recoMuon::SeedPosition theSeedPosition
const std::string metname
StandAloneMuonFilter * theFilter
int getRPCChamberUsed() const
ConstRecHitPointer recHit() const
MuonCandidate::TrajectoryContainer TrajectoryContainer
std::string theBWSeedType
int getRPCCompatibleChambers() const
TrajectoryStateOnSurface lastUpdatedTSOS() const
the Trajectory state on the last surface of the fitting
void refit(const TrajectoryStateOnSurface &initialState, const DetLayer *, Trajectory &trajectory)
Perform the inner-outward fitting.
int getDTChamberUsed() const
std::vector< const DetLayer * > compatibleLayers(const FreeTrajectoryState &fts, PropagationDirection timeDirection) const
std::string dumpMuonId(const DetId &id) const
std::string dumpTSOS(const TrajectoryStateOnSurface &tsos) const
FreeTrajectoryState * freeState(bool withErrors=true) const
int getCSCCompatibleChambers() const
int getDTCompatibleChambers() const
virtual void setEvent(const edm::Event &event)
Pass the Event to the algo at each event.
StandAloneMuonFilter * theBWFilter
TrajectoryMeasurement const & lastMeasurement() const
void addParameter(std::string const &name, T const &value)
StandAloneMuonFilter * bwfilter() const
actual filter
RefitResult refit(const Trajectory &)
virtual void setEvent(const edm::Event &event)
Pass the Event to the algo at each event.
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
GlobalVector momentum() const
std::string theNavigationType
std::pair< const DetLayer *, TrajectoryStateOnSurface > DetLayerWithState
PTrajectoryStateOnDet const & startingState() const
const unsigned int detId() const
int getCSCChamberUsed() const
StandAloneMuonFilter * filter() const
pre-filter
TrajectoryContainer trajectories(const TrajectorySeed &)
return a container of the reconstructed trajectories compatible with a given seed ...
const MuonServiceProxy * theService
std::vector< const DetLayer * > compatibleLayers(NavigationDirection direction) const
int getTotalCompatibleChambers() const
std::string theSeedPropagatorName
Propagator for the seed extrapolation.
StandAloneMuonTrajectoryBuilder(const edm::ParameterSet &, const MuonServiceProxy *)
Constructor with Parameter set and MuonServiceProxy.
virtual ~StandAloneMuonTrajectoryBuilder()
Destructor.
StandAloneMuonRefitter * theRefitter
StandAloneMuonRefitter * refitter() const
refitter of the hits container
TrajectoryStateOnSurface lastCompatibleTSOS() const
the Trajectory state on the last compatible surface
DetLayerWithState propagateTheSeedTSOS(TrajectoryStateOnSurface &aTSOS, DetId &aDetId)
const double par[8 *NPar][4]