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

Referenced by clone().

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

Member Function Documentation

◆ clone()

EtaPhiEstimator* EtaPhiEstimator::clone ( void  ) const
inlineoverridevirtual

Implements MeasurementEstimator.

Definition at line 43 of file EtaPhiEstimator.h.

References EtaPhiEstimator().

43 { return new EtaPhiEstimator(*this); }
EtaPhiEstimator(double eta, double phi, const Chi2MeasurementEstimatorBase *estimator)

◆ 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.

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

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  }
const Chi2MeasurementEstimatorBase * estimator_
std::pair< bool, double > estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &) const override=0
#define LogDebug(id)

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