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 Reference

#include <EtaPhiMeasurementEstimator.h>

Inheritance diagram for EtaPhiMeasurementEstimator:
Chi2MeasurementEstimatorBase MeasurementEstimator

Public Member Functions

EtaPhiMeasurementEstimatorclone () const
 
std::pair< bool, double > estimate (const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const
 
virtual bool estimate (const TrajectoryStateOnSurface &tsos, const BoundPlane &plane) const
 
 EtaPhiMeasurementEstimator (double dEta, double dPhi)
 
virtual Local2DVector maximalLocalDisplacement (const TrajectoryStateOnSurface &tsos, const BoundPlane &plane) const
 
 ~EtaPhiMeasurementEstimator ()
 
- Public Member Functions inherited from Chi2MeasurementEstimatorBase
 Chi2MeasurementEstimatorBase (double maxChi2, double nSigma=3.)
 
double chiSquaredCut () const
 
double nSigmaCut () const
 
- Public Member Functions inherited from MeasurementEstimator
virtual ~MeasurementEstimator ()
 

Private Attributes

double thedEta
 
double thedPhi
 

Additional Inherited Members

- Public Types inherited from MeasurementEstimator
typedef std::pair< bool, double > HitReturnType
 
typedef Vector2DBase< float,
LocalTag
Local2DVector
 
typedef bool SurfaceReturnType
 
- Protected Member Functions inherited from Chi2MeasurementEstimatorBase
std::pair< bool, double > returnIt (double est) const
 

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 
)
inlineexplicit

Definition at line 20 of file EtaPhiMeasurementEstimator.h.

Referenced by clone().

20  :
22  thedEta(dEta),
23  thedPhi(dPhi)
24  {}
Chi2MeasurementEstimatorBase(double maxChi2, double nSigma=3.)
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
EtaPhiMeasurementEstimator::~EtaPhiMeasurementEstimator ( )
inline

Definition at line 25 of file EtaPhiMeasurementEstimator.h.

25 {}

Member Function Documentation

EtaPhiMeasurementEstimator* EtaPhiMeasurementEstimator::clone ( void  ) const
inlinevirtual

Implements MeasurementEstimator.

Definition at line 36 of file EtaPhiMeasurementEstimator.h.

References EtaPhiMeasurementEstimator().

36  {
37  return new EtaPhiMeasurementEstimator(*this);
38  }
EtaPhiMeasurementEstimator(double dEta, double dPhi)
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(), TransientTrackingRecHit::globalPosition(), TrajectoryStateOnSurface::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 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.

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:68
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
T eta() const
Definition: PV3DBase.h:75
const PositionType & position() const
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.

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

Member Data Documentation

double EtaPhiMeasurementEstimator::thedEta
private

Definition at line 40 of file EtaPhiMeasurementEstimator.h.

Referenced by estimate().

double EtaPhiMeasurementEstimator::thedPhi
private

Definition at line 41 of file EtaPhiMeasurementEstimator.h.

Referenced by estimate().