CMS 3D CMS Logo

Public Member Functions | Private Attributes

EtaPhiEstimator Class Reference

#include <EtaPhiEstimator.h>

Inheritance diagram for EtaPhiEstimator:
Chi2MeasurementEstimatorBase MeasurementEstimator

List of all members.

Public Member Functions

virtual EtaPhiEstimatorclone () const
virtual std::pair< bool, double > estimate (const TrajectoryStateOnSurface &tsos, const TransientTrackingRecHit &aRecHit) const
 EtaPhiEstimator (double eta, double phi, const Chi2MeasurementEstimatorBase *estimator)

Private Attributes

const
Chi2MeasurementEstimatorBase
estimator_
double thedEta
double thedEta2
double thedPhi
double thedPhi2

Detailed Description

Definition at line 5 of file EtaPhiEstimator.h.


Constructor & Destructor Documentation

EtaPhiEstimator::EtaPhiEstimator ( double  eta,
double  phi,
const Chi2MeasurementEstimatorBase estimator 
) [inline, explicit]

Construct with cuts on chi2 and nSigma. The cut on Chi2 is used to define the acceptance of RecHits. The errors of the trajectory state are multiplied by nSigma to define acceptance of BoundPlane and maximalLocalDisplacement.

Definition at line 13 of file EtaPhiEstimator.h.

Referenced by clone().


Member Function Documentation

virtual EtaPhiEstimator* EtaPhiEstimator::clone ( void  ) const [inline, virtual]

Implements MeasurementEstimator.

Definition at line 45 of file EtaPhiEstimator.h.

References EtaPhiEstimator().

                                           {
      return new EtaPhiEstimator(*this);
    }
virtual std::pair<bool,double> EtaPhiEstimator::estimate ( const TrajectoryStateOnSurface ts,
const TransientTrackingRecHit hit 
) const [inline, virtual]

Returns pair( true, value) if the TrajectoryStateOnSurface is compatible with the RecHit, and pair( false, value) if it is not compatible. The TrajectoryStateOnSurface must be on the same Surface as the RecHit. For an estimator where there is no value computed, e.g. fixed window estimator, only the first(bool) part is of interest.

Implements Chi2MeasurementEstimatorBase.

Definition at line 24 of file EtaPhiEstimator.h.

References CastorDataFrameFilter_impl::check(), dPhi(), Chi2MeasurementEstimatorBase::estimate(), estimator_, PV3DBase< T, PVType, FrameType >::eta(), TrajectoryStateOnSurface::globalPosition(), TransientTrackingRecHit::globalPosition(), LogDebug, PV3DBase< T, PVType, FrameType >::phi(), thedEta2, and thedPhi2.

                                                                                         {
      
      std::pair<bool,double> primaryResult = estimator_->estimate(tsos,aRecHit);

      double dEta = fabs(tsos.globalPosition().eta() - aRecHit.globalPosition().eta());
      double dPhi = deltaPhi< double > (tsos.globalPosition().phi(), aRecHit.globalPosition().phi());

      double check = (dEta*dEta)/(thedEta2) + (dPhi*dPhi)/(thedPhi2);
      
      LogDebug("EtaPhiMeasurementEstimator")<< " The state to compare with is \n"<< tsos
                                            << " The hit position is:\n" << aRecHit.globalPosition()
                                            << " deta: "<< dEta<< " dPhi: "<<dPhi<<" check: "<<check<<" primaryly: "<< primaryResult.second;

      if (check <= 1)
        //      if (dEta < thedEta && dPhi <thedPhi)
        return std::make_pair(true, primaryResult.second);
      else
        return std::make_pair(false, primaryResult.second);
    }

Member Data Documentation

Definition at line 50 of file EtaPhiEstimator.h.

Referenced by estimate().

double EtaPhiEstimator::thedEta [private]

Definition at line 51 of file EtaPhiEstimator.h.

double EtaPhiEstimator::thedEta2 [private]

Definition at line 51 of file EtaPhiEstimator.h.

Referenced by estimate().

double EtaPhiEstimator::thedPhi [private]

Definition at line 51 of file EtaPhiEstimator.h.

double EtaPhiEstimator::thedPhi2 [private]

Definition at line 51 of file EtaPhiEstimator.h.

Referenced by estimate().