CMS 3D CMS Logo

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 (float dEta, float 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 mpt)
 
float minPt2ForHitRecoveryInGluedDet () const
 
float minTolerance2 () const
 
virtual bool preFilter (const TrajectoryStateOnSurface &, OpaquePayload const &) const
 
virtual ~MeasurementEstimator ()
 

Private Attributes

float thedEta
 
float 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 ( float  dEta,
float  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.

References estimate(), and maximalLocalDisplacement().

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(float dEta, float 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.

Referenced by ~EtaPhiMeasurementEstimator().

11  {
12 
13  // As the center of the plane is in the region, no need to waste time to test the hit as well
14  return std::make_pair(true, 1.0);
15 
16  /* HERE AS THE SECOND LINE WAS BUGGY... (AND MAY BE NEEDED IF WE MODIFY THE ESTIMATE WRT PLANE TO ACCOUNT FOR DET SPAN
17 
18  auto dEta = std::abs(tsos.globalPosition().eta() - aRecHit.globalPosition().eta());
19  auto dPhi = std::abs(deltaPhi(tsos.globalPosition().barePhi(), aRecHit.globalPosition().barePhi()));
20 
21  LogDebug("EtaPhiMeasurementEstimator")<< " The state to compare with is \n"<< tsos
22  << " The hit position is:\n" << aRecHit.globalPosition()
23  << " deta: "<< dEta<< " dPhi: "<<dPhi;
24 
25  if ( (dEta < thedEta) & (dPhi <thedPhi) )
26  return std::make_pair(true, 1.0);
27  else
28  return std::make_pair(false, 0.0);
29 
30  */
31 
32 }
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 34 of file EtaPhiMeasurementEstimator.cc.

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

35  {
36 
37  auto dEta = std::abs(tsos.globalPosition().eta() - plane.eta());
38  auto dPhi = std::abs(deltaPhi(tsos.globalPosition().barePhi(), plane.phi()));
39 
40 
41  LogDebug("EtaPhiMeasurementEstimator")<< "The state to compare with is \n"<< tsos << "\n"
42  << "The plane position center is: " << plane.position() << "\n"
43  << "the deta = " << thedEta << " --- the dPhi = " << thedPhi << "\n"
44  << "deta = "<< fabs(dEta)<< " --- dPhi = "<<fabs(dPhi);
45 
46  // does not take into account bounds... (not sure it was intentional)
47  return (dEta < thedEta) & (dPhi <thedPhi);
48 }
#define LogDebug(id)
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
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 50 of file EtaPhiMeasurementEstimator.cc.

Referenced by ~EtaPhiMeasurementEstimator().

51  {
52 
53  return Local2DVector(30., 30.);
54 }
Vector2DBase< float, LocalTag > Local2DVector

Member Data Documentation

float EtaPhiMeasurementEstimator::thedEta
private

Definition at line 37 of file EtaPhiMeasurementEstimator.h.

Referenced by estimate().

float EtaPhiMeasurementEstimator::thedPhi
private

Definition at line 38 of file EtaPhiMeasurementEstimator.h.

Referenced by estimate().