#include <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 |
test compatibility of RecHit. 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().
: thePhiPrediction(phiPrediction) { theRZCompatibility = rzCompatibility.clone(); }
OuterHitCompatibility::OuterHitCompatibility | ( | const OuterHitCompatibility & | ohc | ) | [inline] |
Definition at line 25 of file OuterHitCompatibility.h.
References HitRZCompatibility::clone(), and theRZCompatibility.
: thePhiPrediction(ohc.thePhiPrediction) { theRZCompatibility = ohc.theRZCompatibility->clone(); }
OuterHitCompatibility::~OuterHitCompatibility | ( | ) | [inline] |
Definition at line 29 of file OuterHitCompatibility.h.
References theRZCompatibility.
{ 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(), phi, and thePhiPrediction.
Referenced by operator()().
{ OuterHitPhiPrediction::Range hitPhiRange = thePhiPrediction(r); PhiLess less; bool phiOK = less(hitPhiRange.min(),phi) && less(phi,hitPhiRange.max()); return phiOK; }
OuterHitCompatibility* OuterHitCompatibility::clone | ( | void | ) | const [inline] |
Definition at line 38 of file OuterHitCompatibility.h.
References OuterHitCompatibility().
{ return new OuterHitCompatibility(*this); }
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().
{ GlobalPoint hitPos = hit->globalPosition(); float hitR = hitPos.perp(); float hitPhi = hitPos.phi(); if ( !checkPhi(hitPhi, hitR) ) return 0; float hitZ = hitPos.z(); if ( !(*theRZCompatibility)(hitR,hitZ) ) return 0; return 1; }
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, patCandidatesForDimuonsSequences_cff::tracker, and PV3DBase< T, PVType, FrameType >::z().
{ edm::ESHandle<TrackerGeometry> tracker; iSetup.get<TrackerDigiGeometryRecord>().get(tracker); DetId tmp=hit->geographicalId(); GlobalPoint hitPos = tracker->idToDet(tmp)->surface().toGlobal(hit->localPosition()); float hitR = hitPos.perp(); float hitPhi = hitPos.phi(); if ( !checkPhi(hitPhi, hitR) ) return 0; float hitZ = hitPos.z(); if ( !(*theRZCompatibility)(hitR,hitZ) ) return 0; return 1; }
Definition at line 44 of file OuterHitCompatibility.h.
Referenced by checkPhi().
const HitRZCompatibility* OuterHitCompatibility::theRZCompatibility [protected] |
Definition at line 43 of file OuterHitCompatibility.h.
Referenced by operator()(), OuterHitCompatibility(), and ~OuterHitCompatibility().