CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
OuterHitCompatibility.cc
Go to the documentation of this file.
6 
11 
13 {
14  GlobalPoint hitPos = hit->globalPosition();
15  float hitR = hitPos.perp();
16  float hitPhi = hitPos.phi();
17 
18  if ( !checkPhi(hitPhi, hitR) ) return 0;
19 
20  float hitZ = hitPos.z();
21  if ( !(*theRZCompatibility)(hitR,hitZ) ) return 0;
22 
23  return 1;
24 }
25 
26 
28 {
30  iSetup.get<TrackerDigiGeometryRecord>().get(tracker);
31  DetId tmp=hit->geographicalId();
32  GlobalPoint hitPos = tracker->idToDet(tmp)->surface().toGlobal(hit->localPosition());
33  float hitR = hitPos.perp();
34  float hitPhi = hitPos.phi();
35 
36  if ( !checkPhi(hitPhi, hitR) ) return 0;
37 
38  float hitZ = hitPos.z();
39  if ( !(*theRZCompatibility)(hitR,hitZ) ) return 0;
40 
41  return 1;
42 }
43 
44 bool OuterHitCompatibility::checkPhi(const float & phi, const float & r) const
45 {
47  PhiLess less;
48  bool phiOK = less(hitPhiRange.min(),phi) && less(phi,hitPhiRange.max());
49  return phiOK;
50 }
51 
T perp() const
Definition: PV3DBase.h:71
T max() const
Geom::Phi< T > phi() const
Definition: PV3DBase.h:68
T min() const
OuterHitPhiPrediction thePhiPrediction
const HitRZCompatibility * theRZCompatibility
bool operator()(const TransientTrackingRecHit *hit) const
T z() const
Definition: PV3DBase.h:63
Definition: DetId.h:20
const T & get() const
Definition: EventSetup.h:55
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
virtual GlobalPoint globalPosition() const
bool checkPhi(const float &phi, const float &r) const
DetId geographicalId() const
virtual LocalPoint localPosition() const =0
Definition: DDAxes.h:10