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 override
 
std::pair< bool, double > estimate (const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
 
bool estimate (const TrajectoryStateOnSurface &tsos, const Plane &plane) const override
 
 EtaPhiMeasurementEstimator (float dEta, float dPhi)
 
Local2DVector maximalLocalDisplacement (const TrajectoryStateOnSurface &tsos, const Plane &plane) const override
 
 ~EtaPhiMeasurementEstimator () override
 
- 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::EtaPhiMeasurementEstimator ( float  dEta,
float  dPhi 
)
inlineexplicit

◆ ~EtaPhiMeasurementEstimator()

EtaPhiMeasurementEstimator::~EtaPhiMeasurementEstimator ( )
inlineoverride

Definition at line 18 of file EtaPhiMeasurementEstimator.h.

18 {}

Member Function Documentation

◆ clone()

EtaPhiMeasurementEstimator* EtaPhiMeasurementEstimator::clone ( void  ) const
inlineoverridevirtual

Implements MeasurementEstimator.

Definition at line 26 of file EtaPhiMeasurementEstimator.h.

References EtaPhiMeasurementEstimator().

26 { return new EtaPhiMeasurementEstimator(*this); }
EtaPhiMeasurementEstimator(float dEta, float dPhi)

◆ estimate() [1/2]

std::pair< bool, double > EtaPhiMeasurementEstimator::estimate ( const TrajectoryStateOnSurface ts,
const TrackingRecHit hit 
) const
overridevirtual

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 9 of file EtaPhiMeasurementEstimator.cc.

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

◆ estimate() [2/2]

bool EtaPhiMeasurementEstimator::estimate ( const TrajectoryStateOnSurface ts,
const Plane plane 
) const
overridevirtual

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

Implements MeasurementEstimator.

Definition at line 31 of file EtaPhiMeasurementEstimator.cc.

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

31  {
32  auto dEta = std::abs(tsos.globalPosition().eta() - plane.eta());
33  auto dPhi = std::abs(deltaPhi(tsos.globalPosition().barePhi(), plane.phi()));
34 
35  LogDebug("EtaPhiMeasurementEstimator") << "The state to compare with is \n"
36  << tsos << "\n"
37  << "The plane position center is: " << plane.position() << "\n"
38  << "the deta = " << thedEta << " --- the dPhi = " << thedPhi << "\n"
39  << "deta = " << fabs(dEta) << " --- dPhi = " << fabs(dPhi);
40 
41  // does not take into account bounds... (not sure it was intentional)
42  return (dEta < thedEta) & (dPhi < thedPhi);
43 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const PositionType & position() const
#define LogDebug(id)

◆ maximalLocalDisplacement()

MeasurementEstimator::Local2DVector EtaPhiMeasurementEstimator::maximalLocalDisplacement ( const TrajectoryStateOnSurface ts,
const Plane plane 
) const
overridevirtual

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 45 of file EtaPhiMeasurementEstimator.cc.

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

Member Data Documentation

◆ thedEta

float EtaPhiMeasurementEstimator::thedEta
private

Definition at line 29 of file EtaPhiMeasurementEstimator.h.

Referenced by estimate().

◆ thedPhi

float EtaPhiMeasurementEstimator::thedPhi
private

Definition at line 30 of file EtaPhiMeasurementEstimator.h.

Referenced by estimate().