CMS 3D CMS Logo

Public Member Functions | Private Attributes

EtaPhiMeasurementEstimator Class Reference

#include <EtaPhiMeasurementEstimator.h>

Inheritance diagram for EtaPhiMeasurementEstimator:
Chi2MeasurementEstimatorBase MeasurementEstimator

List of all members.

Public Member Functions

EtaPhiMeasurementEstimatorclone () const
virtual bool estimate (const TrajectoryStateOnSurface &tsos, const BoundPlane &plane) const
std::pair< bool, double > estimate (const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const
 EtaPhiMeasurementEstimator (double dEta, double dPhi)
virtual Local2DVector maximalLocalDisplacement (const TrajectoryStateOnSurface &tsos, const BoundPlane &plane) const
 ~EtaPhiMeasurementEstimator ()

Private Attributes

double thedEta
double thedPhi

Detailed Description

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

Date:
2011/05/27 11:40:01
Revision:
1.1

tschudi

Definition at line 17 of file EtaPhiMeasurementEstimator.h.


Constructor & Destructor Documentation

EtaPhiMeasurementEstimator::EtaPhiMeasurementEstimator ( double  dEta,
double  dPhi 
) [inline, explicit]

Definition at line 20 of file EtaPhiMeasurementEstimator.h.

Referenced by clone().

EtaPhiMeasurementEstimator::~EtaPhiMeasurementEstimator ( ) [inline]

Definition at line 25 of file EtaPhiMeasurementEstimator.h.

{}

Member Function Documentation

EtaPhiMeasurementEstimator* EtaPhiMeasurementEstimator::clone ( void  ) const [inline, virtual]

Implements MeasurementEstimator.

Definition at line 36 of file EtaPhiMeasurementEstimator.h.

References EtaPhiMeasurementEstimator().

                                            {
    return new EtaPhiMeasurementEstimator(*this);
  }
bool EtaPhiMeasurementEstimator::estimate ( const TrajectoryStateOnSurface ts,
const BoundPlane plane 
) const [virtual]

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

Reimplemented from Chi2MeasurementEstimatorBase.

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.

                                                                  {

  double dEta = fabs(tsos.globalPosition().eta() - plane.position().eta());
  double dPhi = deltaPhi< double > (tsos.globalPosition().phi(), plane.position().phi());

  LogDebug("EtaPhiMeasurementEstimator")<< "The state to compare with is \n"<< tsos << "\n"
                                        << "The plane position center is: " << plane.position() << "\n"
                                        << "the deta = " << thedEta << " --- the dPhi = " << thedPhi << "\n"
                                        << "deta = "<< fabs(dEta)<< " --- dPhi = "<<fabs(dPhi);

  if (fabs(dEta) < thedEta && fabs(dPhi) <thedPhi)
    return true;
  else
    return false;
}
std::pair< bool, double > EtaPhiMeasurementEstimator::estimate ( const TrajectoryStateOnSurface ts,
const TransientTrackingRecHit 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 Chi2MeasurementEstimatorBase.

Definition at line 10 of file EtaPhiMeasurementEstimator.cc.

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

                                                                                 {

  double dEta = fabs(tsos.globalPosition().eta() - aRecHit.globalPosition().eta());
  double dPhi = deltaPhi< double > (tsos.globalPosition().phi(), aRecHit.globalPosition().phi());

  LogDebug("EtaPhiMeasurementEstimator")<< " The state to compare with is \n"<< tsos
                                        << " The hit position is:\n" << aRecHit.globalPosition()
                                        << " deta: "<< dEta<< " dPhi: "<<dPhi;

  if (dEta < thedEta && dPhi <thedPhi)
    return std::make_pair(true, 1.0);
  else
    return std::make_pair(false, 0.0);
}
MeasurementEstimator::Local2DVector EtaPhiMeasurementEstimator::maximalLocalDisplacement ( const TrajectoryStateOnSurface ts,
const BoundPlane 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 BoundPlane which is entirely outside of the compatibility region defined by maximalLocalDisplacement().

Reimplemented from Chi2MeasurementEstimatorBase.

Definition at line 43 of file EtaPhiMeasurementEstimator.cc.

                                                                       {

  return  Local2DVector(30., 30.);
}

Member Data Documentation

Definition at line 40 of file EtaPhiMeasurementEstimator.h.

Referenced by estimate().

Definition at line 41 of file EtaPhiMeasurementEstimator.h.

Referenced by estimate().