CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

StandAloneMuonFilter Class Reference

#include <StandAloneMuonFilter.h>

List of all members.

Public Member Functions

void createDefaultTrajectory (const Trajectory &, Trajectory &)
MeasurementEstimatorestimator () const
 access at the estimator
NavigationDirection fitDirection () const
 Return the fit direction.
int getCSCChamberUsed () const
int getCSCCompatibleChambers () const
int getDTChamberUsed () const
int getDTCompatibleChambers () const
int getRPCChamberUsed () const
int getRPCCompatibleChambers () const
int getTotalChamberUsed () const
int getTotalCompatibleChambers () const
bool goodState () const
bool isCompatibilitySatisfied () const
FreeTrajectoryState lastButOneUpdatedFTS () const
 the last but one free trajectory state
TrajectoryStateOnSurface lastButOneUpdatedTSOS () const
 the Trajectory state on the last surface of the fitting
TrajectoryStateOnSurface lastCompatibleTSOS () const
 the Trajectory state on the last compatible surface
const DetLayerlastDetLayer () const
 return the last det layer
FreeTrajectoryState lastUpdatedFTS () const
 the last free trajectory state
TrajectoryStateOnSurface lastUpdatedTSOS () const
 the Trajectory state on the last surface of the fitting
std::vector< const DetLayer * > layers () const
 return the layer used for the refit
bool onlyRPC () const
 True if there are only the RPC measurements.
PropagationDirection propagationDirection () const
 Return the propagation direction.
const Propagatorpropagator () const
 access at the propagator
void refit (const TrajectoryStateOnSurface &initialState, const DetLayer *, Trajectory &trajectory)
 Perform the inner-outward fitting.
void reset ()
virtual void setEvent (const edm::Event &event)
 Pass the Event to the algo at each event.
 StandAloneMuonFilter (const edm::ParameterSet &par, const MuonServiceProxy *service)
 Constructor.
MuonTrajectoryUpdatorupdator () const
 access at the muon updator
virtual ~StandAloneMuonFilter ()
 Destructor.

Private Member Functions

MuonBestMeasurementFinderbestMeasurementFinder () const
 Access to the best measurement finder.
std::vector< const DetLayer * > compatibleLayers (const DetLayer *initialLayer, FreeTrajectoryState &fts, PropagationDirection propDir)
 Set the rigth Navigation.
std::vector
< TrajectoryMeasurement
findBestMeasurements (const DetLayer *layer, const TrajectoryStateOnSurface &tsos)
void incrementChamberCounters (const DetLayer *layer)
 Increment the DT,CSC,RPC counters.
void incrementCompatibleChamberCounters (const DetLayer *layer)
void setLastButOneUpdatedTSOS (TrajectoryStateOnSurface tsos)
 Set the last but one TSOS.
void setLastCompatibleTSOS (TrajectoryStateOnSurface tsos)
 Set the last compatible TSOS.
void setLastUpdatedTSOS (TrajectoryStateOnSurface tsos)
 Set the last TSOS.
bool update (const DetLayer *layer, const TrajectoryMeasurement *meas, Trajectory &trajectory)

Private Attributes

int cscChambers
int cscCompatibleChambers
int dtChambers
int dtCompatibleChambers
int rpcChambers
int rpcCompatibleChambers
MuonBestMeasurementFindertheBestMeasurementFinder
 The best measurement finder: search for the best measurement among the TMs available.
std::vector< const DetLayer * > theDetLayers
 the det layer used in the reconstruction
MeasurementEstimatortheEstimator
 The Estimator.
NavigationDirection theFitDirection
 the propagation direction
TrajectoryStateOnSurface theLastButOneUpdatedTSOS
 the trajectory state on the last but one available surface
TrajectoryStateOnSurface theLastCompatibleTSOS
 the trajectory state on the last compatible surface
TrajectoryStateOnSurface theLastUpdatedTSOS
 the trajectory state on the last available surface
double theMaxChi2
 The max allowed chi2 to accept a rechit in the fit.
