CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
EtaPhiMeasurementEstimator Class Referencefinal

#include <EtaPhiMeasurementEstimator.h>

Inheritance diagram for EtaPhiMeasurementEstimator:
MeasurementEstimator

Public Member Functions

EtaPhiMeasurementEstimatorclone () const
 
std::pair< bool, double > estimate (const TrajectoryStateOnSurface &, const TrackingRecHit &) const
 
virtual bool estimate (const TrajectoryStateOnSurface &tsos, const Plane &plane) const
 
 EtaPhiMeasurementEstimator (double dEta, double dPhi)
 
virtual Local2DVector maximalLocalDisplacement (const TrajectoryStateOnSurface &tsos, const Plane &plane) const
 
 ~EtaPhiMeasurementEstimator ()
 
- Public Member Functions inherited from MeasurementEstimator
float maxSagitta () const
 
 MeasurementEstimator ()
 
 MeasurementEstimator (float maxSag, float minToll)
 
float minTolerance2 () const
 
virtual bool preFilter (const TrajectoryStateOnSurface &, OpaquePayload const &) const
 
virtual ~MeasurementEstimator ()
 

Private Attributes

double thedEta
 
double thedPhi
 

Additional Inherited Members

- Public Types inherited from MeasurementEstimator
using HitReturnType = std::pair< bool, double >
 
using Local2DVector = Vector2DBase< float, LocalTag >
 
using SurfaceReturnType = bool
 

Detailed Description

A EtaPhi Measurement Estimator. Computhes the Chi^2 of a TrajectoryState with a RecHit or a Plane. The TrajectoryState must have errors. Works for any RecHit dimension. Ported from ORCA.

tschudi

Definition at line 15 of file EtaPhiMeasurementEstimator.h.

Constructor & Destructor Documentation

EtaPhiMeasurementEstimator::EtaPhiMeasurementEstimator ( double  dEta,
double  dPhi 
)
inlineexplicit

Definition at line 18 of file EtaPhiMeasurementEstimator.h.

Referenced by clone().

18  :
19  thedEta(dEta),
20  thedPhi(dPhi)
21  {}
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
EtaPhiMeasurementEstimator::~EtaPhiMeasurementEstimator ( )
inline

Definition at line 22 of file EtaPhiMeasurementEstimator.h.

22 {}

Member Function Documentation

EtaPhiMeasurementEstimator* EtaPhiMeasurementEstimator::clone ( void  ) const
inlinevirtual

Implements MeasurementEstimator.

Definition at line 33 of file EtaPhiMeasurementEstimator.h.

References EtaPhiMeasurementEstimator().

33  {
34  return new EtaPhiMeasurementEstimator(*this);
35  }
EtaPhiMeasurementEstimator(double dEta, double dPhi)
std::pair< bool, double > EtaPhiMeasurementEstimator::estimate ( const TrajectoryStateOnSurface ts,
const TrackingRecHit hit 
) const
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 MeasurementEstimator.

Definition at line 10 of file EtaPhiMeasurementEstimator.cc.

References dPhi(), PV3DBase< T, PVType, FrameType >::eta(), TrajectoryStateOnSurface::globalPosition(), TrackingRecHit::globalPosition(), LogDebug, PV3DBase< T, PVType, FrameType >::phi(), thedEta, and thedPhi.

11  {
12 
13  double dEta = fabs(tsos.globalPosition().eta() - aRecHit.globalPosition().eta());
14  double dPhi = deltaPhi< double > (tsos.globalPosition().phi(), aRecHit.globalPosition().phi());
15 
16  LogDebug("EtaPhiMeasurementEstimator")<< " The state to compare with is \n"<< tsos
17  << " The hit position is:\n" << aRecHit.globalPosition()
18  << " deta: "<< dEta<< " dPhi: "<<dPhi;
19 
20  if (dEta < thedEta && dPhi <thedPhi)
21  return std::make_pair(true, 1.0);
22  else
23  return std::make_pair(false, 0.0);
24 }
#define LogDebug(id)
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
bool EtaPhiMeasurementEstimator::estimate ( const TrajectoryStateOnSurface ts,
const Plane plane 
) const
virtual

Returns true if the TrajectoryStateOnSurface is compatible with the Plane, false otherwise. The TrajectoryStateOnSurface must be on the plane.

Implements MeasurementEstimator.

Definition at line 26 of file EtaPhiMeasurementEstimator.cc.

References dPhi(), PV3DBase< T, PVType, FrameType >::eta(), TrajectoryStateOnSurface::globalPosition(), LogDebug, PV3DBase< T, PVType, FrameType >::phi(), GloballyPositioned< T >::position(), thedEta, and thedPhi.

27  {
28 
29  double dEta = fabs(tsos.globalPosition().eta() - plane.position().eta());
30  double dPhi = deltaPhi< double > (tsos.globalPosition().phi(), plane.position().phi());
31 
32  LogDebug("EtaPhiMeasurementEstimator")<< "The state to compare with is \n"<< tsos << "\n"
33  << "The plane position center is: " << plane.position() << "\n"
34  << "the deta = " << thedEta << " --- the dPhi = " << thedPhi << "\n"
35  << "deta = "<< fabs(dEta)<< " --- dPhi = "<<fabs(dPhi);
36 
37  if (fabs(dEta) < thedEta && fabs(dPhi) <thedPhi)
38  return true;
39  else
40  return false;
41 }
#define LogDebug(id)
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
T eta() const
Definition: PV3DBase.h:76
const PositionType & position() const
MeasurementEstimator::Local2DVector EtaPhiMeasurementEstimator::maximalLocalDisplacement ( const TrajectoryStateOnSurface ts,
const Plane plane 
) const
virtual

Returns the size of the compatibility region around the local position of the TrajectoryStateOnSurface along the directions of local x and y axis. The TrajectoryStateOnSurface must be on the plane. This method allows to limit the search for compatible detectors or RecHits. The MeasurementEstimator should not return "true" for any RecHit or Plane which is entirely outside of the compatibility region defined by maximalLocalDisplacement().

Implements MeasurementEstimator.

Definition at line 43 of file EtaPhiMeasurementEstimator.cc.

44  {
45 
46  return Local2DVector(30., 30.);
47 }
Vector2DBase< float, LocalTag > Local2DVector

Member Data Documentation

double EtaPhiMeasurementEstimator::thedEta
private

Definition at line 37 of file EtaPhiMeasurementEstimator.h.

Referenced by estimate().

double EtaPhiMeasurementEstimator::thedPhi
private

Definition at line 38 of file EtaPhiMeasurementEstimator.h.

Referenced by estimate().