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

Referenced by clone().

17  :
19  estimator->nSigmaCut()),
20  estimator_(estimator),
21  thedEta(eta),
22  thedPhi(phi),
23  thedEta2(eta*eta),
25  { }
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 48 of file EtaPhiEstimator.h.

References EtaPhiEstimator().

48  {
49  return new EtaPhiEstimator(*this);
50  }
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 27 of file EtaPhiEstimator.h.

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

28  {
29 
30  std::pair<bool,double> primaryResult = estimator_->estimate(tsos,aRecHit);
31 
32  double dEta = fabs(tsos.globalPosition().eta() - aRecHit.globalPosition().eta());
33  double dPhi = deltaPhi< double > (tsos.globalPosition().phi(), aRecHit.globalPosition().phi());
34 
35  double check = (dEta*dEta)/(thedEta2) + (dPhi*dPhi)/(thedPhi2);
36 
37  LogDebug("EtaPhiMeasurementEstimator")<< " The state to compare with is \n"<< tsos
38  << " The hit position is:\n" << aRecHit.globalPosition()
39  << " deta: "<< dEta<< " dPhi: "<<dPhi<<" check: "<<check<<" primaryly: "<< primaryResult.second;
40 
41  if (check <= 1)
42  // if (dEta < thedEta && dPhi <thedPhi)
43  return std::make_pair(true, primaryResult.second);
44  else
45  return std::make_pair(false, primaryResult.second);
46  }
#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 53 of file EtaPhiEstimator.h.

Referenced by estimate().

double EtaPhiEstimator::thedEta
private

Definition at line 54 of file EtaPhiEstimator.h.

double EtaPhiEstimator::thedEta2
private

Definition at line 54 of file EtaPhiEstimator.h.

Referenced by estimate().

double EtaPhiEstimator::thedPhi
private

Definition at line 54 of file EtaPhiEstimator.h.

double EtaPhiEstimator::thedPhi2
private

Definition at line 54 of file EtaPhiEstimator.h.

Referenced by estimate().