MuonDetLayerMeasurementstheMeasurementExtractor
 The Measurement extractor.
MuonTrajectoryUpdatortheMuonUpdator
 the muon updator (it doesn't inhert from an updator, but it has one!)
std::string theMuonUpdatorName
 its name
std::string theNavigationType
double theNSigma
bool theOverlappingChambersFlag
std::string thePropagatorName
 the propagator name
bool theRPCLoneliness
 True if there are only the RPC measurements.
const MuonServiceProxytheService
int totalChambers
int totalCompatibleChambers

Detailed Description

The inward-outward fitter (starts from seed state).

Date:
2009/05/11 10:14:52
Revision:
1.4
Author:
R. Bellan - INFN Torino <riccardo.bellan@cern.ch> D. Trocino - INFN Torino <daniele.trocino@to.infn.it>

The inward-outward fitter (starts from seed state).

Date:
2009/09/17 20:02:50
Revision:
1.10
Author:
R. Bellan - INFN Torino <riccardo.bellan@cern.ch> D. Trocino - INFN Torino <daniele.trocino@to.infn.it>

Definition at line 30 of file StandAloneMuonFilter.h.


Constructor & Destructor Documentation

StandAloneMuonFilter::StandAloneMuonFilter ( const edm::ParameterSet par,
const MuonServiceProxy *  service 
)

Constructor.

Definition at line 41 of file StandAloneMuonFilter.cc.

References Chi2MeasurementEstimatorESProducer_cfi::Chi2MeasurementEstimator, Exception, fitDirection(), edm::ParameterSet::getParameter(), insideOut, outsideIn, theBestMeasurementFinder, theEstimator, theFitDirection, theMaxChi2, theMeasurementExtractor, theMuonUpdator, theNavigationType, theNSigma, thePropagatorName, and theRPCLoneliness.

:theService(service),
 theOverlappingChambersFlag(true)
{
  // Fit direction
  string fitDirectionName = par.getParameter<string>("FitDirection");

  if (fitDirectionName == "insideOut" ) theFitDirection = insideOut;
  else if (fitDirectionName == "outsideIn" ) theFitDirection = outsideIn;
  else 
    throw cms::Exception("StandAloneMuonFilter constructor") 
      <<"Wrong fit direction chosen in StandAloneMuonFilter::StandAloneMuonFilter ParameterSet"
      << "\n"
      << "Possible choices are:"
      << "\n"
      << "FitDirection = insideOut or FitDirection = outsideIn";
  
  // The max allowed chi2 to accept a rechit in the fit
  theMaxChi2 = par.getParameter<double>("MaxChi2");

  // The errors of the trajectory state are multiplied by nSigma 
  // to define acceptance of BoundPlane and maximalLocalDisplacement
  theNSigma = par.getParameter<double>("NumberOfSigma"); // default = 3.

  // The navigation type:
  // "Direct","Standard"
  theNavigationType = par.getParameter<string>("NavigationType");
  
  // The estimator: makes the decision wheter a measure is good or not
  // it isn't used by the updator which does the real fit. In fact, in principle,
  // a looser request onto the measure set can be requested 
  // (w.r.t. the request on the accept/reject measure in the fit)
  theEstimator = new Chi2MeasurementEstimator(theMaxChi2,theNSigma);
  
  thePropagatorName = par.getParameter<string>("Propagator");

  theBestMeasurementFinder = new MuonBestMeasurementFinder();

  // Muon trajectory updator parameters
  ParameterSet muonUpdatorPSet = par.getParameter<ParameterSet>("MuonTrajectoryUpdatorParameters");
  
  // the updator needs the fit direction
  theMuonUpdator = new MuonTrajectoryUpdator(muonUpdatorPSet,
                                             fitDirection() );

  // Measurement Extractor: enable the measure for each muon sub detector
  bool enableDTMeasurement = par.getParameter<bool>("EnableDTMeasurement");
  bool enableCSCMeasurement = par.getParameter<bool>("EnableCSCMeasurement");
  bool enableRPCMeasurement = par.getParameter<bool>("EnableRPCMeasurement");

  theMeasurementExtractor = new MuonDetLayerMeasurements(par.getParameter<InputTag>("DTRecSegmentLabel"),
                                                         par.getParameter<InputTag>("CSCRecSegmentLabel"),
                                                         par.getParameter<InputTag>("RPCRecSegmentLabel"),
                                                         enableDTMeasurement,
                                                         enableCSCMeasurement,
                                                         enableRPCMeasurement);
  
  theRPCLoneliness = (!(enableDTMeasurement && enableCSCMeasurement)) ? enableRPCMeasurement : false;
}
StandAloneMuonFilter::~StandAloneMuonFilter ( ) [virtual]

Destructor.

Definition at line 102 of file StandAloneMuonFilter.cc.

References LogTrace, theBestMeasurementFinder, theEstimator, theMeasurementExtractor, and theMuonUpdator.

                                           {

  LogTrace("Muon|RecoMuon|StandAloneMuonFilter")
    <<"StandAloneMuonFilter destructor called"<<endl;
  
  delete theEstimator;
  delete theMuonUpdator;
  delete theMeasurementExtractor;
  delete theBestMeasurementFinder;
}

Member Function Documentation

MuonBestMeasurementFinder* StandAloneMuonFilter::bestMeasurementFinder ( ) const [inline, private]

Access to the best measurement finder.

Definition at line 159 of file StandAloneMuonFilter.h.

References theBestMeasurementFinder.

Referenced by findBestMeasurements().

vector< const DetLayer * > StandAloneMuonFilter::compatibleLayers ( const DetLayer initialLayer,
FreeTrajectoryState fts,
PropagationDirection  propDir 
) [private]

Set the rigth Navigation.

Definition at line 168 of file StandAloneMuonFilter.cc.

References DirectMuonNavigation::compatibleLayers(), DetLayer::compatibleLayers(), theNavigationType, and theService.

Referenced by refit().

                                                                                              {
  vector<const DetLayer*> detLayers;

  if(theNavigationType == "Standard"){
    // ask for compatible layers
    detLayers = initialLayer->compatibleLayers(fts,propDir);  
    // I have to fit by hand the first layer until the seedTSOS is defined on the first rechit layer
    // In fact the first layer is not returned by initialLayer->compatibleLayers.
    detLayers.insert(detLayers.begin(),initialLayer);
  }
  else if (theNavigationType == "Direct"){
    DirectMuonNavigation navigation(theService->detLayerGeometry());
    detLayers = navigation.compatibleLayers(fts,propDir);
  }
  else
    edm::LogError("Muon|RecoMuon|StandAloneMuonFilter") << "No Properly Navigation Selected!!"<<endl;
  
  return detLayers;
}
void StandAloneMuonFilter::createDefaultTrajectory ( const Trajectory oldTraj,
Trajectory defTraj 
)

Definition at line 359 of file StandAloneMuonFilter.cc.

References Trajectory::measurements(), Trajectory::push(), Trajectory::reserve(), and MuonTransientTrackingRecHit::specificBuild().

Referenced by StandAloneMuonTrajectoryBuilder::trajectories().

                                                                                                   {

  Trajectory::DataContainer oldMeas = oldTraj.measurements();
  defTraj.reserve(oldMeas.size());

  for (Trajectory::DataContainer::const_iterator itm = oldMeas.begin(); itm != oldMeas.end(); itm++) {
    if( !(*itm).recHit()->isValid() )
      defTraj.push( *itm, (*itm).estimate() );
    else {
      MuonTransientTrackingRecHit::MuonRecHitPointer invRhPtr = MuonTransientTrackingRecHit::specificBuild( (*itm).recHit()->det(), (*itm).recHit()->hit() );
      invRhPtr->invalidateHit();
      TrajectoryMeasurement invRhMeas( (*itm).forwardPredictedState(), (*itm).updatedState(), invRhPtr.get(), (*itm).estimate(), (*itm).layer() );
      defTraj.push( invRhMeas, (*itm).estimate() );       
    }

  } // end for
}
MeasurementEstimator* StandAloneMuonFilter::estimator ( void  ) const [inline]

access at the estimator

Definition at line 98 of file StandAloneMuonFilter.h.

References theEstimator.

Referenced by findBestMeasurements().

{return theEstimator;}
std::vector< TrajectoryMeasurement > StandAloneMuonFilter::findBestMeasurements ( const DetLayer layer,
const TrajectoryStateOnSurface tsos 
) [private]

Definition at line 285 of file StandAloneMuonFilter.cc.

References bestMeasurementFinder(), estimator(), MuonBestMeasurementFinder::findBestMeasurement(), MuonDetLayerMeasurements::groupedMeasurements(), GeometricSearchDet::hasGroups(), LogTrace, MuonDetLayerMeasurements::measurements(), metname, outsideIn, propagator(), query::result, theFitDirection, theMeasurementExtractor, and theOverlappingChambersFlag.

Referenced by refit().

                                                                                  {

  const std::string metname = "Muon|RecoMuon|StandAloneMuonFilter";

  std::vector<TrajectoryMeasurement> result;
  std::vector<TrajectoryMeasurement> measurements;

  if(theOverlappingChambersFlag && layer->hasGroups()){
    
    std::vector<TrajectoryMeasurementGroup> measurementGroups =
      theMeasurementExtractor->groupedMeasurements(layer, tsos, *propagator(), *estimator());

    if(theFitDirection == outsideIn){
      LogTrace(metname) << "Reversing the order of groupedMeasurements as the direction of the fit is outside-in";
      reverse(measurementGroups.begin(),measurementGroups.end());
      // this should be fixed either in RecoMuon/MeasurementDet/MuonDetLayerMeasurements or
      // RecoMuon/DetLayers/MuRingForwardDoubleLayer
    }


    for(std::vector<TrajectoryMeasurementGroup>::const_iterator tmGroupItr = measurementGroups.begin();
        tmGroupItr != measurementGroups.end(); ++tmGroupItr){
    
      measurements = tmGroupItr->measurements();
      LogTrace(metname) << "Number of Trajectory Measurement: " << measurements.size();
      
      const TrajectoryMeasurement* bestMeasurement 
        = bestMeasurementFinder()->findBestMeasurement(measurements,  propagator());
      
      if(bestMeasurement) result.push_back(*bestMeasurement);
    }
  } 
  else{
    measurements = theMeasurementExtractor->measurements(layer, tsos, *propagator(), *estimator());
    LogTrace(metname) << "Number of Trajectory Measurement: " << measurements.size();
    const TrajectoryMeasurement* bestMeasurement 
      = bestMeasurementFinder()->findBestMeasurement(measurements,  
                                                     propagator());
    if(bestMeasurement) result.push_back(*bestMeasurement);
  }
  return result;
}
NavigationDirection StandAloneMuonFilter::fitDirection ( ) const [inline]

Return the fit direction.

Definition at line 92 of file StandAloneMuonFilter.h.

References theFitDirection.

Referenced by propagationDirection(), and StandAloneMuonFilter().

{return theFitDirection;}
int StandAloneMuonFilter::getCSCChamberUsed ( ) const [inline]

Definition at line 66 of file StandAloneMuonFilter.h.

References cscChambers.

Referenced by StandAloneMuonTrajectoryBuilder::trajectories().

{return cscChambers;}
int StandAloneMuonFilter::getCSCCompatibleChambers ( ) const [inline]
int StandAloneMuonFilter::getDTChamberUsed ( ) const [inline]

Definition at line 65 of file StandAloneMuonFilter.h.

References dtChambers.

Referenced by StandAloneMuonTrajectoryBuilder::trajectories().

{return dtChambers;}
int StandAloneMuonFilter::getDTCompatibleChambers ( ) const [inline]
int StandAloneMuonFilter::getRPCChamberUsed ( ) const [inline]

Definition at line 67 of file StandAloneMuonFilter.h.

References rpcChambers.

Referenced by StandAloneMuonTrajectoryBuilder::trajectories().

{return rpcChambers;}
int StandAloneMuonFilter::getRPCCompatibleChambers ( ) const [inline]
int StandAloneMuonFilter::getTotalChamberUsed ( ) const [inline]

Definition at line 64 of file StandAloneMuonFilter.h.

References totalChambers.

{return totalChambers;}
int StandAloneMuonFilter::getTotalCompatibleChambers ( ) const [inline]
bool StandAloneMuonFilter::goodState ( ) const [inline]

Definition at line 74 of file StandAloneMuonFilter.h.

References cscChambers, dtChambers, onlyRPC(), and totalChambers.

                                {return totalChambers >= 2 && 
                                   ((dtChambers + cscChambers) >0 ||
                                    onlyRPC());}
void StandAloneMuonFilter::incrementChamberCounters ( const DetLayer layer) [private]

Increment the DT,CSC,RPC counters.

Definition at line 141 of file StandAloneMuonFilter.cc.

References CSC(), cscChambers, GeomDetEnumerators::DT, dtChambers, GeomDetEnumerators::RPCBarrel, rpcChambers, GeomDetEnumerators::RPCEndcap, DetLayer::subDetector(), and totalChambers.

Referenced by refit().

                                                                        {

  if(layer->subDetector()==GeomDetEnumerators::DT) dtChambers++; 
  else if(layer->subDetector()==GeomDetEnumerators::CSC) cscChambers++; 
  else if(layer->subDetector()==GeomDetEnumerators::RPCBarrel || layer->subDetector()==GeomDetEnumerators::RPCEndcap) rpcChambers++; 
  else 
    LogError("Muon|RecoMuon|StandAloneMuonFilter")
      << "Unrecognized module type in incrementChamberCounters";
  // FIXME:
  //   << layer->module() << " " <<layer->Part() << endl;
  
  totalChambers++;
}
void StandAloneMuonFilter::incrementCompatibleChamberCounters ( const DetLayer layer) [private]
bool StandAloneMuonFilter::isCompatibilitySatisfied ( ) const [inline]
FreeTrajectoryState StandAloneMuonFilter::lastButOneUpdatedFTS ( ) const [inline]

the last but one free trajectory state

Definition at line 48 of file StandAloneMuonFilter.h.

References TrajectoryStateOnSurface::freeTrajectoryState(), and theLastButOneUpdatedTSOS.

TrajectoryStateOnSurface StandAloneMuonFilter::lastButOneUpdatedTSOS ( ) const [inline]

the Trajectory state on the last surface of the fitting

Definition at line 57 of file StandAloneMuonFilter.h.

References theLastButOneUpdatedTSOS.

TrajectoryStateOnSurface StandAloneMuonFilter::lastCompatibleTSOS ( ) const [inline]

the Trajectory state on the last compatible surface

Definition at line 51 of file StandAloneMuonFilter.h.

References theLastCompatibleTSOS.

Referenced by StandAloneMuonTrajectoryBuilder::trajectories().

const DetLayer* StandAloneMuonFilter::lastDetLayer ( ) const [inline]

return the last det layer

Definition at line 86 of file StandAloneMuonFilter.h.

References theDetLayers.

{return theDetLayers.back();}
FreeTrajectoryState StandAloneMuonFilter::lastUpdatedFTS ( ) const [inline]

the last free trajectory state

Definition at line 45 of file StandAloneMuonFilter.h.

References TrajectoryStateOnSurface::freeTrajectoryState(), and theLastUpdatedTSOS.

TrajectoryStateOnSurface StandAloneMuonFilter::lastUpdatedTSOS ( ) const [inline]

the Trajectory state on the last surface of the fitting

Definition at line 54 of file StandAloneMuonFilter.h.

References theLastUpdatedTSOS.

Referenced by StandAloneMuonTrajectoryBuilder::trajectories().

std::vector<const DetLayer*> StandAloneMuonFilter::layers ( ) const [inline]

return the layer used for the refit

Definition at line 83 of file StandAloneMuonFilter.h.

References theDetLayers.

{return theDetLayers;}
bool StandAloneMuonFilter::onlyRPC ( ) const [inline]

True if there are only the RPC measurements.

Definition at line 95 of file StandAloneMuonFilter.h.

References theRPCLoneliness.

Referenced by goodState(), and isCompatibilitySatisfied().

{return theRPCLoneliness;}
PropagationDirection StandAloneMuonFilter::propagationDirection ( void  ) const

Return the propagation direction.

Definition at line 118 of file StandAloneMuonFilter.cc.

References alongMomentum, anyDirection, fitDirection(), and oppositeToMomentum.

Referenced by refit().

                                                                     {
  if( fitDirection() == 0 ) return alongMomentum;
  else if ( fitDirection() == 1 ) return oppositeToMomentum;
  else return anyDirection;
}
const Propagator * StandAloneMuonFilter::propagator ( void  ) const

access at the propagator

Definition at line 113 of file StandAloneMuonFilter.cc.

References thePropagatorName, and theService.

Referenced by findBestMeasurements(), and update().

                                                         { 
  return &*theService->propagator(thePropagatorName); 
}
void StandAloneMuonFilter::refit ( const TrajectoryStateOnSurface initialState,
const DetLayer initialLayer,
Trajectory trajectory 
)

Perform the inner-outward fitting.

Definition at line 191 of file StandAloneMuonFilter.cc.

References compatibleLayers(), debug, MuonPatternRecoDumper::dumpLayer(), PV3DBase< T, PVType, FrameType >::eta(), findBestMeasurements(), TrajectoryStateOnSurface::freeTrajectoryState(), TrajectoryStateOnSurface::globalPosition(), incrementChamberCounters(), incrementCompatibleChamberCounters(), LogTrace, metname, FreeTrajectoryState::momentum(), propagationDirection(), reset(), theDetLayers, theLastButOneUpdatedTSOS, theLastCompatibleTSOS, theLastUpdatedTSOS, and update().

Referenced by StandAloneMuonTrajectoryBuilder::trajectories().

                                                                                        {
  
  const std::string metname = "Muon|RecoMuon|StandAloneMuonFilter";

  // reset the refitter each seed refinement
  reset();
  
  MuonPatternRecoDumper debug;
  
  LogTrace(metname) << "Starting the refit"<<endl; 

  // this is the most outward TSOS (updated or predicted) onto a DetLayer
  TrajectoryStateOnSurface lastTSOS = theLastCompatibleTSOS = theLastUpdatedTSOS = theLastButOneUpdatedTSOS = initialTSOS;
  
  double eta0 = initialTSOS.freeTrajectoryState()->momentum().eta();
  vector<const DetLayer*> detLayers = compatibleLayers(initialLayer,*initialTSOS.freeTrajectoryState(),
                                                       propagationDirection());  
  
  LogTrace(metname)<<"compatible layers found: "<<detLayers.size()<<endl;
  
  vector<const DetLayer*>::const_iterator layer;

  // the layers are ordered in agreement with the fit/propagation direction 
  for ( layer = detLayers.begin(); layer!= detLayers.end(); ++layer ) {
    
    //    bool firstTime = true;

    LogTrace(metname) << debug.dumpLayer(*layer);
    
    LogTrace(metname) << "search Trajectory Measurement from: " << lastTSOS.globalPosition();
    
    // pick the best measurement from each group
    std::vector<TrajectoryMeasurement> bestMeasurements = findBestMeasurements(*layer, lastTSOS);

    // RB: Different ways can be choosen if no bestMeasurement is available:
    // 1- check on lastTSOS-initialTSOS eta difference
    // 2- check on lastTSOS-lastButOneUpdatedTSOS eta difference
    // After this choice:
    // A- extract the measurements compatible with the initialTSOS (seed)
    // B- extract the measurements compatible with the lastButOneUpdatedTSOS
    // In ORCA the choice was 1A. Here I will try 1B and if it fail I'll try 1A
    // another possibility could be 2B and then 1A.

    // if no measurement found and the current TSOS has an eta very different
    // wrt the initial one (i.e. seed), then try to find the measurements
    // according to the lastButOne FTS. (1B)
    double lastdEta = fabs(lastTSOS.freeTrajectoryState()->momentum().eta() - eta0);
    if( bestMeasurements.empty() && lastdEta > 0.1) {
      LogTrace(metname) << "No measurement and big eta variation wrt seed" << endl
                        << "trying with lastButOneUpdatedTSOS";
      bestMeasurements = findBestMeasurements(*layer, theLastButOneUpdatedTSOS);
    }
    
    //if no measurement found and the current FTS has an eta very different
    //wrt the initial one (i.e. seed), then try to find the measurements
    //according to the initial FTS. (1A)
    if( bestMeasurements.empty() && lastdEta > 0.1) {
      LogTrace(metname) << "No measurement and big eta variation wrt seed" << endl
                        << "tryng with seed TSOS";
      bestMeasurements = findBestMeasurements(*layer, initialTSOS);
    }
    
    // FIXME: uncomment this line!!
    // if(!bestMeasurement && firstTime) break;

    if(!bestMeasurements.empty()) {
      incrementCompatibleChamberCounters(*layer);
      bool added = false;
      for(std::vector<TrajectoryMeasurement>::const_iterator tmItr = bestMeasurements.begin();
          tmItr != bestMeasurements.end(); ++tmItr){
        added |= update(*layer, &(*tmItr), trajectory);
        lastTSOS = theLastUpdatedTSOS;
      }
      if(added) {
        incrementChamberCounters(*layer);
        theDetLayers.push_back(*layer);
      }
    }
    // SL in case no valid mesurement is found, still I want to use the predicted
    // state for the following measurement serches. I take the first in the
    // container. FIXME!!! I want to carefully check this!!!!!
    else{
      LogTrace(metname)<<"No best measurement found"<<endl;
      //       if (!theMeasurementCache.empty()){
      //        LogTrace(metname)<<"but the #of measurement is "<<theMeasurementCache.size()<<endl;
      //         lastTSOS = theMeasurementCache.front().predictedState();
      //       }
    }
  } // loop over layers
}
void StandAloneMuonFilter::reset ( void  )
void StandAloneMuonFilter::setEvent ( const edm::Event event) [virtual]

Pass the Event to the algo at each event.

Definition at line 136 of file StandAloneMuonFilter.cc.

References MuonDetLayerMeasurements::setEvent(), and theMeasurementExtractor.

Referenced by StandAloneMuonTrajectoryBuilder::setEvent().

void StandAloneMuonFilter::setLastButOneUpdatedTSOS ( TrajectoryStateOnSurface  tsos) [inline, private]

Set the last but one TSOS.

Definition at line 120 of file StandAloneMuonFilter.h.

References theLastButOneUpdatedTSOS.

void StandAloneMuonFilter::setLastCompatibleTSOS ( TrajectoryStateOnSurface  tsos) [inline, private]

Set the last compatible TSOS.

Definition at line 114 of file StandAloneMuonFilter.h.

References theLastCompatibleTSOS.

void StandAloneMuonFilter::setLastUpdatedTSOS ( TrajectoryStateOnSurface  tsos) [inline, private]

Set the last TSOS.

Definition at line 117 of file StandAloneMuonFilter.h.

References theLastUpdatedTSOS.

{ theLastUpdatedTSOS = tsos;}
bool StandAloneMuonFilter::update ( const DetLayer layer,
const TrajectoryMeasurement meas,
Trajectory trajectory 
) [private]

Definition at line 332 of file StandAloneMuonFilter.cc.

References debug, MuonPatternRecoDumper::dumpTSOS(), LogTrace, metname, propagator(), query::result, theLastButOneUpdatedTSOS, theLastCompatibleTSOS, theLastUpdatedTSOS, MuonTrajectoryUpdator::update(), and updator().

Referenced by refit().

{
  const std::string metname = "Muon|RecoMuon|StandAloneMuonFilter";
  MuonPatternRecoDumper debug;

  LogTrace(metname)<<"best measurement found" << "\n"
                   <<"updating the trajectory..."<<endl;
  pair<bool,TrajectoryStateOnSurface> result = updator()->update(meas,
                                                                 trajectory,
                                                                 propagator());
  LogTrace(metname)<<"trajectory updated: "<<result.first<<endl;
  LogTrace(metname) << debug.dumpTSOS(result.second);

  if(result.first){
    theLastButOneUpdatedTSOS = theLastUpdatedTSOS;
    theLastUpdatedTSOS = result.second;
  }

  if(result.second.isValid())
    theLastCompatibleTSOS = result.second;

  return result.first;
}
MuonTrajectoryUpdator* StandAloneMuonFilter::updator ( ) const [inline]

access at the muon updator

Definition at line 104 of file StandAloneMuonFilter.h.

References theMuonUpdator.

Referenced by update().

{return theMuonUpdator;}

Member Data Documentation

Definition at line 186 of file StandAloneMuonFilter.h.

Referenced by getRPCChamberUsed(), incrementChamberCounters(), and reset().

The best measurement finder: search for the best measurement among the TMs available.

Definition at line 157 of file StandAloneMuonFilter.h.

Referenced by bestMeasurementFinder(), StandAloneMuonFilter(), and ~StandAloneMuonFilter().

std::vector<const DetLayer*> StandAloneMuonFilter::theDetLayers [private]

the det layer used in the reconstruction

Definition at line 171 of file StandAloneMuonFilter.h.

Referenced by lastDetLayer(), layers(), refit(), and reset().

The Estimator.

Definition at line 149 of file StandAloneMuonFilter.h.

Referenced by estimator(), StandAloneMuonFilter(), and ~StandAloneMuonFilter().

the propagation direction

Definition at line 168 of file StandAloneMuonFilter.h.

Referenced by findBestMeasurements(), fitDirection(), and StandAloneMuonFilter().

the trajectory state on the last but one available surface

Definition at line 143 of file StandAloneMuonFilter.h.

Referenced by lastButOneUpdatedFTS(), lastButOneUpdatedTSOS(), refit(), reset(), setLastButOneUpdatedTSOS(), and update().

the trajectory state on the last compatible surface

Definition at line 139 of file StandAloneMuonFilter.h.

Referenced by lastCompatibleTSOS(), refit(), reset(), setLastCompatibleTSOS(), and update().

the trajectory state on the last available surface

Definition at line 141 of file StandAloneMuonFilter.h.

Referenced by lastUpdatedFTS(), lastUpdatedTSOS(), refit(), reset(), setLastUpdatedTSOS(), and update().

The max allowed chi2 to accept a rechit in the fit.

Definition at line 162 of file StandAloneMuonFilter.h.

Referenced by StandAloneMuonFilter().

the muon updator (it doesn't inhert from an updator, but it has one!)

Definition at line 152 of file StandAloneMuonFilter.h.

Referenced by reset(), StandAloneMuonFilter(), updator(), and ~StandAloneMuonFilter().

its name

Definition at line 154 of file StandAloneMuonFilter.h.

Navigation type "Direct","Standard"

Definition at line 178 of file StandAloneMuonFilter.h.

Referenced by compatibleLayers(), and StandAloneMuonFilter().

The errors of the trajectory state are multiplied by nSigma to define acceptance of BoundPlane and maximalLocalDisplacement

Definition at line 165 of file StandAloneMuonFilter.h.

Referenced by StandAloneMuonFilter().

Definition at line 194 of file StandAloneMuonFilter.h.

Referenced by findBestMeasurements().

the propagator name

Definition at line 174 of file StandAloneMuonFilter.h.

Referenced by propagator(), and StandAloneMuonFilter().

True if there are only the RPC measurements.

Definition at line 181 of file StandAloneMuonFilter.h.

Referenced by onlyRPC(), and StandAloneMuonFilter().

Definition at line 193 of file StandAloneMuonFilter.h.

Referenced by compatibleLayers(), and propagator().