CMS 3D CMS Logo

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

#include <ConversionForwardEstimator.h>

Inheritance diagram for ConversionForwardEstimator:
MeasurementEstimator

Public Member Functions

ConversionForwardEstimatorclone () const override
 
 ConversionForwardEstimator ()
 
 ConversionForwardEstimator (float phiRangeMin, float phiRangeMax, float dr, double nSigma=3.)
 
bool estimate (const TrajectoryStateOnSurface &ts, const Plane &plane) const override
 
std::pair< bool, double > estimate (const TrajectoryStateOnSurface &ts, const TrackingRecHit &hit) const override
 
Local2DVector maximalLocalDisplacement (const TrajectoryStateOnSurface &ts, const Plane &plane) const override
 
double nSigmaCut () const
 
- 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 dr_
 
double theNSigma
 
float thePhiRangeMax
 
float thePhiRangeMin
 

Additional Inherited Members

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

Detailed Description

Defines the search area in the forward

Author
Nancy Marinelli, U. of Notre Dame, US

Definition at line 20 of file ConversionForwardEstimator.h.

Constructor & Destructor Documentation

◆ ConversionForwardEstimator() [1/2]

ConversionForwardEstimator::ConversionForwardEstimator ( )
inline

Definition at line 22 of file ConversionForwardEstimator.h.

22 {};

Referenced by clone().

◆ ConversionForwardEstimator() [2/2]

ConversionForwardEstimator::ConversionForwardEstimator ( float  phiRangeMin,
float  phiRangeMax,
float  dr,
double  nSigma = 3. 
)
inline

Definition at line 23 of file ConversionForwardEstimator.h.

24  : thePhiRangeMin(phiRangeMin), thePhiRangeMax(phiRangeMax), dr_(dr), theNSigma(nSigma) {
25  //std::cout << " ConversionForwardEstimator CTOR " << std::endl;
26  }

Member Function Documentation

◆ clone()

ConversionForwardEstimator* ConversionForwardEstimator::clone ( void  ) const
inlineoverridevirtual

Implements MeasurementEstimator.

Definition at line 31 of file ConversionForwardEstimator.h.

31 { return new ConversionForwardEstimator(*this); }

References ConversionForwardEstimator().

◆ estimate() [1/2]

bool ConversionForwardEstimator::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.

◆ estimate() [2/2]

std::pair< bool, double > ConversionForwardEstimator::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 ConversionForwardEstimator.cc.

10  {
11  LogDebug("ConversionForwardEstimator")
12  << "ConversionForwardEstimator::estimate( const TrajectoryStateOnSurface& ts ...) "
13  << "\n";
14  // std::cout << "ConversionForwardEstimator::estimate( const TrajectoryStateOnSurface& ts ...) " << "\n";
15 
16  std::pair<bool, double> result;
17 
18  float tsPhi = ts.globalParameters().position().phi();
19  GlobalPoint gp = hit.globalPosition();
20  float rhPhi = gp.phi();
21  float rhR = gp.perp();
22 
23  // allow an r fudge of 1.5 * times the sigma
24  // nodt used float dr = 1.5 * hit.localPositionError().yy();
25  //std::cout << " err " << hit.globalPositionError().phierr(gp)
26  // << " " << hit.globalPositionError().rerr(gp) << std::endl;
27 
28  // not used float zLayer = ts.globalParameters().position().z();
29  float rLayer = ts.globalParameters().position().perp();
30 
31  float newdr = sqrt(pow(dr_, 2) + 4. * hit.localPositionError().yy());
32  float rMin = rLayer - newdr;
33  float rMax = rLayer + newdr;
34  float phiDiff = tsPhi - rhPhi;
35  if (phiDiff > pi)
36  phiDiff -= twopi;
37  if (phiDiff < -pi)
38  phiDiff += twopi;
39 
40  //std::cout << " ConversionForwardEstimator: RecHit at " << gp << "\n";
41  //std::cout << " rMin = " << rMin << ", rMax = " << rMax << ", rHit = " << rhR << "\n";
42  //std::cout << " thePhiRangeMin = " << thePhiRangeMin << ", thePhiRangeMax = " << thePhiRangeMax << ", phiDiff = " << phiDiff << "\n";
43 
44  if (phiDiff < thePhiRangeMax && phiDiff > thePhiRangeMin && rhR < rMax && rhR > rMin) {
45  // std::cout << " estimator returns 1 with phiDiff " << thePhiRangeMin << " < " << phiDiff << " < "
46  // << thePhiRangeMax << " and rhR " << rMin << " < " << rhR << " < " << rMax << "\n";
47  //std::cout << " YES " << phiDiff << " " <<rLayer-rhR << "\n";
48  //std::cout << " => RECHIT ACCEPTED " << "\n";
49 
50  result.first = true;
51  result.second = phiDiff;
52  } else {
53  /*
54  cout << " estimator returns 0 with phiDiff " << thePhiRangeMin << " < " << phiDiff << " < "
55  << thePhiRangeMax << " and rhR " << rMin << " < " << rhR << " < " << rMax << endl;
56  */
57  result.first = false;
58  result.second = 0;
59  }
60 
61  return result;
62 }

