CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
EtaPhiEstimator Class Reference

#include <EtaPhiEstimator.h>

Inheritance diagram for EtaPhiEstimator:
Chi2MeasurementEstimatorBase MeasurementEstimator

Public Member Functions

EtaPhiEstimatorclone () const override
 
std::pair< bool, double > estimate (const TrajectoryStateOnSurface &tsos, const TrackingRecHit &aRecHit) const override
 
 EtaPhiEstimator (double eta, double phi, const Chi2MeasurementEstimatorBase *estimator)
 
- Public Member Functions inherited from Chi2MeasurementEstimatorBase
 Chi2MeasurementEstimatorBase (double maxChi2, double nSigma=3., float maxDisp=std::numeric_limits< float >::max())
 
template<typename... Args>
 Chi2MeasurementEstimatorBase (double maxChi2, double nSigma, float maxDisp, Args &&...args)
 
double chiSquaredCut () const
 
bool estimate (const TrajectoryStateOnSurface &ts, const Plane &plane) const final
 
Local2DVector maximalLocalDisplacement (const TrajectoryStateOnSurface &ts, const Plane &plane) const final
 
double nSigmaCut () const
 
- Public Member Functions inherited from MeasurementEstimator
float maxSagitta () const
 
 MeasurementEstimator ()
 
 MeasurementEstimator (float maxSag, float minToll, float mpt)
 
float minPt2ForHitRecoveryInGluedDet () const
 
float minTolerance2 () const
 
virtual bool preFilter (const TrajectoryStateOnSurface &, OpaquePayload const &) const
 
virtual ~MeasurementEstimator ()
 

Private Attributes

const Chi2MeasurementEstimatorBaseestimator_
 
double thedEta
 
double thedEta2
 
double thedPhi
 
double thedPhi2
 

Additional Inherited Members

- Public Types inherited from MeasurementEstimator
using HitReturnType = std::pair< bool, double >
 
using Local2DVector = Vector2DBase< float, LocalTag >
 
using SurfaceReturnType = bool
 
- Protected Member Functions inherited from Chi2MeasurementEstimatorBase
std::pair< bool, double > returnIt (double est) const
 

Detailed Description

Definition at line 5 of file EtaPhiEstimator.h.

Constructor & Destructor Documentation

EtaPhiEstimator::EtaPhiEstimator ( double  eta,
double  phi,
const Chi2MeasurementEstimatorBase estimator 
)
inlineexplicit

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().

14  :
16  estimator->nSigmaCut()),
17  estimator_(estimator),
18  thedEta(eta),
19  thedPhi(phi),
20  thedEta2(eta*eta),
22  { }
Chi2MeasurementEstimatorBase(double maxChi2, double nSigma=3., float maxDisp=std::numeric_limits< float >::max())
const Chi2MeasurementEstimatorBase * estimator_

Member Function Documentation

EtaPhiEstimator* EtaPhiEstimator::clone ( void  ) const
inlineoverridevirtual

Implements MeasurementEstimator.

Definition at line 45 of file EtaPhiEstimator.h.

References EtaPhiEstimator().

45  {
46  return new EtaPhiEstimator(*this);
47  }
EtaPhiEstimator(double eta, double phi, const Chi2MeasurementEstimatorBase *estimator)
std::pair<bool,double> EtaPhiEstimator::estimate ( const TrajectoryStateOnSurface ts,
const TrackingRecHit hit 
) const
inlineoverridevirtual

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 trackerTree::check(), Chi2MeasurementEstimatorBase::estimate(), estimator_, PV3DBase< T, PVType, FrameType >::eta(), TrajectoryStateOnSurface::globalPosition(), TrackingRecHit::globalPosition(), LogDebug, PV3DBase< T, PVType, FrameType >::phi(), thedEta2, and thedPhi2.

25  {
26 
27  std::pair<bool,double> primaryResult = estimator_->estimate(tsos,aRecHit);
28 
29  double dEta = fabs(tsos.globalPosition().eta() - aRecHit.globalPosition().eta());
30  double dPhi = deltaPhi< double > (tsos.globalPosition().phi(), aRecHit.globalPosition().phi());
31 
32  double check = (dEta*dEta)/(thedEta2) + (dPhi*dPhi)/(thedPhi2);
33 
34  LogDebug("EtaPhiMeasurementEstimator")<< " The state to compare with is \n"<< tsos
35  << " The hit position is:\n" << aRecHit.globalPosition()
36  << " deta: "<< dEta<< " dPhi: "<<dPhi<<" check: "<<check<<" primaryly: "<< primaryResult.second;
37 
38  if (check <= 1)
39  // if (dEta < thedEta && dPhi <thedPhi)
40  return std::make_pair(true, primaryResult.second);
41  else
42  return std::make_pair(false, primaryResult.second);
43  }
#define LogDebug(id)
std::pair< bool, double > estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &) const override=0
const Chi2MeasurementEstimatorBase * estimator_
def check(config)
Definition: trackerTree.py:14

Member Data Documentation

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().