#include <RecoTracker/TkTrackingRegions/interface/OuterHitCompatibility.h>
Public Member Functions | |
bool | checkPhi (const float &phi, const float &r) const |
OuterHitCompatibility * | clone () const |
bool | operator() (const TrackingRecHit *hit, const edm::EventSetup &iSetup) const |
bool | operator() (const TransientTrackingRecHit *hit) const |
OuterHitCompatibility (const OuterHitCompatibility &ohc) | |
OuterHitCompatibility (const OuterHitPhiPrediction &phiPrediction, const HitRZCompatibility &rzCompatibility) | |
~OuterHitCompatibility () | |
Protected Attributes | |
OuterHitPhiPrediction | thePhiPrediction |
const HitRZCompatibility * | theRZCompatibility |
The phi and r-z are checked in independent way. The phi of a RecHit hit is tested if it is in the range defined by OuterHitPhiPrediction. The r-z checking is done with a help of HitRZCompatibility checker
Definition at line 16 of file OuterHitCompatibility.h.
OuterHitCompatibility::OuterHitCompatibility | ( | const OuterHitPhiPrediction & | phiPrediction, | |
const HitRZCompatibility & | rzCompatibility | |||
) | [inline] |
Definition at line 19 of file OuterHitCompatibility.h.
References HitRZCompatibility::clone(), and theRZCompatibility.
Referenced by clone().
00022 : thePhiPrediction(phiPrediction) 00023 { theRZCompatibility = rzCompatibility.clone(); }
OuterHitCompatibility::OuterHitCompatibility | ( | const OuterHitCompatibility & | ohc | ) | [inline] |
Definition at line 25 of file OuterHitCompatibility.h.
References HitRZCompatibility::clone(), and theRZCompatibility.
00026 : thePhiPrediction(ohc.thePhiPrediction) 00027 { theRZCompatibility = ohc.theRZCompatibility->clone(); }
OuterHitCompatibility::~OuterHitCompatibility | ( | ) | [inline] |
Definition at line 29 of file OuterHitCompatibility.h.
References theRZCompatibility.
00030 { delete theRZCompatibility; }
bool OuterHitCompatibility::checkPhi | ( | const float & | phi, | |
const float & | r | |||
) | const |
Definition at line 44 of file OuterHitCompatibility.cc.
References PixelRecoRange< T >::max(), PixelRecoRange< T >::min(), and thePhiPrediction.
Referenced by operator()().
00045 { 00046 OuterHitPhiPrediction::Range hitPhiRange = thePhiPrediction(r); 00047 PhiLess less; 00048 bool phiOK = less(hitPhiRange.min(),phi) && less(phi,hitPhiRange.max()); 00049 return phiOK; 00050 }
OuterHitCompatibility* OuterHitCompatibility::clone | ( | void | ) | const [inline] |
Definition at line 38 of file OuterHitCompatibility.h.
References OuterHitCompatibility().
00038 { 00039 return new OuterHitCompatibility(*this); 00040 }
bool OuterHitCompatibility::operator() | ( | const TrackingRecHit * | hit, | |
const edm::EventSetup & | iSetup | |||
) | const |
Definition at line 27 of file OuterHitCompatibility.cc.
References checkPhi(), TrackingRecHit::geographicalId(), edm::EventSetup::get(), TrackingRecHit::localPosition(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), theRZCompatibility, tmp, and PV3DBase< T, PVType, FrameType >::z().
00028 { 00029 edm::ESHandle<TrackerGeometry> tracker; 00030 iSetup.get<TrackerDigiGeometryRecord>().get(tracker); 00031 DetId tmp=hit->geographicalId(); 00032 GlobalPoint hitPos = tracker->idToDet(tmp)->surface().toGlobal(hit->localPosition()); 00033 float hitR = hitPos.perp(); 00034 float hitPhi = hitPos.phi(); 00035 00036 if ( !checkPhi(hitPhi, hitR) ) return 0; 00037 00038 float hitZ = hitPos.z(); 00039 if ( !(*theRZCompatibility)(hitR,hitZ) ) return 0; 00040 00041 return 1; 00042 }
bool OuterHitCompatibility::operator() | ( | const TransientTrackingRecHit * | hit | ) | const |
Definition at line 12 of file OuterHitCompatibility.cc.
References checkPhi(), TransientTrackingRecHit::globalPosition(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), theRZCompatibility, and PV3DBase< T, PVType, FrameType >::z().
00013 { 00014 GlobalPoint hitPos = hit->globalPosition(); 00015 float hitR = hitPos.perp(); 00016 float hitPhi = hitPos.phi(); 00017 00018 if ( !checkPhi(hitPhi, hitR) ) return 0; 00019 00020 float hitZ = hitPos.z(); 00021 if ( !(*theRZCompatibility)(hitR,hitZ) ) return 0; 00022 00023 return 1; 00024 }
const HitRZCompatibility* OuterHitCompatibility::theRZCompatibility [protected] |
Definition at line 43 of file OuterHitCompatibility.h.
Referenced by operator()(), OuterHitCompatibility(), and ~OuterHitCompatibility().