45 theOverlappingChambersFlag(
true)
48 string fitDirectionName = par.
getParameter<
string>(
"FitDirection");
54 <<
"Wrong fit direction chosen in StandAloneMuonFilter::StandAloneMuonFilter ParameterSet"
56 <<
"Possible choices are:"
58 <<
"FitDirection = insideOut or FitDirection = outsideIn";
89 bool enableDTMeasurement = par.
getParameter<
bool>(
"EnableDTMeasurement");
90 bool enableCSCMeasurement = par.
getParameter<
bool>(
"EnableCSCMeasurement");
91 bool enableRPCMeasurement = par.
getParameter<
bool>(
"EnableRPCMeasurement");
92 bool enableGEMMeasurement = par.
getParameter<
bool>(
"EnableGEMMeasurement");
100 enableCSCMeasurement,
101 enableRPCMeasurement,
102 enableGEMMeasurement);
104 theRPCLoneliness = (!(enableDTMeasurement && enableCSCMeasurement)) ? enableRPCMeasurement :
false;
109 LogTrace(
"Muon|RecoMuon|StandAloneMuonFilter")
110 <<
"StandAloneMuonFilter destructor called"<<endl;
153 LogError(
"Muon|RecoMuon|StandAloneMuonFilter")
154 <<
"Unrecognized module type in incrementChamberCounters";
168 LogError(
"Muon|RecoMuon|StandAloneMuonFilter")
169 <<
"Unrecognized module type in incrementCompatibleChamberCounters";
178 vector<const DetLayer*> detLayers;
182 detLayers =
theService->muonNavigationSchool()->compatibleLayers(*initialLayer,fts,propDir);
185 detLayers.insert(detLayers.begin(),initialLayer);
192 edm::LogError(
"Muon|RecoMuon|StandAloneMuonFilter") <<
"No Properly Navigation Selected!!"<<endl;
208 LogTrace(metname) <<
"Starting the refit"<<endl;
217 LogTrace(metname)<<
"compatible layers found: "<<detLayers.size()<<endl;
219 vector<const DetLayer*>::const_iterator layer;
222 for ( layer = detLayers.begin(); layer!= detLayers.end(); ++layer ) {
246 if( bestMeasurements.empty() && lastdEta > 0.1) {
247 LogTrace(metname) <<
"No measurement and big eta variation wrt seed" << endl
248 <<
"trying with lastButOneUpdatedTSOS";
255 if( bestMeasurements.empty() && lastdEta > 0.1) {
256 LogTrace(metname) <<
"No measurement and big eta variation wrt seed" << endl
257 <<
"tryng with seed TSOS";
264 if(!bestMeasurements.empty()) {
267 for(std::vector<TrajectoryMeasurement>::const_iterator tmItr = bestMeasurements.begin();
268 tmItr != bestMeasurements.end(); ++tmItr){
269 added |=
update(*layer, &(*tmItr), trajectory);
281 LogTrace(metname)<<
"No best measurement found"<<endl;
291 std::vector<TrajectoryMeasurement>
297 std::vector<TrajectoryMeasurement>
result;
298 std::vector<TrajectoryMeasurement> measurements;
302 std::vector<TrajectoryMeasurementGroup> measurementGroups =
306 LogTrace(metname) <<
"Reversing the order of groupedMeasurements as the direction of the fit is outside-in";
307 reverse(measurementGroups.begin(),measurementGroups.end());
313 for(std::vector<TrajectoryMeasurementGroup>::const_iterator tmGroupItr = measurementGroups.begin();
314 tmGroupItr != measurementGroups.end(); ++tmGroupItr){
316 measurements = tmGroupItr->measurements();
317 LogTrace(metname) <<
"Number of Trajectory Measurement: " << measurements.size();
322 if(bestMeasurement) result.push_back(*bestMeasurement);
327 LogTrace(metname) <<
"Number of Trajectory Measurement: " << measurements.size();
331 if(bestMeasurement) result.push_back(*bestMeasurement);
346 LogTrace(metname)<<
"best measurement found" <<
"\n"
347 <<
"updating the trajectory..."<<endl;
351 LogTrace(metname)<<
"trajectory updated: "<<result.first<<endl;
359 if(result.second.isValid())
369 defTraj.
reserve(oldMeas.size());
371 for (Trajectory::DataContainer::const_iterator itm = oldMeas.begin(); itm != oldMeas.end(); itm++) {
372 if( !(*itm).recHit()->isValid() )
373 defTraj.
push( *itm, (*itm).estimate() );
377 TrajectoryMeasurement invRhMeas( (*itm).forwardPredictedState(), (*itm).updatedState(), invRhPtr, (*itm).estimate(), (*itm).layer() );
T getParameter(std::string const &) const
MeasurementEstimator * estimator() const
access at the estimator
NavigationDirection fitDirection() const
Return the fit direction.
double theMaxChi2
The max allowed chi2 to accept a rechit in the fit.
MuonTrajectoryUpdator * theMuonUpdator
the muon updator (it doesn't inhert from an updator, but it has one!)
void createDefaultTrajectory(const Trajectory &, Trajectory &)
std::string dumpLayer(const DetLayer *layer) const
const std::string metname
void incrementCompatibleChamberCounters(const DetLayer *layer)
void makeFirstTime()
reset the theFirstTSOSFlag
virtual SubDetector subDetector() const =0
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap)
GlobalPoint globalPosition() const
int cscCompatibleChambers
TrajectoryStateOnSurface theLastCompatibleTSOS
the trajectory state on the last compatible surface
void reserve(unsigned int n)
bool theRPCLoneliness
True if there are only the RPC measurements.
int totalCompatibleChambers
void refit(const TrajectoryStateOnSurface &initialState, const DetLayer *, Trajectory &trajectory)
Perform the inner-outward fitting.
std::vector< TrajectoryMeasurementGroup > groupedMeasurements(const DetLayer *layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, const edm::Event &iEvent)
std::string thePropagatorName
the propagator name
std::vector< const DetLayer * > compatibleLayers(const FreeTrajectoryState &fts, PropagationDirection timeDirection) const
DataContainer const & measurements() const
std::string dumpTSOS(const TrajectoryStateOnSurface &tsos) const
MuonDetLayerMeasurements * theMeasurementExtractor
The Measurement extractor.
std::vector< TrajectoryMeasurement > DataContainer
void incrementChamberCounters(const DetLayer *layer)
Increment the DT,CSC,RPC counters.
FreeTrajectoryState const * freeTrajectoryState(bool withErrors=true) const
int gemCompatibleChambers
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
tuple Chi2MeasurementEstimator
MeasurementContainer measurements(const DetLayer *layer, const GeomDet *det, const TrajectoryStateOnSurface &stateOnDet, const MeasurementEstimator &est, const edm::Event &iEvent)
GlobalVector momentum() const
const Propagator * propagator() const
access at the propagator
StandAloneMuonFilter(const edm::ParameterSet &par, const MuonServiceProxy *service, edm::ConsumesCollector &iC)
Constructor.
bool theOverlappingChambersFlag
PropagationDirection propagationDirection() const
Return the propagation direction.
MuonTrajectoryUpdator * updator() const
access at the muon updator
bool update(const DetLayer *layer, const TrajectoryMeasurement *meas, Trajectory &trajectory)
std::vector< const DetLayer * > theDetLayers
the det layer used in the reconstruction
NavigationDirection theFitDirection
the propagation direction
std::vector< const DetLayer * > compatibleLayers(const DetLayer *initialLayer, const FreeTrajectoryState &fts, PropagationDirection propDir)
Set the rigth Navigation.
MeasurementEstimator * theEstimator
The Estimator.
TrajectoryStateOnSurface theLastButOneUpdatedTSOS
the trajectory state on the last but one available surface
void setEvent(const edm::Event &)
set event
int rpcCompatibleChambers
TrajectoryStateOnSurface theLastUpdatedTSOS
the trajectory state on the last available surface
TrajectoryMeasurement * findBestMeasurement(std::vector< TrajectoryMeasurement > &measC, const Propagator *propagator)
return the Tm with the best chi2: no cut applied.
MuonBestMeasurementFinder * bestMeasurementFinder() const
Access to the best measurement finder.
virtual ~StandAloneMuonFilter()
Destructor.
virtual std::pair< bool, TrajectoryStateOnSurface > update(const TrajectoryMeasurement *measurement, Trajectory &trajectory, const Propagator *propagator)
update the Trajectory with the TrajectoryMeasurement
std::string theNavigationType
std::vector< TrajectoryMeasurement > findBestMeasurements(const DetLayer *layer, const TrajectoryStateOnSurface &tsos)
static MuonRecHitPointer specificBuild(const GeomDet *geom, const TrackingRecHit *rh)
void push(const TrajectoryMeasurement &tm)
MuonBestMeasurementFinder * theBestMeasurementFinder
The best measurement finder: search for the best measurement among the TMs available.
const MuonServiceProxy * theService