CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ForwardMeasurementEstimator Class Reference

#include <ForwardMeasurementEstimator.h>

Inheritance diagram for ForwardMeasurementEstimator:
MeasurementEstimator

Public Member Functions

ForwardMeasurementEstimatorclone () const override
 
std::pair< bool, double > estimate (const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const override
 
virtual std::pair< bool, double > estimate (const TrajectoryStateOnSurface &ts, const GlobalPoint &gp) const
 
virtual std::pair< bool, double > estimate (const GlobalPoint &vprim, const TrajectoryStateOnSurface &ts, const GlobalPoint &gp) const
 
bool estimate (const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const override
 
 ForwardMeasurementEstimator ()
 
 ForwardMeasurementEstimator (float phiMin, float phiMax, float rMin, float rMax)
 
MeasurementEstimator::Local2DVector maximalLocalDisplacement (const TrajectoryStateOnSurface &ts, const BoundPlane &plane) const override
 
void setPhiRange (float dummyphiMin, float dummyphiMax)
 
void setRRange (float rmin, float rmax)
 
void setRRangeI (float rmin, float rmax)
 
- Public Member Functions inherited from MeasurementEstimator
virtual SurfaceReturnType estimate (const TrajectoryStateOnSurface &ts, const Plane &plane) const =0
 
virtual Local2DVector maximalLocalDisplacement (const TrajectoryStateOnSurface &ts, const Plane &plane) const =0
 
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 thePhiMax
 
float thePhiMin
 
float theRMax
 
float theRMaxI
 
float theRMin
 
float theRMinI
 

Additional Inherited Members

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

Detailed Description

Description: Class defining the search area in the forward disks in the pixel match, ported from ORCA

Implementation: <Notes on="" implementation>="">

Description: MeasurementEstimator for Pixel Endcap, ported from ORCA

Implementation: <Notes on="" implementation>="">

Definition at line 26 of file ForwardMeasurementEstimator.h.

Constructor & Destructor Documentation

ForwardMeasurementEstimator::ForwardMeasurementEstimator ( )
inline

Definition at line 31 of file ForwardMeasurementEstimator.h.

Referenced by clone().

32  {}
ForwardMeasurementEstimator::ForwardMeasurementEstimator ( float  phiMin,
float  phiMax,
float  rMin,
float  rMax 
)
inline

Member Function Documentation

ForwardMeasurementEstimator* ForwardMeasurementEstimator::clone ( void  ) const
inlineoverridevirtual
std::pair< bool, double > ForwardMeasurementEstimator::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 27 of file ForwardMeasurementEstimator.cc.

References TrackingRecHit::det(), runTauDisplay::gp, TrackingRecHit::localPosition(), GeomDet::surface(), and Surface::toGlobal().

Referenced by estimate(), and setRRangeI().

28  {
29  LocalPoint lp = hit.localPosition();
30  GlobalPoint gp = hit.det()->surface().toGlobal( lp);
31  return estimate(ts,gp);
32 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:106
std::pair< bool, double > estimate(const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const override
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
const GeomDet * det() const
virtual LocalPoint localPosition() const =0
std::pair< bool, double > ForwardMeasurementEstimator::estimate ( const TrajectoryStateOnSurface ts,
const GlobalPoint gp 
) const
virtual

Definition at line 34 of file ForwardMeasurementEstimator.cc.

References funct::abs(), PV3DBase< T, PVType, FrameType >::barePhi(), estimate(), f, TrajectoryStateOnSurface::globalParameters(), normalizedPhi(), PV3DBase< T, PVType, FrameType >::perp(), GlobalTrajectoryParameters::position(), hfnoseDigiStudy_cfi::rMax, hfnoseDigiStudy_cfi::rMin, thePhiMax, thePhiMin, theRMax, theRMaxI, theRMin, theRMinI, and PV3DBase< T, PVType, FrameType >::z().

34  {
35 
36  float tsR = ts.globalParameters().position().perp();
37  float rhR = gp.perp();
38  float rDiff = tsR - rhR;
39  float rMin = theRMin;
40  float rMax = theRMax;
41  float myZ = gp.z();
42  if( (std::abs(myZ)> 70.f) & (std::abs(myZ)<170.f)) {
43  rMin = theRMinI;
44  rMax = theRMaxI;
45  }
46  if( rDiff >= rMax || rDiff <= rMin ) return std::pair<bool,double>(false,0.);
47 
48  float tsPhi = ts.globalParameters().position().barePhi();
49  float rhPhi = gp.barePhi();
50 
51  float myPhimin = thePhiMin;
52  float myPhimax = thePhiMax;
53 
54  float phiDiff = normalizedPhi(tsPhi - rhPhi);
55 
56  if ( (phiDiff < myPhimax) & (phiDiff > myPhimin) ) {
57  return std::pair<bool,double>(true,1.);
58  } else {
59  return std::pair<bool,double>(false,0.);
60  }
61 }
T perp() const
Definition: PV3DBase.h:72
constexpr T normalizedPhi(T phi)
Definition: normalizedPhi.h:9
T barePhi() const
Definition: PV3DBase.h:68
T z() const
Definition: PV3DBase.h:64
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]
const GlobalTrajectoryParameters & globalParameters() const
std::pair< bool, double > ForwardMeasurementEstimator::estimate ( const GlobalPoint vprim,
const TrajectoryStateOnSurface ts,
const GlobalPoint gp 
) const
virtual

Definition at line 64 of file ForwardMeasurementEstimator.cc.

References funct::abs(), PV3DBase< T, PVType, FrameType >::barePhi(), estimate(), f, TrajectoryStateOnSurface::globalParameters(), runTauDisplay::gp, normalizedPhi(), PV3DBase< T, PVType, FrameType >::perp(), GlobalTrajectoryParameters::position(), hfnoseDigiStudy_cfi::rMax, hfnoseDigiStudy_cfi::rMin, thePhiMax, thePhiMin, theRMax, theRMaxI, theRMin, theRMinI, and PV3DBase< T, PVType, FrameType >::z().

67  {
68  GlobalVector ts = absolute_ts.globalParameters().position() - vprim ;
69  GlobalVector gp = absolute_gp - vprim ;
70 
71  float rhR = gp.perp();
72  float tsR = ts.perp();
73  float rDiff = rhR - tsR;
74  float rMin = theRMin;
75  float rMax = theRMax;
76  float myZ = gp.z();
77  if( (std::abs(myZ)> 70.f) & (std::abs(myZ)<170.f) ) {
78  rMin = theRMinI;
79  rMax = theRMaxI;
80  }
81 
82  if( (rDiff >= rMax) | (rDiff <= rMin) ) return std::pair<bool,double>(false,0.);
83 
84  float tsPhi = ts.barePhi();
85  float rhPhi = gp.barePhi();
86 
87  float myPhimin = thePhiMin;
88  float myPhimax = thePhiMax;
89 
90  float phiDiff = normalizedPhi(rhPhi - tsPhi) ;
91 
92  if ( phiDiff < myPhimax && phiDiff > myPhimin )
93  { return std::pair<bool,double>(true,1.) ; }
94  else
95  { return std::pair<bool,double>(false,0.) ; }
96 }
T perp() const
Definition: PV3DBase.h:72
constexpr T normalizedPhi(T phi)
Definition: normalizedPhi.h:9
T barePhi() const
Definition: PV3DBase.h:68
T z() const
Definition: PV3DBase.h:64
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]
const GlobalTrajectoryParameters & globalParameters() const
bool ForwardMeasurementEstimator::estimate ( const TrajectoryStateOnSurface ts,
const BoundPlane plane 
) const
override

Definition at line 99 of file ForwardMeasurementEstimator.cc.

References funct::abs(), funct::false, TrajectoryStateOnSurface::globalParameters(), maximalLocalDisplacement(), Geom::phiLess(), GlobalTrajectoryParameters::position(), diffTwoXMLs::r1, diffTwoXMLs::r2, rangesIntersect(), thePhiMax, thePhiMin, funct::true, x, and y.

101  {
102  typedef std::pair<float,float> Range ;
103 
104  GlobalPoint trajPos(ts.globalParameters().position());
105 
106  float r1 = 0.;
107  float r2 = 40.;
108 
109  Range trajRRange(trajPos.perp() - r1, trajPos.perp() + r2);
110  Range trajPhiRange(trajPos.phi() - std::abs(thePhiMin), trajPos.phi() + std::abs(thePhiMax));
111 
112  if(rangesIntersect(trajRRange, plane.rSpan()) &&
113  rangesIntersect(trajPhiRange, plane.phiSpan(), [](auto x,auto y){ return Geom::phiLess(x, y);}))
114  { return true ; }
115  else
116  { return false ; }
117 }
PixelRecoRange< float > Range
bool rangesIntersect(const Range &a, const Range &b)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool phiLess(float phi1, float phi2)
Definition: VectorUtil.h:23
const GlobalTrajectoryParameters & globalParameters() const
MeasurementEstimator::Local2DVector ForwardMeasurementEstimator::maximalLocalDisplacement ( const TrajectoryStateOnSurface ts,
const BoundPlane plane 
) const
override

Definition at line 121 of file ForwardMeasurementEstimator.cc.

References TrajectoryStateOnSurface::hasError(), TrajectoryStateOnSurface::localError(), d0_phi_analyzer_cff::nSigmaCut, LocalTrajectoryError::positionError(), mathSSE::sqrt(), LocalError::xx(), and LocalError::yy().

Referenced by clone(), and estimate().

123  {
124  float nSigmaCut = 3.;
125  if ( ts.hasError())
126  {
127  LocalError le = ts.localError().positionError();
128  return Local2DVector( std::sqrt(le.xx())*nSigmaCut, std::sqrt(le.yy())*nSigmaCut);
129  }
130  else
131  return Local2DVector(999999,999999) ;
132  }
float xx() const
Definition: LocalError.h:24
LocalError positionError() const
float yy() const
Definition: LocalError.h:26
Vector2DBase< float, LocalTag > Local2DVector
T sqrt(T t)
Definition: SSEVec.h:18
const LocalTrajectoryError & localError() const
void ForwardMeasurementEstimator::setPhiRange ( float  dummyphiMin,
float  dummyphiMax 
)
inline

Definition at line 37 of file ForwardMeasurementEstimator.h.

References thePhiMax, and thePhiMin.

void ForwardMeasurementEstimator::setRRange ( float  rmin,
float  rmax 
)
inline

Definition at line 39 of file ForwardMeasurementEstimator.h.

References theRMax, and theRMin.

void ForwardMeasurementEstimator::setRRangeI ( float  rmin,
float  rmax 
)
inline

Member Data Documentation

float ForwardMeasurementEstimator::thePhiMax
private

Definition at line 59 of file ForwardMeasurementEstimator.h.

Referenced by estimate(), and setPhiRange().

float ForwardMeasurementEstimator::thePhiMin
private

Definition at line 58 of file ForwardMeasurementEstimator.h.

Referenced by estimate(), and setPhiRange().

float ForwardMeasurementEstimator::theRMax
private

Definition at line 61 of file ForwardMeasurementEstimator.h.

Referenced by estimate(), and setRRange().

float ForwardMeasurementEstimator::theRMaxI
private

Definition at line 63 of file ForwardMeasurementEstimator.h.

Referenced by estimate(), and setRRangeI().

float ForwardMeasurementEstimator::theRMin
private

Definition at line 60 of file ForwardMeasurementEstimator.h.

Referenced by estimate(), and setRRange().

float ForwardMeasurementEstimator::theRMinI
private

Definition at line 62 of file ForwardMeasurementEstimator.h.

Referenced by estimate(), and setRRangeI().