References dr_, TrajectoryStateOnSurface::globalParameters(), runTauDisplay::gp, LogDebug, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), pi, GlobalTrajectoryParameters::position(), funct::pow(), mps_fire::result, photonAnalyzer_cfi::rMax, photonAnalyzer_cfi::rMin, mathSSE::sqrt(), and thePhiRangeMin.

◆ maximalLocalDisplacement()

MeasurementEstimator::Local2DVector ConversionForwardEstimator::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 73 of file ConversionForwardEstimator.cc.

74  {
75  /*
76  if ( ts.hasError() ) {
77  LocalError le = ts.localError().positionError();
78  std::cout << " ConversionForwardEstimator::maximalLocalDisplacent local error " << sqrt(le.xx()) << " " << sqrt(le.yy()) << " nSigma " << nSigmaCut() << " sqrt(le.xx())*nSigmaCut() " << sqrt(le.xx())*nSigmaCut() << " sqrt(le.yy())*nSigmaCut() " << sqrt(le.yy())*nSigmaCut() << std::endl;
79  return Local2DVector( sqrt(le.xx())*nSigmaCut(), sqrt(le.yy())*nSigmaCut());
80 
81  }
82  else return Local2DVector(99999,99999);
83  */
84 
85  return Local2DVector(99999, 99999);
86 }

◆ nSigmaCut()

double ConversionForwardEstimator::nSigmaCut ( ) const
inline

Definition at line 35 of file ConversionForwardEstimator.h.

35 { return theNSigma; }

References theNSigma.

Member Data Documentation

◆ dr_

float ConversionForwardEstimator::dr_
private

Definition at line 40 of file ConversionForwardEstimator.h.

Referenced by estimate().

◆ theNSigma

double ConversionForwardEstimator::theNSigma
private

Definition at line 41 of file ConversionForwardEstimator.h.

Referenced by nSigmaCut().

◆ thePhiRangeMax

float ConversionForwardEstimator::thePhiRangeMax
private

Definition at line 39 of file ConversionForwardEstimator.h.

◆ thePhiRangeMin

float ConversionForwardEstimator::thePhiRangeMin
private

Definition at line 38 of file ConversionForwardEstimator.h.

Referenced by estimate().

photonAnalyzer_cfi.rMax
rMax
Definition: photonAnalyzer_cfi.py:91
GlobalTrajectoryParameters::position
GlobalPoint position() const
Definition: GlobalTrajectoryParameters.h:60
ConversionForwardEstimator::ConversionForwardEstimator
ConversionForwardEstimator()
Definition: ConversionForwardEstimator.h:22
ConversionForwardEstimator::thePhiRangeMin
float thePhiRangeMin
Definition: ConversionForwardEstimator.h:38
ConversionForwardEstimator::dr_
float dr_
Definition: ConversionForwardEstimator.h:40
MeasurementEstimator::Local2DVector
Vector2DBase< float, LocalTag > Local2DVector
Definition: MeasurementEstimator.h:26
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
Point3DBase< float, GlobalTag >
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
ConversionForwardEstimator::theNSigma
double theNSigma
Definition: ConversionForwardEstimator.h:41
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
photonAnalyzer_cfi.rMin
rMin
Definition: photonAnalyzer_cfi.py:90
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
mps_fire.result
result
Definition: mps_fire.py:311
pi
const Double_t pi
Definition: trackSplitPlot.h:36
TrajectoryStateOnSurface::globalParameters
const GlobalTrajectoryParameters & globalParameters() const
Definition: TrajectoryStateOnSurface.h:64
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
HLTSiStripMonitoring_cff.nSigma
nSigma
Definition: HLTSiStripMonitoring_cff.py:151
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
hit
Definition: SiStripHitEffFromCalibTree.cc:88
ConversionForwardEstimator::thePhiRangeMax
float thePhiRangeMax
Definition: ConversionForwardEstimator.h:39