#include <EtaPhiEstimator.h>
Public Member Functions | |
virtual EtaPhiEstimator * | clone () 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 |
Definition at line 5 of file EtaPhiEstimator.h.
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().
: Chi2MeasurementEstimatorBase(estimator->chiSquaredCut(), estimator->nSigmaCut()), estimator_(estimator), thedEta(eta), thedPhi(phi), thedEta2(eta*eta), thedPhi2(phi*phi) { }
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); }
const Chi2MeasurementEstimatorBase* EtaPhiEstimator::estimator_ [private] |
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().