CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
ThirdHitRZPrediction< Propagator > Class Template Reference

#include <ThirdHitRZPrediction.h>

Inheritance diagram for ThirdHitRZPrediction< Propagator >:
ThirdHitRZPredictionBase

Public Member Functions

void initPropagator (const Propagator *propagator)
 
Range operator() (const DetLayer *layer=nullptr)
 
Range operator() (float rORz) const
 
Range operator() (float rORz, const Propagator &propagator) const
 
 ThirdHitRZPrediction ()
 
 ThirdHitRZPrediction (const Propagator *propagator, float tolerance, const DetLayer *layer=nullptr)
 
- Public Member Functions inherited from ThirdHitRZPredictionBase
const RangedetRange () const
 
const RangedetSize () const
 
void initLayer (const DetLayer *layer)
 
void initTolerance (float tolerance)
 
 ThirdHitRZPredictionBase ()
 
 ThirdHitRZPredictionBase (float tolerance, const DetLayer *layer=nullptr)
 

Private Member Functions

float transform (const Propagator &propagator, float rOrZ) const
 

Private Attributes

const PropagatorthePropagator
 

Additional Inherited Members

- Public Types inherited from ThirdHitRZPredictionBase
typedef TkTrackingRegionsMargin< float > Margin
 
typedef PixelRecoRange< float > Range
 
- Protected Attributes inherited from ThirdHitRZPredictionBase
bool theBarrel
 
Range theDetRange
 
Range theDetSize
 
bool theForward
 
Margin theTolerance
 

Detailed Description

template<class Propagator>
class ThirdHitRZPrediction< Propagator >

predicts a range in r-z for the position of third hit. the predicted reange is defined by the template argument, which is a straight line extrapolation/interpolation if PixelRecoLineRZ is used.

Definition at line 14 of file ThirdHitRZPrediction.h.

Constructor & Destructor Documentation

◆ ThirdHitRZPrediction() [1/2]

template<class Propagator>
ThirdHitRZPrediction< Propagator >::ThirdHitRZPrediction ( )
inline

Definition at line 16 of file ThirdHitRZPrediction.h.

◆ ThirdHitRZPrediction() [2/2]

template<class Propagator>
ThirdHitRZPrediction< Propagator >::ThirdHitRZPrediction ( const Propagator propagator,
float  tolerance,
const DetLayer layer = nullptr 
)
inline

Member Function Documentation

◆ initPropagator()

template<class Propagator>
void ThirdHitRZPrediction< Propagator >::initPropagator ( const Propagator propagator)
inline

◆ operator()() [1/3]

template<class Propagator >
ThirdHitRZPrediction< Propagator >::Range ThirdHitRZPrediction< Propagator >::operator() ( const DetLayer layer = nullptr)
inline

Definition at line 35 of file ThirdHitRZPrediction.h.

35  {
36  if (layer)
38  if (!theBarrel && !theForward)
39  return Range(0., 0.);
40  float v1 = transform(*thePropagator, theDetRange.min());
41  float v2 = transform(*thePropagator, theDetRange.max());
42  if (v1 > v2)
43  std::swap(v1, v2);
44  return Range(v1 - theTolerance.left(), v2 + theTolerance.right());
45 }

References phase1PixelTopology::layer, std::swap(), and HcalDetIdTransform::transform().

◆ operator()() [2/3]

template<class Propagator>
Range ThirdHitRZPrediction< Propagator >::operator() ( float  rORz) const
inline

Definition at line 21 of file ThirdHitRZPrediction.h.

21 { return (*this)(rORz, *thePropagator); }

References ThirdHitRZPrediction< Propagator >::thePropagator.

◆ operator()() [3/3]

template<class Propagator >
ThirdHitRZPrediction< Propagator >::Range ThirdHitRZPrediction< Propagator >::operator() ( float  rORz,
const Propagator propagator 
) const
inline

Definition at line 48 of file ThirdHitRZPrediction.h.

49  {
50  float v = transform(propagator, rOrZ);
51  return Range(v - theTolerance.left(), v + theTolerance.right());
52 }

References TrackCandidateProducer_cfi::propagator, HcalDetIdTransform::transform(), and findQualityFiles::v.

◆ transform()

template<class Propagator>
float ThirdHitRZPrediction< Propagator >::transform ( const Propagator propagator,
float  rOrZ 
) const
inlineprivate

Definition at line 27 of file ThirdHitRZPrediction.h.

27  {
28  return theBarrel ? propagator.zAtR(rOrZ) : propagator.rAtZ(rOrZ);
29  }

References TrackCandidateProducer_cfi::propagator, and ThirdHitRZPredictionBase::theBarrel.

Member Data Documentation

◆ thePropagator

template<class Propagator>
const Propagator* ThirdHitRZPrediction< Propagator >::thePropagator
private
ThirdHitRZPredictionBase::initLayer
void initLayer(const DetLayer *layer)
Definition: ThirdHitRZPredictionBase.cc:17
findQualityFiles.v
v
Definition: findQualityFiles.py:179
ThirdHitRZPredictionBase::Range
PixelRecoRange< float > Range
Definition: ThirdHitRZPredictionBase.h:20
PixelRecoRange::min
T min() const
Definition: PixelRecoRange.h:25
TkTrackingRegionsMargin::left
const T & left() const
Definition: TkTrackingRegionsMargin.h:18
TrackCandidateProducer_cfi.propagator
propagator
Definition: TrackCandidateProducer_cfi.py:17
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
ThirdHitRZPredictionBase::theDetRange
Range theDetRange
Definition: ThirdHitRZPredictionBase.h:34
PixelRecoRange::max
T max() const
Definition: PixelRecoRange.h:26
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
ThirdHitRZPredictionBase::theBarrel
bool theBarrel
Definition: ThirdHitRZPredictionBase.h:33
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:29
TkTrackingRegionsMargin::right
const T & right() const
Definition: TkTrackingRegionsMargin.h:19
ThirdHitRZPredictionBase::ThirdHitRZPredictionBase
ThirdHitRZPredictionBase()
Definition: ThirdHitRZPredictionBase.cc:9
ThirdHitRZPredictionBase::theForward
bool theForward
Definition: ThirdHitRZPredictionBase.h:33
ThirdHitRZPrediction::transform
float transform(const Propagator &propagator, float rOrZ) const
Definition: ThirdHitRZPrediction.h:27
ThirdHitRZPredictionBase::theTolerance
Margin theTolerance
Definition: ThirdHitRZPredictionBase.h:35
ThirdHitRZPrediction::thePropagator
const Propagator * thePropagator
Definition: ThirdHitRZPrediction.h:31