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
template<typename... Args>
 Chi2MeasurementEstimatorBase (double maxChi2, double nSigma, float maxDisp, Args &&... args)
 
 Chi2MeasurementEstimatorBase (double maxChi2, double nSigma=3., float maxDisp=std::numeric_limits< float >::max())
 
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 8 of file EtaPhiEstimator.h.

Constructor & Destructor Documentation

◆ EtaPhiEstimator()

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 15 of file EtaPhiEstimator.h.

16  : Chi2MeasurementEstimatorBase(estimator->chiSquaredCut(), estimator->nSigmaCut()),
18  thedEta(eta),
19  thedPhi(phi),
20  thedEta2(eta * eta),
21  thedPhi2(phi * phi) {}

Referenced by clone().

Member Function Documentation

◆ clone()

EtaPhiEstimator* EtaPhiEstimator::clone ( void  ) const
inlineoverridevirtual

Implements MeasurementEstimator.

Definition at line 43 of file EtaPhiEstimator.h.

43 { return new EtaPhiEstimator(*this); }

References EtaPhiEstimator().

◆ estimate()

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 23 of file EtaPhiEstimator.h.

23  {
24  std::pair<bool, double> primaryResult = estimator_->estimate(tsos, aRecHit);
25 
26  double dEta = fabs(tsos.globalPosition().eta() - aRecHit.globalPosition().eta());
27  double dPhi = deltaPhi<double>(tsos.globalPosition().phi(), aRecHit.globalPosition().phi());
28 
29  double check = (dEta * dEta) / (thedEta2) + (dPhi * dPhi) / (thedPhi2);
30 
31  LogDebug("EtaPhiMeasurementEstimator") << " The state to compare with is \n"
32  << tsos << " The hit position is:\n"
33  << aRecHit.globalPosition() << " deta: " << dEta << " dPhi: " << dPhi
34  << " check: " << check << " primaryly: " << primaryResult.second;
35 
36  if (check <= 1)
37  // if (dEta < thedEta && dPhi <thedPhi)
38  return std::make_pair(true, primaryResult.second);
39  else
40  return std::make_pair(false, primaryResult.second);
41  }

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

Member Data Documentation

◆ estimator_

const Chi2MeasurementEstimatorBase* EtaPhiEstimator::estimator_
private

Definition at line 46 of file EtaPhiEstimator.h.

Referenced by estimate().

◆ thedEta

double EtaPhiEstimator::thedEta
private

Definition at line 47 of file EtaPhiEstimator.h.

◆ thedEta2

double EtaPhiEstimator::thedEta2
private

Definition at line 47 of file EtaPhiEstimator.h.

Referenced by estimate().

◆ thedPhi

double EtaPhiEstimator::thedPhi
private

Definition at line 47 of file EtaPhiEstimator.h.

◆ thedPhi2

double EtaPhiEstimator::thedPhi2
private

Definition at line 47 of file EtaPhiEstimator.h.

Referenced by estimate().

Chi2MeasurementEstimatorBase::estimate
std::pair< bool, double > estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &) const override=0
EtaPhiEstimator::thedEta
double thedEta
Definition: EtaPhiEstimator.h:47
HLT_FULL_cff.dPhi
dPhi
Definition: HLT_FULL_cff.py:13695
RPCNoise_example.check
check
Definition: RPCNoise_example.py:71
PVValHelper::estimator
estimator
Definition: PVValidationHelpers.h:45
PVValHelper::eta
Definition: PVValidationHelpers.h:70
Chi2MeasurementEstimatorBase::Chi2MeasurementEstimatorBase
Chi2MeasurementEstimatorBase(double maxChi2, double nSigma=3., float maxDisp=std::numeric_limits< float >::max())
Definition: Chi2MeasurementEstimatorBase.h:21
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
EtaPhiEstimator::EtaPhiEstimator
EtaPhiEstimator(double eta, double phi, const Chi2MeasurementEstimatorBase *estimator)
Definition: EtaPhiEstimator.h:15
DDAxes::phi
EtaPhiEstimator::thedPhi2
double thedPhi2
Definition: EtaPhiEstimator.h:47
HLT_FULL_cff.dEta
dEta
Definition: HLT_FULL_cff.py:13694
EtaPhiEstimator::estimator_
const Chi2MeasurementEstimatorBase * estimator_
Definition: EtaPhiEstimator.h:46
EtaPhiEstimator::thedPhi
double thedPhi
Definition: EtaPhiEstimator.h:47
EtaPhiEstimator::thedEta2
double thedEta2
Definition: EtaPhiEstimator.h:47